From c1828929a38c5df210880d8d6e06c7be8bf094dd Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Wed, 10 Nov 2021 15:53:33 +0200 Subject: [PATCH] fix --- src/compiler.ts | 10 +---- tests/compiler/binary.untouched.wat | 15 ++++--- tests/compiler/call-super.untouched.wat | 3 +- tests/compiler/class-implements.untouched.wat | 3 +- .../class-overloading-cast.untouched.wat | 3 +- .../compiler/class-overloading.untouched.wat | 3 +- tests/compiler/class.untouched.wat | 3 +- tests/compiler/constructor.untouched.wat | 3 +- tests/compiler/do.untouched.wat | 6 ++- .../empty-exportruntime.untouched.wat | 6 ++- tests/compiler/empty-new.untouched.wat | 3 +- tests/compiler/exports.untouched.wat | 3 +- .../exportstar-rereexport.untouched.wat | 3 +- .../extends-baseaggregate.untouched.wat | 3 +- .../compiler/extends-recursive.untouched.wat | 3 +- .../field-initialization.untouched.wat | 3 +- tests/compiler/field.untouched.wat | 6 ++- tests/compiler/for.untouched.wat | 6 ++- tests/compiler/function-call.untouched.wat | 3 +- .../function-expression.untouched.wat | 3 +- tests/compiler/getter-call.untouched.wat | 3 +- .../implicit-getter-setter.untouched.wat | 3 +- tests/compiler/infer-array.untouched.wat | 3 +- tests/compiler/infer-generic.untouched.wat | 3 +- tests/compiler/inlining.untouched.wat | 3 +- tests/compiler/instanceof-class.untouched.wat | 3 +- tests/compiler/issues/1095.untouched.wat | 3 +- tests/compiler/issues/1225.untouched.wat | 6 ++- tests/compiler/issues/1699.untouched.wat | 3 +- tests/compiler/logical.untouched.wat | 6 ++- tests/compiler/managed-cast.untouched.wat | 6 ++- tests/compiler/new.untouched.wat | 3 +- tests/compiler/number.untouched.wat | 3 +- tests/compiler/object-literal.untouched.wat | 6 ++- .../optional-typeparameters.untouched.wat | 3 +- tests/compiler/overflow.ts | 9 ++++ tests/compiler/overflow.untouched.wat | 26 +++++++++++ tests/compiler/reexport.untouched.wat | 3 +- tests/compiler/rereexport.untouched.wat | 3 +- tests/compiler/resolve-access.untouched.wat | 3 +- tests/compiler/resolve-binary.untouched.wat | 15 ++++--- .../resolve-elementaccess.untouched.wat | 3 +- .../resolve-function-expression.untouched.wat | 3 +- tests/compiler/resolve-nested.untouched.wat | 3 +- tests/compiler/resolve-new.untouched.wat | 3 +- .../resolve-propertyaccess.untouched.wat | 3 +- tests/compiler/resolve-ternary.untouched.wat | 3 +- tests/compiler/resolve-unary.untouched.wat | 3 +- tests/compiler/rt/finalize.untouched.wat | 6 ++- tests/compiler/rt/instanceof.untouched.wat | 3 +- .../runtime-incremental-export.untouched.wat | 6 ++- tests/compiler/std-wasi/console.untouched.wat | 3 +- tests/compiler/std-wasi/crypto.untouched.wat | 3 +- tests/compiler/std-wasi/process.untouched.wat | 3 +- .../compiler/std/array-literal.untouched.wat | 6 ++- tests/compiler/std/array.untouched.wat | 12 +++-- tests/compiler/std/arraybuffer.untouched.wat | 6 ++- tests/compiler/std/dataview.untouched.wat | 6 ++- tests/compiler/std/date.untouched.wat | 15 ++++--- tests/compiler/std/map.untouched.wat | 6 ++- tests/compiler/std/math.untouched.wat | 45 ++++++++++++------- tests/compiler/std/new.untouched.wat | 3 +- .../std/operator-overloading.untouched.wat | 3 +- tests/compiler/std/set.untouched.wat | 6 ++- tests/compiler/std/static-array.untouched.wat | 3 +- tests/compiler/std/staticarray.untouched.wat | 6 ++- .../std/string-casemapping.untouched.wat | 3 +- .../std/string-encoding.untouched.wat | 6 ++- tests/compiler/std/string.untouched.wat | 6 ++- tests/compiler/std/symbol.untouched.wat | 3 +- tests/compiler/std/typedarray.untouched.wat | 12 +++-- tests/compiler/std/uri.untouched.wat | 6 ++- tests/compiler/super-inline.untouched.wat | 3 +- tests/compiler/templateliteral.untouched.wat | 3 +- tests/compiler/throw.untouched.wat | 3 +- tests/compiler/typeof.untouched.wat | 3 +- tests/compiler/while.untouched.wat | 6 ++- 77 files changed, 289 insertions(+), 134 deletions(-) diff --git a/src/compiler.ts b/src/compiler.ts index a4c10db782..810998e7a1 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -3391,14 +3391,8 @@ export class Compiler extends DiagnosticEmitter { ): ExpressionRef { assert(element.is(CommonFlags.INLINED | CommonFlags.RESOLVED)); var type = element.type; - switch ( - !(constraints & (Constraints.CONV_IMPLICIT | Constraints.CONV_EXPLICIT)) && - type.isIntegerValue && - contextualType.isIntegerValue && - type.size < contextualType.size - ? (this.currentType = contextualType).kind // essentially precomputes a (sign-)extension - : (this.currentType = type).kind - ) { + this.currentType = type; + switch (type.kind) { case TypeKind.I8: case TypeKind.I16: { let shift = type.computeSmallIntegerShift(Type.i32); diff --git a/tests/compiler/binary.untouched.wat b/tests/compiler/binary.untouched.wat index ae76893ff6..4ba77b7887 100644 --- a/tests/compiler/binary.untouched.wat +++ b/tests/compiler/binary.untouched.wat @@ -722,10 +722,12 @@ local.set $11 local.get $11 i64.const 52 - i64.const 7 + i32.const 7 + i64.extend_i32_s i64.sub i64.shr_u - i64.const 127 + i32.const 127 + i64.extend_i32_s i64.and i32.wrap_i64 local.set $12 @@ -1048,7 +1050,8 @@ f64.add local.set $28 local.get $14 - i64.const 127 + i32.const 127 + i64.extend_i32_s i64.and i64.const 1 i64.shl @@ -1059,7 +1062,8 @@ i64.extend_i32_u i64.add i64.const 52 - i64.const 7 + i32.const 7 + i64.extend_i32_s i64.sub i64.shl local.set $13 @@ -2049,7 +2053,8 @@ i64.extend_i32_u i64.add i64.const 52 - i64.const 5 + i32.const 5 + i64.extend_i32_s i64.sub i64.shl i64.add diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index 446526b584..3cd4a32f81 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -1536,7 +1536,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/class-implements.untouched.wat b/tests/compiler/class-implements.untouched.wat index 104af54d85..3d1f967fd7 100644 --- a/tests/compiler/class-implements.untouched.wat +++ b/tests/compiler/class-implements.untouched.wat @@ -1546,7 +1546,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/class-overloading-cast.untouched.wat b/tests/compiler/class-overloading-cast.untouched.wat index c3df550ffc..1bcc0ca549 100644 --- a/tests/compiler/class-overloading-cast.untouched.wat +++ b/tests/compiler/class-overloading-cast.untouched.wat @@ -1546,7 +1546,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/class-overloading.untouched.wat b/tests/compiler/class-overloading.untouched.wat index 73b3ed7326..b77ff017c3 100644 --- a/tests/compiler/class-overloading.untouched.wat +++ b/tests/compiler/class-overloading.untouched.wat @@ -1552,7 +1552,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/class.untouched.wat b/tests/compiler/class.untouched.wat index 6fda41c809..e27fc15a42 100644 --- a/tests/compiler/class.untouched.wat +++ b/tests/compiler/class.untouched.wat @@ -1649,7 +1649,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index 2a90aead9b..e6cb986975 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -1548,7 +1548,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/do.untouched.wat b/tests/compiler/do.untouched.wat index 5780fd01a8..92a47f874d 100644 --- a/tests/compiler/do.untouched.wat +++ b/tests/compiler/do.untouched.wat @@ -1945,7 +1945,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u @@ -2928,7 +2929,8 @@ end global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/empty-exportruntime.untouched.wat b/tests/compiler/empty-exportruntime.untouched.wat index 6cfe1e0434..bcf84011f0 100644 --- a/tests/compiler/empty-exportruntime.untouched.wat +++ b/tests/compiler/empty-exportruntime.untouched.wat @@ -1542,7 +1542,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u @@ -2455,7 +2456,8 @@ end global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/empty-new.untouched.wat b/tests/compiler/empty-new.untouched.wat index 7d67affc28..8f30e3f8cd 100644 --- a/tests/compiler/empty-new.untouched.wat +++ b/tests/compiler/empty-new.untouched.wat @@ -1535,7 +1535,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index 6e2f615cd1..8d3f9103b0 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -1599,7 +1599,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/exportstar-rereexport.untouched.wat b/tests/compiler/exportstar-rereexport.untouched.wat index b1e2bafc65..b78191f004 100644 --- a/tests/compiler/exportstar-rereexport.untouched.wat +++ b/tests/compiler/exportstar-rereexport.untouched.wat @@ -1580,7 +1580,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/extends-baseaggregate.untouched.wat b/tests/compiler/extends-baseaggregate.untouched.wat index ee79fbfd3c..e839a9c359 100644 --- a/tests/compiler/extends-baseaggregate.untouched.wat +++ b/tests/compiler/extends-baseaggregate.untouched.wat @@ -1545,7 +1545,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/extends-recursive.untouched.wat b/tests/compiler/extends-recursive.untouched.wat index 886d35c1f8..1e77d96a2a 100644 --- a/tests/compiler/extends-recursive.untouched.wat +++ b/tests/compiler/extends-recursive.untouched.wat @@ -1540,7 +1540,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/field-initialization.untouched.wat b/tests/compiler/field-initialization.untouched.wat index 90140e0342..9eeb4a40b4 100644 --- a/tests/compiler/field-initialization.untouched.wat +++ b/tests/compiler/field-initialization.untouched.wat @@ -1545,7 +1545,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/field.untouched.wat b/tests/compiler/field.untouched.wat index 652bf1f8b0..0b3da62555 100644 --- a/tests/compiler/field.untouched.wat +++ b/tests/compiler/field.untouched.wat @@ -1537,7 +1537,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u @@ -3753,7 +3754,8 @@ end global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/for.untouched.wat b/tests/compiler/for.untouched.wat index 274cf8f80a..1e1cbea9db 100644 --- a/tests/compiler/for.untouched.wat +++ b/tests/compiler/for.untouched.wat @@ -1962,7 +1962,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u @@ -2963,7 +2964,8 @@ end global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/function-call.untouched.wat b/tests/compiler/function-call.untouched.wat index 27b2cc8679..4e98519326 100644 --- a/tests/compiler/function-call.untouched.wat +++ b/tests/compiler/function-call.untouched.wat @@ -1570,7 +1570,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/function-expression.untouched.wat b/tests/compiler/function-expression.untouched.wat index b190999976..f142d9be69 100644 --- a/tests/compiler/function-expression.untouched.wat +++ b/tests/compiler/function-expression.untouched.wat @@ -1726,7 +1726,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index 3fa9b41b61..11bf3c25b4 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -1538,7 +1538,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/implicit-getter-setter.untouched.wat b/tests/compiler/implicit-getter-setter.untouched.wat index 4bdc62a2b0..54685f8625 100644 --- a/tests/compiler/implicit-getter-setter.untouched.wat +++ b/tests/compiler/implicit-getter-setter.untouched.wat @@ -1545,7 +1545,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/infer-array.untouched.wat b/tests/compiler/infer-array.untouched.wat index a39653b6f5..25fb03dc89 100644 --- a/tests/compiler/infer-array.untouched.wat +++ b/tests/compiler/infer-array.untouched.wat @@ -1554,7 +1554,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/infer-generic.untouched.wat b/tests/compiler/infer-generic.untouched.wat index 9363d0ea8b..30134cd190 100644 --- a/tests/compiler/infer-generic.untouched.wat +++ b/tests/compiler/infer-generic.untouched.wat @@ -1624,7 +1624,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index 591305f56b..2992a1704e 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -1744,7 +1744,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/instanceof-class.untouched.wat b/tests/compiler/instanceof-class.untouched.wat index 5bfcc1c5e8..4f986b8fa1 100644 --- a/tests/compiler/instanceof-class.untouched.wat +++ b/tests/compiler/instanceof-class.untouched.wat @@ -1538,7 +1538,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/issues/1095.untouched.wat b/tests/compiler/issues/1095.untouched.wat index 0d031c6765..6e7d533459 100644 --- a/tests/compiler/issues/1095.untouched.wat +++ b/tests/compiler/issues/1095.untouched.wat @@ -1538,7 +1538,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/issues/1225.untouched.wat b/tests/compiler/issues/1225.untouched.wat index c422ca0438..6d1f184cd0 100644 --- a/tests/compiler/issues/1225.untouched.wat +++ b/tests/compiler/issues/1225.untouched.wat @@ -1549,7 +1549,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u @@ -2408,7 +2409,8 @@ end global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/issues/1699.untouched.wat b/tests/compiler/issues/1699.untouched.wat index 24e10aaea1..27534979fa 100644 --- a/tests/compiler/issues/1699.untouched.wat +++ b/tests/compiler/issues/1699.untouched.wat @@ -1540,7 +1540,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/logical.untouched.wat b/tests/compiler/logical.untouched.wat index 344c415077..e47276a328 100644 --- a/tests/compiler/logical.untouched.wat +++ b/tests/compiler/logical.untouched.wat @@ -1561,7 +1561,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u @@ -2423,7 +2424,8 @@ end global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/managed-cast.untouched.wat b/tests/compiler/managed-cast.untouched.wat index 40b0f68c6f..bd5c191b51 100644 --- a/tests/compiler/managed-cast.untouched.wat +++ b/tests/compiler/managed-cast.untouched.wat @@ -1538,7 +1538,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u @@ -2532,7 +2533,8 @@ end global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/new.untouched.wat b/tests/compiler/new.untouched.wat index 2531a2b11b..6d850e0d3e 100644 --- a/tests/compiler/new.untouched.wat +++ b/tests/compiler/new.untouched.wat @@ -1541,7 +1541,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/number.untouched.wat b/tests/compiler/number.untouched.wat index 6549064b26..19b979c51a 100644 --- a/tests/compiler/number.untouched.wat +++ b/tests/compiler/number.untouched.wat @@ -1639,7 +1639,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/object-literal.untouched.wat b/tests/compiler/object-literal.untouched.wat index 588fdabe2c..5c152a30b5 100644 --- a/tests/compiler/object-literal.untouched.wat +++ b/tests/compiler/object-literal.untouched.wat @@ -1628,7 +1628,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u @@ -4265,7 +4266,8 @@ end global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/optional-typeparameters.untouched.wat b/tests/compiler/optional-typeparameters.untouched.wat index 05136ca9de..be40364603 100644 --- a/tests/compiler/optional-typeparameters.untouched.wat +++ b/tests/compiler/optional-typeparameters.untouched.wat @@ -1544,7 +1544,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/overflow.ts b/tests/compiler/overflow.ts index bb05caa01b..9ca7e3bf01 100644 --- a/tests/compiler/overflow.ts +++ b/tests/compiler/overflow.ts @@ -128,3 +128,12 @@ assert(val - 1 == 0xffff); } + +{ + // regression #2131 + const a: u32 = 65; + const b: u16 = 63457; + let c = a + (((b & 0x1f8) >> 3) - (b & 0x200 ? 0x40 : 0)); + // trace(">>>> c", 1, c); + assert(c == 65597); +} diff --git a/tests/compiler/overflow.untouched.wat b/tests/compiler/overflow.untouched.wat index 66b4056373..e4aa1a45e8 100644 --- a/tests/compiler/overflow.untouched.wat +++ b/tests/compiler/overflow.untouched.wat @@ -677,6 +677,32 @@ call $~lib/builtins/abort unreachable end + i32.const 65 + i32.const 63457 + i32.const 504 + i32.and + i32.const 3 + i32.const 15 + i32.and + i32.shr_u + i32.const 64 + i32.sub + i32.const 65535 + i32.and + i32.add + local.set $0 + local.get $0 + i32.const 65597 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 138 + i32.const 3 + call $~lib/builtins/abort + unreachable + end ) (func $~start call $start:overflow diff --git a/tests/compiler/reexport.untouched.wat b/tests/compiler/reexport.untouched.wat index 5ed6191586..09709a9c0c 100644 --- a/tests/compiler/reexport.untouched.wat +++ b/tests/compiler/reexport.untouched.wat @@ -1628,7 +1628,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/rereexport.untouched.wat b/tests/compiler/rereexport.untouched.wat index 30c35df4bc..2ee9a00878 100644 --- a/tests/compiler/rereexport.untouched.wat +++ b/tests/compiler/rereexport.untouched.wat @@ -1580,7 +1580,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/resolve-access.untouched.wat b/tests/compiler/resolve-access.untouched.wat index 53636d9820..11df03b345 100644 --- a/tests/compiler/resolve-access.untouched.wat +++ b/tests/compiler/resolve-access.untouched.wat @@ -1554,7 +1554,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/resolve-binary.untouched.wat b/tests/compiler/resolve-binary.untouched.wat index e6b550cff1..740e8907c9 100644 --- a/tests/compiler/resolve-binary.untouched.wat +++ b/tests/compiler/resolve-binary.untouched.wat @@ -1812,7 +1812,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u @@ -3464,10 +3465,12 @@ local.set $11 local.get $11 i64.const 52 - i64.const 7 + i32.const 7 + i64.extend_i32_s i64.sub i64.shr_u - i64.const 127 + i32.const 127 + i64.extend_i32_s i64.and i32.wrap_i64 local.set $12 @@ -3790,7 +3793,8 @@ f64.add local.set $28 local.get $14 - i64.const 127 + i32.const 127 + i64.extend_i32_s i64.and i64.const 1 i64.shl @@ -3801,7 +3805,8 @@ i64.extend_i32_u i64.add i64.const 52 - i64.const 7 + i32.const 7 + i64.extend_i32_s i64.sub i64.shl local.set $13 diff --git a/tests/compiler/resolve-elementaccess.untouched.wat b/tests/compiler/resolve-elementaccess.untouched.wat index 981941dc8a..1255683dc2 100644 --- a/tests/compiler/resolve-elementaccess.untouched.wat +++ b/tests/compiler/resolve-elementaccess.untouched.wat @@ -1578,7 +1578,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/resolve-function-expression.untouched.wat b/tests/compiler/resolve-function-expression.untouched.wat index d2d5582ab5..9a94ff8609 100644 --- a/tests/compiler/resolve-function-expression.untouched.wat +++ b/tests/compiler/resolve-function-expression.untouched.wat @@ -1621,7 +1621,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/resolve-nested.untouched.wat b/tests/compiler/resolve-nested.untouched.wat index 2b9a974028..c8c8038796 100644 --- a/tests/compiler/resolve-nested.untouched.wat +++ b/tests/compiler/resolve-nested.untouched.wat @@ -1560,7 +1560,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/resolve-new.untouched.wat b/tests/compiler/resolve-new.untouched.wat index c8804fbdba..534a0de5f0 100644 --- a/tests/compiler/resolve-new.untouched.wat +++ b/tests/compiler/resolve-new.untouched.wat @@ -1536,7 +1536,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/resolve-propertyaccess.untouched.wat b/tests/compiler/resolve-propertyaccess.untouched.wat index 1204319f7b..08355c586a 100644 --- a/tests/compiler/resolve-propertyaccess.untouched.wat +++ b/tests/compiler/resolve-propertyaccess.untouched.wat @@ -1622,7 +1622,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/resolve-ternary.untouched.wat b/tests/compiler/resolve-ternary.untouched.wat index 32b79fd5ae..6cb50eb234 100644 --- a/tests/compiler/resolve-ternary.untouched.wat +++ b/tests/compiler/resolve-ternary.untouched.wat @@ -1629,7 +1629,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/resolve-unary.untouched.wat b/tests/compiler/resolve-unary.untouched.wat index 0d48fb1030..6e43525dc4 100644 --- a/tests/compiler/resolve-unary.untouched.wat +++ b/tests/compiler/resolve-unary.untouched.wat @@ -1619,7 +1619,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/rt/finalize.untouched.wat b/tests/compiler/rt/finalize.untouched.wat index 9f65c5f3fd..73c8adfcee 100644 --- a/tests/compiler/rt/finalize.untouched.wat +++ b/tests/compiler/rt/finalize.untouched.wat @@ -1559,7 +1559,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u @@ -2405,7 +2406,8 @@ end global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/rt/instanceof.untouched.wat b/tests/compiler/rt/instanceof.untouched.wat index 04e2819d55..edb3157a87 100644 --- a/tests/compiler/rt/instanceof.untouched.wat +++ b/tests/compiler/rt/instanceof.untouched.wat @@ -1546,7 +1546,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/rt/runtime-incremental-export.untouched.wat b/tests/compiler/rt/runtime-incremental-export.untouched.wat index 6cfe1e0434..bcf84011f0 100644 --- a/tests/compiler/rt/runtime-incremental-export.untouched.wat +++ b/tests/compiler/rt/runtime-incremental-export.untouched.wat @@ -1542,7 +1542,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u @@ -2455,7 +2456,8 @@ end global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/std-wasi/console.untouched.wat b/tests/compiler/std-wasi/console.untouched.wat index 03dfa64e06..3886345944 100644 --- a/tests/compiler/std-wasi/console.untouched.wat +++ b/tests/compiler/std-wasi/console.untouched.wat @@ -3586,7 +3586,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/std-wasi/crypto.untouched.wat b/tests/compiler/std-wasi/crypto.untouched.wat index fdf616ac4a..bd5cad7d2c 100644 --- a/tests/compiler/std-wasi/crypto.untouched.wat +++ b/tests/compiler/std-wasi/crypto.untouched.wat @@ -2143,7 +2143,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/std-wasi/process.untouched.wat b/tests/compiler/std-wasi/process.untouched.wat index 6d800d22f5..d097d147d1 100644 --- a/tests/compiler/std-wasi/process.untouched.wat +++ b/tests/compiler/std-wasi/process.untouched.wat @@ -3584,7 +3584,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index 613b5d27e7..b32f64f179 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -1612,7 +1612,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u @@ -3861,7 +3862,8 @@ end global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index 5604a6719a..2202591239 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -1952,7 +1952,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u @@ -18381,7 +18382,8 @@ if local.get $0 local.get $1 - i64.const 48 + i32.const 48 + i64.extend_i32_s i64.or i64.store16 i32.const 1 @@ -18508,7 +18510,8 @@ i32.shl i32.add local.get $1 - i64.const 48 + i32.const 48 + i64.extend_i32_s i64.or i64.store16 i32.const 1 @@ -18923,7 +18926,8 @@ end global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index b76e1b5d56..48fd5021e3 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -1543,7 +1543,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u @@ -4025,7 +4026,8 @@ end global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index 63b8b01b7e..2950f7f29b 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -1550,7 +1550,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u @@ -3300,7 +3301,8 @@ end global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index fcee4fcf69..1d5aadc95d 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -240,7 +240,8 @@ local.get $2 call $~lib/date/daysSinceEpoch i64.extend_i32_s - i64.const 86400000 + i32.const 86400000 + i64.extend_i32_s i64.mul local.get $3 i32.const 3600000 @@ -1893,7 +1894,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u @@ -2963,7 +2965,8 @@ local.get $1 call $~lib/date/daysSinceEpoch i64.extend_i32_s - i64.const 86400000 + i32.const 86400000 + i64.extend_i32_s i64.mul local.get $5 i64.add @@ -3013,7 +3016,8 @@ i32.load offset=8 call $~lib/date/daysSinceEpoch i64.extend_i32_s - i64.const 86400000 + i32.const 86400000 + i64.extend_i32_s i64.mul local.get $5 i64.add @@ -3061,7 +3065,8 @@ i32.load offset=8 call $~lib/date/daysSinceEpoch i64.extend_i32_s - i64.const 86400000 + i32.const 86400000 + i64.extend_i32_s i64.mul local.get $5 i64.add diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index 397e0e6b2e..d74fda104e 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -1563,7 +1563,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u @@ -16538,7 +16539,8 @@ end global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/std/math.untouched.wat b/tests/compiler/std/math.untouched.wat index d83cf67e4f..176beb6f5c 100644 --- a/tests/compiler/std/math.untouched.wat +++ b/tests/compiler/std/math.untouched.wat @@ -1482,10 +1482,12 @@ local.set $13 local.get $13 i64.const 52 - i64.const 7 + i32.const 7 + i64.extend_i32_s i64.sub i64.shr_u - i64.const 127 + i32.const 127 + i64.extend_i32_s i64.and i32.wrap_i64 local.set $14 @@ -6197,7 +6199,8 @@ f64.add local.set $7 local.get $6 - i64.const 127 + i32.const 127 + i64.extend_i32_s i64.and i64.const 1 i64.shl @@ -6205,7 +6208,8 @@ local.set $8 local.get $6 i64.const 52 - i64.const 7 + i32.const 7 + i64.extend_i32_s i64.sub i64.shl local.set $9 @@ -6875,7 +6879,8 @@ local.get $11 local.get $7 i64.const 52 - i64.const 5 + i32.const 5 + i64.extend_i32_s i64.sub i64.shl i64.add @@ -7171,7 +7176,8 @@ f64.sub local.set $6 local.get $5 - i64.const 127 + i32.const 127 + i64.extend_i32_s i64.and i64.const 1 i64.shl @@ -7179,7 +7185,8 @@ local.set $7 local.get $5 i64.const 52 - i64.const 7 + i32.const 7 + i64.extend_i32_s i64.sub i64.shl local.set $8 @@ -7433,7 +7440,8 @@ local.get $8 local.get $6 i64.const 52 - i64.const 5 + i32.const 5 + i64.extend_i32_s i64.sub i64.shl i64.add @@ -8601,10 +8609,12 @@ local.set $13 local.get $13 i64.const 52 - i64.const 6 + i32.const 6 + i64.extend_i32_s i64.sub i64.shr_u - i64.const 63 + i32.const 63 + i64.extend_i32_s i64.and i32.wrap_i64 local.set $14 @@ -10045,10 +10055,12 @@ local.set $11 local.get $11 i64.const 52 - i64.const 7 + i32.const 7 + i64.extend_i32_s i64.sub i64.shr_u - i64.const 127 + i32.const 127 + i64.extend_i32_s i64.and i32.wrap_i64 local.set $12 @@ -10371,7 +10383,8 @@ f64.add local.set $28 local.get $14 - i64.const 127 + i32.const 127 + i64.extend_i32_s i64.and i64.const 1 i64.shl @@ -10382,7 +10395,8 @@ i64.extend_i32_u i64.add i64.const 52 - i64.const 7 + i32.const 7 + i64.extend_i32_s i64.sub i64.shl local.set $13 @@ -11141,7 +11155,8 @@ i64.extend_i32_u i64.add i64.const 52 - i64.const 5 + i32.const 5 + i64.extend_i32_s i64.sub i64.shl i64.add diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index d4999fd5a6..3478dd091c 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -1549,7 +1549,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index 7d0d132f14..34dfb694fb 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -1603,7 +1603,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index ea82e01e9f..c58528fe3e 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -1558,7 +1558,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u @@ -13550,7 +13551,8 @@ end global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index e3d3535279..d10cb3566b 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -1592,7 +1592,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/std/staticarray.untouched.wat b/tests/compiler/std/staticarray.untouched.wat index 3153dd3c4a..62b5515c7a 100644 --- a/tests/compiler/std/staticarray.untouched.wat +++ b/tests/compiler/std/staticarray.untouched.wat @@ -1671,7 +1671,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u @@ -6223,7 +6224,8 @@ end global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/std/string-casemapping.untouched.wat b/tests/compiler/std/string-casemapping.untouched.wat index b6f0e112cf..49a2dfc5da 100644 --- a/tests/compiler/std/string-casemapping.untouched.wat +++ b/tests/compiler/std/string-casemapping.untouched.wat @@ -1724,7 +1724,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/std/string-encoding.untouched.wat b/tests/compiler/std/string-encoding.untouched.wat index b5d8c553e8..3211f81ba3 100644 --- a/tests/compiler/std/string-encoding.untouched.wat +++ b/tests/compiler/std/string-encoding.untouched.wat @@ -1561,7 +1561,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u @@ -4257,7 +4258,8 @@ end global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 4c539bfd82..0f8eecf07f 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -2259,7 +2259,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u @@ -9273,7 +9274,8 @@ end global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index b41fcb2bfb..ed4a37b46d 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -1595,7 +1595,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index a59cf9b188..151728470b 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -1906,7 +1906,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u @@ -22744,7 +22745,8 @@ i32.shl i32.add local.get $1 - i64.const 48 + i32.const 48 + i64.extend_i32_s i64.or i64.store16 i32.const 1 @@ -22840,7 +22842,8 @@ if local.get $0 local.get $1 - i64.const 48 + i32.const 48 + i64.extend_i32_s i64.or i64.store16 i32.const 1 @@ -40508,7 +40511,8 @@ end global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/std/uri.untouched.wat b/tests/compiler/std/uri.untouched.wat index 05f634cf74..db02ab3292 100644 --- a/tests/compiler/std/uri.untouched.wat +++ b/tests/compiler/std/uri.untouched.wat @@ -1605,7 +1605,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u @@ -4791,7 +4792,8 @@ end global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/super-inline.untouched.wat b/tests/compiler/super-inline.untouched.wat index c27fd26d61..b144116759 100644 --- a/tests/compiler/super-inline.untouched.wat +++ b/tests/compiler/super-inline.untouched.wat @@ -1537,7 +1537,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/templateliteral.untouched.wat b/tests/compiler/templateliteral.untouched.wat index 0190703438..23a8ef1f66 100644 --- a/tests/compiler/templateliteral.untouched.wat +++ b/tests/compiler/templateliteral.untouched.wat @@ -1754,7 +1754,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/throw.untouched.wat b/tests/compiler/throw.untouched.wat index 06f4c2c127..3ab9afb46d 100644 --- a/tests/compiler/throw.untouched.wat +++ b/tests/compiler/throw.untouched.wat @@ -1664,7 +1664,8 @@ end global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/typeof.untouched.wat b/tests/compiler/typeof.untouched.wat index 63390e1779..d3f978daea 100644 --- a/tests/compiler/typeof.untouched.wat +++ b/tests/compiler/typeof.untouched.wat @@ -1713,7 +1713,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u diff --git a/tests/compiler/while.untouched.wat b/tests/compiler/while.untouched.wat index cea58d34f9..b5b316251b 100644 --- a/tests/compiler/while.untouched.wat +++ b/tests/compiler/while.untouched.wat @@ -1991,7 +1991,8 @@ drop global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u @@ -3076,7 +3077,8 @@ end global.get $~lib/rt/itcms/total i64.extend_i32_u - i64.const 200 + i32.const 200 + i64.extend_i32_u i64.mul i64.const 100 i64.div_u