From 95d8941137de582bcb0da18e922095a87799e520 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 20 Feb 2021 18:34:42 +0100 Subject: [PATCH] Make use of initial memory when initializing the incremental GC --- src/asconfig.json | 2 +- std/assembly/rt/itcms.ts | 4 +- tests/compiler/call-super.optimized.wat | 10 +- tests/compiler/call-super.untouched.wat | 10 +- tests/compiler/class-implements.optimized.wat | 10 +- tests/compiler/class-implements.untouched.wat | 10 +- .../compiler/class-overloading.optimized.wat | 10 +- .../compiler/class-overloading.untouched.wat | 10 +- tests/compiler/class.optimized.wat | 10 +- tests/compiler/class.untouched.wat | 10 +- tests/compiler/constructor.optimized.wat | 10 +- tests/compiler/constructor.untouched.wat | 10 +- tests/compiler/do.optimized.wat | 10 +- tests/compiler/do.untouched.wat | 10 +- .../empty-exportruntime.optimized.wat | 10 +- .../empty-exportruntime.untouched.wat | 10 +- tests/compiler/empty-new.optimized.wat | 10 +- tests/compiler/empty-new.untouched.wat | 10 +- tests/compiler/exports.optimized.wat | 10 +- tests/compiler/exports.untouched.wat | 10 +- .../exportstar-rereexport.optimized.wat | 10 +- .../exportstar-rereexport.untouched.wat | 10 +- .../extends-baseaggregate.optimized.wat | 239 ++++---- .../extends-baseaggregate.untouched.wat | 10 +- .../compiler/extends-recursive.optimized.wat | 10 +- .../compiler/extends-recursive.untouched.wat | 10 +- .../field-initialization.optimized.wat | 10 +- .../field-initialization.untouched.wat | 10 +- tests/compiler/for.optimized.wat | 10 +- tests/compiler/for.untouched.wat | 10 +- tests/compiler/function-call.optimized.wat | 10 +- tests/compiler/function-call.untouched.wat | 10 +- .../function-expression.optimized.wat | 10 +- .../function-expression.untouched.wat | 10 +- tests/compiler/getter-call.optimized.wat | 10 +- tests/compiler/getter-call.untouched.wat | 10 +- .../implicit-getter-setter.optimized.wat | 10 +- .../implicit-getter-setter.untouched.wat | 10 +- tests/compiler/infer-array.optimized.wat | 10 +- tests/compiler/infer-array.untouched.wat | 10 +- tests/compiler/inlining.optimized.wat | 10 +- tests/compiler/inlining.untouched.wat | 10 +- tests/compiler/instanceof-class.optimized.wat | 10 +- tests/compiler/instanceof-class.untouched.wat | 10 +- tests/compiler/issues/1095.optimized.wat | 10 +- tests/compiler/issues/1095.untouched.wat | 10 +- tests/compiler/issues/1225.optimized.wat | 10 +- tests/compiler/issues/1225.untouched.wat | 10 +- tests/compiler/logical.optimized.wat | 10 +- tests/compiler/logical.untouched.wat | 10 +- tests/compiler/managed-cast.optimized.wat | 10 +- tests/compiler/managed-cast.untouched.wat | 10 +- tests/compiler/new.optimized.wat | 10 +- tests/compiler/new.untouched.wat | 10 +- tests/compiler/number.optimized.wat | 10 +- tests/compiler/number.untouched.wat | 10 +- tests/compiler/object-literal.optimized.wat | 10 +- tests/compiler/object-literal.untouched.wat | 10 +- .../optional-typeparameters.optimized.wat | 10 +- .../optional-typeparameters.untouched.wat | 10 +- tests/compiler/reexport.optimized.wat | 10 +- tests/compiler/reexport.untouched.wat | 10 +- tests/compiler/rereexport.optimized.wat | 10 +- tests/compiler/rereexport.untouched.wat | 10 +- tests/compiler/resolve-access.optimized.wat | 10 +- tests/compiler/resolve-access.untouched.wat | 10 +- tests/compiler/resolve-binary.optimized.wat | 10 +- tests/compiler/resolve-binary.untouched.wat | 10 +- .../resolve-elementaccess.optimized.wat | 10 +- .../resolve-elementaccess.untouched.wat | 10 +- .../resolve-function-expression.optimized.wat | 334 +++++------ .../resolve-function-expression.untouched.wat | 10 +- tests/compiler/resolve-nested.optimized.wat | 10 +- tests/compiler/resolve-nested.untouched.wat | 10 +- tests/compiler/resolve-new.optimized.wat | 10 +- tests/compiler/resolve-new.untouched.wat | 10 +- .../resolve-propertyaccess.optimized.wat | 10 +- .../resolve-propertyaccess.untouched.wat | 10 +- tests/compiler/resolve-ternary.optimized.wat | 10 +- tests/compiler/resolve-ternary.untouched.wat | 10 +- tests/compiler/resolve-unary.optimized.wat | 10 +- tests/compiler/resolve-unary.untouched.wat | 10 +- tests/compiler/rt/finalize.optimized.wat | 85 +-- tests/compiler/rt/finalize.untouched.wat | 10 +- tests/compiler/rt/instanceof.optimized.wat | 10 +- tests/compiler/rt/instanceof.untouched.wat | 10 +- .../runtime-incremental-export.optimized.wat | 10 +- .../runtime-incremental-export.untouched.wat | 10 +- tests/compiler/std-wasi/console.optimized.wat | 273 ++++++--- tests/compiler/std-wasi/console.untouched.wat | 524 ++++++++++++------ tests/compiler/std-wasi/crypto.optimized.wat | 10 +- tests/compiler/std-wasi/crypto.untouched.wat | 10 +- tests/compiler/std-wasi/process.optimized.wat | 245 ++++++-- tests/compiler/std-wasi/process.untouched.wat | 423 ++++++++++---- .../compiler/std/array-literal.optimized.wat | 10 +- .../compiler/std/array-literal.untouched.wat | 10 +- tests/compiler/std/array.optimized.wat | 10 +- tests/compiler/std/array.untouched.wat | 10 +- tests/compiler/std/arraybuffer.optimized.wat | 10 +- tests/compiler/std/arraybuffer.untouched.wat | 10 +- tests/compiler/std/dataview.optimized.wat | 10 +- tests/compiler/std/dataview.untouched.wat | 10 +- tests/compiler/std/date.optimized.wat | 10 +- tests/compiler/std/date.untouched.wat | 10 +- tests/compiler/std/map.optimized.wat | 10 +- tests/compiler/std/map.untouched.wat | 10 +- tests/compiler/std/new.optimized.wat | 10 +- tests/compiler/std/new.untouched.wat | 10 +- .../std/operator-overloading.optimized.wat | 10 +- .../std/operator-overloading.untouched.wat | 10 +- tests/compiler/std/set.optimized.wat | 10 +- tests/compiler/std/set.untouched.wat | 10 +- tests/compiler/std/static-array.optimized.wat | 10 +- tests/compiler/std/static-array.untouched.wat | 10 +- tests/compiler/std/staticarray.optimized.wat | 10 +- tests/compiler/std/staticarray.untouched.wat | 10 +- .../std/string-casemapping.optimized.wat | 48 +- .../std/string-casemapping.untouched.wat | 10 +- .../std/string-encoding.optimized.wat | 489 ++++++++-------- .../std/string-encoding.untouched.wat | 10 +- tests/compiler/std/string.optimized.wat | 10 +- tests/compiler/std/string.untouched.wat | 10 +- tests/compiler/std/symbol.optimized.wat | 10 +- tests/compiler/std/symbol.untouched.wat | 10 +- tests/compiler/std/typedarray.optimized.wat | 10 +- tests/compiler/std/typedarray.untouched.wat | 10 +- tests/compiler/super-inline.optimized.wat | 66 ++- tests/compiler/super-inline.untouched.wat | 10 +- tests/compiler/throw.optimized.wat | 2 + tests/compiler/throw.untouched.wat | 10 +- tests/compiler/typeof.optimized.wat | 10 +- tests/compiler/typeof.untouched.wat | 10 +- tests/compiler/while.optimized.wat | 10 +- tests/compiler/while.untouched.wat | 10 +- 134 files changed, 2820 insertions(+), 1124 deletions(-) diff --git a/src/asconfig.json b/src/asconfig.json index 63fbf89993..2335eca294 100644 --- a/src/asconfig.json +++ b/src/asconfig.json @@ -6,7 +6,7 @@ "options": { "explicitStart": true, "exportRuntime": true, - "initialMemory": 256, + "initialMemory": 768, "runtime": "incremental", "measure": true }, diff --git a/std/assembly/rt/itcms.ts b/std/assembly/rt/itcms.ts index bc9766120b..868d67fda8 100644 --- a/std/assembly/rt/itcms.ts +++ b/std/assembly/rt/itcms.ts @@ -389,9 +389,9 @@ export function __collect(): void { // @ts-ignore: decorator @inline const IDLEFACTOR: usize = isDefined(ASC_GC_IDLEFACTOR) ? ASC_GC_IDLEFACTOR : 200; -/** Threshold of objects for the next scheduled GC step. */ +/** Threshold of memory used by objects to exceed before interrupting again. */ // @ts-ignore: decorator -@lazy var threshold: usize = GRANULARITY; +@lazy var threshold: usize = ((memory.size() << 16) - __heap_base) >> 1; /** Performs a reasonable amount of incremental GC steps. */ function interrupt(): void { diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index 00f8452e6f..83ce8c782c 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -24,7 +24,7 @@ (data (i32.const 1488) "\0d\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 1516) " \00\00\00\04\00\00\00 \00\00\00\00\00\00\00 \00\00\00\06\00\00\00 \00\00\00\00\00\00\00 \00\00\00\08\00\00\00 \00\00\00\00\00\00\00 \00\00\00\n\00\00\00 \00\00\00\00\00\00\00 \00\00\00\0c\00\00\00 ") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2200,6 +2200,14 @@ ) (func $~start (local $0 i32) + memory.size + i32.const 16 + i32.shl + i32.const 17980 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1216 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index dfccbe9c80..97f6f8ee46 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -22,7 +22,7 @@ (data (i32.const 464) "\0d\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\04\00\00\00 \00\00\00\00\00\00\00 \00\00\00\06\00\00\00 \00\00\00\00\00\00\00 \00\00\00\08\00\00\00 \00\00\00\00\00\00\00 \00\00\00\n\00\00\00 \00\00\00\00\00\00\00 \00\00\00\0c\00\00\00 \00\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2633,6 +2633,14 @@ global.set $~lib/memory/__stack_pointer ) (func $start:call-super + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 192 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/class-implements.optimized.wat b/tests/compiler/class-implements.optimized.wat index 46a0ee9f90..642f9b909e 100644 --- a/tests/compiler/class-implements.optimized.wat +++ b/tests/compiler/class-implements.optimized.wat @@ -23,7 +23,7 @@ (data (i32.const 1504) "\07\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 1532) " \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\06\00\00\00 ") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1483,6 +1483,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + memory.size + i32.const 16 + i32.shl + i32.const 17948 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1168 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/class-implements.untouched.wat b/tests/compiler/class-implements.untouched.wat index c23013e26c..224874cdcf 100644 --- a/tests/compiler/class-implements.untouched.wat +++ b/tests/compiler/class-implements.untouched.wat @@ -22,7 +22,7 @@ (data (i32.const 480) "\07\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\06\00\00\00 \00\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2500,6 +2500,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 144 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/class-overloading.optimized.wat b/tests/compiler/class-overloading.optimized.wat index 10eb7f23a2..276d40366b 100644 --- a/tests/compiler/class-overloading.optimized.wat +++ b/tests/compiler/class-overloading.optimized.wat @@ -41,7 +41,7 @@ (data (i32.const 1820) " \00\00\00\00\00\00\00 \00\00\00\03\00\00\00 \00\00\00\04\00\00\00 \00\00\00\04\00\00\00 \00\00\00\06\00\00\00 \00\00\00\07\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\t\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\0d\00\00\00 \00\00\00\10\00\00\00 ") (global $class-overloading/which (mut i32) (i32.const 1056)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2090,6 +2090,14 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store + memory.size + i32.const 16 + i32.shl + i32.const 18316 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1200 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/class-overloading.untouched.wat b/tests/compiler/class-overloading.untouched.wat index 39c2aafa2e..fb2234a085 100644 --- a/tests/compiler/class-overloading.untouched.wat +++ b/tests/compiler/class-overloading.untouched.wat @@ -32,7 +32,7 @@ (table $0 1 funcref) (global $class-overloading/which (mut i32) (i32.const 32)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -3383,6 +3383,14 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 176 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/class.optimized.wat b/tests/compiler/class.optimized.wat index d9fbdb9b97..49be758414 100644 --- a/tests/compiler/class.optimized.wat +++ b/tests/compiler/class.optimized.wat @@ -27,7 +27,7 @@ (data (i32.const 1564) " ") (data (i32.const 1580) "\02\t") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1900,6 +1900,14 @@ end ) (func $~start + memory.size + i32.const 16 + i32.shl + i32.const 17972 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1168 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/class.untouched.wat b/tests/compiler/class.untouched.wat index 858cd8ae16..3c6c31c1f5 100644 --- a/tests/compiler/class.untouched.wat +++ b/tests/compiler/class.untouched.wat @@ -26,7 +26,7 @@ (table $0 1 funcref) (global $class/Animal.ONE (mut i32) (i32.const 1)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2611,6 +2611,14 @@ ) (func $~start call $start:class + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 144 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index e152667900..6539c146f2 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -22,7 +22,7 @@ (data (i32.const 1440) "\0d\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 1468) " \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 ") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1792,6 +1792,14 @@ ) (func $start:constructor (local $0 i32) + memory.size + i32.const 16 + i32.shl + i32.const 17932 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1168 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index dcd5afc3d8..158cf4f587 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -21,7 +21,7 @@ (data (i32.const 416) "\0d\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2391,6 +2391,14 @@ i32.const 0 ) (func $start:constructor + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 144 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index 63c3f7b936..2d411408b7 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -23,7 +23,7 @@ (data (i32.const 1472) "\04\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 1500) " ") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1587,6 +1587,14 @@ call $~lib/builtins/abort unreachable end + memory.size + i32.const 16 + i32.shl + i32.const 17892 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1200 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/do.untouched.wat b/tests/compiler/do.untouched.wat index d1ec34ada6..deb5cde058 100644 --- a/tests/compiler/do.untouched.wat +++ b/tests/compiler/do.untouched.wat @@ -23,7 +23,7 @@ (table $0 1 funcref) (global $do/ran (mut i32) (i32.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -3095,6 +3095,14 @@ end i32.const 0 global.set $do/ran + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 176 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/empty-exportruntime.optimized.wat b/tests/compiler/empty-exportruntime.optimized.wat index 9d7eb3b5f0..e8eb27890d 100644 --- a/tests/compiler/empty-exportruntime.optimized.wat +++ b/tests/compiler/empty-exportruntime.optimized.wat @@ -25,7 +25,7 @@ (data (i32.const 1512) "\01\00\00\00(\00\00\00O\00b\00j\00e\00c\00t\00 \00i\00s\00 \00n\00o\00t\00 \00p\00i\00n\00n\00e\00d") (data (i32.const 1568) "\03\00\00\00 \00\00\00\00\00\00\00 ") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1870,6 +1870,14 @@ unreachable ) (func $~start + memory.size + i32.const 16 + i32.shl + i32.const 17980 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1168 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/empty-exportruntime.untouched.wat b/tests/compiler/empty-exportruntime.untouched.wat index 126cbaf008..8b7ff30ef2 100644 --- a/tests/compiler/empty-exportruntime.untouched.wat +++ b/tests/compiler/empty-exportruntime.untouched.wat @@ -23,7 +23,7 @@ (data (i32.const 544) "\03\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2529,6 +2529,14 @@ unreachable ) (func $~start + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 144 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/empty-new.optimized.wat b/tests/compiler/empty-new.optimized.wat index cc545ddb00..3b52fdedc5 100644 --- a/tests/compiler/empty-new.optimized.wat +++ b/tests/compiler/empty-new.optimized.wat @@ -20,7 +20,7 @@ (data (i32.const 1384) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") (data (i32.const 1440) "\03\00\00\00 \00\00\00\00\00\00\00 ") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1362,6 +1362,14 @@ ) (func $~start (local $0 i32) + memory.size + i32.const 16 + i32.shl + i32.const 17852 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1168 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/empty-new.untouched.wat b/tests/compiler/empty-new.untouched.wat index fe78f54b92..8056b409d4 100644 --- a/tests/compiler/empty-new.untouched.wat +++ b/tests/compiler/empty-new.untouched.wat @@ -21,7 +21,7 @@ (data (i32.const 416) "\03\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2352,6 +2352,14 @@ local.get $3 ) (func $start:empty-new + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 144 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index a1ade0b2cc..016fa0e46d 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -29,7 +29,7 @@ (global $exports/vehicles.Car.TIRES i32 (i32.const 4)) (global $exports/outer.inner.a i32 (i32.const 42)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1543,6 +1543,14 @@ global.set $~argumentsLength ) (func $~start + memory.size + i32.const 16 + i32.shl + i32.const 17868 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1168 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index 2a145d45bc..572844ee65 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -31,7 +31,7 @@ (global $export/b i32 (i32.const 2)) (global $export/c i32 (i32.const 3)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2563,6 +2563,14 @@ global.set $~argumentsLength ) (func $~start + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 144 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/exportstar-rereexport.optimized.wat b/tests/compiler/exportstar-rereexport.optimized.wat index 35a548ddd0..8e3baf1299 100644 --- a/tests/compiler/exportstar-rereexport.optimized.wat +++ b/tests/compiler/exportstar-rereexport.optimized.wat @@ -29,7 +29,7 @@ (global $export/b i32 (i32.const 2)) (global $export/c i32 (i32.const 3)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1539,6 +1539,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + memory.size + i32.const 16 + i32.shl + i32.const 17956 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1216 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/exportstar-rereexport.untouched.wat b/tests/compiler/exportstar-rereexport.untouched.wat index eee66ac8e2..242197f518 100644 --- a/tests/compiler/exportstar-rereexport.untouched.wat +++ b/tests/compiler/exportstar-rereexport.untouched.wat @@ -29,7 +29,7 @@ (global $exports/vehicles.Car.TIRES i32 (i32.const 4)) (global $exports/outer.inner.a i32 (i32.const 42)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2545,6 +2545,14 @@ call $~lib/builtins/abort unreachable end + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 192 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/extends-baseaggregate.optimized.wat b/tests/compiler/extends-baseaggregate.optimized.wat index cbaaa1b561..127caeb323 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -32,7 +32,7 @@ (data (i32.const 1696) "\t\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 1752) "\04\00\00\00\02A\00\00\00\00\00\00\02A") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1975,6 +1975,103 @@ end end ) + (func $~lib/array/ensureSize (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.const 1176 + i32.load + local.tee $4 + i32.const 2 + i32.shr_u + i32.gt_u + if + local.get $0 + i32.const 268435455 + i32.gt_u + if + i32.const 1616 + i32.const 1664 + i32.const 14 + i32.const 48 + call $~lib/builtins/abort + unreachable + end + i32.const 1168 + i32.load + local.tee $5 + local.set $1 + block $__inlined_func$~lib/rt/itcms/__renew + local.get $0 + i32.const 2 + i32.shl + local.tee $6 + local.tee $2 + local.get $5 + i32.const 20 + i32.sub + local.tee $3 + i32.load + i32.const -4 + i32.and + i32.const 16 + i32.sub + i32.le_u + if + local.get $3 + local.get $2 + i32.store offset=16 + local.get $1 + local.set $0 + br $__inlined_func$~lib/rt/itcms/__renew + end + local.get $2 + local.get $3 + i32.load offset=12 + call $~lib/rt/itcms/__new + local.tee $0 + local.get $1 + local.get $2 + local.get $3 + i32.load offset=16 + local.tee $1 + local.get $1 + local.get $2 + i32.gt_u + select + call $~lib/memory/memory.copy + end + local.get $0 + local.get $4 + i32.add + local.get $6 + local.get $4 + i32.sub + call $~lib/memory/memory.fill + local.get $0 + local.get $5 + i32.ne + if + i32.const 1168 + local.get $0 + i32.store + i32.const 1172 + local.get $0 + i32.store + i32.const 1168 + local.get $0 + i32.const 0 + call $~lib/rt/itcms/__link + end + i32.const 1176 + local.get $6 + i32.store + end + ) (func $~lib/rt/__visit_members (param $0 i32) (local $1 i32) (local $2 i32) @@ -2051,13 +2148,6 @@ (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -2066,6 +2156,14 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store + memory.size + i32.const 16 + i32.shl + i32.const 18156 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1328 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace @@ -2090,10 +2188,10 @@ i32.const 20 i32.const 6 call $~lib/rt/itcms/__new - local.tee $9 + local.tee $0 i32.store global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $0 i32.store offset=4 global.get $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer @@ -2104,26 +2202,26 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - local.get $9 + local.get $0 i32.eqz if global.get $~lib/memory/__stack_pointer i32.const 20 i32.const 4 call $~lib/rt/itcms/__new - local.tee $9 + local.tee $0 i32.store end - local.get $9 + local.get $0 f64.const 0 f64.store - local.get $9 + local.get $0 f64.const 0 f64.store offset=8 - local.get $9 + local.get $0 i32.const 0 i32.store offset=16 - local.get $9 + local.get $0 i32.const 0 i32.const 0 call $~lib/rt/itcms/__link @@ -2131,125 +2229,36 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $9 + local.get $0 i32.store global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $0 i32.store offset=4 i32.const 1180 i32.load - local.tee $2 + local.tee $1 i32.const 1 i32.add - local.tee $6 - local.set $0 - local.get $6 - i32.const 1176 - i32.load - local.tee $5 - i32.const 2 - i32.shr_u - i32.gt_u - if - local.get $0 - i32.const 268435455 - i32.gt_u - if - i32.const 1616 - i32.const 1664 - i32.const 14 - i32.const 48 - call $~lib/builtins/abort - unreachable - end - i32.const 1168 - i32.load - local.tee $4 - local.set $1 - block $__inlined_func$~lib/rt/itcms/__renew - local.get $0 - i32.const 2 - i32.shl - local.tee $3 - local.tee $8 - local.get $4 - i32.const 20 - i32.sub - local.tee $7 - i32.load - i32.const -4 - i32.and - i32.const 16 - i32.sub - i32.le_u - if - local.get $7 - local.get $8 - i32.store offset=16 - br $__inlined_func$~lib/rt/itcms/__renew - end - local.get $8 - local.get $7 - i32.load offset=12 - call $~lib/rt/itcms/__new - local.tee $0 - local.get $1 - local.get $8 - local.get $7 - i32.load offset=16 - local.tee $1 - local.get $1 - local.get $8 - i32.gt_u - select - call $~lib/memory/memory.copy - local.get $0 - local.set $1 - end - local.get $1 - local.get $5 - i32.add - local.get $3 - local.get $5 - i32.sub - call $~lib/memory/memory.fill - local.get $1 - local.get $4 - i32.ne - if - i32.const 1168 - local.get $1 - i32.store - i32.const 1172 - local.get $1 - i32.store - i32.const 1168 - local.get $1 - i32.const 0 - call $~lib/rt/itcms/__link - end - i32.const 1176 - local.get $3 - i32.store - end + local.tee $2 + call $~lib/array/ensureSize i32.const 1172 i32.load - local.get $2 + local.get $1 i32.const 2 i32.shl i32.add - local.get $9 + local.get $0 i32.store i32.const 1168 - local.get $9 + local.get $0 i32.const 1 call $~lib/rt/itcms/__link i32.const 1180 - local.get $6 + local.get $2 i32.store global.get $~lib/memory/__stack_pointer i32.const 8 diff --git a/tests/compiler/extends-baseaggregate.untouched.wat b/tests/compiler/extends-baseaggregate.untouched.wat index a610c05e87..2d64f80526 100644 --- a/tests/compiler/extends-baseaggregate.untouched.wat +++ b/tests/compiler/extends-baseaggregate.untouched.wat @@ -30,7 +30,7 @@ (global $extends-baseaggregate/poolB i32 (i32.const 64)) (global $extends-baseaggregate/poolA i32 (i32.const 144)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -4148,6 +4148,14 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 304 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/extends-recursive.optimized.wat b/tests/compiler/extends-recursive.optimized.wat index 6903726f57..30c65058c7 100644 --- a/tests/compiler/extends-recursive.optimized.wat +++ b/tests/compiler/extends-recursive.optimized.wat @@ -21,7 +21,7 @@ (data (i32.const 1440) "\05\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 1472) "\04") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1531,6 +1531,14 @@ end ) (func $~start + memory.size + i32.const 16 + i32.shl + i32.const 17868 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1168 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/extends-recursive.untouched.wat b/tests/compiler/extends-recursive.untouched.wat index b4b22389d9..0ad72d777e 100644 --- a/tests/compiler/extends-recursive.untouched.wat +++ b/tests/compiler/extends-recursive.untouched.wat @@ -21,7 +21,7 @@ (data (i32.const 416) "\05\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2508,6 +2508,14 @@ unreachable ) (func $~start + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 144 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/field-initialization.optimized.wat b/tests/compiler/field-initialization.optimized.wat index ccd2a65304..e9b30b7b3d 100644 --- a/tests/compiler/field-initialization.optimized.wat +++ b/tests/compiler/field-initialization.optimized.wat @@ -42,7 +42,7 @@ (data (i32.const 1952) "\12") (data (i32.const 1968) "\14") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2121,6 +2121,14 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=32 + memory.size + i32.const 16 + i32.shl + i32.const 18380 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1168 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/field-initialization.untouched.wat b/tests/compiler/field-initialization.untouched.wat index a12b54f6a5..81f70f2d9d 100644 --- a/tests/compiler/field-initialization.untouched.wat +++ b/tests/compiler/field-initialization.untouched.wat @@ -30,7 +30,7 @@ (data (i32.const 768) "\19\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -3306,6 +3306,14 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=32 + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 144 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index b1ec14e552..303f05027b 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -23,7 +23,7 @@ (data (i32.const 1472) "\04\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 1500) " ") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1578,6 +1578,14 @@ call $~lib/builtins/abort unreachable end + memory.size + i32.const 16 + i32.shl + i32.const 17892 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1200 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/for.untouched.wat b/tests/compiler/for.untouched.wat index 741ac7562f..88a9566870 100644 --- a/tests/compiler/for.untouched.wat +++ b/tests/compiler/for.untouched.wat @@ -23,7 +23,7 @@ (table $0 1 funcref) (global $for/ran (mut i32) (i32.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -3134,6 +3134,14 @@ end i32.const 0 global.set $for/ran + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 176 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/function-call.optimized.wat b/tests/compiler/function-call.optimized.wat index a6c5a04fdc..7b23d6c921 100644 --- a/tests/compiler/function-call.optimized.wat +++ b/tests/compiler/function-call.optimized.wat @@ -43,7 +43,7 @@ (table $0 9 funcref) (elem (i32.const 1) $start:function-call~anonymous|0 $start:function-call~anonymous|0 $start:function-call~anonymous|2 $start:function-call~anonymous|2 $start:function-call~fn2|4 $function-call/Foo#fnVoid $start:function-call~fn2|4 $function-call/Foo#fnRet) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1495,6 +1495,14 @@ call $~lib/builtins/abort unreachable end + memory.size + i32.const 16 + i32.shl + i32.const 18220 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1392 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/function-call.untouched.wat b/tests/compiler/function-call.untouched.wat index 6e8a33cf4b..ef3c975395 100644 --- a/tests/compiler/function-call.untouched.wat +++ b/tests/compiler/function-call.untouched.wat @@ -37,7 +37,7 @@ (global $function-call/faRet (mut i32) (i32.const 192)) (global $function-call/fnThis (mut i32) (i32.const 224)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2624,6 +2624,14 @@ call $~lib/builtins/abort unreachable end + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 368 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/function-expression.optimized.wat b/tests/compiler/function-expression.optimized.wat index 7b7c6f6c09..0aa9400422 100644 --- a/tests/compiler/function-expression.optimized.wat +++ b/tests/compiler/function-expression.optimized.wat @@ -64,7 +64,7 @@ (table $0 20 funcref) (elem (i32.const 1) $start:function-expression~anonymous|0 $start:function-expression~anonymous|0 $start:function-expression~someName|2 $start:function-expression~anonymous|3 $start:function-expression~anonymous|4 $start:function-expression~anonymous|5 $start:function-expression~anonymous|6 $start:function-expression~anonymous|4 $start:function-expression~anonymous|5 $start:function-expression~anonymous|6 $start:function-expression~anonymous|3 $function-expression/testGlobal~anonymous|0~anonymous|0 $function-expression/testGlobal~anonymous|0 $function-expression/testGlobal~anonymous|0~anonymous|0 $function-expression/testLocal~anonymous|0 $function-expression/testGlobal~anonymous|0~anonymous|0 $function-expression/testField~anonymous|0 $start:function-expression~anonymous|0 $function-expression/semanticallyAnonymous~fnDecl|0) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1790,6 +1790,14 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + memory.size + i32.const 16 + i32.shl + i32.const 18580 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1712 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/function-expression.untouched.wat b/tests/compiler/function-expression.untouched.wat index 6b01cab120..2e78cc447a 100644 --- a/tests/compiler/function-expression.untouched.wat +++ b/tests/compiler/function-expression.untouched.wat @@ -49,7 +49,7 @@ (global $function-expression/f4 (mut i32) (i32.const 192)) (global $function-expression/globalFunc (mut i32) (i32.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -3086,6 +3086,14 @@ end call $function-expression/testGlobal call $function-expression/testLocal + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 688 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index 0072cc7a06..87bf9bd813 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -25,7 +25,7 @@ (table $0 2 funcref) (elem (i32.const 1) $getter-call/C#get:x~anonymous|0) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1380,6 +1380,14 @@ unreachable ) (func $~start + memory.size + i32.const 16 + i32.shl + i32.const 17900 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1168 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index f4de8c5e4d..4f3adf2eaa 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -23,7 +23,7 @@ (table $0 2 funcref) (elem (i32.const 1) $getter-call/C#get:x~anonymous|0) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2424,6 +2424,14 @@ unreachable ) (func $~start + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 144 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index 41cf97bea0..ee9a27cb5b 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -22,7 +22,7 @@ (data (i32.const 1440) "\05\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 1468) " ") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1530,6 +1530,14 @@ end ) (func $~start + memory.size + i32.const 16 + i32.shl + i32.const 17868 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1168 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/implicit-getter-setter.untouched.wat b/tests/compiler/implicit-getter-setter.untouched.wat index e9d88ccdd5..ffba3a548c 100644 --- a/tests/compiler/implicit-getter-setter.untouched.wat +++ b/tests/compiler/implicit-getter-setter.untouched.wat @@ -21,7 +21,7 @@ (data (i32.const 416) "\05\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2514,6 +2514,14 @@ unreachable ) (func $~start + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 144 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/infer-array.optimized.wat b/tests/compiler/infer-array.optimized.wat index 937d7c6451..d6d1d4ddaa 100644 --- a/tests/compiler/infer-array.optimized.wat +++ b/tests/compiler/infer-array.optimized.wat @@ -57,7 +57,7 @@ (data (i32.const 2112) "\0c\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 2140) "\02\t\00\00\00\00\00\00\02\1a\00\00\00\00\00\00\02\01\00\00\00\00\00\00\02\19\00\00\00\00\00\00 \00\00\00\00\00\00\00\02a\00\00\00\00\00\00\02a\00\00\00\00\00\00\02\01\00\00\00\00\00\00\02A") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2117,6 +2117,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store offset=16 + memory.size + i32.const 16 + i32.shl + i32.const 18596 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1200 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/infer-array.untouched.wat b/tests/compiler/infer-array.untouched.wat index 0c0a616361..5dc1b37f16 100644 --- a/tests/compiler/infer-array.untouched.wat +++ b/tests/compiler/infer-array.untouched.wat @@ -40,7 +40,7 @@ (data (i32.const 1088) "\0c\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\t\00\00\00\00\00\00\02\1a\00\00\00\00\00\00\02\01\00\00\00\00\00\00\02\19\00\00\00\00\00\00 \00\00\00\00\00\00\00\02a\00\00\00\00\00\00\02a\00\00\00\00\00\00\02\01\00\00\00\00\00\00\02A\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -4216,6 +4216,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store offset=16 + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 176 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index defb78529a..a231bf8227 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -28,7 +28,7 @@ (table $0 2 funcref) (elem (i32.const 1) $inlining/func_fe~anonymous|0) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1918,6 +1918,14 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + memory.size + i32.const 16 + i32.shl + i32.const 17964 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1248 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index a3a195623e..889e837697 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -26,7 +26,7 @@ (global $inlining/constantGlobal i32 (i32.const 1)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2722,6 +2722,14 @@ unreachable end call $inlining/test_funcs + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 224 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/instanceof-class.optimized.wat b/tests/compiler/instanceof-class.optimized.wat index cb8b71a141..0ee49023d6 100644 --- a/tests/compiler/instanceof-class.optimized.wat +++ b/tests/compiler/instanceof-class.optimized.wat @@ -24,7 +24,7 @@ (data (i32.const 1504) "\07\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 1532) " \00\00\00\04\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\05") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1431,6 +1431,14 @@ ) (func $start:instanceof-class (local $0 i32) + memory.size + i32.const 16 + i32.shl + i32.const 17948 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1168 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/instanceof-class.untouched.wat b/tests/compiler/instanceof-class.untouched.wat index df0ee33a97..527b2b1efc 100644 --- a/tests/compiler/instanceof-class.untouched.wat +++ b/tests/compiler/instanceof-class.untouched.wat @@ -22,7 +22,7 @@ (data (i32.const 480) "\07\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\04\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\05\00\00\00") (table $0 1 funcref) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2355,6 +2355,14 @@ local.get $3 ) (func $start:instanceof-class + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 144 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index 7f41fc8496..dd8a04e22f 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -26,7 +26,7 @@ (data (i32.const 1544) "\01\00\00\00\1c\00\00\00i\00s\00s\00u\00e\00s\00/\001\000\009\005\00.\00t\00s") (data (i32.const 1584) "\04\00\00\00 \00\00\00\00\00\00\00 ") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1531,6 +1531,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + memory.size + i32.const 16 + i32.shl + i32.const 18004 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1168 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/issues/1095.untouched.wat b/tests/compiler/issues/1095.untouched.wat index 16ad684f1e..ab16c21e9e 100644 --- a/tests/compiler/issues/1095.untouched.wat +++ b/tests/compiler/issues/1095.untouched.wat @@ -24,7 +24,7 @@ (data (i32.const 560) "\04\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2549,6 +2549,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 144 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/issues/1225.optimized.wat b/tests/compiler/issues/1225.optimized.wat index 229087731a..f378537fa9 100644 --- a/tests/compiler/issues/1225.optimized.wat +++ b/tests/compiler/issues/1225.optimized.wat @@ -23,7 +23,7 @@ (data (i32.const 1488) "\04\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 1516) " ") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1499,6 +1499,14 @@ (func $start:issues/1225 (local $0 i32) (local $1 i32) + memory.size + i32.const 16 + i32.shl + i32.const 17908 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1168 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/issues/1225.untouched.wat b/tests/compiler/issues/1225.untouched.wat index b506d59c22..aad5b3befa 100644 --- a/tests/compiler/issues/1225.untouched.wat +++ b/tests/compiler/issues/1225.untouched.wat @@ -22,7 +22,7 @@ (data (i32.const 464) "\04\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2434,6 +2434,14 @@ drop ) (func $start:issues/1225 + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 144 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/logical.optimized.wat b/tests/compiler/logical.optimized.wat index 72dba49e7c..e76e95a33c 100644 --- a/tests/compiler/logical.optimized.wat +++ b/tests/compiler/logical.optimized.wat @@ -23,7 +23,7 @@ (data (i32.const 1488) "\04\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 1516) " ") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1395,6 +1395,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + memory.size + i32.const 16 + i32.shl + i32.const 17908 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1216 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/logical.untouched.wat b/tests/compiler/logical.untouched.wat index d13ad44746..e168639e19 100644 --- a/tests/compiler/logical.untouched.wat +++ b/tests/compiler/logical.untouched.wat @@ -27,7 +27,7 @@ (global $logical/f (mut f32) (f32.const 0)) (global $logical/F (mut f64) (f64.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -3025,6 +3025,14 @@ call $~lib/builtins/abort unreachable end + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 192 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index 86f7526094..497044dd95 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -27,7 +27,7 @@ (data (i32.const 1632) "\05\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 1660) " \00\00\00\04\00\00\00 ") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1579,6 +1579,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + memory.size + i32.const 16 + i32.shl + i32.const 18060 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1168 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/managed-cast.untouched.wat b/tests/compiler/managed-cast.untouched.wat index 96ba8bf923..347ec7dcc1 100644 --- a/tests/compiler/managed-cast.untouched.wat +++ b/tests/compiler/managed-cast.untouched.wat @@ -24,7 +24,7 @@ (data (i32.const 608) "\05\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\04\00\00\00 \00\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2878,6 +2878,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 144 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/new.optimized.wat b/tests/compiler/new.optimized.wat index e4316d8771..63fb49d4a2 100644 --- a/tests/compiler/new.optimized.wat +++ b/tests/compiler/new.optimized.wat @@ -22,7 +22,7 @@ (data (i32.const 1468) " \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\04") (global $new/ref (mut i32) (i32.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1502,6 +1502,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + memory.size + i32.const 16 + i32.shl + i32.const 17884 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1168 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/new.untouched.wat b/tests/compiler/new.untouched.wat index 2df4b1024e..cfeabe71b7 100644 --- a/tests/compiler/new.untouched.wat +++ b/tests/compiler/new.untouched.wat @@ -22,7 +22,7 @@ (table $0 1 funcref) (global $new/ref (mut i32) (i32.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2526,6 +2526,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 144 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index d97d95bea1..6b8d08a21b 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -62,7 +62,7 @@ (data (i32.const 3200) "\03\00\00\00 \00\00\00\00\00\00\00 ") (global $number/a (mut i32) (i32.const 1)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -3048,6 +3048,14 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store + memory.size + i32.const 16 + i32.shl + i32.const 19612 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1392 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/number.untouched.wat b/tests/compiler/number.untouched.wat index 516d081cf9..00f6dc0a81 100644 --- a/tests/compiler/number.untouched.wat +++ b/tests/compiler/number.untouched.wat @@ -54,7 +54,7 @@ (table $0 1 funcref) (global $number/a (mut i32) (i32.const 1)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -5683,6 +5683,14 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 368 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/object-literal.optimized.wat b/tests/compiler/object-literal.optimized.wat index 1548e94848..cac26c87f2 100644 --- a/tests/compiler/object-literal.optimized.wat +++ b/tests/compiler/object-literal.optimized.wat @@ -40,7 +40,7 @@ (global $~lib/rt/itcms/toSpace (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) @@ -2738,6 +2738,14 @@ i32.const 1152 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/toSpace + memory.size + i32.const 16 + i32.shl + i32.const 18156 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1360 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/object-literal.untouched.wat b/tests/compiler/object-literal.untouched.wat index 573edced89..8a65597488 100644 --- a/tests/compiler/object-literal.untouched.wat +++ b/tests/compiler/object-literal.untouched.wat @@ -36,7 +36,7 @@ (global $~lib/rt/itcms/toSpace (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) @@ -5037,6 +5037,14 @@ i32.const 128 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/toSpace + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 336 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index 4110210bf0..bb73075173 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -21,7 +21,7 @@ (data (i32.const 1440) "\05\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 1468) " \00\00\00\00\00\00\00 ") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1468,6 +1468,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + memory.size + i32.const 16 + i32.shl + i32.const 17868 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1168 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/optional-typeparameters.untouched.wat b/tests/compiler/optional-typeparameters.untouched.wat index 0e04c2ecd3..2c25945ad9 100644 --- a/tests/compiler/optional-typeparameters.untouched.wat +++ b/tests/compiler/optional-typeparameters.untouched.wat @@ -22,7 +22,7 @@ (data (i32.const 416) "\05\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2464,6 +2464,14 @@ i32.const 2 call $optional-typeparameters/testDerived drop + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 144 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/reexport.optimized.wat b/tests/compiler/reexport.optimized.wat index 9f5c16de5c..630523b70d 100644 --- a/tests/compiler/reexport.optimized.wat +++ b/tests/compiler/reexport.optimized.wat @@ -34,7 +34,7 @@ (global $exports/vehicles.Car.TIRES i32 (i32.const 4)) (global $exports/outer.inner.a i32 (i32.const 42)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1597,6 +1597,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + memory.size + i32.const 16 + i32.shl + i32.const 17916 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1216 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/reexport.untouched.wat b/tests/compiler/reexport.untouched.wat index f8d0eefa56..aa34cc9ddc 100644 --- a/tests/compiler/reexport.untouched.wat +++ b/tests/compiler/reexport.untouched.wat @@ -32,7 +32,7 @@ (global $exports/vehicles.Car.TIRES i32 (i32.const 4)) (global $exports/outer.inner.a i32 (i32.const 42)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2682,6 +2682,14 @@ call $~lib/builtins/abort unreachable end + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 192 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/rereexport.optimized.wat b/tests/compiler/rereexport.optimized.wat index bcdbe1a686..05ce79caf2 100644 --- a/tests/compiler/rereexport.optimized.wat +++ b/tests/compiler/rereexport.optimized.wat @@ -29,7 +29,7 @@ (global $export/b i32 (i32.const 2)) (global $export/c i32 (i32.const 3)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1539,6 +1539,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + memory.size + i32.const 16 + i32.shl + i32.const 17956 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1216 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/rereexport.untouched.wat b/tests/compiler/rereexport.untouched.wat index 6e0c4d1301..b1b3235a18 100644 --- a/tests/compiler/rereexport.untouched.wat +++ b/tests/compiler/rereexport.untouched.wat @@ -29,7 +29,7 @@ (global $exports/vehicles.Car.TIRES i32 (i32.const 4)) (global $exports/outer.inner.a i32 (i32.const 42)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2542,6 +2542,14 @@ call $~lib/builtins/abort unreachable end + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 192 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/resolve-access.optimized.wat b/tests/compiler/resolve-access.optimized.wat index dd9964437c..05e8e9bc64 100644 --- a/tests/compiler/resolve-access.optimized.wat +++ b/tests/compiler/resolve-access.optimized.wat @@ -35,7 +35,7 @@ (data (i32.const 1840) "\06\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 1868) "\02\02\00\00\00\00\00\00\02\t\00\00\00\00\00\00 ") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2009,6 +2009,14 @@ call $~lib/rt/itcms/__visit ) (func $~start + memory.size + i32.const 16 + i32.shl + i32.const 18276 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1200 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/resolve-access.untouched.wat b/tests/compiler/resolve-access.untouched.wat index 2466b7aa32..87ef53dbe2 100644 --- a/tests/compiler/resolve-access.untouched.wat +++ b/tests/compiler/resolve-access.untouched.wat @@ -36,7 +36,7 @@ (data (i32.const 2272) "\06\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\02\00\00\00\00\00\00\02\t\00\00\00\00\00\00 \00\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -4441,6 +4441,14 @@ unreachable ) (func $~start + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 176 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index ca59b39eff..a8265cd5d7 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -87,7 +87,7 @@ (data (i32.const 3660) " \00\00\00\00\00\00\00 ") (global $resolve-binary/a (mut i32) (i32.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -3231,6 +3231,14 @@ call $~lib/builtins/abort unreachable end + memory.size + i32.const 16 + i32.shl + i32.const 20060 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1552 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/resolve-binary.untouched.wat b/tests/compiler/resolve-binary.untouched.wat index 2d6dabba02..26da053160 100644 --- a/tests/compiler/resolve-binary.untouched.wat +++ b/tests/compiler/resolve-binary.untouched.wat @@ -71,7 +71,7 @@ (global $resolve-binary/a (mut i32) (i32.const 0)) (global $resolve-binary/f (mut f64) (f64.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -7117,6 +7117,14 @@ call $~lib/builtins/abort unreachable end + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 528 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index 5cf0f66572..4724411859 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -67,7 +67,7 @@ (data (i32.const 3344) "\06\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 3372) "\01\19\00\00\02\00\00\00A\00\00\00\05\00\00\00A\00\00\00\02") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -3419,6 +3419,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store offset=16 + memory.size + i32.const 16 + i32.shl + i32.const 19780 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1280 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/resolve-elementaccess.untouched.wat b/tests/compiler/resolve-elementaccess.untouched.wat index 04d432b432..8fa25ef5a7 100644 --- a/tests/compiler/resolve-elementaccess.untouched.wat +++ b/tests/compiler/resolve-elementaccess.untouched.wat @@ -55,7 +55,7 @@ (data (i32.const 3776) "\06\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\19\00\00\02\00\00\00A\00\00\00\05\00\00\00A\00\00\00\02\00\00\00") (table $0 1 funcref) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -5960,6 +5960,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store offset=16 + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 256 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index d7aa45daa7..42c2cb0a6f 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -1,7 +1,7 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_=>_none (func (param i32 i32))) (type $none_=>_none (func)) + (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) @@ -41,7 +41,7 @@ (table $0 4 funcref) (elem (i32.const 1) $start:resolve-function-expression~anonymous|0 $start:resolve-function-expression~anonymous|1 $start:resolve-function-expression~anonymous|2) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1789,79 +1789,7 @@ unreachable ) (func $~start - (local $0 i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - i32.const 2 - i32.const 1056 - i32.load - call_indirect (type $i32_=>_i32) - i32.const 42 - i32.ne - if - i32.const 0 - i32.const 1088 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - i32.const 1168 - i32.load - call_indirect (type $i32_=>_i32) - i32.const 42 - i32.ne - if - i32.const 0 - i32.const 1088 - i32.const 6 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 1568 - call $~lib/rt/itcms/initLazy - global.set $~lib/rt/itcms/pinSpace - i32.const 1600 - call $~lib/rt/itcms/initLazy - global.set $~lib/rt/itcms/toSpace - i32.const 1744 - call $~lib/rt/itcms/initLazy - global.set $~lib/rt/itcms/fromSpace - i32.const 0 - i32.const 1200 - i32.load - call_indirect (type $i32_=>_i32) - call $~lib/util/number/itoa32 - local.set $0 - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 1952 - i32.store offset=4 - local.get $0 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 11 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer + call $start:resolve-function-expression ) (func $~stack_check global.get $~lib/memory/__stack_pointer @@ -2016,117 +1944,199 @@ global.set $~lib/memory/__stack_pointer i32.const 0 ) - (func $~lib/util/number/itoa32 (param $0 i32) (result i32) + (func $start:resolve-function-expression + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $0 - i32.eqz + i64.const 0 + i64.store + i32.const 2 + i32.const 1056 + i32.load + call_indirect (type $i32_=>_i32) + i32.const 42 + i32.ne if - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - i32.const 1424 - return + i32.const 0 + i32.const 1088 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable end - global.get $~lib/memory/__stack_pointer - i32.const 0 - local.get $0 - i32.sub - local.get $0 - local.get $0 - i32.const 31 - i32.shr_u - local.tee $2 - select - local.tee $0 - i32.const 10 - i32.ge_u - i32.const 1 - i32.add - local.get $0 - i32.const 10000 - i32.ge_u - i32.const 3 - i32.add - local.get $0 - i32.const 1000 - i32.ge_u - i32.add - local.get $0 - i32.const 100 - i32.lt_u - select - local.get $0 - i32.const 1000000 - i32.ge_u - i32.const 6 - i32.add - local.get $0 - i32.const 1000000000 - i32.ge_u - i32.const 8 - i32.add - local.get $0 - i32.const 100000000 - i32.ge_u - i32.add - local.get $0 - i32.const 10000000 - i32.lt_u - select - local.get $0 - i32.const 100000 - i32.lt_u - select - local.get $2 - i32.add - local.tee $3 i32.const 1 + i32.const 1168 + i32.load + call_indirect (type $i32_=>_i32) + i32.const 42 + i32.ne + if + i32.const 0 + i32.const 1088 + i32.const 6 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + memory.size + i32.const 16 i32.shl - call $~lib/rt/itcms/__new - local.tee $1 + i32.const 18388 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold + i32.const 1568 + call $~lib/rt/itcms/initLazy + global.set $~lib/rt/itcms/pinSpace + i32.const 1600 + call $~lib/rt/itcms/initLazy + global.set $~lib/rt/itcms/toSpace + i32.const 1744 + call $~lib/rt/itcms/initLazy + global.set $~lib/rt/itcms/fromSpace + i32.const 0 + i32.const 1200 + i32.load + call_indirect (type $i32_=>_i32) + local.set $0 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 i32.store - loop $do-continue|0 - local.get $1 - local.get $3 - i32.const 1 + block $__inlined_func$~lib/util/number/itoa32 + local.get $0 + i32.eqz + if + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + i32.const 1424 + local.set $1 + br $__inlined_func$~lib/util/number/itoa32 + end + global.get $~lib/memory/__stack_pointer + i32.const 0 + local.get $0 i32.sub - local.tee $3 + local.get $0 + local.get $0 + i32.const 31 + i32.shr_u + local.tee $2 + select + local.tee $0 + i32.const 10 + i32.ge_u i32.const 1 - i32.shl i32.add local.get $0 - i32.const 10 - i32.rem_u - i32.const 48 + i32.const 10000 + i32.ge_u + i32.const 3 i32.add - i32.store16 local.get $0 - i32.const 10 - i32.div_u - local.tee $0 - br_if $do-continue|0 + i32.const 1000 + i32.ge_u + i32.add + local.get $0 + i32.const 100 + i32.lt_u + select + local.get $0 + i32.const 1000000 + i32.ge_u + i32.const 6 + i32.add + local.get $0 + i32.const 1000000000 + i32.ge_u + i32.const 8 + i32.add + local.get $0 + i32.const 100000000 + i32.ge_u + i32.add + local.get $0 + i32.const 10000000 + i32.lt_u + select + local.get $0 + i32.const 100000 + i32.lt_u + select + local.get $2 + i32.add + local.tee $3 + i32.const 1 + i32.shl + call $~lib/rt/itcms/__new + local.tee $1 + i32.store + loop $do-continue|0 + local.get $1 + local.get $3 + i32.const 1 + i32.sub + local.tee $3 + i32.const 1 + i32.shl + i32.add + local.get $0 + i32.const 10 + i32.rem_u + i32.const 48 + i32.add + i32.store16 + local.get $0 + i32.const 10 + i32.div_u + local.tee $0 + br_if $do-continue|0 + end + local.get $2 + if + local.get $1 + i32.const 45 + i32.store16 + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer end - local.get $2 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 1952 + i32.store offset=4 + local.get $1 + call $~lib/string/String.__eq + i32.eqz if - local.get $1 - i32.const 45 - i32.store16 + i32.const 0 + i32.const 1088 + i32.const 11 + i32.const 1 + call $~lib/builtins/abort + unreachable end global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $1 ) ) diff --git a/tests/compiler/resolve-function-expression.untouched.wat b/tests/compiler/resolve-function-expression.untouched.wat index b897b3f434..923d5da53b 100644 --- a/tests/compiler/resolve-function-expression.untouched.wat +++ b/tests/compiler/resolve-function-expression.untouched.wat @@ -38,7 +38,7 @@ (elem (i32.const 1) $start:resolve-function-expression~anonymous|0 $start:resolve-function-expression~anonymous|1 $start:resolve-function-expression~anonymous|2) (global $~argumentsLength (mut i32) (i32.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -3140,6 +3140,14 @@ call $~lib/builtins/abort unreachable end + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 544 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/resolve-nested.optimized.wat b/tests/compiler/resolve-nested.optimized.wat index 2b38401607..0e1749d64a 100644 --- a/tests/compiler/resolve-nested.optimized.wat +++ b/tests/compiler/resolve-nested.optimized.wat @@ -23,7 +23,7 @@ (data (i32.const 1440) "\06\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 1468) " \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 ") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1459,6 +1459,14 @@ unreachable ) (func $~start + memory.size + i32.const 16 + i32.shl + i32.const 17876 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1168 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/resolve-nested.untouched.wat b/tests/compiler/resolve-nested.untouched.wat index ba72e8236b..5b0143a85d 100644 --- a/tests/compiler/resolve-nested.untouched.wat +++ b/tests/compiler/resolve-nested.untouched.wat @@ -37,7 +37,7 @@ (global $resolve-nested/b (mut i32) (i32.const 0)) (global $resolve-nested/c (mut i32) (i32.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2535,6 +2535,14 @@ unreachable ) (func $~start + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 144 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/resolve-new.optimized.wat b/tests/compiler/resolve-new.optimized.wat index b07c195fcf..7b54a60a16 100644 --- a/tests/compiler/resolve-new.optimized.wat +++ b/tests/compiler/resolve-new.optimized.wat @@ -21,7 +21,7 @@ (data (i32.const 1440) "\04\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 1468) " ") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1382,6 +1382,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + memory.size + i32.const 16 + i32.shl + i32.const 17860 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1168 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/resolve-new.untouched.wat b/tests/compiler/resolve-new.untouched.wat index 06002da381..8c4f1f9590 100644 --- a/tests/compiler/resolve-new.untouched.wat +++ b/tests/compiler/resolve-new.untouched.wat @@ -21,7 +21,7 @@ (data (i32.const 416) "\04\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2433,6 +2433,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 144 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/resolve-propertyaccess.optimized.wat b/tests/compiler/resolve-propertyaccess.optimized.wat index c6a619a9a7..27c411ef55 100644 --- a/tests/compiler/resolve-propertyaccess.optimized.wat +++ b/tests/compiler/resolve-propertyaccess.optimized.wat @@ -56,7 +56,7 @@ (data (i32.const 2224) "\04\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 2252) " ") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2078,6 +2078,14 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=8 + memory.size + i32.const 16 + i32.shl + i32.const 18644 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1392 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/resolve-propertyaccess.untouched.wat b/tests/compiler/resolve-propertyaccess.untouched.wat index 4bc2f16c85..166b3a73ba 100644 --- a/tests/compiler/resolve-propertyaccess.untouched.wat +++ b/tests/compiler/resolve-propertyaccess.untouched.wat @@ -45,7 +45,7 @@ (table $0 1 funcref) (global $resolve-propertyaccess/Namespace.member i32 (i32.const 1)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -3107,6 +3107,14 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=8 + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 368 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index c28b1ea3ac..6c837bdc49 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -57,7 +57,7 @@ (table $0 5 funcref) (elem (i32.const 1) $start:resolve-ternary~anonymous|0 $start:resolve-ternary~anonymous|1 $resolve-ternary/g1 $resolve-ternary/g2) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2957,6 +2957,14 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store + memory.size + i32.const 16 + i32.shl + i32.const 19572 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1392 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/resolve-ternary.untouched.wat b/tests/compiler/resolve-ternary.untouched.wat index 37e43632ef..ea08a25a3b 100644 --- a/tests/compiler/resolve-ternary.untouched.wat +++ b/tests/compiler/resolve-ternary.untouched.wat @@ -52,7 +52,7 @@ (elem (i32.const 1) $start:resolve-ternary~anonymous|0 $start:resolve-ternary~anonymous|1 $resolve-ternary/g1 $resolve-ternary/g2) (global $resolve-ternary/b (mut i32) (i32.const 1)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -5642,6 +5642,14 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 368 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/resolve-unary.optimized.wat b/tests/compiler/resolve-unary.optimized.wat index 57e0b098ec..c845f133c8 100644 --- a/tests/compiler/resolve-unary.optimized.wat +++ b/tests/compiler/resolve-unary.optimized.wat @@ -60,7 +60,7 @@ (data (i32.const 2272) "\05\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 2300) " \00\00\00\00\00\00\00 ") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2103,6 +2103,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store offset=16 + memory.size + i32.const 16 + i32.shl + i32.const 18700 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1392 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/resolve-unary.untouched.wat b/tests/compiler/resolve-unary.untouched.wat index 9bdc145660..d3b809a21d 100644 --- a/tests/compiler/resolve-unary.untouched.wat +++ b/tests/compiler/resolve-unary.untouched.wat @@ -46,7 +46,7 @@ (data (i32.const 2704) "\05\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -3163,6 +3163,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store offset=16 + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 368 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/rt/finalize.optimized.wat b/tests/compiler/rt/finalize.optimized.wat index f5bcd6d819..be16fffa83 100644 --- a/tests/compiler/rt/finalize.optimized.wat +++ b/tests/compiler/rt/finalize.optimized.wat @@ -1,7 +1,7 @@ (module + (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $none_=>_none (func)) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -25,7 +25,7 @@ (global $rt/finalize/expect (mut i32) (i32.const 0)) (global $rt/finalize/ran (mut i32) (i32.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1361,44 +1361,17 @@ end local.get $1 ) - (func $~lib/rt/__visit_members (param $0 i32) - block $invalid - block $rt/finalize/Ref - block $~lib/arraybuffer/ArrayBufferView - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $rt/finalize/Ref $invalid - end - return - end - return - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - call $~lib/rt/itcms/__visit - end - return - end - return - end - unreachable - ) - (func $~start + (func $start:rt/finalize (local $0 i32) (local $1 i32) - global.get $~started - if - return - end + memory.size + i32.const 16 + i32.shl + i32.const 17908 + i32.sub i32.const 1 - global.set $~started + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1168 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace @@ -1552,4 +1525,42 @@ unreachable end ) + (func $~lib/rt/__visit_members (param $0 i32) + block $invalid + block $rt/finalize/Ref + block $~lib/arraybuffer/ArrayBufferView + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $rt/finalize/Ref $invalid + end + return + end + return + end + local.get $0 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/rt/itcms/__visit + end + return + end + return + end + unreachable + ) + (func $~start + global.get $~started + if + return + end + i32.const 1 + global.set $~started + call $start:rt/finalize + ) ) diff --git a/tests/compiler/rt/finalize.untouched.wat b/tests/compiler/rt/finalize.untouched.wat index c68a3115a0..e131fb6a65 100644 --- a/tests/compiler/rt/finalize.untouched.wat +++ b/tests/compiler/rt/finalize.untouched.wat @@ -24,7 +24,7 @@ (global $rt/finalize/expect (mut i32) (i32.const 0)) (global $rt/finalize/ran (mut i32) (i32.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2431,6 +2431,14 @@ drop ) (func $start:rt/finalize + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 144 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/rt/instanceof.optimized.wat b/tests/compiler/rt/instanceof.optimized.wat index 1eb7fd2f5e..91970978eb 100644 --- a/tests/compiler/rt/instanceof.optimized.wat +++ b/tests/compiler/rt/instanceof.optimized.wat @@ -24,7 +24,7 @@ (data (i32.const 1504) "\06\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 1532) " \00\00\00\00\00\00\00 \00\00\00\03\00\00\00 \00\00\00\04") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1498,6 +1498,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + memory.size + i32.const 16 + i32.shl + i32.const 17940 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1168 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/rt/instanceof.untouched.wat b/tests/compiler/rt/instanceof.untouched.wat index e2313d516b..b47d0a1e3e 100644 --- a/tests/compiler/rt/instanceof.untouched.wat +++ b/tests/compiler/rt/instanceof.untouched.wat @@ -22,7 +22,7 @@ (data (i32.const 480) "\06\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\03\00\00\00 \00\00\00\04\00\00\00") (table $0 1 funcref) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2412,6 +2412,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 144 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/rt/runtime-incremental-export.optimized.wat b/tests/compiler/rt/runtime-incremental-export.optimized.wat index 9d7eb3b5f0..e8eb27890d 100644 --- a/tests/compiler/rt/runtime-incremental-export.optimized.wat +++ b/tests/compiler/rt/runtime-incremental-export.optimized.wat @@ -25,7 +25,7 @@ (data (i32.const 1512) "\01\00\00\00(\00\00\00O\00b\00j\00e\00c\00t\00 \00i\00s\00 \00n\00o\00t\00 \00p\00i\00n\00n\00e\00d") (data (i32.const 1568) "\03\00\00\00 \00\00\00\00\00\00\00 ") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1870,6 +1870,14 @@ unreachable ) (func $~start + memory.size + i32.const 16 + i32.shl + i32.const 17980 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1168 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/rt/runtime-incremental-export.untouched.wat b/tests/compiler/rt/runtime-incremental-export.untouched.wat index 126cbaf008..8b7ff30ef2 100644 --- a/tests/compiler/rt/runtime-incremental-export.untouched.wat +++ b/tests/compiler/rt/runtime-incremental-export.untouched.wat @@ -23,7 +23,7 @@ (data (i32.const 544) "\03\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2529,6 +2529,14 @@ unreachable ) (func $~start + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 144 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std-wasi/console.optimized.wat b/tests/compiler/std-wasi/console.optimized.wat index a8a778edb3..b4148eddc0 100644 --- a/tests/compiler/std-wasi/console.optimized.wat +++ b/tests/compiler/std-wasi/console.optimized.wat @@ -259,7 +259,7 @@ (data (i32.const 6396) "\10\02\82") (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -3189,26 +3189,36 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/util/hash/hashStr (param $0 i32) (result i32) + (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - i32.const -2128831035 - local.set $1 - local.get $0 - if + i64.const 0 + i64.store + block $~lib/util/hash/hashStr|inlined.0 (result i32) global.get $~lib/memory/__stack_pointer local.get $0 i32.store + i32.const 0 + local.get $0 + i32.eqz + br_if $~lib/util/hash/hashStr|inlined.0 + drop + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 local.get $0 + local.tee $1 i32.const 20 i32.sub i32.load offset=16 @@ -3216,34 +3226,181 @@ i32.shr_u i32.const 1 i32.shl - local.set $3 - loop $for-loop|0 + local.tee $3 + i32.const 16 + i32.ge_u + if (result i32) + i32.const 606290984 + local.set $2 + i32.const -2048144777 + local.set $4 + i32.const 1640531535 + local.set $5 + local.get $1 + local.get $3 + i32.add + i32.const 16 + i32.sub + local.set $7 + loop $while-continue|0 + local.get $1 + local.get $7 + i32.le_u + if + local.get $2 + local.get $1 + i32.load + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $2 + local.get $4 + local.get $1 + i32.load offset=4 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $4 + local.get $6 + local.get $1 + i32.load offset=8 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $6 + local.get $5 + local.get $1 + i32.load offset=12 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $5 + local.get $1 + i32.const 16 + i32.add + local.set $1 + br $while-continue|0 + end + end + local.get $3 local.get $2 + i32.const 1 + i32.rotl + local.get $4 + i32.const 7 + i32.rotl + i32.add + local.get $6 + i32.const 12 + i32.rotl + i32.add + local.get $5 + i32.const 18 + i32.rotl + i32.add + i32.add + else local.get $3 - i32.lt_u + i32.const 374761393 + i32.add + end + local.set $2 + local.get $0 + local.get $3 + i32.add + i32.const 4 + i32.sub + local.set $4 + loop $while-continue|1 + local.get $1 + local.get $4 + i32.le_u if - local.get $1 - local.get $0 local.get $2 + local.get $1 + i32.load + i32.const -1028477379 + i32.mul i32.add - i32.load8_u - i32.xor - i32.const 16777619 + i32.const 17 + i32.rotl + i32.const 668265263 i32.mul + local.set $2 + local.get $1 + i32.const 4 + i32.add local.set $1 + br $while-continue|1 + end + end + local.get $0 + local.get $3 + i32.add + local.set $0 + loop $while-continue|2 + local.get $0 + local.get $1 + i32.gt_u + if local.get $2 - i32.const 1 + local.get $1 + i32.load8_u + i32.const 374761393 + i32.mul i32.add + i32.const 11 + i32.rotl + i32.const -1640531535 + i32.mul local.set $2 - br $for-loop|0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|2 end end + local.get $2 + local.get $2 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor end global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $1 ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -3458,7 +3615,7 @@ ) (func $~lib/map/Map<~lib/string/String,u64>#has (param $0 i32) (param $1 i32) (result i32) global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -3466,8 +3623,8 @@ i64.const 0 i64.store global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 + i32.const 0 + i32.store offset=8 global.get $~lib/memory/__stack_pointer local.get $0 i32.store @@ -3477,18 +3634,15 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=8 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=12 local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String> call $~lib/map/Map<~lib/string/String,u64>#find i32.const 0 i32.ne global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer ) @@ -3501,7 +3655,7 @@ (local $7 i32) (local $8 i32) global.get $~lib/memory/__stack_pointer - i32.const 20 + i32.const 16 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -3512,9 +3666,6 @@ i64.const 0 i64.store offset=8 global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store offset=16 - global.get $~lib/memory/__stack_pointer local.get $1 i32.const 1 i32.add @@ -3573,13 +3724,10 @@ global.get $~lib/memory/__stack_pointer local.get $7 i32.store offset=12 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=16 local.get $2 local.get $6 local.get $7 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String> local.get $1 i32.and i32.const 2 @@ -3620,7 +3768,7 @@ i32.load offset=20 i32.store offset=16 global.get $~lib/memory/__stack_pointer - i32.const 20 + i32.const 16 i32.add global.set $~lib/memory/__stack_pointer ) @@ -3642,18 +3790,15 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store - global.get $~lib/memory/__stack_pointer local.get $1 - i32.store offset=4 - local.get $1 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String> local.set $4 global.get $~lib/memory/__stack_pointer local.get $0 - i32.store offset=4 + i32.store global.get $~lib/memory/__stack_pointer local.get $1 - i32.store offset=8 + i32.store offset=4 local.get $0 local.get $1 local.get $4 @@ -3672,7 +3817,7 @@ if global.get $~lib/memory/__stack_pointer local.get $0 - i32.store offset=4 + i32.store local.get $0 local.get $0 i32.load offset=20 @@ -3700,7 +3845,7 @@ local.get $0 i32.load offset=8 local.tee $3 - i32.store + i32.store offset=8 local.get $0 local.get $0 i32.load offset=16 @@ -3834,7 +3979,7 @@ local.get $0 i32.store offset=4 global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -3842,8 +3987,8 @@ i64.const 0 i64.store global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 + i32.const 0 + i32.store offset=8 global.get $~lib/memory/__stack_pointer local.get $1 i32.store @@ -3853,13 +3998,10 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=8 - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store offset=12 local.get $1 local.get $0 local.get $0 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String> call $~lib/map/Map<~lib/string/String,u64>#find local.tee $1 i32.eqz @@ -3875,7 +4017,7 @@ i64.load offset=8 local.set $2 global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer call $~lib/process/process.hrtime @@ -3979,7 +4121,7 @@ (func $~lib/map/Map<~lib/string/String,u64>#delete (param $0 i32) (param $1 i32) (local $2 i32) global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -3987,8 +4129,8 @@ i64.const 0 i64.store global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 + i32.const 0 + i32.store offset=8 global.get $~lib/memory/__stack_pointer local.get $0 i32.store @@ -3998,19 +4140,16 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=8 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=12 local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String> call $~lib/map/Map<~lib/string/String,u64>#find local.tee $1 i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer return @@ -4065,7 +4204,7 @@ call $~lib/map/Map<~lib/string/String,u64>#rehash end global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer ) @@ -4297,6 +4436,14 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer + memory.size + i32.const 16 + i32.shl + i32.const 22788 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 4928 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std-wasi/console.untouched.wat b/tests/compiler/std-wasi/console.untouched.wat index a25988e8c7..49a669b241 100644 --- a/tests/compiler/std-wasi/console.untouched.wat +++ b/tests/compiler/std-wasi/console.untouched.wat @@ -156,7 +156,7 @@ (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) (global $~lib/process/process.stdout i32 (i32.const 1)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -5155,69 +5155,281 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/util/hash/hashStr (param $0 i32) (result i32) + (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - i32.const -2128831035 - local.set $1 - local.get $0 - i32.const 0 - i32.ne - if - i32.const 0 - local.set $2 - local.get $0 - local.set $5 + i64.const 0 + i64.store + i32.const 1 + drop + block $~lib/util/hash/hashStr|inlined.0 (result i32) global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $0 + local.tee $1 i32.store - local.get $5 + local.get $1 + i32.const 0 + i32.eq + if + i32.const 0 + br $~lib/util/hash/hashStr|inlined.0 + end + local.get $1 + local.set $13 + global.get $~lib/memory/__stack_pointer + local.get $13 + i32.store offset=4 + local.get $13 call $~lib/string/String#get:length i32.const 1 i32.shl + local.set $2 + local.get $2 local.set $3 - loop $for-loop|0 - local.get $2 + local.get $1 + local.set $4 + local.get $3 + i32.const 16 + i32.ge_u + if + i32.const 0 + i32.const -1640531535 + i32.add + i32.const -2048144777 + i32.add + local.set $5 + i32.const 0 + i32.const -2048144777 + i32.add + local.set $6 + i32.const 0 + local.set $7 + i32.const 0 + i32.const -1640531535 + i32.sub + local.set $8 local.get $3 - i32.lt_u - local.set $4 local.get $4 + i32.add + i32.const 16 + i32.sub + local.set $9 + loop $while-continue|0 + local.get $4 + local.get $9 + i32.le_u + local.set $10 + local.get $10 + if + local.get $5 + local.set $12 + local.get $4 + i32.load + local.set $11 + local.get $12 + local.get $11 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $5 + local.get $6 + local.set $12 + local.get $4 + i32.load offset=4 + local.set $11 + local.get $12 + local.get $11 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $6 + local.get $7 + local.set $12 + local.get $4 + i32.load offset=8 + local.set $11 + local.get $12 + local.get $11 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $7 + local.get $8 + local.set $12 + local.get $4 + i32.load offset=12 + local.set $11 + local.get $12 + local.get $11 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $8 + local.get $4 + i32.const 16 + i32.add + local.set $4 + br $while-continue|0 + end + end + local.get $2 + local.get $5 + i32.const 1 + i32.rotl + local.get $6 + i32.const 7 + i32.rotl + i32.add + local.get $7 + i32.const 12 + i32.rotl + i32.add + local.get $8 + i32.const 18 + i32.rotl + i32.add + i32.add + local.set $2 + else + local.get $2 + i32.const 0 + i32.const 374761393 + i32.add + i32.add + local.set $2 + end + local.get $1 + local.get $3 + i32.add + i32.const 4 + i32.sub + local.set $9 + loop $while-continue|1 + local.get $4 + local.get $9 + i32.le_u + local.set $8 + local.get $8 if - local.get $1 - local.get $0 local.get $2 + local.get $4 + i32.load + i32.const -1028477379 + i32.mul i32.add + local.set $2 + local.get $2 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $2 + local.get $4 + i32.const 4 + i32.add + local.set $4 + br $while-continue|1 + end + end + local.get $1 + local.get $3 + i32.add + local.set $9 + loop $while-continue|2 + local.get $4 + local.get $9 + i32.lt_u + local.set $8 + local.get $8 + if + local.get $2 + local.get $4 i32.load8_u - i32.xor - i32.const 16777619 + i32.const 374761393 i32.mul - local.set $1 + i32.add + local.set $2 local.get $2 + i32.const 11 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $2 + local.get $4 i32.const 1 i32.add - local.set $2 - br $for-loop|0 + local.set $4 + br $while-continue|2 end end + local.get $2 + local.get $2 + i32.const 15 + i32.shr_u + i32.xor + local.set $2 + local.get $2 + i32.const -2048144777 + i32.mul + local.set $2 + local.get $2 + local.get $2 + i32.const 13 + i32.shr_u + i32.xor + local.set $2 + local.get $2 + i32.const -1028477379 + i32.mul + local.set $2 + local.get $2 + local.get $2 + i32.const 16 + i32.shr_u + i32.xor + local.set $2 + local.get $2 end - local.get $1 - local.set $5 + local.set $13 global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $5 + local.get $13 + return ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -5397,9 +5609,8 @@ ) (func $~lib/map/Map<~lib/string/String,u64>#has (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -5407,45 +5618,36 @@ i64.const 0 i64.store global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 + i32.const 0 + i32.store offset=8 local.get $0 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 local.get $1 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store offset=4 - local.get $3 - block $~lib/util/hash/HASH<~lib/string/String>|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - local.get $1 - local.tee $2 - i32.store offset=8 - i32.const 1 - drop - local.get $2 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store offset=12 - local.get $3 - call $~lib/util/hash/hashStr - br $~lib/util/hash/HASH<~lib/string/String>|inlined.0 - end + local.get $2 + local.get $1 + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $2 + call $~lib/util/hash/HASH<~lib/string/String> call $~lib/map/Map<~lib/string/String,u64>#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) (func $~lib/map/Map<~lib/string/String,u64>#rehash (param $0 i32) (param $1 i32) (local $2 i32) @@ -5463,7 +5665,7 @@ (local $14 i32) (local $15 i32) global.get $~lib/memory/__stack_pointer - i32.const 20 + i32.const 16 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -5473,9 +5675,6 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store offset=16 local.get $1 i32.const 1 i32.add @@ -5543,22 +5742,13 @@ local.get $10 i64.load offset=8 call $~lib/map/MapEntry<~lib/string/String,u64>#set:value - block $~lib/util/hash/HASH<~lib/string/String>|inlined.2 (result i32) - global.get $~lib/memory/__stack_pointer - local.get $12 - local.tee $13 - i32.store offset=12 - i32.const 1 - drop - local.get $13 - local.set $15 - global.get $~lib/memory/__stack_pointer - local.get $15 - i32.store offset=16 - local.get $15 - call $~lib/util/hash/hashStr - br $~lib/util/hash/HASH<~lib/string/String>|inlined.2 - end + local.get $12 + local.set $15 + global.get $~lib/memory/__stack_pointer + local.get $15 + i32.store offset=12 + local.get $15 + call $~lib/util/hash/HASH<~lib/string/String> local.get $1 i32.and local.set $13 @@ -5604,7 +5794,7 @@ i32.load offset=20 call $~lib/map/Map<~lib/string/String,u64>#set:entriesOffset global.get $~lib/memory/__stack_pointer - i32.const 20 + i32.const 16 i32.add global.set $~lib/memory/__stack_pointer ) @@ -5625,41 +5815,32 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store offset=8 - block $~lib/util/hash/HASH<~lib/string/String>|inlined.1 (result i32) - global.get $~lib/memory/__stack_pointer - local.get $1 - local.tee $3 - i32.store - i32.const 1 - drop - local.get $3 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - call $~lib/util/hash/hashStr - br $~lib/util/hash/HASH<~lib/string/String>|inlined.1 - end - local.set $4 + local.get $1 + local.set $7 + global.get $~lib/memory/__stack_pointer + local.get $7 + i32.store + local.get $7 + call $~lib/util/hash/HASH<~lib/string/String> + local.set $3 local.get $0 local.set $7 global.get $~lib/memory/__stack_pointer local.get $7 - i32.store offset=4 + i32.store local.get $7 local.get $1 local.set $7 global.get $~lib/memory/__stack_pointer local.get $7 - i32.store offset=8 + i32.store offset=4 local.get $7 - local.get $4 + local.get $3 call $~lib/map/Map<~lib/string/String,u64>#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry<~lib/string/String,u64>#set:value i32.const 0 @@ -5675,7 +5856,7 @@ local.set $7 global.get $~lib/memory/__stack_pointer local.get $7 - i32.store offset=4 + i32.store local.get $7 local.get $0 i32.load offset=20 @@ -5702,9 +5883,9 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $3 - i32.store - local.get $3 + local.tee $5 + i32.store offset=8 + local.get $5 local.get $0 local.get $0 i32.load offset=16 @@ -5716,8 +5897,8 @@ i32.const 24 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 call $~lib/map/MapEntry<~lib/string/String,u64>#set:key i32.const 1 @@ -5726,7 +5907,7 @@ local.get $1 i32.const 1 call $~lib/rt/itcms/__link - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry<~lib/string/String,u64>#set:value i32.const 0 @@ -5739,7 +5920,7 @@ call $~lib/map/Map<~lib/string/String,u64>#set:entriesCount local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -5747,12 +5928,12 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load call $~lib/map/MapEntry<~lib/string/String,u64>#set:taggedNext local.get $6 - local.get $5 + local.get $4 i32.store end local.get $0 @@ -5843,10 +6024,9 @@ (func $~lib/map/Map<~lib/string/String,u64>#get (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i64) + (local $4 i64) global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -5854,39 +6034,30 @@ i64.const 0 i64.store global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 + i32.const 0 + i32.store offset=8 local.get $0 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $3 i32.store - local.get $4 + local.get $3 local.get $1 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $3 i32.store offset=4 - local.get $4 - block $~lib/util/hash/HASH<~lib/string/String>|inlined.3 (result i32) - global.get $~lib/memory/__stack_pointer - local.get $1 - local.tee $2 - i32.store offset=8 - i32.const 1 - drop - local.get $2 - local.set $4 - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.store offset=12 - local.get $4 - call $~lib/util/hash/hashStr - br $~lib/util/hash/HASH<~lib/string/String>|inlined.3 - end - call $~lib/map/Map<~lib/string/String,u64>#find + local.get $3 + local.get $1 local.set $3 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store offset=8 local.get $3 + call $~lib/util/hash/HASH<~lib/string/String> + call $~lib/map/Map<~lib/string/String,u64>#find + local.set $2 + local.get $2 i32.eqz if i32.const 4560 @@ -5896,14 +6067,14 @@ call $~lib/wasi/index/abort unreachable end - local.get $3 + local.get $2 i64.load offset=8 - local.set $5 + local.set $4 global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer - local.get $5 + local.get $4 ) (func $~lib/console/timeLogImpl (param $0 i32) (local $1 i64) @@ -6070,7 +6241,7 @@ (local $5 i32) (local $6 i32) global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -6078,8 +6249,8 @@ i64.const 0 i64.store global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 + i32.const 0 + i32.store offset=8 local.get $0 local.set $6 global.get $~lib/memory/__stack_pointer @@ -6092,38 +6263,29 @@ local.get $6 i32.store offset=4 local.get $6 - block $~lib/util/hash/HASH<~lib/string/String>|inlined.4 (result i32) - global.get $~lib/memory/__stack_pointer - local.get $1 - local.tee $2 - i32.store offset=8 - i32.const 1 - drop - local.get $2 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=12 - local.get $6 - call $~lib/util/hash/hashStr - br $~lib/util/hash/HASH<~lib/string/String>|inlined.4 - end + local.get $1 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=8 + local.get $6 + call $~lib/util/hash/HASH<~lib/string/String> call $~lib/map/Map<~lib/string/String,u64>#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 local.set $6 global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer local.get $6 return end - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=16 i32.const 1 i32.or @@ -6138,16 +6300,16 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=20 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -6172,13 +6334,13 @@ local.get $6 i32.store local.get $6 - local.get $4 + local.get $3 call $~lib/map/Map<~lib/string/String,u64>#rehash end i32.const 1 local.set $6 global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer local.get $6 @@ -6328,6 +6490,14 @@ i32.store offset=4 local.get $0 call $~lib/console/console.error + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 3904 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std-wasi/crypto.optimized.wat b/tests/compiler/std-wasi/crypto.optimized.wat index ab521cd2fc..801c477100 100644 --- a/tests/compiler/std-wasi/crypto.optimized.wat +++ b/tests/compiler/std-wasi/crypto.optimized.wat @@ -212,7 +212,7 @@ (data (i32.const 5328) "\04\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 5356) "A\00\00\00\02") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -4015,6 +4015,14 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=8 + memory.size + i32.const 16 + i32.shl + i32.const 21748 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1280 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std-wasi/crypto.untouched.wat b/tests/compiler/std-wasi/crypto.untouched.wat index 0aa27edb93..99bc93fb05 100644 --- a/tests/compiler/std-wasi/crypto.untouched.wat +++ b/tests/compiler/std-wasi/crypto.untouched.wat @@ -123,7 +123,7 @@ (data (i32.const 5760) "\04\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00A\00\00\00\02\00\00\00") (table $0 1 funcref) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -6741,6 +6741,14 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=8 + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 256 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std-wasi/process.optimized.wat b/tests/compiler/std-wasi/process.optimized.wat index da7395c88c..e4186dea2f 100644 --- a/tests/compiler/std-wasi/process.optimized.wat +++ b/tests/compiler/std-wasi/process.optimized.wat @@ -242,7 +242,7 @@ (data (i32.const 5868) "\02A\00\00\00\00\00\00\10A\82") (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -4004,26 +4004,36 @@ global.set $~lib/memory/__stack_pointer local.get $1 ) - (func $~lib/util/hash/hashStr (param $0 i32) (result i32) + (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - i32.const -2128831035 - local.set $1 - local.get $0 - if + i64.const 0 + i64.store + block $~lib/util/hash/hashStr|inlined.0 (result i32) global.get $~lib/memory/__stack_pointer local.get $0 i32.store + i32.const 0 + local.get $0 + i32.eqz + br_if $~lib/util/hash/hashStr|inlined.0 + drop + global.get $~lib/memory/__stack_pointer local.get $0 + i32.store offset=4 + local.get $0 + local.tee $1 i32.const 20 i32.sub i32.load offset=16 @@ -4031,34 +4041,181 @@ i32.shr_u i32.const 1 i32.shl - local.set $3 - loop $for-loop|0 + local.tee $3 + i32.const 16 + i32.ge_u + if (result i32) + i32.const 606290984 + local.set $2 + i32.const -2048144777 + local.set $4 + i32.const 1640531535 + local.set $5 + local.get $1 + local.get $3 + i32.add + i32.const 16 + i32.sub + local.set $7 + loop $while-continue|0 + local.get $1 + local.get $7 + i32.le_u + if + local.get $2 + local.get $1 + i32.load + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $2 + local.get $4 + local.get $1 + i32.load offset=4 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $4 + local.get $6 + local.get $1 + i32.load offset=8 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $6 + local.get $5 + local.get $1 + i32.load offset=12 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $5 + local.get $1 + i32.const 16 + i32.add + local.set $1 + br $while-continue|0 + end + end + local.get $3 local.get $2 + i32.const 1 + i32.rotl + local.get $4 + i32.const 7 + i32.rotl + i32.add + local.get $6 + i32.const 12 + i32.rotl + i32.add + local.get $5 + i32.const 18 + i32.rotl + i32.add + i32.add + else local.get $3 - i32.lt_u + i32.const 374761393 + i32.add + end + local.set $2 + local.get $0 + local.get $3 + i32.add + i32.const 4 + i32.sub + local.set $4 + loop $while-continue|1 + local.get $1 + local.get $4 + i32.le_u if - local.get $1 - local.get $0 local.get $2 + local.get $1 + i32.load + i32.const -1028477379 + i32.mul i32.add - i32.load8_u - i32.xor - i32.const 16777619 + i32.const 17 + i32.rotl + i32.const 668265263 i32.mul + local.set $2 + local.get $1 + i32.const 4 + i32.add local.set $1 + br $while-continue|1 + end + end + local.get $0 + local.get $3 + i32.add + local.set $0 + loop $while-continue|2 + local.get $0 + local.get $1 + i32.gt_u + if local.get $2 - i32.const 1 + local.get $1 + i32.load8_u + i32.const 374761393 + i32.mul i32.add + i32.const 11 + i32.rotl + i32.const -1640531535 + i32.mul local.set $2 - br $for-loop|0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|2 end end + local.get $2 + local.get $2 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor end global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $1 ) (func $~lib/map/Map<~lib/string/String,~lib/string/String>#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -4210,7 +4367,7 @@ (local $7 i32) (local $8 i32) global.get $~lib/memory/__stack_pointer - i32.const 20 + i32.const 16 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -4221,9 +4378,6 @@ i64.const 0 i64.store offset=8 global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store offset=16 - global.get $~lib/memory/__stack_pointer local.get $1 i32.const 1 i32.add @@ -4282,13 +4436,10 @@ global.get $~lib/memory/__stack_pointer local.get $7 i32.store offset=12 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=16 local.get $2 local.get $6 local.get $7 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String> local.get $1 i32.and i32.const 2 @@ -4329,7 +4480,7 @@ i32.load offset=20 i32.store offset=16 global.get $~lib/memory/__stack_pointer - i32.const 20 + i32.const 16 i32.add global.set $~lib/memory/__stack_pointer ) @@ -4351,18 +4502,15 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 local.get $1 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String> local.set $4 global.get $~lib/memory/__stack_pointer local.get $0 - i32.store offset=4 + i32.store global.get $~lib/memory/__stack_pointer local.get $1 - i32.store offset=8 + i32.store offset=4 local.get $0 local.get $1 local.get $4 @@ -4385,7 +4533,7 @@ if global.get $~lib/memory/__stack_pointer local.get $0 - i32.store offset=4 + i32.store local.get $0 local.get $0 i32.load offset=20 @@ -4413,7 +4561,7 @@ local.get $0 i32.load offset=8 local.tee $3 - i32.store + i32.store offset=8 local.get $0 local.get $0 i32.load offset=16 @@ -4708,6 +4856,14 @@ i32.store i32.const 4416 call $~lib/console/console.log + memory.size + i32.const 16 + i32.shl + i32.const 22268 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 4592 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace @@ -4898,7 +5054,7 @@ local.get $0 i32.store offset=12 global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -4906,8 +5062,8 @@ i64.const 0 i64.store global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 + i32.const 0 + i32.store offset=8 global.get $~lib/memory/__stack_pointer local.get $2 i32.store @@ -4917,13 +5073,10 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=8 - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store offset=12 local.get $2 local.get $0 local.get $0 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String> call $~lib/map/Map<~lib/string/String,~lib/string/String>#find local.tee $0 i32.eqz @@ -4939,7 +5092,7 @@ i32.load offset=4 local.set $0 global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer diff --git a/tests/compiler/std-wasi/process.untouched.wat b/tests/compiler/std-wasi/process.untouched.wat index 099856cd8f..9bee08f7ef 100644 --- a/tests/compiler/std-wasi/process.untouched.wat +++ b/tests/compiler/std-wasi/process.untouched.wat @@ -148,7 +148,7 @@ (global $~lib/process/process.arch i32 (i32.const 3312)) (global $~lib/process/process.platform i32 (i32.const 3392)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -6960,69 +6960,281 @@ global.set $~lib/memory/__stack_pointer local.get $12 ) - (func $~lib/util/hash/hashStr (param $0 i32) (result i32) + (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - i32.const -2128831035 - local.set $1 - local.get $0 - i32.const 0 - i32.ne - if - i32.const 0 - local.set $2 - local.get $0 - local.set $5 + i64.const 0 + i64.store + i32.const 1 + drop + block $~lib/util/hash/hashStr|inlined.0 (result i32) global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $0 + local.tee $1 i32.store - local.get $5 + local.get $1 + i32.const 0 + i32.eq + if + i32.const 0 + br $~lib/util/hash/hashStr|inlined.0 + end + local.get $1 + local.set $13 + global.get $~lib/memory/__stack_pointer + local.get $13 + i32.store offset=4 + local.get $13 call $~lib/string/String#get:length i32.const 1 i32.shl + local.set $2 + local.get $2 local.set $3 - loop $for-loop|0 - local.get $2 + local.get $1 + local.set $4 + local.get $3 + i32.const 16 + i32.ge_u + if + i32.const 0 + i32.const -1640531535 + i32.add + i32.const -2048144777 + i32.add + local.set $5 + i32.const 0 + i32.const -2048144777 + i32.add + local.set $6 + i32.const 0 + local.set $7 + i32.const 0 + i32.const -1640531535 + i32.sub + local.set $8 local.get $3 - i32.lt_u - local.set $4 local.get $4 + i32.add + i32.const 16 + i32.sub + local.set $9 + loop $while-continue|0 + local.get $4 + local.get $9 + i32.le_u + local.set $10 + local.get $10 + if + local.get $5 + local.set $12 + local.get $4 + i32.load + local.set $11 + local.get $12 + local.get $11 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $5 + local.get $6 + local.set $12 + local.get $4 + i32.load offset=4 + local.set $11 + local.get $12 + local.get $11 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $6 + local.get $7 + local.set $12 + local.get $4 + i32.load offset=8 + local.set $11 + local.get $12 + local.get $11 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $7 + local.get $8 + local.set $12 + local.get $4 + i32.load offset=12 + local.set $11 + local.get $12 + local.get $11 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $8 + local.get $4 + i32.const 16 + i32.add + local.set $4 + br $while-continue|0 + end + end + local.get $2 + local.get $5 + i32.const 1 + i32.rotl + local.get $6 + i32.const 7 + i32.rotl + i32.add + local.get $7 + i32.const 12 + i32.rotl + i32.add + local.get $8 + i32.const 18 + i32.rotl + i32.add + i32.add + local.set $2 + else + local.get $2 + i32.const 0 + i32.const 374761393 + i32.add + i32.add + local.set $2 + end + local.get $1 + local.get $3 + i32.add + i32.const 4 + i32.sub + local.set $9 + loop $while-continue|1 + local.get $4 + local.get $9 + i32.le_u + local.set $8 + local.get $8 if - local.get $1 - local.get $0 local.get $2 + local.get $4 + i32.load + i32.const -1028477379 + i32.mul + i32.add + local.set $2 + local.get $2 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $2 + local.get $4 + i32.const 4 i32.add + local.set $4 + br $while-continue|1 + end + end + local.get $1 + local.get $3 + i32.add + local.set $9 + loop $while-continue|2 + local.get $4 + local.get $9 + i32.lt_u + local.set $8 + local.get $8 + if + local.get $2 + local.get $4 i32.load8_u - i32.xor - i32.const 16777619 + i32.const 374761393 i32.mul - local.set $1 + i32.add + local.set $2 local.get $2 + i32.const 11 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $2 + local.get $4 i32.const 1 i32.add - local.set $2 - br $for-loop|0 + local.set $4 + br $while-continue|2 end end + local.get $2 + local.get $2 + i32.const 15 + i32.shr_u + i32.xor + local.set $2 + local.get $2 + i32.const -2048144777 + i32.mul + local.set $2 + local.get $2 + local.get $2 + i32.const 13 + i32.shr_u + i32.xor + local.set $2 + local.get $2 + i32.const -1028477379 + i32.mul + local.set $2 + local.get $2 + local.get $2 + i32.const 16 + i32.shr_u + i32.xor + local.set $2 + local.get $2 end - local.get $1 - local.set $5 + local.set $13 global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $5 + local.get $13 + return ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -7216,7 +7428,7 @@ (local $14 i32) (local $15 i32) global.get $~lib/memory/__stack_pointer - i32.const 20 + i32.const 16 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -7226,9 +7438,6 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store offset=16 local.get $1 i32.const 1 i32.add @@ -7296,22 +7505,13 @@ local.get $10 i32.load offset=4 call $~lib/map/MapEntry<~lib/string/String,~lib/string/String>#set:value - block $~lib/util/hash/HASH<~lib/string/String>|inlined.1 (result i32) - global.get $~lib/memory/__stack_pointer - local.get $12 - local.tee $13 - i32.store offset=12 - i32.const 1 - drop - local.get $13 - local.set $15 - global.get $~lib/memory/__stack_pointer - local.get $15 - i32.store offset=16 - local.get $15 - call $~lib/util/hash/hashStr - br $~lib/util/hash/HASH<~lib/string/String>|inlined.1 - end + local.get $12 + local.set $15 + global.get $~lib/memory/__stack_pointer + local.get $15 + i32.store offset=12 + local.get $15 + call $~lib/util/hash/HASH<~lib/string/String> local.get $1 i32.and local.set $13 @@ -7357,7 +7557,7 @@ i32.load offset=20 call $~lib/map/Map<~lib/string/String,~lib/string/String>#set:entriesOffset global.get $~lib/memory/__stack_pointer - i32.const 20 + i32.const 16 i32.add global.set $~lib/memory/__stack_pointer ) @@ -7378,41 +7578,32 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store offset=8 - block $~lib/util/hash/HASH<~lib/string/String>|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - local.get $1 - local.tee $3 - i32.store - i32.const 1 - drop - local.get $3 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - call $~lib/util/hash/hashStr - br $~lib/util/hash/HASH<~lib/string/String>|inlined.0 - end - local.set $4 + local.get $1 + local.set $7 + global.get $~lib/memory/__stack_pointer + local.get $7 + i32.store + local.get $7 + call $~lib/util/hash/HASH<~lib/string/String> + local.set $3 local.get $0 local.set $7 global.get $~lib/memory/__stack_pointer local.get $7 - i32.store offset=4 + i32.store local.get $7 local.get $1 local.set $7 global.get $~lib/memory/__stack_pointer local.get $7 - i32.store offset=8 + i32.store offset=4 local.get $7 - local.get $4 + local.get $3 call $~lib/map/Map<~lib/string/String,~lib/string/String>#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry<~lib/string/String,~lib/string/String>#set:value i32.const 1 @@ -7432,7 +7623,7 @@ local.set $7 global.get $~lib/memory/__stack_pointer local.get $7 - i32.store offset=4 + i32.store local.get $7 local.get $0 i32.load offset=20 @@ -7459,9 +7650,9 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $3 - i32.store - local.get $3 + local.tee $5 + i32.store offset=8 + local.get $5 local.get $0 local.get $0 i32.load offset=16 @@ -7473,8 +7664,8 @@ i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 call $~lib/map/MapEntry<~lib/string/String,~lib/string/String>#set:key i32.const 1 @@ -7483,7 +7674,7 @@ local.get $1 i32.const 1 call $~lib/rt/itcms/__link - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry<~lib/string/String,~lib/string/String>#set:value i32.const 1 @@ -7500,7 +7691,7 @@ call $~lib/map/Map<~lib/string/String,~lib/string/String>#set:entriesCount local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -7508,12 +7699,12 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load call $~lib/map/MapEntry<~lib/string/String,~lib/string/String>#set:taggedNext local.get $6 - local.get $5 + local.get $4 i32.store end local.get $0 @@ -7836,9 +8027,8 @@ (func $~lib/map/Map<~lib/string/String,~lib/string/String>#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -7846,39 +8036,30 @@ i64.const 0 i64.store global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 + i32.const 0 + i32.store offset=8 local.get $0 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $3 i32.store - local.get $4 + local.get $3 local.get $1 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $3 i32.store offset=4 - local.get $4 - block $~lib/util/hash/HASH<~lib/string/String>|inlined.2 (result i32) - global.get $~lib/memory/__stack_pointer - local.get $1 - local.tee $2 - i32.store offset=8 - i32.const 1 - drop - local.get $2 - local.set $4 - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.store offset=12 - local.get $4 - call $~lib/util/hash/hashStr - br $~lib/util/hash/HASH<~lib/string/String>|inlined.2 - end - call $~lib/map/Map<~lib/string/String,~lib/string/String>#find + local.get $3 + local.get $1 local.set $3 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store offset=8 local.get $3 + call $~lib/util/hash/HASH<~lib/string/String> + call $~lib/map/Map<~lib/string/String,~lib/string/String>#find + local.set $2 + local.get $2 i32.eqz if i32.const 4256 @@ -7888,14 +8069,14 @@ call $~lib/wasi/index/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer - local.get $4 + local.get $3 ) (func $start:std-wasi/process (local $0 i32) @@ -7942,6 +8123,14 @@ i32.store local.get $4 call $~lib/console/console.log + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 3568 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 3b0027aaf7..080ca27869 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -40,7 +40,7 @@ (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 1424)) (global $std/array-literal/i (mut i32) (i32.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2145,6 +2145,14 @@ call $~lib/builtins/abort unreachable end + memory.size + i32.const 16 + i32.shl + i32.const 18252 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1584 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index c45526d90c..a582a60cb7 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -34,7 +34,7 @@ (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 400)) (global $std/array-literal/i (mut i32) (i32.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -4332,6 +4332,14 @@ call $~lib/builtins/abort unreachable end + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 560 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index e11c61e8a0..99fc7a24b4 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -558,7 +558,7 @@ (table $0 59 funcref) (elem (i32.const 1) $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|2 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|16 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR<~lib/string/String|null>~anonymous|0 $~lib/util/sort/COMPARATOR<~lib/string/String|null>~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR<~lib/string/String|null>~anonymous|0) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -13161,6 +13161,14 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=64 + memory.size + i32.const 16 + i32.shl + i32.const 30004 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1264 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index 0a4c0ba7a7..c07bde57b3 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -308,7 +308,7 @@ (table $0 59 funcref) (elem (i32.const 1) $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|4 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|18 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|30 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|34 $start:std/array~anonymous|35 $start:std/array~anonymous|36 $start:std/array~anonymous|37 $start:std/array~anonymous|38 $start:std/array~anonymous|39 $start:std/array~anonymous|40 $start:std/array~anonymous|41 $start:std/array~anonymous|42 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|1 $start:std/array~anonymous|43 $start:std/array~anonymous|44 $start:std/array~anonymous|45 $start:std/array~anonymous|46 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR<~lib/string/String|null>~anonymous|0 $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|1) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -23917,6 +23917,14 @@ i32.const 8 i32.eq drop + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 240 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 7d9dcc18ce..4bbe70f90d 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -33,7 +33,7 @@ (data (i32.const 1712) "\10\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 1740) "\02\t\00\00\00\00\00\00A\08\00\00\02\00\00\00A\00\00\00\02\00\00\00A\00\00\00\02\00\00\00\81\08\00\00\02\00\00\00\81\00\00\00\02\00\00\00\01\t\00\00\02\00\00\00\01\01\00\00\02\00\00\00\01\n\00\00\02\00\00\00\01\02\00\00\02\00\00\00\01\19\00\00\02\00\00\00\01\1a\00\00\02") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2135,6 +2135,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store offset=16 + memory.size + i32.const 16 + i32.shl + i32.const 18228 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1280 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index e7a1629609..8b4d252985 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -27,7 +27,7 @@ (data (i32.const 688) "\10\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\t\00\00\00\00\00\00A\08\00\00\02\00\00\00A\00\00\00\02\00\00\00A\00\00\00\02\00\00\00\81\08\00\00\02\00\00\00\81\00\00\00\02\00\00\00\01\t\00\00\02\00\00\00\01\01\00\00\02\00\00\00\01\n\00\00\02\00\00\00\01\02\00\00\02\00\00\00\01\19\00\00\02\00\00\00\01\1a\00\00\02\00\00\00\00\00\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -4566,6 +4566,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store offset=16 + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 256 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index eedea45d77..4db534413b 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -40,7 +40,7 @@ (data (i32.const 1744) "\05\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 1772) "A\00\00\00\02") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2499,6 +2499,14 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=8 + memory.size + i32.const 16 + i32.shl + i32.const 18172 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1280 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index 92f869bc6b..7c4659f1d8 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -34,7 +34,7 @@ (data (i32.const 720) "\05\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00A\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -3655,6 +3655,14 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=8 + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 256 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index fb415c9904..b0b9904199 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -28,7 +28,7 @@ (data (i32.const 1516) " ") (global $std/date/creationTime (mut i64) (i64.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1580,6 +1580,14 @@ call $~lib/builtins/abort unreachable end + memory.size + i32.const 16 + i32.shl + i32.const 17908 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1216 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index 0a002819d3..06e5eaf644 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -31,7 +31,7 @@ (table $0 1 funcref) (global $std/date/creationTime (mut i64) (i64.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2582,6 +2582,14 @@ call $~lib/builtins/abort unreachable end + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 192 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index cc0385aa42..bb737a8ee1 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -54,7 +54,7 @@ (data (i32.const 1760) " \00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 1788) "\10\89\10\00\00\00\00\00B\08\00\00\00\00\00\00\02\t\00\00\00\00\00\00P\88\10\00\00\00\00\00\10\t\12\00\00\00\00\00\10\89\00\00\00\00\00\00B\00\00\00\00\00\00\00P\80\00\00\00\00\00\00\10\t\11\00\00\00\00\00\82\08\00\00\00\00\00\00\90\08\11\00\00\00\00\00\10\t\01\00\00\00\00\00\82\00\00\00\00\00\00\00\90\00\01\00\00\00\00\00\10\t\02\00\00\00\00\00\02\01\00\00\00\00\00\00\10\01\02\00\00\00\00\00\10\t\14\00\00\00\00\00\02\n\00\00\00\00\00\00\10\n\14\00\00\00\00\00\10\t\04\00\00\00\00\00\02\02\00\00\00\00\00\00\10\02\04\00\00\00\00\00\10\t2\00\00\00\00\00\02\19\00\00\00\00\00\00\10\192\00\00\00\00\00\10\t4\00\00\00\00\00\02\1a\00\00\00\00\00\00\10\1a4") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -5088,6 +5088,14 @@ call $~lib/rt/itcms/__visit ) (func $~start + memory.size + i32.const 16 + i32.shl + i32.const 18404 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1168 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index 9ee9e571ab..3a3461a428 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -48,7 +48,7 @@ (data (i32.const 736) " \00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\10\89\10\00\00\00\00\00B\08\00\00\00\00\00\00\02\t\00\00\00\00\00\00P\88\10\00\00\00\00\00\10\t\12\00\00\00\00\00\10\89\00\00\00\00\00\00B\00\00\00\00\00\00\00P\80\00\00\00\00\00\00\10\t\11\00\00\00\00\00\82\08\00\00\00\00\00\00\90\08\11\00\00\00\00\00\10\t\01\00\00\00\00\00\82\00\00\00\00\00\00\00\90\00\01\00\00\00\00\00\10\t\02\00\00\00\00\00\02\01\00\00\00\00\00\00\10\01\02\00\00\00\00\00\10\t\14\00\00\00\00\00\02\n\00\00\00\00\00\00\10\n\14\00\00\00\00\00\10\t\04\00\00\00\00\00\02\02\00\00\00\00\00\00\10\02\04\00\00\00\00\00\10\t2\00\00\00\00\00\02\19\00\00\00\00\00\00\10\192\00\00\00\00\00\10\t4\00\00\00\00\00\02\1a\00\00\00\00\00\00\10\1a4\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -10310,6 +10310,14 @@ drop ) (func $start:std/map + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 144 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index 2e823962d3..befc2361b6 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -21,7 +21,7 @@ (data (i32.const 1440) "\04\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 1468) " ") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1477,6 +1477,14 @@ ) (func $~start (local $0 i32) + memory.size + i32.const 16 + i32.shl + i32.const 17860 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1168 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index f19d64df92..78fcc95b18 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -24,7 +24,7 @@ (table $0 1 funcref) (global $std/new/AClass.aStaticField (mut i32) (i32.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2366,6 +2366,14 @@ local.get $3 ) (func $start:std/new + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 144 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index b4569b335d..06db26fe72 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -24,7 +24,7 @@ (data (i32.const 1520) "\06\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 1548) " \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 ") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1992,6 +1992,14 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=8 + memory.size + i32.const 16 + i32.shl + i32.const 17956 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1168 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index 9a06ab7d90..52e857ca17 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -22,7 +22,7 @@ (data (i32.const 496) "\06\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -3519,6 +3519,14 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=8 + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 144 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 4e866282c8..7225cfd99e 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -47,7 +47,7 @@ (data (i32.const 1648) "\17\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 1676) "H\08\00\00\00\00\00\00B\08\00\00\00\00\00\00H\00\00\00\00\00\00\00B\00\00\00\00\00\00\00\88\08\00\00\00\00\00\00\82\08\00\00\00\00\00\00\88\00\00\00\00\00\00\00\82\00\00\00\00\00\00\00\08\t\00\00\00\00\00\00\02\t\00\00\00\00\00\00\08\01\00\00\00\00\00\00\02\01\00\00\00\00\00\00\08\n\00\00\00\00\00\00\02\n\00\00\00\00\00\00\08\02\00\00\00\00\00\00\02\02\00\00\00\00\00\00\08\19\00\00\00\00\00\00\02\19\00\00\00\00\00\00\08\1a\00\00\00\00\00\00\02\1a") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -4167,6 +4167,14 @@ call $~lib/rt/itcms/__visit ) (func $~start + memory.size + i32.const 16 + i32.shl + i32.const 18220 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1168 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index c862ca4524..1800cb0624 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -43,7 +43,7 @@ (data (i32.const 624) "\17\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00H\08\00\00\00\00\00\00B\08\00\00\00\00\00\00H\00\00\00\00\00\00\00B\00\00\00\00\00\00\00\88\08\00\00\00\00\00\00\82\08\00\00\00\00\00\00\88\00\00\00\00\00\00\00\82\00\00\00\00\00\00\00\08\t\00\00\00\00\00\00\02\t\00\00\00\00\00\00\08\01\00\00\00\00\00\00\02\01\00\00\00\00\00\00\08\n\00\00\00\00\00\00\02\n\00\00\00\00\00\00\08\02\00\00\00\00\00\00\02\02\00\00\00\00\00\00\08\19\00\00\00\00\00\00\02\19\00\00\00\00\00\00\08\1a\00\00\00\00\00\00\02\1a\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -7998,6 +7998,14 @@ drop ) (func $start:std/set + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 144 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index 8de736e3e1..afccdbc042 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -48,7 +48,7 @@ (data (i32.const 1952) "\07\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 1980) "\02\t\00\00\00\00\00\00\02\n\00\00\00\00\00\00\02\19\00\00\00\00\00\00\02\1a") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2262,6 +2262,14 @@ call $~lib/builtins/abort unreachable end + memory.size + i32.const 16 + i32.shl + i32.const 18396 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1744 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index e79a7de4a3..af9511d13f 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -42,7 +42,7 @@ (global $std/static-array/f i32 (i32.const 240)) (global $std/static-array/F i32 (i32.const 336)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -4433,6 +4433,14 @@ call $~lib/builtins/abort unreachable end + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 720 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index 4ca04ec913..d69bc16bd0 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -33,7 +33,7 @@ (data (i32.const 1664) "\06\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 1692) "$\t\00\00\00\00\00\00 \00\00\00\00\00\00\00\04A") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2289,6 +2289,14 @@ call $~lib/builtins/abort unreachable end + memory.size + i32.const 16 + i32.shl + i32.const 18100 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1456 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/staticarray.untouched.wat b/tests/compiler/std/staticarray.untouched.wat index 7b7baa58b3..894b3a60b3 100644 --- a/tests/compiler/std/staticarray.untouched.wat +++ b/tests/compiler/std/staticarray.untouched.wat @@ -28,7 +28,7 @@ (global $std/staticarray/arr1 i32 (i32.const 32)) (global $std/staticarray/arr2 i32 (i32.const 256)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -4177,6 +4177,14 @@ call $~lib/builtins/abort unreachable end + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 432 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 415d279817..c02f51ef46 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -467,7 +467,7 @@ (data (i32.const 19376) "\04\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 19404) "\a4") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -3783,6 +3783,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store offset=24 + memory.size + i32.const 16 + i32.shl + i32.const 35796 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1200 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace @@ -5768,36 +5776,36 @@ global.get $~lib/memory/__stack_pointer local.get $6 call $~lib/string/String.fromCodePoint - local.tee $7 + local.tee $5 i32.store offset=16 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $5 call $~lib/string/String#toLowerCase - local.tee $5 + local.tee $7 i32.store offset=20 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $5 call $~lib/string/String#toUpperCase - local.tee $7 + local.tee $5 i32.store offset=24 global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $7 i32.store - local.get $5 + local.get $7 i32.const 0 call $~lib/string/String#codePointAt i64.extend_i32_s local.set $0 global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $7 i32.store - local.get $5 + local.get $7 i32.const 1 call $~lib/string/String#codePointAt i64.extend_i32_s @@ -5813,9 +5821,9 @@ local.set $0 end global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $7 i32.store - local.get $5 + local.get $7 i32.const 2 call $~lib/string/String#codePointAt i64.extend_i32_s @@ -5831,17 +5839,17 @@ local.set $0 end global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $5 i32.store - local.get $7 + local.get $5 i32.const 0 call $~lib/string/String#codePointAt i64.extend_i32_s local.set $3 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $5 i32.store - local.get $7 + local.get $5 i32.const 1 call $~lib/string/String#codePointAt i64.extend_i32_s @@ -5857,9 +5865,9 @@ local.set $3 end global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $5 i32.store - local.get $7 + local.get $5 i32.const 2 call $~lib/string/String#codePointAt i64.extend_i32_s diff --git a/tests/compiler/std/string-casemapping.untouched.wat b/tests/compiler/std/string-casemapping.untouched.wat index 3a6484c036..1d0a7b2513 100644 --- a/tests/compiler/std/string-casemapping.untouched.wat +++ b/tests/compiler/std/string-casemapping.untouched.wat @@ -201,7 +201,7 @@ (data (i32.const 20064) "\04\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\a4\00\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -6174,6 +6174,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store offset=24 + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 176 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index d8955f4b62..4cb455648e 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -48,7 +48,7 @@ (data (i32.const 14984) "\01\00\00\00\ba\1c\00\00S\00e\00n\00t\00e\00n\00c\00e\00s\00 \00t\00h\00a\00t\00 \00c\00o\00n\00t\00a\00i\00n\00 \00a\00l\00l\00 \00l\00e\00t\00t\00e\00r\00s\00 \00c\00o\00m\00m\00o\00n\00l\00y\00 \00u\00s\00e\00d\00 \00i\00n\00 \00a\00 \00l\00a\00n\00g\00u\00a\00g\00e\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00M\00a\00r\00k\00u\00s\00 \00K\00u\00h\00n\00 \00<\00h\00t\00t\00p\00:\00/\00/\00w\00w\00w\00.\00c\00l\00.\00c\00a\00m\00.\00a\00c\00.\00u\00k\00/\00~\00m\00g\00k\002\005\00/\00>\00 \00-\00-\00 \002\000\001\002\00-\000\004\00-\001\001\00\n\00\n\00T\00h\00i\00s\00 \00i\00s\00 \00a\00n\00 \00e\00x\00a\00m\00p\00l\00e\00 \00o\00f\00 \00a\00 \00p\00l\00a\00i\00n\00-\00t\00e\00x\00t\00 \00f\00i\00l\00e\00 \00e\00n\00c\00o\00d\00e\00d\00 \00i\00n\00 \00U\00T\00F\00-\008\00.\00\n\00\n\00\n\00D\00a\00n\00i\00s\00h\00 \00(\00d\00a\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00Q\00u\00i\00z\00d\00e\00l\00t\00a\00g\00e\00r\00n\00e\00 \00s\00p\00i\00s\00t\00e\00 \00j\00o\00r\00d\00b\00\e6\00r\00 \00m\00e\00d\00 \00f\00l\00\f8\00d\00e\00,\00 \00m\00e\00n\00s\00 \00c\00i\00r\00k\00u\00s\00k\00l\00o\00v\00n\00e\00n\00\n\00 \00 \00W\00o\00l\00t\00h\00e\00r\00 \00s\00p\00i\00l\00l\00e\00d\00e\00 \00p\00\e5\00 \00x\00y\00l\00o\00f\00o\00n\00.\00\n\00 \00 \00(\00=\00 \00Q\00u\00i\00z\00 \00c\00o\00n\00t\00e\00s\00t\00a\00n\00t\00s\00 \00w\00e\00r\00e\00 \00e\00a\00t\00i\00n\00g\00 \00s\00t\00r\00a\00w\00b\00e\00r\00y\00 \00w\00i\00t\00h\00 \00c\00r\00e\00a\00m\00 \00w\00h\00i\00l\00e\00 \00W\00o\00l\00t\00h\00e\00r\00\n\00 \00 \00t\00h\00e\00 \00c\00i\00r\00c\00u\00s\00 \00c\00l\00o\00w\00n\00 \00p\00l\00a\00y\00e\00d\00 \00o\00n\00 \00x\00y\00l\00o\00p\00h\00o\00n\00e\00.\00)\00\n\00\n\00G\00e\00r\00m\00a\00n\00 \00(\00d\00e\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00F\00a\00l\00s\00c\00h\00e\00s\00 \00\dc\00b\00e\00n\00 \00v\00o\00n\00 \00X\00y\00l\00o\00p\00h\00o\00n\00m\00u\00s\00i\00k\00 \00q\00u\00\e4\00l\00t\00 \00j\00e\00d\00e\00n\00 \00g\00r\00\f6\00\df\00e\00r\00e\00n\00 \00Z\00w\00e\00r\00g\00\n\00 \00 \00(\00=\00 \00W\00r\00o\00n\00g\00f\00u\00l\00 \00p\00r\00a\00c\00t\00i\00c\00i\00n\00g\00 \00o\00f\00 \00x\00y\00l\00o\00p\00h\00o\00n\00e\00 \00m\00u\00s\00i\00c\00 \00t\00o\00r\00t\00u\00r\00e\00s\00 \00e\00v\00e\00r\00y\00 \00l\00a\00r\00g\00e\00r\00 \00d\00w\00a\00r\00f\00)\00\n\00\n\00 \00 \00Z\00w\00\f6\00l\00f\00 \00B\00o\00x\00k\00\e4\00m\00p\00f\00e\00r\00 \00j\00a\00g\00t\00e\00n\00 \00E\00v\00a\00 \00q\00u\00e\00r\00 \00\fc\00b\00e\00r\00 \00d\00e\00n\00 \00S\00y\00l\00t\00e\00r\00 \00D\00e\00i\00c\00h\00\n\00 \00 \00(\00=\00 \00T\00w\00e\00l\00v\00e\00 \00b\00o\00x\00i\00n\00g\00 \00f\00i\00g\00h\00t\00e\00r\00s\00 \00h\00u\00n\00t\00e\00d\00 \00E\00v\00a\00 \00a\00c\00r\00o\00s\00s\00 \00t\00h\00e\00 \00d\00i\00k\00e\00 \00o\00f\00 \00S\00y\00l\00t\00)\00\n\00\n\00 \00 \00H\00e\00i\00z\00\f6\00l\00r\00\fc\00c\00k\00s\00t\00o\00\df\00a\00b\00d\00\e4\00m\00p\00f\00u\00n\00g\00\n\00 \00 \00(\00=\00 \00f\00u\00e\00l\00 \00o\00i\00l\00 \00r\00e\00c\00o\00i\00l\00 \00a\00b\00s\00o\00r\00b\00e\00r\00)\00\n\00 \00 \00(\00j\00q\00v\00w\00x\00y\00 \00m\00i\00s\00s\00i\00n\00g\00,\00 \00b\00u\00t\00 \00a\00l\00l\00 \00n\00o\00n\00-\00A\00S\00C\00I\00I\00 \00l\00e\00t\00t\00e\00r\00s\00 \00i\00n\00 \00o\00n\00e\00 \00w\00o\00r\00d\00)\00\n\00\n\00G\00r\00e\00e\00k\00 \00(\00e\00l\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00\93\03\b1\03\b6\03\ad\03\b5\03\c2\03 \00\ba\03\b1\03v\1f \00\bc\03\c5\03\c1\03\c4\03\b9\03r\1f\c2\03 \00\b4\03r\1f\bd\03 \00\b8\03p\1f \00\b2\03\c1\03\f6\1f \00\c0\03\b9\03p\1f \00\c3\03\c4\03x\1f \00\c7\03\c1\03\c5\03\c3\03\b1\03\c6\03v\1f \00\be\03\ad\03\c6\03\c9\03\c4\03\bf\03\n\00 \00 \00(\00=\00 \00N\00o\00 \00m\00o\00r\00e\00 \00s\00h\00a\00l\00l\00 \00I\00 \00s\00e\00e\00 \00a\00c\00a\00c\00i\00a\00s\00 \00o\00r\00 \00m\00y\00r\00t\00l\00e\00s\00 \00i\00n\00 \00t\00h\00e\00 \00g\00o\00l\00d\00e\00n\00 \00c\00l\00e\00a\00r\00i\00n\00g\00)\00\n\00\n\00 \00 \00\9e\03\b5\03\c3\03\ba\03\b5\03\c0\03\ac\03\b6\03\c9\03 \00\c4\03t\1f\bd\03 \00\c8\03\c5\03\c7\03\bf\03\c6\03\b8\03\cc\03\c1\03\b1\03 \00\b2\03\b4\03\b5\03\bb\03\c5\03\b3\03\bc\03\af\03\b1\03\n\00 \00 \00(\00=\00 \00I\00 \00u\00n\00c\00o\00v\00e\00r\00 \00t\00h\00e\00 \00s\00o\00u\00l\00-\00d\00e\00s\00t\00r\00o\00y\00i\00n\00g\00 \00a\00b\00h\00o\00r\00r\00e\00n\00c\00e\00)\00\n\00\n\00E\00n\00g\00l\00i\00s\00h\00 \00(\00e\00n\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00T\00h\00e\00 \00q\00u\00i\00c\00k\00 \00b\00r\00o\00w\00n\00 \00f\00o\00x\00 \00j\00u\00m\00p\00s\00 \00o\00v\00e\00r\00 \00t\00h\00e\00 \00l\00a\00z\00y\00 \00d\00o\00g\00\n\00\n\00S\00p\00a\00n\00i\00s\00h\00 \00(\00e\00s\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00E\00l\00 \00p\00i\00n\00g\00\fc\00i\00n\00o\00 \00W\00e\00n\00c\00e\00s\00l\00a\00o\00 \00h\00i\00z\00o\00 \00k\00i\00l\00\f3\00m\00e\00t\00r\00o\00s\00 \00b\00a\00j\00o\00 \00e\00x\00h\00a\00u\00s\00t\00i\00v\00a\00 \00l\00l\00u\00v\00i\00a\00 \00y\00\n\00 \00 \00f\00r\00\ed\00o\00,\00 \00a\00\f1\00o\00r\00a\00b\00a\00 \00a\00 \00s\00u\00 \00q\00u\00e\00r\00i\00d\00o\00 \00c\00a\00c\00h\00o\00r\00r\00o\00.\00\n\00 \00 \00(\00C\00o\00n\00t\00a\00i\00n\00s\00 \00e\00v\00e\00r\00y\00 \00l\00e\00t\00t\00e\00r\00 \00a\00n\00d\00 \00e\00v\00e\00r\00y\00 \00a\00c\00c\00e\00n\00t\00,\00 \00b\00u\00t\00 \00n\00o\00t\00 \00e\00v\00e\00r\00y\00 \00c\00o\00m\00b\00i\00n\00a\00t\00i\00o\00n\00\n\00 \00 \00o\00f\00 \00v\00o\00w\00e\00l\00 \00+\00 \00a\00c\00u\00t\00e\00.\00)\00\n\00\n\00F\00r\00e\00n\00c\00h\00 \00(\00f\00r\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00P\00o\00r\00t\00e\00z\00 \00c\00e\00 \00v\00i\00e\00u\00x\00 \00w\00h\00i\00s\00k\00y\00 \00a\00u\00 \00j\00u\00g\00e\00 \00b\00l\00o\00n\00d\00 \00q\00u\00i\00 \00f\00u\00m\00e\00 \00s\00u\00r\00 \00s\00o\00n\00 \00\ee\00l\00e\00 \00i\00n\00t\00\e9\00r\00i\00e\00u\00r\00e\00,\00 \00\e0\00\n\00 \00 \00c\00\f4\00t\00\e9\00 \00d\00e\00 \00l\00\'\00a\00l\00c\00\f4\00v\00e\00 \00o\00v\00o\00\ef\00d\00e\00,\00 \00o\00\f9\00 \00l\00e\00s\00 \00b\00\fb\00c\00h\00e\00s\00 \00s\00e\00 \00c\00o\00n\00s\00u\00m\00e\00n\00t\00 \00d\00a\00n\00s\00 \00l\00\'\00\e2\00t\00r\00e\00,\00 \00c\00e\00\n\00 \00 \00q\00u\00i\00 \00l\00u\00i\00 \00p\00e\00r\00m\00e\00t\00 \00d\00e\00 \00p\00e\00n\00s\00e\00r\00 \00\e0\00 \00l\00a\00 \00c\00\e6\00n\00o\00g\00e\00n\00\e8\00s\00e\00 \00d\00e\00 \00l\00\'\00\ea\00t\00r\00e\00 \00d\00o\00n\00t\00 \00i\00l\00 \00e\00s\00t\00 \00q\00u\00e\00s\00t\00i\00o\00n\00\n\00 \00 \00d\00a\00n\00s\00 \00l\00a\00 \00c\00a\00u\00s\00e\00 \00a\00m\00b\00i\00g\00u\00\eb\00 \00e\00n\00t\00e\00n\00d\00u\00e\00 \00\e0\00 \00M\00o\00\ff\00,\00 \00d\00a\00n\00s\00 \00u\00n\00 \00c\00a\00p\00h\00a\00r\00n\00a\00\fc\00m\00 \00q\00u\00i\00,\00\n\00 \00 \00p\00e\00n\00s\00e\00-\00t\00-\00i\00l\00,\00 \00d\00i\00m\00i\00n\00u\00e\00 \00\e7\00\e0\00 \00e\00t\00 \00l\00\e0\00 \00l\00a\00 \00q\00u\00a\00l\00i\00t\00\e9\00 \00d\00e\00 \00s\00o\00n\00 \00S\01u\00v\00r\00e\00.\00\n\00\n\00 \00 \00l\00\'\00\ee\00l\00e\00 \00e\00x\00i\00g\00u\00\eb\00\n\00 \00 \00O\00\f9\00 \00l\00\'\00o\00b\00\e8\00s\00e\00 \00j\00u\00r\00y\00 \00m\00\fb\00r\00\n\00 \00 \00F\00\ea\00t\00e\00 \00l\00\'\00h\00a\00\ef\00 \00v\00o\00l\00a\00p\00\fc\00k\00,\00\n\00 \00 \00\c2\00n\00e\00 \00e\00x\00 \00a\00\e9\00q\00u\00o\00 \00a\00u\00 \00w\00h\00i\00s\00t\00,\00\n\00 \00 \00\d4\00t\00e\00z\00 \00c\00e\00 \00v\00S\01u\00 \00d\00\e9\00\e7\00u\00.\00\n\00\n\00 \00 \00L\00e\00 \00c\00S\01u\00r\00 \00d\00\e9\00\e7\00u\00 \00m\00a\00i\00s\00 \00l\00\'\00\e2\00m\00e\00 \00p\00l\00u\00t\00\f4\00t\00 \00n\00a\00\ef\00v\00e\00,\00 \00L\00o\00u\00\ff\00s\00 \00r\00\ea\00v\00a\00 \00d\00e\00 \00c\00r\00a\00p\00a\00\fc\00t\00e\00r\00 \00e\00n\00\n\00 \00 \00c\00a\00n\00o\00\eb\00 \00a\00u\00 \00d\00e\00l\00\e0\00 \00d\00e\00s\00 \00\ee\00l\00e\00s\00,\00 \00p\00r\00\e8\00s\00 \00d\00u\00 \00m\00\e4\00l\00s\00t\00r\00\f6\00m\00 \00o\00\f9\00 \00b\00r\00\fb\00l\00e\00n\00t\00 \00l\00e\00s\00 \00n\00o\00v\00\e6\00.\00\n\00\n\00I\00r\00i\00s\00h\00 \00G\00a\00e\00l\00i\00c\00 \00(\00g\00a\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00D\00\'\00f\00h\00u\00a\00s\00c\00a\00i\00l\00 \00\cd\00o\00s\00a\00,\00 \00\da\00r\00m\00h\00a\00c\00 \00n\00a\00 \00h\00\d3\00i\00g\00h\00e\00 \00B\00e\00a\00n\00n\00a\00i\00t\00h\00e\00,\00 \00p\00\f3\00r\00 \00\c9\00a\00v\00a\00 \00a\00g\00u\00s\00 \00\c1\00d\00h\00a\00i\00m\00h\00\n\00\n\00H\00u\00n\00g\00a\00r\00i\00a\00n\00 \00(\00h\00u\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00\c1\00r\00v\00\ed\00z\00t\00q\01r\00Q\01 \00t\00\fc\00k\00\f6\00r\00f\00\fa\00r\00\f3\00g\00\e9\00p\00\n\00 \00 \00(\00=\00 \00f\00l\00o\00o\00d\00-\00p\00r\00o\00o\00f\00 \00m\00i\00r\00r\00o\00r\00-\00d\00r\00i\00l\00l\00i\00n\00g\00 \00m\00a\00c\00h\00i\00n\00e\00,\00 \00o\00n\00l\00y\00 \00a\00l\00l\00 \00n\00o\00n\00-\00A\00S\00C\00I\00I\00 \00l\00e\00t\00t\00e\00r\00s\00)\00\n\00\n\00I\00c\00e\00l\00a\00n\00d\00i\00c\00 \00(\00i\00s\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00K\00\e6\00m\00i\00 \00n\00\fd\00 \00\f6\00x\00i\00 \00h\00\e9\00r\00 \00y\00k\00i\00s\00t\00 \00\fe\00j\00\f3\00f\00u\00m\00 \00n\00\fa\00 \00b\00\e6\00\f0\00i\00 \00v\00\ed\00l\00 \00o\00g\00 \00\e1\00d\00r\00e\00p\00a\00\n\00\n\00 \00 \00S\00\e6\00v\00\f6\00r\00 \00g\00r\00\e9\00t\00 \00\e1\00\f0\00a\00n\00 \00\fe\00v\00\ed\00 \00\fa\00l\00p\00a\00n\00 \00v\00a\00r\00 \00\f3\00n\00\fd\00t\00\n\00 \00 \00(\00s\00o\00m\00e\00 \00A\00S\00C\00I\00I\00 \00l\00e\00t\00t\00e\00r\00s\00 \00m\00i\00s\00s\00i\00n\00g\00)\00\n\00\n\00J\00a\00p\00a\00n\00e\00s\00e\00 \00(\00j\00p\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00H\00i\00r\00a\00g\00a\00n\00a\00:\00 \00(\00I\00r\00o\00h\00a\00)\00\n\00\n\00 \00 \00D0\8d0o0k0{0x0h0a0\8a0l0\8b0\920\n\00 \00 \00\8f0K0\880_0\8c0]0d0m0j0\890\800\n\00 \00 \00F0\900n0J0O0\840~0Q0u0S0H0f0\n\00 \00 \00B0U0M0\860\810\7f0W0\910r0\820[0Y0\n\00\n\00 \00 \00K\00a\00t\00a\00k\00a\00n\00a\00:\00\n\00\n\00 \00 \00\a40\ed0\cf0\cb0\db0\d80\c80 \00\c10\ea0\cc0\eb0\f20 \00\ef0\ab0\e80\bf0\ec0\bd0 \00\c40\cd0\ca0\e90\e00\n\00 \00 \00\a60\f00\ce0\aa0\af0\e40\de0 \00\b10\d50\b30\a80\c60 \00\a20\b50\ad0\e60\e10\df0\b70 \00\f10\d20\e20\bb0\b90\f30\n\00\n\00H\00e\00b\00r\00e\00w\00 \00(\00i\00w\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00?\00 \00\d3\05\d2\05 \00\e1\05\e7\05\e8\05\df\05 \00\e9\05\d8\05 \00\d1\05\d9\05\dd\05 \00\de\05\d0\05\d5\05\db\05\d6\05\d1\05 \00\d5\05\dc\05\e4\05\ea\05\e2\05 \00\de\05\e6\05\d0\05 \00\dc\05\d5\05 \00\d7\05\d1\05\e8\05\d4\05 \00\d0\05\d9\05\da\05 \00\d4\05\e7\05\dc\05\d9\05\d8\05\d4\05\n\00\n\00P\00o\00l\00i\00s\00h\00 \00(\00p\00l\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00P\00c\00h\00n\00\05\01\07\01 \00w\00 \00t\00\19\01 \00B\01\f3\00d\00z\01 \00j\00e\00|\01a\00 \00l\00u\00b\00 \00o\00[\01m\00 \00s\00k\00r\00z\00y\00D\01 \00f\00i\00g\00\n\00 \00 \00(\00=\00 \00T\00o\00 \00p\00u\00s\00h\00 \00a\00 \00h\00e\00d\00g\00e\00h\00o\00g\00 \00o\00r\00 \00e\00i\00g\00h\00t\00 \00b\00i\00n\00s\00 \00o\00f\00 \00f\00i\00g\00s\00 \00i\00n\00 \00t\00h\00i\00s\00 \00b\00o\00a\00t\00)\00\n\00\n\00R\00u\00s\00s\00i\00a\00n\00 \00(\00r\00u\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00\12\04 \00G\040\04I\040\04E\04 \00N\043\040\04 \006\048\04;\04 \001\04K\04 \00F\048\04B\04@\04C\04A\04?\00 \00\14\040\04,\00 \00=\04>\04 \00D\040\04;\04L\04H\048\042\04K\049\04 \00M\04:\047\045\04<\04?\04;\04O\04@\04!\00\n\00 \00 \00(\00=\00 \00W\00o\00u\00l\00d\00 \00a\00 \00c\00i\00t\00r\00u\00s\00 \00l\00i\00v\00e\00 \00i\00n\00 \00t\00h\00e\00 \00b\00u\00s\00h\00e\00s\00 \00o\00f\00 \00s\00o\00u\00t\00h\00?\00 \00Y\00e\00s\00,\00 \00b\00u\00t\00 \00o\00n\00l\00y\00 \00a\00 \00f\00a\00k\00e\00 \00o\00n\00e\00!\00)\00\n\00\n\00 \00 \00!\04J\045\04H\04L\04 \006\045\04 \005\04I\04Q\04 \00M\04B\048\04E\04 \00<\04O\043\04:\048\04E\04 \00D\04@\040\04=\04F\04C\047\04A\04:\048\04E\04 \001\04C\04;\04>\04:\04 \004\040\04 \002\04K\04?\045\049\04 \00G\040\04N\04\n\00 \00 \00(\00=\00 \00E\00a\00t\00 \00s\00o\00m\00e\00 \00m\00o\00r\00e\00 \00o\00f\00 \00t\00h\00e\00s\00e\00 \00f\00r\00e\00s\00h\00 \00F\00r\00e\00n\00c\00h\00 \00l\00o\00a\00f\00s\00 \00a\00n\00d\00 \00h\00a\00v\00e\00 \00s\00o\00m\00e\00 \00t\00e\00a\00)\00\n\00\n\00T\00h\00a\00i\00 \00(\00t\00h\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00[\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00|\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00]\00\n\00 \00 \00O\0e \00@\0e\1b\0eG\0e\19\0e!\0e\19\0e8\0e)\0e\"\0eL\0e*\0e8\0e\14\0e\1b\0e#\0e0\0e@\0e*\0e#\0e4\0e\10\0e@\0e%\0e4\0e(\0e\04\0e8\0e\13\0e\04\0eH\0e2\0e \00 \00\01\0e\'\0eH\0e2\0e\1a\0e#\0e#\0e\14\0e2\0e\1d\0e9\0e\07\0e*\0e1\0e\15\0e\'\0eL\0e@\0e\14\0e#\0e1\0e\08\0e\t\0e2\0e\19\0e\n\00 \00 \00\08\0e\07\0e\1d\0eH\0e2\0e\1f\0e1\0e\19\0e\1e\0e1\0e\12\0e\19\0e2\0e\'\0e4\0e\n\0e2\0e\01\0e2\0e#\0e \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00-\0e\"\0eH\0e2\0e%\0eI\0e2\0e\07\0e\1c\0e%\0e2\0e\0d\0e$\0eE\0e@\0e\02\0eH\0e\19\0e\06\0eH\0e2\0e\1a\0e5\0e\11\0e2\0eC\0e\04\0e#\0e\n\00 \00 \00D\0e!\0eH\0e\16\0e7\0e-\0eB\0e\17\0e)\0eB\0e\01\0e#\0e\18\0eA\0e\n\0eH\0e\07\0e\0b\0e1\0e\14\0e.\0e6\0e\14\0e.\0e1\0e\14\0e\14\0eH\0e2\0e \00 \00 \00 \00 \00+\0e1\0e\14\0e-\0e \0e1\0e\"\0e@\0e+\0e!\0e7\0e-\0e\19\0e\01\0e5\0e,\0e2\0e-\0e1\0e\n\0e\0c\0e2\0e*\0e1\0e\"\0e\n\00 \00 \00\1b\0e\0f\0e4\0e\1a\0e1\0e\15\0e4\0e\1b\0e#\0e0\0e\1e\0e$\0e\15\0e4\0e\01\0e\0e\0e\01\0e3\0e+\0e\19\0e\14\0eC\0e\08\0e \00 \00 \00 \00 \00 \00 \00 \00\1e\0e9\0e\14\0e\08\0e2\0eC\0e+\0eI\0e\08\0eJ\0e0\0eF\0e \00\08\0eK\0e2\0eF\0e \00\19\0eH\0e2\0e\1f\0e1\0e\07\0e@\0e-\0e\"\0e \00/\0e\n\00\n\00 \00 \00[\00T\00h\00e\00 \00c\00o\00p\00y\00r\00i\00g\00h\00t\00 \00f\00o\00r\00 \00t\00h\00e\00 \00T\00h\00a\00i\00 \00e\00x\00a\00m\00p\00l\00e\00 \00i\00s\00 \00o\00w\00n\00e\00d\00 \00b\00y\00 \00T\00h\00e\00 \00C\00o\00m\00p\00u\00t\00e\00r\00\n\00 \00 \00A\00s\00s\00o\00c\00i\00a\00t\00i\00o\00n\00 \00o\00f\00 \00T\00h\00a\00i\00l\00a\00n\00d\00 \00u\00n\00d\00e\00r\00 \00t\00h\00e\00 \00R\00o\00y\00a\00l\00 \00P\00a\00t\00r\00o\00n\00a\00g\00e\00 \00o\00f\00 \00H\00i\00s\00 \00M\00a\00j\00e\00s\00t\00y\00 \00t\00h\00e\00\n\00 \00 \00K\00i\00n\00g\00.\00]\00\n\00\n\00T\00u\00r\00k\00i\00s\00h\00 \00(\00t\00r\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00P\00i\00j\00a\00m\00a\00l\001\01 \00h\00a\00s\00t\00a\00,\00 \00y\00a\00\1f\011\01z\00 \00_\01o\00f\00\f6\00r\00e\00 \00\e7\00a\00b\00u\00c\00a\00k\00 \00g\00\fc\00v\00e\00n\00d\00i\00.\00\n\00 \00 \00(\00=\00P\00a\00t\00i\00e\00n\00t\00 \00w\00i\00t\00h\00 \00p\00a\00j\00a\00m\00a\00s\00,\00 \00t\00r\00u\00s\00t\00e\00d\00 \00s\00w\00a\00r\00t\00h\00y\00 \00d\00r\00i\00v\00e\00r\00 \00q\00u\00i\00c\00k\00l\00y\00)\00\n") (data (i32.const 22352) "\03\00\00\00 \00\00\00\00\00\00\00 ") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2213,244 +2213,7 @@ unreachable ) (func $~start - (local $0 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 1056 - i32.store - i32.const 1052 - i32.load - i32.const 12 - i32.ne - if - i32.const 0 - i32.const 1088 - i32.const 8 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - i32.const 1264 - call $~lib/rt/itcms/initLazy - global.set $~lib/rt/itcms/pinSpace - i32.const 1296 - call $~lib/rt/itcms/initLazy - global.set $~lib/rt/itcms/toSpace - i32.const 1440 - call $~lib/rt/itcms/initLazy - global.set $~lib/rt/itcms/fromSpace - call $std/string-encoding/testUTF16Encode - global.get $~lib/memory/__stack_pointer - i32.const 16 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i32.const 1056 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 1056 - call $~lib/string/String.UTF16.encode - local.tee $0 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store offset=12 - local.get $0 - call $~lib/string/String.UTF16.decode - local.set $0 - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 1056 - i32.store offset=8 - local.get $0 - i32.const 1056 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 33 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - i32.const 16 - i32.add - global.set $~lib/memory/__stack_pointer - call $std/string-encoding/testUTF16DecodeUnsafe - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 1056 - i32.store - i32.const 1056 - i32.const 0 - call $~lib/string/String.UTF8.byteLength - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 1088 - i32.const 55 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - i32.const 1056 - i32.store - i32.const 1056 - i32.const 1 - call $~lib/string/String.UTF8.byteLength - i32.const 11 - i32.ne - if - i32.const 0 - i32.const 1088 - i32.const 56 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - call $std/string-encoding/testUTF8Encode - call $std/string-encoding/testUTF8EncodeNullTerminated - global.get $~lib/memory/__stack_pointer - i32.const 16 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i32.const 1056 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 1056 - i32.const 0 - call $~lib/string/String.UTF8.encode - local.tee $0 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store offset=12 - local.get $0 - i32.const 0 - call $~lib/string/String.UTF8.decode - local.set $0 - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 1056 - i32.store offset=8 - local.get $0 - i32.const 1056 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 97 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - i32.const 16 - i32.add - global.set $~lib/memory/__stack_pointer - call $std/string-encoding/testUTF8DecodeNullTerminated - call $std/string-encoding/testUTF8DecodeUnsafe - global.get $~lib/memory/__stack_pointer - i32.const 1872 - i32.store - i32.const 1872 - call $std/string-encoding/testLarge - global.get $~lib/memory/__stack_pointer - i32.const 14992 - i32.store - i32.const 14992 - call $std/string-encoding/testLarge - global.get $~lib/rt/itcms/state - i32.const 0 - i32.gt_s - if - loop $while-continue|0 - global.get $~lib/rt/itcms/state - if - call $~lib/rt/itcms/step - drop - br $while-continue|0 - end - end - end - call $~lib/rt/itcms/step - drop - loop $while-continue|1 - global.get $~lib/rt/itcms/state - if - call $~lib/rt/itcms/step - drop - br $while-continue|1 - end - end - global.get $~lib/rt/itcms/total - i64.extend_i32_u - i64.const 200 - i64.mul - i64.const 100 - i64.div_u - i32.wrap_i64 - i32.const 1024 - i32.add - global.set $~lib/rt/itcms/threshold - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer + call $start:std/string-encoding ) (func $~stack_check global.get $~lib/memory/__stack_pointer @@ -3973,6 +3736,254 @@ i32.add global.set $~lib/memory/__stack_pointer ) + (func $start:std/string-encoding + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 1056 + i32.store + i32.const 1052 + i32.load + i32.const 12 + i32.ne + if + i32.const 0 + i32.const 1088 + i32.const 8 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + memory.size + i32.const 16 + i32.shl + i32.const 38764 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold + i32.const 1264 + call $~lib/rt/itcms/initLazy + global.set $~lib/rt/itcms/pinSpace + i32.const 1296 + call $~lib/rt/itcms/initLazy + global.set $~lib/rt/itcms/toSpace + i32.const 1440 + call $~lib/rt/itcms/initLazy + global.set $~lib/rt/itcms/fromSpace + call $std/string-encoding/testUTF16Encode + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i32.const 1056 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 1056 + call $~lib/string/String.UTF16.encode + local.tee $0 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=12 + local.get $0 + call $~lib/string/String.UTF16.decode + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 1056 + i32.store offset=8 + local.get $0 + i32.const 1056 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 33 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.add + global.set $~lib/memory/__stack_pointer + call $std/string-encoding/testUTF16DecodeUnsafe + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 1056 + i32.store + i32.const 1056 + i32.const 0 + call $~lib/string/String.UTF8.byteLength + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 1088 + i32.const 55 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 1056 + i32.store + i32.const 1056 + i32.const 1 + call $~lib/string/String.UTF8.byteLength + i32.const 11 + i32.ne + if + i32.const 0 + i32.const 1088 + i32.const 56 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + call $std/string-encoding/testUTF8Encode + call $std/string-encoding/testUTF8EncodeNullTerminated + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i32.const 1056 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 1056 + i32.const 0 + call $~lib/string/String.UTF8.encode + local.tee $0 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=12 + local.get $0 + i32.const 0 + call $~lib/string/String.UTF8.decode + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 1056 + i32.store offset=8 + local.get $0 + i32.const 1056 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 97 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.add + global.set $~lib/memory/__stack_pointer + call $std/string-encoding/testUTF8DecodeNullTerminated + call $std/string-encoding/testUTF8DecodeUnsafe + global.get $~lib/memory/__stack_pointer + i32.const 1872 + i32.store + i32.const 1872 + call $std/string-encoding/testLarge + global.get $~lib/memory/__stack_pointer + i32.const 14992 + i32.store + i32.const 14992 + call $std/string-encoding/testLarge + global.get $~lib/rt/itcms/state + i32.const 0 + i32.gt_s + if + loop $while-continue|0 + global.get $~lib/rt/itcms/state + if + call $~lib/rt/itcms/step + drop + br $while-continue|0 + end + end + end + call $~lib/rt/itcms/step + drop + loop $while-continue|1 + global.get $~lib/rt/itcms/state + if + call $~lib/rt/itcms/step + drop + br $while-continue|1 + end + end + global.get $~lib/rt/itcms/total + i64.extend_i32_u + i64.const 200 + i64.mul + i64.const 100 + i64.div_u + i32.wrap_i64 + i32.const 1024 + i32.add + global.set $~lib/rt/itcms/threshold + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) (func $~lib/string/String.UTF16.decodeUnsafe (param $0 i32) (param $1 i32) (result i32) (local $2 i32) global.get $~lib/memory/__stack_pointer diff --git a/tests/compiler/std/string-encoding.untouched.wat b/tests/compiler/std/string-encoding.untouched.wat index 12b7c7d7a4..6a893ba8f7 100644 --- a/tests/compiler/std/string-encoding.untouched.wat +++ b/tests/compiler/std/string-encoding.untouched.wat @@ -37,7 +37,7 @@ (table $0 1 funcref) (global $std/string-encoding/str (mut i32) (i32.const 32)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -6074,6 +6074,14 @@ i32.const 0 i32.store call $std/string-encoding/testUTF16Length + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 240 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index a635d06960..33b117cc43 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -897,7 +897,7 @@ (data (i32.const 24028) "\02A\00\00\00\00\00\00\02\t") (global $std/string/str (mut i32) (i32.const 1056)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -8933,6 +8933,14 @@ call $~lib/builtins/abort unreachable end + memory.size + i32.const 16 + i32.shl + i32.const 40428 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1488 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index dce01afcd3..68134caf10 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -474,7 +474,7 @@ (global $std/string/nullStr (mut i32) (i32.const 0)) (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -12675,6 +12675,14 @@ call $~lib/builtins/abort unreachable end + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 464 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index b278b0fb59..e315c860f9 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -79,7 +79,7 @@ (global $std/symbol/sym2 (mut i32) (i32.const 0)) (global $~lib/symbol/stringToId (mut i32) (i32.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -3837,6 +3837,14 @@ call $~lib/builtins/abort unreachable end + memory.size + i32.const 16 + i32.shl + i32.const 19116 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1248 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index 61572c58d1..c5defd3c60 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -52,7 +52,7 @@ (global $std/symbol/sym2 (mut i32) (i32.const 0)) (global $~lib/symbol/stringToId (mut i32) (i32.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -6061,6 +6061,14 @@ call $~lib/builtins/abort unreachable end + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 224 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 65a210c46d..e13f033525 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -568,7 +568,7 @@ (table $0 123 funcref) (elem (i32.const 1) $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -43742,6 +43742,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store offset=32 + memory.size + i32.const 16 + i32.shl + i32.const 30108 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1280 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index 5aa6311073..cd0a9f32e5 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -325,7 +325,7 @@ (global $~lib/typedarray/Float32Array.BYTES_PER_ELEMENT i32 (i32.const 4)) (global $~lib/typedarray/Float64Array.BYTES_PER_ELEMENT i32 (i32.const 8)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -72892,6 +72892,14 @@ i32.const 8 i32.eq drop + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 256 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/super-inline.optimized.wat b/tests/compiler/super-inline.optimized.wat index c367c32172..ee6b222201 100644 --- a/tests/compiler/super-inline.optimized.wat +++ b/tests/compiler/super-inline.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -21,7 +21,7 @@ (data (i32.const 1440) "\05\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 1468) " \00\00\00\00\00\00\00 \00\00\00\03") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1459,6 +1459,22 @@ unreachable ) (func $~start + call $start:super-inline + ) + (func $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 1484 + i32.lt_s + if + i32.const 17888 + i32.const 17936 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + ) + (func $start:super-inline (local $0 i32) global.get $~lib/memory/__stack_pointer i32.const 4 @@ -1468,6 +1484,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + memory.size + i32.const 16 + i32.shl + i32.const 17868 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1168 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace @@ -1484,16 +1508,21 @@ global.get $super-inline/foo local.tee $0 i32.store - local.get $0 - i32.const 8 - i32.sub - i32.load - i32.const 4 - i32.eq - if + block $__inlined_func$super-inline/Foo#a@virtual (result i32) local.get $0 - call $super-inline/Bar#a + i32.const 8 + i32.sub + i32.load + i32.const 4 + i32.eq + if + local.get $0 + call $super-inline/Bar#a + br $__inlined_func$super-inline/Foo#a@virtual + end + i32.const 0 end + drop global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -1527,24 +1556,12 @@ i32.store local.get $0 call $super-inline/Bar#a + drop global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ) - (func $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 1484 - i32.lt_s - if - i32.const 17888 - i32.const 17936 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - ) (func $super-inline/Foo#constructor (param $0 i32) (result i32) global.get $~lib/memory/__stack_pointer i32.const 4 @@ -1569,7 +1586,7 @@ global.set $~lib/memory/__stack_pointer local.get $0 ) - (func $super-inline/Bar#a (param $0 i32) + (func $super-inline/Bar#a (param $0 i32) (result i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -1585,5 +1602,6 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer + i32.const 1 ) ) diff --git a/tests/compiler/super-inline.untouched.wat b/tests/compiler/super-inline.untouched.wat index e08177824a..bb076567c7 100644 --- a/tests/compiler/super-inline.untouched.wat +++ b/tests/compiler/super-inline.untouched.wat @@ -21,7 +21,7 @@ (data (i32.const 416) "\05\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\03\00\00\00") (table $0 1 funcref) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -2504,6 +2504,14 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 144 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/throw.optimized.wat b/tests/compiler/throw.optimized.wat index 36ca9cfada..c330466311 100644 --- a/tests/compiler/throw.optimized.wat +++ b/tests/compiler/throw.optimized.wat @@ -1199,6 +1199,8 @@ i32.const 1584 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/fromSpace + memory.size + drop global.get $~lib/rt/itcms/state i32.const 0 i32.gt_s diff --git a/tests/compiler/throw.untouched.wat b/tests/compiler/throw.untouched.wat index d8a86c368d..715c1c03ad 100644 --- a/tests/compiler/throw.untouched.wat +++ b/tests/compiler/throw.untouched.wat @@ -37,7 +37,7 @@ (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 704)) (global $~lib/memory/__data_end i32 (i32.const 732)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 17116)) @@ -1718,6 +1718,14 @@ i32.const 560 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/fromSpace + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold call $~lib/rt/itcms/__collect ) (func $throw/doThrow diff --git a/tests/compiler/typeof.optimized.wat b/tests/compiler/typeof.optimized.wat index 7309884268..65bdca0753 100644 --- a/tests/compiler/typeof.optimized.wat +++ b/tests/compiler/typeof.optimized.wat @@ -40,7 +40,7 @@ (data (i32.const 1792) "\05\00\00\00 \00\00\00\00\00\00\00 ") (data (i32.const 1828) " ") (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1903,6 +1903,14 @@ call $~lib/builtins/abort unreachable end + memory.size + i32.const 16 + i32.shl + i32.const 18220 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1472 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/typeof.untouched.wat b/tests/compiler/typeof.untouched.wat index 38af8cbfc6..b9d254ee75 100644 --- a/tests/compiler/typeof.untouched.wat +++ b/tests/compiler/typeof.untouched.wat @@ -41,7 +41,7 @@ (global $typeof/s (mut i32) (i32.const 240)) (global $typeof/fn (mut i32) (i32.const 304)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -3119,6 +3119,14 @@ call $~lib/builtins/abort unreachable end + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 448 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index bb01a86655..fe2f06312b 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -24,7 +24,7 @@ (data (i32.const 1516) " ") (global $while/ran (mut i32) (i32.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -1662,6 +1662,14 @@ global.set $while/ran i32.const 0 global.set $while/ran + memory.size + i32.const 16 + i32.shl + i32.const 17908 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 1216 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace diff --git a/tests/compiler/while.untouched.wat b/tests/compiler/while.untouched.wat index 33342dd29f..7cb806f183 100644 --- a/tests/compiler/while.untouched.wat +++ b/tests/compiler/while.untouched.wat @@ -23,7 +23,7 @@ (table $0 1 funcref) (global $while/ran (mut i32) (i32.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) - (global $~lib/rt/itcms/threshold (mut i32) (i32.const 1024)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) @@ -3201,6 +3201,14 @@ end i32.const 0 global.set $while/ran + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold i32.const 192 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/pinSpace