Skip to content

Commit e049e72

Browse files
committed
Fix a few issues with TSD generation; Update Binaryen
1 parent 98a0aa8 commit e049e72

25 files changed

+3081
-2538
lines changed

dist/assemblyscript.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/assemblyscript.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
declare module ASModule {
2+
type i8 = number;
3+
type i16 = number;
4+
type i32 = number;
5+
type u8 = number;
6+
type u16 = number;
7+
type u32 = number;
8+
type f32 = number;
9+
type f64 = number;
10+
type bool = any;
11+
function init(width: i32, height: i32): void;
12+
function step(): void;
13+
function fill(x: u32, y: u32, p: f64): void;
14+
}
15+
export default ASModule;
4 Bytes
Binary file not shown.

examples/game-of-life/build/optimized.wat

Lines changed: 35 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@
171171
(get_global $assembly/index/h)
172172
)
173173
(block
174-
(set_local $4
174+
(set_local $5
175175
;;@ assembly/index.ts:53:14
176176
(if (result i32)
177177
(get_local $0)
@@ -185,7 +185,7 @@
185185
(get_local $7)
186186
)
187187
)
188-
(set_local $5
188+
(set_local $6
189189
;;@ assembly/index.ts:54:14
190190
(if (result i32)
191191
(i32.eq
@@ -233,10 +233,10 @@
233233
(i32.shl
234234
(i32.add
235235
(i32.mul
236-
(get_local $4)
236+
(get_local $5)
237237
(get_global $assembly/index/w)
238238
)
239-
(tee_local $3
239+
(tee_local $2
240240
;;@ assembly/index.ts:56:16
241241
(if (result i32)
242242
(get_local $1)
@@ -263,7 +263,7 @@
263263
(i32.shl
264264
(i32.add
265265
(i32.mul
266-
(get_local $4)
266+
(get_local $5)
267267
(get_global $assembly/index/w)
268268
)
269269
(get_local $1)
@@ -281,10 +281,10 @@
281281
(i32.shl
282282
(i32.add
283283
(i32.mul
284-
(get_local $4)
284+
(get_local $5)
285285
(get_global $assembly/index/w)
286286
)
287-
(tee_local $2
287+
(tee_local $3
288288
;;@ assembly/index.ts:57:16
289289
(if (result i32)
290290
(i32.eq
@@ -319,7 +319,7 @@
319319
(get_local $0)
320320
(get_global $assembly/index/w)
321321
)
322-
(get_local $3)
322+
(get_local $2)
323323
)
324324
(i32.const 2)
325325
)
@@ -337,7 +337,7 @@
337337
(get_local $0)
338338
(get_global $assembly/index/w)
339339
)
340-
(get_local $2)
340+
(get_local $3)
341341
)
342342
(i32.const 2)
343343
)
@@ -352,10 +352,10 @@
352352
(i32.shl
353353
(i32.add
354354
(i32.mul
355-
(get_local $5)
355+
(get_local $6)
356356
(get_global $assembly/index/w)
357357
)
358-
(get_local $3)
358+
(get_local $2)
359359
)
360360
(i32.const 2)
361361
)
@@ -370,7 +370,7 @@
370370
(i32.shl
371371
(i32.add
372372
(i32.mul
373-
(get_local $5)
373+
(get_local $6)
374374
(get_global $assembly/index/w)
375375
)
376376
(get_local $1)
@@ -388,10 +388,10 @@
388388
(i32.shl
389389
(i32.add
390390
(i32.mul
391-
(get_local $5)
391+
(get_local $6)
392392
(get_global $assembly/index/w)
393393
)
394-
(get_local $2)
394+
(get_local $3)
395395
)
396396
(i32.const 2)
397397
)
@@ -406,7 +406,7 @@
406406
;;@ assembly/index.ts:68:10
407407
(i32.and
408408
;;@ assembly/index.ts:67:6
409-
(tee_local $3
409+
(tee_local $4
410410
;;@ assembly/index.ts:15:9
411411
(i32.load
412412
;;@ assembly/index.ts:15:19
@@ -429,7 +429,7 @@
429429
;;@ assembly/index.ts:68:17
430430
(i32.const 1)
431431
)
432-
;;@ assembly/index.ts:70:8
432+
;;@ assembly/index.ts:68:20
433433
(if
434434
;;@ assembly/index.ts:70:12
435435
(i32.eq
@@ -462,13 +462,15 @@
462462
(tee_local $2
463463
(i32.sub
464464
(i32.shr_u
465-
(get_local $3)
465+
(get_local $4)
466466
(i32.const 24)
467467
)
468468
(get_global $assembly/index/BIT_ROT)
469469
)
470470
)
471-
(i32.const 0)
471+
(tee_local $3
472+
(i32.const 0)
473+
)
472474
(i32.gt_s
473475
(get_local $2)
474476
(i32.const 0)
@@ -477,7 +479,7 @@
477479
(i32.const 24)
478480
)
479481
(i32.and
480-
(get_local $3)
482+
(get_local $4)
481483
(i32.const 16777215)
482484
)
483485
)
@@ -504,7 +506,7 @@
504506
)
505507
)
506508
)
507-
;;@ assembly/index.ts:75:8
509+
;;@ assembly/index.ts:73:13
508510
(if
509511
;;@ assembly/index.ts:75:12
510512
(i32.eq
@@ -564,16 +566,18 @@
564566
(i32.sub
565567
(i32.shr_u
566568
;;@ assembly/index.ts:27:20
567-
(get_local $3)
569+
(get_local $4)
568570
;;@ assembly/index.ts:27:26
569571
(i32.const 24)
570572
)
571573
;;@ assembly/index.ts:27:32
572574
(get_global $assembly/index/BIT_ROT)
573575
)
574576
)
575-
;;@ assembly/index.ts:27:41
576-
(i32.const 0)
577+
(tee_local $3
578+
;;@ assembly/index.ts:27:41
579+
(i32.const 0)
580+
)
577581
(i32.gt_s
578582
(get_local $2)
579583
(i32.const 0)
@@ -585,7 +589,7 @@
585589
;;@ assembly/index.ts:28:24
586590
(i32.and
587591
;;@ assembly/index.ts:28:25
588-
(get_local $3)
592+
(get_local $4)
589593
;;@ assembly/index.ts:28:29
590594
(i32.const 16777215)
591595
)
@@ -629,7 +633,7 @@
629633
(get_global $assembly/index/w)
630634
)
631635
(block
632-
;;@ assembly/index.ts:86:4
636+
;;@ assembly/index.ts:85:33
633637
(if
634638
;;@ assembly/index.ts:86:8
635639
(f64.lt
@@ -673,20 +677,20 @@
673677
)
674678
)
675679
;;@ assembly/index.ts:88:7
676-
(set_local $1
680+
(set_local $3
677681
;;@ assembly/index.ts:88:16
678682
(i32.const 0)
679683
)
680684
(loop $continue|1
681685
(if
682686
;;@ assembly/index.ts:88:19
683687
(i32.lt_s
684-
(get_local $1)
688+
(get_local $3)
685689
;;@ assembly/index.ts:88:24
686690
(get_global $assembly/index/h)
687691
)
688692
(block
689-
;;@ assembly/index.ts:89:4
693+
;;@ assembly/index.ts:88:33
690694
(if
691695
;;@ assembly/index.ts:89:8
692696
(f64.lt
@@ -705,7 +709,7 @@
705709
(get_global $assembly/index/s)
706710
;;@ assembly/index.ts:21:18
707711
(i32.mul
708-
(get_local $1)
712+
(get_local $3)
709713
;;@ assembly/index.ts:21:22
710714
(get_global $assembly/index/w)
711715
)
@@ -725,10 +729,10 @@
725729
)
726730
)
727731
;;@ assembly/index.ts:88:27
728-
(set_local $1
732+
(set_local $3
729733
(i32.add
730734
;;@ assembly/index.ts:88:29
731-
(get_local $1)
735+
(get_local $3)
732736
(i32.const 1)
733737
)
734738
)

0 commit comments

Comments
 (0)