2024-12-09 20:38:36 +00:00
|
|
|
@constpool
|
|
|
|
|
#0: "Received "
|
|
|
|
|
#1: ", "
|
2024-12-13 12:26:53 +00:00
|
|
|
#2: @ident(cout)
|
|
|
|
|
#3: @selector(-put:)
|
|
|
|
|
#4: @atom(years)
|
|
|
|
|
#5: @atom(months)
|
|
|
|
|
#6: @atom(days)
|
2024-12-09 20:38:36 +00:00
|
|
|
#12: #42
|
2024-12-13 12:26:53 +00:00
|
|
|
#13: @ident(net.doorstuck.test.Person)
|
|
|
|
|
#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
|
|
|
|
|
|
|
|
|
|
@import
|
|
|
|
|
@package[ident:#23]
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
@block [index:#1009]
|
2024-11-05 13:23:16 +00:00
|
|
|
ldr x0, [self, #2]
|
|
|
|
|
ret
|
|
|
|
|
@end
|
|
|
|
|
|
2024-12-13 12:26:53 +00:00
|
|
|
@block [index:#1010]
|
2024-11-05 13:23:16 +00:00
|
|
|
ldr x0, [bp, #-1]
|
|
|
|
|
str x0, [self, #2]
|
|
|
|
|
|
|
|
|
|
ret
|
|
|
|
|
@end
|
|
|
|
|
|
2024-12-13 12:26:53 +00:00
|
|
|
@block [index:#1011]
|
2024-11-05 22:17:36 +00:00
|
|
|
ldr x0, [self, #3]
|
|
|
|
|
ret
|
2024-11-05 13:23:16 +00:00
|
|
|
@end
|
|
|
|
|
|
2024-12-13 12:26:53 +00:00
|
|
|
@block [index:#1012]
|
2024-11-05 22:17:36 +00:00
|
|
|
ldr x0, [bp, #-1]
|
|
|
|
|
str x0, [self, #3]
|
2024-11-05 13:23:16 +00:00
|
|
|
|
2024-11-05 22:17:36 +00:00
|
|
|
ret
|
2024-11-05 13:23:16 +00:00
|
|
|
@end
|
|
|
|
|
|
2024-12-13 12:26:53 +00:00
|
|
|
@block [index:#1013]
|
2024-11-05 22:17:36 +00:00
|
|
|
ldr x0, [self, #4]
|
|
|
|
|
ret
|
|
|
|
|
@end
|
2024-11-05 13:23:16 +00:00
|
|
|
|
2024-12-09 20:38:36 +00:00
|
|
|
@class [ident:#13]
|
2024-12-13 12:26:53 +00:00
|
|
|
@property[ident:#24 get:#1009 set:#1010]
|
|
|
|
|
@property[ident:#25 get:#1013]
|
|
|
|
|
@property[ident:#26 set:#1011]
|
|
|
|
|
@property[ident:#27 get:#1012]
|
|
|
|
|
|
|
|
|
|
@var[index:#0 ident:#28]
|
|
|
|
|
@var[index:#1 ident:#29]
|
|
|
|
|
@var[index:#2 ident:#30]
|
|
|
|
|
@var[index:#3 ident:#31]
|
|
|
|
|
@var[index:#4 ident:#32]
|
2024-12-14 21:57:55 +00:00
|
|
|
|
2024-12-13 12:26:53 +00:00
|
|
|
@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
|
|
|
|
|
|
|
|
|
|
@block [index:#1000]
|
2024-11-05 13:23:16 +00:00
|
|
|
ldr x0, [bp, #-1]
|
|
|
|
|
str x0, [self, #0]
|
|
|
|
|
|
|
|
|
|
ldr x0, [bp, #-2]
|
|
|
|
|
str x0, [self, #1]
|
|
|
|
|
|
|
|
|
|
ret.n
|
|
|
|
|
@end
|
2024-11-05 22:17:36 +00:00
|
|
|
|
2024-12-14 21:57:55 +00:00
|
|
|
@block [index:#1001]
|
2024-11-08 13:24:37 +00:00
|
|
|
ldr x0, [pool, #0]
|
2024-11-05 22:17:36 +00:00
|
|
|
|
2024-11-08 13:24:37 +00:00
|
|
|
ldr x1, [bp, #-1]
|
|
|
|
|
add x0, x1, x0
|
|
|
|
|
|
|
|
|
|
ldr x1, [pool, #1]
|
|
|
|
|
add x0, x1, x0
|
|
|
|
|
|
|
|
|
|
ldr x1, [bp, #-2]
|
|
|
|
|
add x0, x1, x0
|
|
|
|
|
|
|
|
|
|
push x0
|
|
|
|
|
|
|
|
|
|
ldr x1, [pool, #2]
|
|
|
|
|
ldr x2, [pool, #3]
|
|
|
|
|
|
|
|
|
|
msg x1, x2, #1
|
|
|
|
|
|
|
|
|
|
ret.n
|
|
|
|
|
@end
|
|
|
|
|
|
2024-12-14 21:57:55 +00:00
|
|
|
@block [index:#1002]
|
2024-11-08 13:24:37 +00:00
|
|
|
ldr x0, [self, #0]
|
|
|
|
|
ret
|
|
|
|
|
@end
|
|
|
|
|
|
2024-12-14 21:57:55 +00:00
|
|
|
@block [index:#1003]
|
2024-11-08 13:24:37 +00:00
|
|
|
ldr x0, [self, #1]
|
|
|
|
|
ret
|
|
|
|
|
@end
|
|
|
|
|
|
2024-12-14 21:57:55 +00:00
|
|
|
@block [index:#1004]
|
2024-11-08 13:24:37 +00:00
|
|
|
ldr x0, [self, #1]
|
|
|
|
|
ldr x1, #12
|
|
|
|
|
|
|
|
|
|
mul x0, x1, x0
|
|
|
|
|
|
|
|
|
|
ret
|
|
|
|
|
@end
|
|
|
|
|
|
2024-12-14 21:57:55 +00:00
|
|
|
@block [index:#1005]
|
2024-11-08 13:24:37 +00:00
|
|
|
ldr x0, [bp, #-1]
|
|
|
|
|
str x0, [self, #0]
|
|
|
|
|
|
|
|
|
|
ret.n
|
|
|
|
|
@end
|
|
|
|
|
|
2024-12-14 21:57:55 +00:00
|
|
|
@block [index:#1006]
|
2024-11-08 13:24:37 +00:00
|
|
|
ldr x0, [bp, #-1]
|
|
|
|
|
str x0, [self, #1]
|
|
|
|
|
|
|
|
|
|
ret.n
|
|
|
|
|
@end
|
|
|
|
|
|
2024-12-14 21:57:55 +00:00
|
|
|
@block [index:#1007]
|
2024-11-08 13:24:37 +00:00
|
|
|
ldr x0, [bp, #-1]
|
|
|
|
|
ldr x1, [bp, #-2]
|
|
|
|
|
|
|
|
|
|
ldr x2, [pool, #4]
|
2024-12-15 22:37:05 +00:00
|
|
|
c.eq x1, x2
|
|
|
|
|
br.t L0001
|
2024-11-08 13:24:37 +00:00
|
|
|
|
|
|
|
|
ldr x2, [pool, #5]
|
2024-12-15 22:37:05 +00:00
|
|
|
c.eq x1, x2
|
|
|
|
|
br.t L0002
|
2024-11-08 13:24:37 +00:00
|
|
|
|
|
|
|
|
ldr x2, [pool, #6]
|
2024-12-15 22:37:05 +00:00
|
|
|
c.eq x1, x2
|
|
|
|
|
br.t L0003
|
2024-11-08 13:24:37 +00:00
|
|
|
|
|
|
|
|
ldr x0, #0
|
|
|
|
|
str x0, [self, #1]
|
|
|
|
|
|
|
|
|
|
br L0004
|
|
|
|
|
|
|
|
|
|
L0001: str x0, [self, #2]
|
|
|
|
|
br L0004
|
|
|
|
|
|
|
|
|
|
L0002: ldr x3, #12
|
|
|
|
|
div x3, x0, x3
|
|
|
|
|
str x3, [self, #2]
|
|
|
|
|
br L0004
|
|
|
|
|
|
|
|
|
|
L0003: ldr x3, #365
|
|
|
|
|
div x3, x0, x3
|
|
|
|
|
str x3, [self, #2]
|
|
|
|
|
br L0004
|
|
|
|
|
L0004:
|
|
|
|
|
ret.n
|
|
|
|
|
@end
|
|
|
|
|
|
2024-12-14 21:57:55 +00:00
|
|
|
@block [index:#1008]
|
2024-11-08 13:24:37 +00:00
|
|
|
ldr x1, [bp, #-1] ; x1 = units
|
|
|
|
|
|
|
|
|
|
ldr x2, [pool, #4] ; x2 = #years
|
2024-12-15 22:37:05 +00:00
|
|
|
c.eq x1, x2
|
|
|
|
|
br.t L0001 ; [jump] if units == #years
|
2024-11-08 13:24:37 +00:00
|
|
|
|
|
|
|
|
ldr x2, [pool, #5] ; x2 = #months
|
2024-12-15 22:37:05 +00:00
|
|
|
c.eq x1, x2
|
|
|
|
|
br.t L0002 ; [jump] if units == #years
|
2024-11-08 13:24:37 +00:00
|
|
|
|
|
|
|
|
ldr x2, [pool, #6] ; x2 = #days
|
2024-12-15 22:37:05 +00:00
|
|
|
c.eq x1, x2
|
|
|
|
|
br.t L0003 ; [jump] if units == #days
|
2024-11-08 13:24:37 +00:00
|
|
|
|
|
|
|
|
ldr x0, #0 ; else
|
|
|
|
|
ret ; return 0
|
|
|
|
|
|
|
|
|
|
L0001: ldr x0, [self, #1] ; [code] if units == #years
|
|
|
|
|
ret ; return self.age
|
|
|
|
|
|
|
|
|
|
L0002: ldr x0, [self, #1] ; [code] if units == #months
|
|
|
|
|
ldr x1, #12
|
|
|
|
|
div x0, x1, x0
|
|
|
|
|
ret ; return self.age / 12
|
|
|
|
|
|
|
|
|
|
L0003: ldr x0, [self, #1] ; [code] if units == #months
|
|
|
|
|
ldr x1, #365
|
|
|
|
|
div x0, x1, x0
|
|
|
|
|
ret ; return self.age / 365
|
2024-11-05 22:17:36 +00:00
|
|
|
@end
|