-
-
Notifications
You must be signed in to change notification settings - Fork 667
/
Copy pathconsole.release.wat
386 lines (386 loc) · 10.6 KB
/
console.release.wat
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
(module
(type $0 (func (param i32)))
(type $1 (func (param i32 i32)))
(type $2 (func))
(type $3 (func (param i32 i32 i32 i32)))
(import "env" "console.assert" (func $~lib/bindings/dom/console.assert (param i32 i32)))
(import "env" "console.log" (func $~lib/bindings/dom/console.log (param i32)))
(import "env" "console.debug" (func $~lib/bindings/dom/console.debug (param i32)))
(import "env" "console.info" (func $~lib/bindings/dom/console.info (param i32)))
(import "env" "console.warn" (func $~lib/bindings/dom/console.warn (param i32)))
(import "env" "console.error" (func $~lib/bindings/dom/console.error (param i32)))
(import "env" "console.time" (func $~lib/bindings/dom/console.time (param i32)))
(import "env" "console.timeLog" (func $~lib/bindings/dom/console.timeLog (param i32)))
(import "env" "console.timeEnd" (func $~lib/bindings/dom/console.timeEnd (param i32)))
(import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32)))
(global $~lib/memory/__stack_pointer (mut i32) (i32.const 34380))
(memory $0 1)
(data $0 (i32.const 1036) "\1c")
(data $0.1 (i32.const 1048) "\02\00\00\00\0c\00\00\00w\00h\00o\00o\00p\00s")
(data $1 (i32.const 1068) "\1c")
(data $1.1 (i32.const 1080) "\02\00\00\00\08\00\00\00p\00h\00e\00w")
(data $2 (i32.const 1100) ",")
(data $2.1 (i32.const 1112) "\02\00\00\00\12\00\00\00h\00e\00l\00l\00o\00 \00l\00o\00g")
(data $3 (i32.const 1148) ",")
(data $3.1 (i32.const 1160) "\02\00\00\00\16\00\00\00h\00e\00l\00l\00o\00 \00d\00e\00b\00u\00g")
(data $4 (i32.const 1196) ",")
(data $4.1 (i32.const 1208) "\02\00\00\00\14\00\00\00h\00e\00l\00l\00o\00 \00i\00n\00f\00o")
(data $5 (i32.const 1244) ",")
(data $5.1 (i32.const 1256) "\02\00\00\00\14\00\00\00h\00e\00l\00l\00o\00 \00w\00a\00r\00n")
(data $6 (i32.const 1292) ",")
(data $6.1 (i32.const 1304) "\02\00\00\00\16\00\00\00h\00e\00l\00l\00o\00 \00e\00r\00r\00o\00r")
(data $7 (i32.const 1340) ",")
(data $7.1 (i32.const 1352) "\02\00\00\00\12\00\00\00s\00o\00m\00e\00L\00a\00b\00e\00l")
(data $8 (i32.const 1388) ",")
(data $8.1 (i32.const 1400) "\02\00\00\00\14\00\00\00w\00r\00o\00n\00g\00L\00a\00b\00e\00l")
(data $9 (i32.const 1436) ",")
(data $9.1 (i32.const 1448) "\02\00\00\00\1c\00\00\00d\00u\00p\00l\00i\00c\00a\00t\00e\00L\00a\00b\00e\00l")
(data $10 (i32.const 1484) "\1c")
(data $10.1 (i32.const 1496) "\02\00\00\00\02\00\00\001")
(data $11 (i32.const 1516) "\1c")
(data $11.1 (i32.const 1528) "\02\00\00\00\04\00\00\001\002")
(data $12 (i32.const 1548) "\1c")
(data $12.1 (i32.const 1560) "\02\00\00\00\06\00\00\001\002\003")
(data $13 (i32.const 1580) "\1c")
(data $13.1 (i32.const 1592) "\02\00\00\00\08\00\00\001\002\003\004")
(export "memory" (memory $0))
(start $~start)
(func $~start
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
global.set $~lib/memory/__stack_pointer
block $folding-inner0
global.get $~lib/memory/__stack_pointer
i32.const 1612
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
i32.const 0
i32.store
global.get $~lib/memory/__stack_pointer
i32.const 1056
i32.store
i32.const 0
i32.const 1056
call $~lib/console/console.assert<bool>
global.get $~lib/memory/__stack_pointer
i32.const 1088
i32.store
i32.const 1
i32.const 1088
call $~lib/console/console.assert<bool>
global.get $~lib/memory/__stack_pointer
i32.const 1120
i32.store
i32.const 1120
call $~lib/console/console.log
global.get $~lib/memory/__stack_pointer
i32.const 1168
i32.store
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
i32.const 1612
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
i32.const 0
i32.store
global.get $~lib/memory/__stack_pointer
i32.const 1168
i32.store
i32.const 1168
call $~lib/bindings/dom/console.debug
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
i32.const 1216
i32.store
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
i32.const 1612
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
i32.const 0
i32.store
global.get $~lib/memory/__stack_pointer
i32.const 1216
i32.store
i32.const 1216
call $~lib/bindings/dom/console.info
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
i32.const 1264
i32.store
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
i32.const 1612
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
i32.const 0
i32.store
global.get $~lib/memory/__stack_pointer
i32.const 1264
i32.store
i32.const 1264
call $~lib/bindings/dom/console.warn
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
i32.const 1312
i32.store
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
i32.const 1612
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
i32.const 0
i32.store
global.get $~lib/memory/__stack_pointer
i32.const 1312
i32.store
i32.const 1312
call $~lib/bindings/dom/console.error
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
i32.const 1360
i32.store
i32.const 1360
call $~lib/console/console.time
global.get $~lib/memory/__stack_pointer
i32.const 1360
i32.store
i32.const 1360
call $~lib/console/console.timeLog
global.get $~lib/memory/__stack_pointer
i32.const 1360
i32.store
i32.const 1360
call $~lib/console/console.timeEnd
global.get $~lib/memory/__stack_pointer
i32.const 1408
i32.store
i32.const 1408
call $~lib/console/console.timeLog
global.get $~lib/memory/__stack_pointer
i32.const 1408
i32.store
i32.const 1408
call $~lib/console/console.timeEnd
global.get $~lib/memory/__stack_pointer
i32.const 1456
i32.store
i32.const 1456
call $~lib/console/console.time
global.get $~lib/memory/__stack_pointer
i32.const 1456
i32.store
i32.const 1456
call $~lib/console/console.time
global.get $~lib/memory/__stack_pointer
i32.const 1504
i32.store
i32.const 1504
call $~lib/console/console.log
global.get $~lib/memory/__stack_pointer
i32.const 1536
i32.store
i32.const 1536
call $~lib/console/console.log
global.get $~lib/memory/__stack_pointer
i32.const 1568
i32.store
i32.const 1568
call $~lib/console/console.log
global.get $~lib/memory/__stack_pointer
i32.const 1600
i32.store
i32.const 1600
call $~lib/console/console.log
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
return
end
i32.const 34400
i32.const 34448
i32.const 1
i32.const 1
call $~lib/builtins/abort
unreachable
)
(func $~lib/console/console.assert<bool> (param $0 i32) (param $1 i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
i32.const 1612
i32.lt_s
if
i32.const 34400
i32.const 34448
i32.const 1
i32.const 1
call $~lib/builtins/abort
unreachable
end
global.get $~lib/memory/__stack_pointer
i32.const 0
i32.store
global.get $~lib/memory/__stack_pointer
local.get $1
i32.store
local.get $0
i32.const 0
i32.ne
local.get $1
call $~lib/bindings/dom/console.assert
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
)
(func $~lib/console/console.log (param $0 i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
i32.const 1612
i32.lt_s
if
i32.const 34400
i32.const 34448
i32.const 1
i32.const 1
call $~lib/builtins/abort
unreachable
end
global.get $~lib/memory/__stack_pointer
i32.const 0
i32.store
global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
local.get $0
call $~lib/bindings/dom/console.log
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
)
(func $~lib/console/console.time (param $0 i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
i32.const 1612
i32.lt_s
if
i32.const 34400
i32.const 34448
i32.const 1
i32.const 1
call $~lib/builtins/abort
unreachable
end
global.get $~lib/memory/__stack_pointer
i32.const 0
i32.store
global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
local.get $0
call $~lib/bindings/dom/console.time
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
)
(func $~lib/console/console.timeLog (param $0 i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
i32.const 1612
i32.lt_s
if
i32.const 34400
i32.const 34448
i32.const 1
i32.const 1
call $~lib/builtins/abort
unreachable
end
global.get $~lib/memory/__stack_pointer
i32.const 0
i32.store
global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
local.get $0
call $~lib/bindings/dom/console.timeLog
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
)
(func $~lib/console/console.timeEnd (param $0 i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
i32.const 1612
i32.lt_s
if
i32.const 34400
i32.const 34448
i32.const 1
i32.const 1
call $~lib/builtins/abort
unreachable
end
global.get $~lib/memory/__stack_pointer
i32.const 0
i32.store
global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
local.get $0
call $~lib/bindings/dom/console.timeEnd
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
)
)