doc: update assembly language syntax
This commit is contained in:
36
doc/sample/Data.iasm
Normal file
36
doc/sample/Data.iasm
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
@constpool
|
||||||
|
#0: "Received "
|
||||||
|
#1: ", "
|
||||||
|
#2: @ident(cout)
|
||||||
|
#3: @selector(-put:)
|
||||||
|
#4: @atom(years)
|
||||||
|
#5: @atom(months)
|
||||||
|
#6: @atom(days)
|
||||||
|
#7: @ident(_.Person_exampleProperty_get)
|
||||||
|
#8: @ident(_.Person_exampleProperty_set)
|
||||||
|
#9: @ident(_.Person_exampleProperty3_get)
|
||||||
|
#10: @ident(_.Person_exampleProperty3_set)
|
||||||
|
#11: @ident(_.Person_exampleProperty4_get)
|
||||||
|
#12: #42
|
||||||
|
#13: @ident(net.doorstuck.test.Person)
|
||||||
|
#13: @ident(net.doorstuck.test.Vehicle)
|
||||||
|
#14: @selector(-init(name:age:))
|
||||||
|
#15: @selector(-test(param:_:))
|
||||||
|
#16: @selector(-name)
|
||||||
|
#17: @selector(-age)
|
||||||
|
#18: @selector(-ageInMonths)
|
||||||
|
#19: @selector(-setName:)
|
||||||
|
#20: @selector(-setAge:)
|
||||||
|
#21: @selector(-setAge:inUnits:)
|
||||||
|
#22: @selector(-getAgeInUnits:)
|
||||||
|
#23: @ident(std.io)
|
||||||
|
#24: @ident(exampleProperty)
|
||||||
|
#25: @ident(exampleProperty2)
|
||||||
|
#26: @ident(exampleProperty3)
|
||||||
|
#27: @ident(exampleProperty4)
|
||||||
|
#28: @ident(name)
|
||||||
|
#29: @ident(age)
|
||||||
|
#30: @ident(val)
|
||||||
|
#31: @ident(__exampleProperty3)
|
||||||
|
#32: @ident(__exampleProperty4)
|
||||||
|
@end
|
||||||
@@ -1,79 +1,96 @@
|
|||||||
@constpool
|
@constpool
|
||||||
#0: "Received "
|
#0: "Received "
|
||||||
#1: ", "
|
#1: ", "
|
||||||
#2: @ident[cout]
|
#2: @ident(cout)
|
||||||
#3: @selector[-put:]
|
#3: @selector(-put:)
|
||||||
#4: @atom[years]
|
#4: @atom(years)
|
||||||
#5: @atom[months]
|
#5: @atom(months)
|
||||||
#6: @atom[days]
|
#6: @atom(days)
|
||||||
#7: @ident[_.Person_exampleProperty_get]
|
#7: @ident(_.Person_exampleProperty_get)
|
||||||
#8: @ident[_.Person_exampleProperty_set]
|
#8: @ident(_.Person_exampleProperty_set)
|
||||||
#9: @ident[_.Person_exampleProperty3_get]
|
#9: @ident(_.Person_exampleProperty3_get)
|
||||||
#10: @ident[_.Person_exampleProperty3_set]
|
#10: @ident(_.Person_exampleProperty3_set)
|
||||||
#11: @ident[_.Person_exampleProperty4_get]
|
#11: @ident(_.Person_exampleProperty4_get)
|
||||||
#12: #42
|
#12: #42
|
||||||
#13: @ident[#13]
|
#13: @ident(net.doorstuck.test.Person)
|
||||||
#14: @selector[-init(name:age:)]
|
#14: @selector(-init(name:age:))
|
||||||
#15: @selector[-test(param:_:)]
|
#15: @selector(-test(param:_:))
|
||||||
#16: @selector[-name]
|
#16: @selector(-name)
|
||||||
#17: @selector[-age]
|
#17: @selector(-age)
|
||||||
#18: @selector[-ageInMonths]
|
#18: @selector(-ageInMonths)
|
||||||
#19: @selector[-setName:]
|
#19: @selector(-setName:)
|
||||||
#20: @selector[-setAge:]
|
#20: @selector(-setAge:)
|
||||||
#21: @selector[-setAge:inUnits:]
|
#21: @selector(-setAge:inUnits:)
|
||||||
#22: @selector[-getAgeInUnits:]
|
#22: @selector(-getAgeInUnits:)
|
||||||
#23: @ident[std.io]
|
#23: @ident(std.io)
|
||||||
#24: @ident[exampleProperty]
|
#24: @ident(exampleProperty)
|
||||||
#25: @ident[exampleProperty2]
|
#25: @ident(exampleProperty2)
|
||||||
#26: @ident[exampleProperty3]
|
#26: @ident(exampleProperty3)
|
||||||
#27: @ident[exampleProperty4]
|
#27: @ident(exampleProperty4)
|
||||||
|
#28: @ident(name)
|
||||||
|
#29: @ident(age)
|
||||||
|
#30: @ident(val)
|
||||||
|
#31: @ident(__exampleProperty3)
|
||||||
|
#32: @ident(__exampleProperty4)
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@import [package:#23]
|
@import
|
||||||
|
@package[ident:#23]
|
||||||
|
@end
|
||||||
|
|
||||||
@lambda [ident:#7]
|
@block [index:#1009]
|
||||||
ldr x0, [self, #2]
|
ldr x0, [self, #2]
|
||||||
ret
|
ret
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@lambda [ident:#8]
|
@block [index:#1010]
|
||||||
ldr x0, [bp, #-1]
|
ldr x0, [bp, #-1]
|
||||||
str x0, [self, #2]
|
str x0, [self, #2]
|
||||||
|
|
||||||
ret
|
ret
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@lambda [ident:#9]
|
@block [index:#1011]
|
||||||
ldr x0, [self, #3]
|
ldr x0, [self, #3]
|
||||||
ret
|
ret
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@lambda [ident:#10]
|
@block [index:#1012]
|
||||||
ldr x0, [bp, #-1]
|
ldr x0, [bp, #-1]
|
||||||
str x0, [self, #3]
|
str x0, [self, #3]
|
||||||
|
|
||||||
ret
|
ret
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@lambda [ident:#11]
|
@block [index:#1013]
|
||||||
ldr x0, [self, #4]
|
ldr x0, [self, #4]
|
||||||
ret
|
ret
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@class [ident:#13]
|
@class [ident:#13]
|
||||||
@property[ident:#24 get:#7 set:#8]
|
@property[ident:#24 get:#1009 set:#1010]
|
||||||
@property[ident:#25 get:#12]
|
@property[ident:#25 get:#1013]
|
||||||
@property[ident:#26 set:#10]
|
@property[ident:#26 set:#1011]
|
||||||
@property[ident:#27 get:#11]
|
@property[ident:#27 get:#1012]
|
||||||
|
|
||||||
#0: name
|
@var[index:#0 ident:#28]
|
||||||
#1: age
|
@var[index:#1 ident:#29]
|
||||||
#2: val
|
@var[index:#2 ident:#30]
|
||||||
#3: __exampleProperty3
|
@var[index:#3 ident:#31]
|
||||||
#4: __exampleProperty4
|
@var[index:#4 ident:#32]
|
||||||
|
|
||||||
|
@msgh[selector:#14 block:#1000]
|
||||||
|
@msgh[selector:#15 block:#1001]
|
||||||
|
@msgh[selector:#16 block:#1002]
|
||||||
|
@msgh[selector:#17 block:#1003]
|
||||||
|
@msgh[selector:#18 block:#1004]
|
||||||
|
@msgh[selector:#19 block:#1005]
|
||||||
|
@msgh[selector:#20 block:#1006]
|
||||||
|
@msgh[selector:#21 block:#1007]
|
||||||
|
@msgh[selector:#22 block:#1008]
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@msgh [recipient:#13 selector:#14]
|
@block [index:#1000]
|
||||||
ldr x0, [bp, #-1]
|
ldr x0, [bp, #-1]
|
||||||
str x0, [self, #0]
|
str x0, [self, #0]
|
||||||
|
|
||||||
@@ -83,7 +100,7 @@
|
|||||||
ret.n
|
ret.n
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@msgh [recipient:#13 selector:#15]
|
@msgh [index:#1001]
|
||||||
ldr x0, [pool, #0]
|
ldr x0, [pool, #0]
|
||||||
|
|
||||||
ldr x1, [bp, #-1]
|
ldr x1, [bp, #-1]
|
||||||
@@ -105,17 +122,17 @@
|
|||||||
ret.n
|
ret.n
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@msgh [recipient:#13 selector:#16]
|
@msgh [index:#1002]
|
||||||
ldr x0, [self, #0]
|
ldr x0, [self, #0]
|
||||||
ret
|
ret
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@msgh [recipient:#13 selector:#17]
|
@msgh [index:#1003]
|
||||||
ldr x0, [self, #1]
|
ldr x0, [self, #1]
|
||||||
ret
|
ret
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@msgh [recipient:#13 selector:#18]
|
@msgh [index:#1004]
|
||||||
ldr x0, [self, #1]
|
ldr x0, [self, #1]
|
||||||
ldr x1, #12
|
ldr x1, #12
|
||||||
|
|
||||||
@@ -124,21 +141,21 @@
|
|||||||
ret
|
ret
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@msgh [recipient:#13 selector:#19]
|
@msgh [index:#1005]
|
||||||
ldr x0, [bp, #-1]
|
ldr x0, [bp, #-1]
|
||||||
str x0, [self, #0]
|
str x0, [self, #0]
|
||||||
|
|
||||||
ret.n
|
ret.n
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@msgh [recipient:#13 selector:#20]
|
@msgh [index:#1006]
|
||||||
ldr x0, [bp, #-1]
|
ldr x0, [bp, #-1]
|
||||||
str x0, [self, #1]
|
str x0, [self, #1]
|
||||||
|
|
||||||
ret.n
|
ret.n
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@msgh [recipient:#13 selector:#21]
|
@msgh [index:#1007]
|
||||||
ldr x0, [bp, #-1]
|
ldr x0, [bp, #-1]
|
||||||
ldr x1, [bp, #-2]
|
ldr x1, [bp, #-2]
|
||||||
|
|
||||||
@@ -175,7 +192,7 @@ L0004:
|
|||||||
ret.n
|
ret.n
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@msgh [recipient:#13 selector:#22]
|
@msgh [index:#1008]
|
||||||
ldr x1, [bp, #-1] ; x1 = units
|
ldr x1, [bp, #-1] ; x1 = units
|
||||||
|
|
||||||
ldr x2, [pool, #4] ; x2 = #years
|
ldr x2, [pool, #4] ; x2 = #years
|
||||||
|
|||||||
Reference in New Issue
Block a user