-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQUOTE-TEST.j
162 lines (155 loc) · 3.37 KB
/
QUOTE-TEST.j
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
.class QUOTE-TEST
.super Procedure
.field private static final t LLispObject;
.field private static final literal_1 LLispObject;
.method static <clinit>()V
.limit locals 255
.limit stack 255
ldc_w "t"
invokestatic Symbol.intern(Ljava/lang/String;)LSymbol;
putstatic QUOTE-TEST/t LLispObject;
new Cons
dup
new LispChar
dup
bipush 87
invokenonvirtual LispChar.<init>(C)V
new Cons
dup
new Cons
dup
ldc_w "1231312312312312312312312312312313123"
invokestatic LispBignum.parse(Ljava.lang.String;)LLispBignum;
new LispFixnum
dup
ldc2_w 5343412914294967296
invokenonvirtual LispFixnum.<init>(J)V
invokenonvirtual Cons.<init>(LLispObject;LLispObject;)V
new Cons
dup
new Cons
dup
new LispFlonum
dup
;; jasmin lacks all sort of documentation on how to push a NaN double. Division by zero works as a work-around.
dconst_0
dconst_0
ddiv
invokenonvirtual LispFlonum.<init>(D)V
new Cons
dup
new LispFlonum
dup
;; hackaround for positive infinity
ldc2_w 1.0d
dconst_0
ddiv
invokenonvirtual LispFlonum.<init>(D)V
new Cons
dup
new LispFlonum
dup
;; hackaround for negative infinity
ldc2_w -1.0d
dconst_0
ddiv
invokenonvirtual LispFlonum.<init>(D)V
aconst_null
invokenonvirtual Cons.<init>(LLispObject;LLispObject;)V
invokenonvirtual Cons.<init>(LLispObject;LLispObject;)V
invokenonvirtual Cons.<init>(LLispObject;LLispObject;)V
new Cons
dup
ldc_w "b"
invokestatic Symbol.intern(Ljava.lang.String;)LSymbol;
new Cons
dup
new LispArray
dup
ldc_w 4
anewarray LispObject
dup
ldc_w 3
new Cons
dup
new LispFixnum
dup
ldc2_w 1
invokenonvirtual LispFixnum.<init>(J)V
new Cons
dup
new LispFixnum
dup
ldc2_w 2
invokenonvirtual LispFixnum.<init>(J)V
new Cons
dup
new LispFixnum
dup
ldc2_w 3
invokenonvirtual LispFixnum.<init>(J)V
aconst_null
invokenonvirtual Cons.<init>(LLispObject;LLispObject;)V
invokenonvirtual Cons.<init>(LLispObject;LLispObject;)V
invokenonvirtual Cons.<init>(LLispObject;LLispObject;)V
aastore
dup
ldc_w 2
ldc_w "fisk"
invokestatic Symbol.intern(Ljava.lang.String;)LSymbol;
aastore
dup
ldc_w 1
ldc_w "din"
invokestatic Symbol.intern(Ljava.lang.String;)LSymbol;
aastore
dup
ldc_w 0
ldc_w "hej"
invokestatic Symbol.intern(Ljava.lang.String;)LSymbol;
aastore
invokenonvirtual LispArray.<init>([LLispObject;)V
new Cons
dup
new LispString
dup
ldc_w "potatismossa"
invokenonvirtual LispString.<init>(Ljava.lang.String;)V
new LispFlonum
dup
ldc2_w 12.4d
invokenonvirtual LispFlonum.<init>(D)V
invokenonvirtual Cons.<init>(LLispObject;LLispObject;)V
invokenonvirtual Cons.<init>(LLispObject;LLispObject;)V
invokenonvirtual Cons.<init>(LLispObject;LLispObject;)V
invokenonvirtual Cons.<init>(LLispObject;LLispObject;)V
invokenonvirtual Cons.<init>(LLispObject;LLispObject;)V
invokenonvirtual Cons.<init>(LLispObject;LLispObject;)V
putstatic QUOTE-TEST/literal_1 LLispObject;
return
.end method
.method public <init>()V
.limit stack 2
.limit locals 1
aload_0
ldc "QUOTE-TEST"
invokenonvirtual Procedure.<init>(Ljava/lang/String;)V
return
.end method
.method public run([LLispObject;)LLispObject;
.limit stack 255
.limit locals 255
;; (lambda (a) (cons a (quote (#\W (1231312312312312312312312312312313123 . 5343412914294967296) (NaN Infinity -Infinity) b #(hej din fisk (1 2 3)) "potatismossa" . 12.4))))
aload_1
ldc_w 0
aaload
astore 5
Lselftail:
new Cons
dup
aload 5
getstatic QUOTE-TEST/literal_1 LLispObject;
invokenonvirtual Cons.<init>(LLispObject;LLispObject;)V
areturn
;; endlambda
.end method