diff --git a/package-lock.json b/package-lock.json index 1cf7d8084d..184f4f2e12 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1163,9 +1163,9 @@ "optional": true }, "binaryen": { - "version": "97.0.0-nightly.20200919", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-97.0.0-nightly.20200919.tgz", - "integrity": "sha512-BqKZxONTh53SVl2QUqVidoSo/nvL6FMKUG21SvB6V46M1Y6EbJrXES5Nt2c9XYveWpJjA297zIoxTUdI/PMDSA==" + "version": "97.0.0-nightly.20200929", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-97.0.0-nightly.20200929.tgz", + "integrity": "sha512-HQ7VTISqwfVOylWJAE2jIyhuO5zrxTD2Vvc0cwtXTUqfmlbZdt/Z0vxUZD+uFYHRLM0p9ddJc7RPVGsvPI2oEQ==" }, "bluebird": { "version": "3.7.2", diff --git a/package.json b/package.json index 790cf11f27..ea2fdc2d33 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/AssemblyScript/assemblyscript/issues" }, "dependencies": { - "binaryen": "97.0.0-nightly.20200919", + "binaryen": "97.0.0-nightly.20200929", "long": "^4.0.0", "source-map-support": "^0.5.19", "ts-node": "^6.2.0" diff --git a/src/module.ts b/src/module.ts index a265f28b20..c2093b252c 100644 --- a/src/module.ts +++ b/src/module.ts @@ -105,12 +105,12 @@ export enum ExpressionId { RefNull = 40 /* _BinaryenRefNullId */, RefIsNull = 41 /* _BinaryenRefIsNullId */, RefFunc = 42 /* _BinaryenRefFuncId */, - Try = 43 /* _BinaryenTryId */, - Throw = 44 /* _BinaryenThrowId */, - Rethrow = 45 /* _BinaryenRethrowId */, - BrOnExn = 46 /* _BinaryenBrOnExnId */, - TupleMake = 47 /* _BinaryenTupleMakeId */, - TupleExtract = 48 /* _BinaryenTupleExtractId */ + Try = 44 /* _BinaryenTryId */, + Throw = 45 /* _BinaryenThrowId */, + Rethrow = 46 /* _BinaryenRethrowId */, + BrOnExn = 47 /* _BinaryenBrOnExnId */, + TupleMake = 48 /* _BinaryenTupleMakeId */, + TupleExtract = 49 /* _BinaryenTupleExtractId */ } export enum UnaryOp { @@ -249,8 +249,8 @@ export enum BinaryOp { OrI32 = 8 /* _BinaryenOrInt32 */, XorI32 = 9 /* _BinaryenXorInt32 */, ShlI32 = 10 /* _BinaryenShlInt32 */, - ShrU32 = 11 /* _BinaryenShrUInt32 */, - ShrI32 = 12 /* _BinaryenShrSInt32 */, + ShrI32 = 11 /* _BinaryenShrSInt32 */, + ShrU32 = 12 /* _BinaryenShrUInt32 */, RotlI32 = 13 /* _BinaryenRotLInt32 */, RotrI32 = 14 /* _BinaryenRotRInt32 */, EqI32 = 15 /* _BinaryenEqInt32 */, @@ -274,8 +274,8 @@ export enum BinaryOp { OrI64 = 33 /* _BinaryenOrInt64 */, XorI64 = 34 /* _BinaryenXorInt64 */, ShlI64 = 35 /* _BinaryenShlInt64 */, - ShrU64 = 36 /* _BinaryenShrUInt64 */, - ShrI64 = 37 /* _BinaryenShrSInt64 */, + ShrI64 = 36 /* _BinaryenShrSInt64 */, + ShrU64 = 37 /* _BinaryenShrUInt64 */, RotlI64 = 38 /* _BinaryenRotLInt64 */, RotrI64 = 39 /* _BinaryenRotRInt64 */, EqI64 = 40 /* _BinaryenEqInt64 */, diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 1e188883b7..9eaec6027b 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -3274,7 +3274,7 @@ i64.const 9223372036854775807 i64.and i64.const 52 - i64.shr_s + i64.shr_u i64.const 1045 i64.sub local.tee $2 @@ -3383,12 +3383,12 @@ local.get $6 i64.mul i64.add - local.get $1 - i64.const 32 - i64.shr_u local.get $2 i64.const 32 i64.shr_s + local.get $1 + i64.const 32 + i64.shr_u i64.mul local.tee $4 local.get $9 @@ -3997,7 +3997,7 @@ end local.get $2 i32.const 23 - i32.shr_s + i32.shr_u i32.const 152 i32.sub local.tee $1 @@ -5578,7 +5578,7 @@ local.set $9 local.get $10 i32.const 1533 - i32.gt_s + i32.gt_u if (result f64) f64.const 5260135901548373507240989e186 local.set $9 @@ -5592,7 +5592,7 @@ else local.get $6 i32.const 573 - i32.lt_s + i32.lt_u if (result f64) f64.const 1.90109156629516e-211 local.set $9 @@ -7188,7 +7188,7 @@ i32.const 1 local.get $9 i32.const 2146435072 - i32.gt_s + i32.gt_u i32.const 1 local.get $18 i32.const 0 @@ -7214,19 +7214,19 @@ if (result i32) local.get $9 i32.const 1128267776 - i32.ge_s + i32.ge_u if (result i32) i32.const 2 else local.get $9 i32.const 1072693248 - i32.ge_s + i32.ge_u if (result i32) i32.const 52 i32.const 20 local.get $9 i32.const 20 - i32.shr_s + i32.shr_u i32.const 1023 i32.sub local.tee $11 @@ -7429,11 +7429,11 @@ local.set $10 local.get $9 i32.const 1105199104 - i32.gt_s + i32.gt_u if (result f64) local.get $9 i32.const 1139802112 - i32.gt_s + i32.gt_u if local.get $4 i32.const 1072693247 @@ -7825,7 +7825,7 @@ i32.const 2147483647 i32.and i32.const 1083231232 - i32.ge_s + i32.ge_u i32.const 0 local.get $5 local.get $12 @@ -7846,7 +7846,7 @@ i32.and local.tee $11 i32.const 20 - i32.shr_s + i32.shr_u i32.const 1023 i32.sub local.set $5 @@ -7869,7 +7869,7 @@ i32.const 2147483647 i32.and i32.const 20 - i32.shr_s + i32.shr_u i32.const 1023 i32.sub local.tee $5 @@ -9424,7 +9424,7 @@ end local.get $2 i32.const 23 - i32.shr_s + i32.shr_u i32.const 152 i32.sub local.tee $1 @@ -9806,7 +9806,7 @@ i32.const 2147483647 i32.and i32.const 1072010280 - i32.ge_s + i32.ge_u local.tee $7 if f64.const 0.7853981633974483 @@ -9992,7 +9992,7 @@ i32.and local.tee $4 i32.const 1072243195 - i32.le_s + i32.le_u if local.get $4 i32.const 1044381696 @@ -10276,7 +10276,7 @@ end local.get $2 i32.const 23 - i32.shr_s + i32.shr_u i32.const 152 i32.sub local.tee $1 diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 242a26ef06..362ee9491f 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -2099,7 +2099,7 @@ i32.and local.tee $2 i32.const 65536 - i32.lt_s + i32.lt_u if local.get $10 local.get $11 @@ -2757,7 +2757,7 @@ i32.and local.tee $3 i32.const 65536 - i32.lt_s + i32.lt_u if local.get $10 local.get $11 diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 577660b0fb..dad96f2d68 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -2895,7 +2895,7 @@ i32.shr_u local.tee $0 i32.const 1 - i32.le_s + i32.le_u br_if $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 local.get $2 i32.load offset=4