diff --git a/src/builtins.ts b/src/builtins.ts index 94596b4849..1011ef0550 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -85,7 +85,8 @@ import { DecoratorFlags, Class, PropertyPrototype, - VariableLikeElement + VariableLikeElement, + Function, } from "./program"; import { @@ -10673,6 +10674,18 @@ builtinFunctions.set(BuiltinNames.i32x4_relaxed_dot_i8x16_i7x16_add_s, builtin_i // === Internal helpers ======================================================================= +// When no visit is needed, null is returned, otherwise the name of the visit function is returned. +function getVisitInstanceName(visitInstance: Function, classReference: Class): string | null { + if (classReference.hasDecorator(DecoratorFlags.Final)) { + if (classReference.visitRef != 0) { + return classReference.visitorFunctionName; + } else if (classReference.isPointerfree) { + return null; // no visitor for pointerfree classes + } + } + return visitInstance.internalName; +} + /** Compiles the `visit_globals` function. */ export function compileVisitGlobals(compiler: Compiler): void { let module = compiler.module; @@ -10695,11 +10708,13 @@ export function compileVisitGlobals(compiler: Compiler): void { !classReference.hasDecorator(DecoratorFlags.Unmanaged) && global.is(CommonFlags.Compiled) ) { + let visitFunctionName = getVisitInstanceName(visitInstance, classReference); + if (visitFunctionName == null) continue; if (global.is(CommonFlags.Inlined)) { let value = global.constantIntegerValue; if (i64_low(value) || i64_high(value)) { exprs.push( - module.call(visitInstance.internalName, [ + module.call(visitFunctionName, [ compiler.options.isWasm64 ? module.i64(i64_low(value), i64_high(value)) : module.i32(i64_low(value)), @@ -10714,7 +10729,7 @@ export function compileVisitGlobals(compiler: Compiler): void { module.global_get(global.internalName, sizeTypeRef), false // internal ), - module.call(visitInstance.internalName, [ + module.call(visitFunctionName, [ module.local_get(1, sizeTypeRef), // tempRef != null module.local_get(0, TypeRef.I32) // cookie ], TypeRef.None) @@ -10750,7 +10765,7 @@ function ensureVisitMembersOf(compiler: Compiler, instance: Class): void { let base = instance.base; if (base) { body.push( - module.call(`${base.internalName}~visit`, [ + module.call(base.visitorFunctionName, [ module.local_get(0, sizeTypeRef), // this module.local_get(1, TypeRef.I32) // cookie ], TypeRef.None) @@ -10860,7 +10875,7 @@ export function compileVisitMembers(compiler: Compiler): void { cases[i] = module.return(); } else { cases[i] = module.block(null, [ - module.call(`${instance.internalName}~visit`, [ + module.call(instance.visitorFunctionName, [ module.local_get(0, sizeTypeRef), // this module.local_get(1, TypeRef.I32) // cookie ], TypeRef.None), diff --git a/src/compiler.ts b/src/compiler.ts index dcc5e84978..56a8b5b691 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -647,8 +647,10 @@ export class Compiler extends DiagnosticEmitter { // finalize runtime features module.removeGlobal(BuiltinNames.rtti_base); if (this.runtimeFeatures & RuntimeFeatures.Rtti) compileRTTI(this); - if (this.runtimeFeatures & RuntimeFeatures.visitGlobals) compileVisitGlobals(this); + // visit globals can rely on the result of visit members to visit globals of + // certain type directly thought the visit of the class. if (this.runtimeFeatures & RuntimeFeatures.visitMembers) compileVisitMembers(this); + if (this.runtimeFeatures & RuntimeFeatures.visitGlobals) compileVisitGlobals(this); let memoryOffset = i64_align(this.memoryOffset, options.usizeType.byteSize); diff --git a/src/program.ts b/src/program.ts index bf8dcc433c..e4f459d0c7 100644 --- a/src/program.ts +++ b/src/program.ts @@ -4910,6 +4910,10 @@ export class Class extends TypedElement { } return false; } + + get visitorFunctionName(): string { + return `${this.internalName}~visit`; + } } /** A yet unresolved interface. */ diff --git a/tests/compiler/assignment-chain.debug.wat b/tests/compiler/assignment-chain.debug.wat index dc86b62eb1..9a8f201bd6 100644 --- a/tests/compiler/assignment-chain.debug.wat +++ b/tests/compiler/assignment-chain.debug.wat @@ -2333,15 +2333,6 @@ call $assignment-chain/setter_assignment_chain call $assignment-chain/static_setter_assignment_chain ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2385,6 +2376,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:assignment-chain ) diff --git a/tests/compiler/assignment-chain.release.wat b/tests/compiler/assignment-chain.release.wat index 2d02b94594..88b7d831e0 100644 --- a/tests/compiler/assignment-chain.release.wat +++ b/tests/compiler/assignment-chain.release.wat @@ -42,10 +42,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/bindings/esm.debug.wat b/tests/compiler/bindings/esm.debug.wat index b025730171..5a7098e384 100644 --- a/tests/compiler/bindings/esm.debug.wat +++ b/tests/compiler/bindings/esm.debug.wat @@ -2832,41 +2832,6 @@ i32.const 0 drop ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $bindings/esm/stringGlobal - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $bindings/esm/mutableStringGlobal - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 528 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 944 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 336 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 1072 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 1136 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -3038,6 +3003,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~setArgumentsLength (param $0 i32) local.get $0 global.set $~argumentsLength diff --git a/tests/compiler/bindings/esm.release.wat b/tests/compiler/bindings/esm.release.wat index d2fae9e068..2faad25201 100644 --- a/tests/compiler/bindings/esm.release.wat +++ b/tests/compiler/bindings/esm.release.wat @@ -139,26 +139,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1056 - call $~lib/rt/itcms/__visit - global.get $bindings/esm/mutableStringGlobal - local.tee $0 - if - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 1552 - call $~lib/rt/itcms/__visit - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1968 - call $~lib/rt/itcms/__visit - i32.const 1360 - call $~lib/rt/itcms/__visit - i32.const 2096 - call $~lib/rt/itcms/__visit - i32.const 2160 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/bindings/noExportRuntime.debug.wat b/tests/compiler/bindings/noExportRuntime.debug.wat index a75c227578..141e69c0dd 100644 --- a/tests/compiler/bindings/noExportRuntime.debug.wat +++ b/tests/compiler/bindings/noExportRuntime.debug.wat @@ -2415,53 +2415,6 @@ ) (func $bindings/noExportRuntime/takesFunction (param $fn i32) ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $bindings/noExportRuntime/isString - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $bindings/noExportRuntime/isBuffer - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $bindings/noExportRuntime/isTypedArray - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $bindings/noExportRuntime/isArrayOfBasic - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $bindings/noExportRuntime/isArrayOfArray - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 368 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 64 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 176 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2557,6 +2510,30 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $bindings/noExportRuntime/isTypedArray + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $bindings/noExportRuntime/isArrayOfBasic + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $bindings/noExportRuntime/isArrayOfArray + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start global.get $~started if diff --git a/tests/compiler/bindings/noExportRuntime.release.wat b/tests/compiler/bindings/noExportRuntime.release.wat index dd2b17bc43..c3dddaf623 100644 --- a/tests/compiler/bindings/noExportRuntime.release.wat +++ b/tests/compiler/bindings/noExportRuntime.release.wat @@ -71,14 +71,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1056 - call $~lib/rt/itcms/__visit - global.get $bindings/noExportRuntime/isBuffer - local.tee $0 - if - local.get $0 - call $~lib/rt/itcms/__visit - end global.get $bindings/noExportRuntime/isTypedArray local.tee $0 if @@ -89,12 +81,6 @@ call $~lib/rt/itcms/__visit i32.const 1712 call $~lib/rt/itcms/__visit - i32.const 1392 - call $~lib/rt/itcms/__visit - i32.const 1088 - call $~lib/rt/itcms/__visit - i32.const 1200 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/bindings/raw.debug.wat b/tests/compiler/bindings/raw.debug.wat index 5947b885ed..d9a1b5dbab 100644 --- a/tests/compiler/bindings/raw.debug.wat +++ b/tests/compiler/bindings/raw.debug.wat @@ -2835,41 +2835,6 @@ i32.const 0 drop ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 528 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 944 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 336 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 1072 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 1136 - local.get $0 - call $~lib/rt/itcms/__visit - global.get $bindings/esm/stringGlobal - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $bindings/esm/mutableStringGlobal - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -3041,6 +3006,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~setArgumentsLength (param $0 i32) local.get $0 global.set $~argumentsLength diff --git a/tests/compiler/bindings/raw.release.wat b/tests/compiler/bindings/raw.release.wat index 85e626eef7..c725b366fe 100644 --- a/tests/compiler/bindings/raw.release.wat +++ b/tests/compiler/bindings/raw.release.wat @@ -139,26 +139,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1552 - call $~lib/rt/itcms/__visit - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1968 - call $~lib/rt/itcms/__visit - i32.const 1360 - call $~lib/rt/itcms/__visit - i32.const 2096 - call $~lib/rt/itcms/__visit - i32.const 2160 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit - global.get $bindings/esm/mutableStringGlobal - local.tee $0 - if - local.get $0 - call $~lib/rt/itcms/__visit - end global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/call-inferred.debug.wat b/tests/compiler/call-inferred.debug.wat index 3fd88cbe2d..7547f6e1ff 100644 --- a/tests/compiler/call-inferred.debug.wat +++ b/tests/compiler/call-inferred.debug.wat @@ -2295,15 +2295,6 @@ local.get $a return ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 288 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 96 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2350,6 +2341,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:call-inferred ) diff --git a/tests/compiler/call-inferred.release.wat b/tests/compiler/call-inferred.release.wat index 2ef72953b6..d836cf6a93 100644 --- a/tests/compiler/call-inferred.release.wat +++ b/tests/compiler/call-inferred.release.wat @@ -38,10 +38,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1312 - call $~lib/rt/itcms/__visit - i32.const 1120 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/call-rest.debug.wat b/tests/compiler/call-rest.debug.wat index af743cb0b0..a1f68f14e0 100644 --- a/tests/compiler/call-rest.debug.wat +++ b/tests/compiler/call-rest.debug.wat @@ -2437,18 +2437,6 @@ local.get $this i32.load offset=12 ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 720 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 176 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2578,6 +2566,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:call-rest ) diff --git a/tests/compiler/call-rest.release.wat b/tests/compiler/call-rest.release.wat index 24506bdd09..0bf2b747c8 100644 --- a/tests/compiler/call-rest.release.wat +++ b/tests/compiler/call-rest.release.wat @@ -80,12 +80,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1056 - call $~lib/rt/itcms/__visit - i32.const 1744 - call $~lib/rt/itcms/__visit - i32.const 1200 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/call-super.debug.wat b/tests/compiler/call-super.debug.wat index 6ff707d75c..9b373b03f3 100644 --- a/tests/compiler/call-super.debug.wat +++ b/tests/compiler/call-super.debug.wat @@ -2356,15 +2356,6 @@ call $call-super/test4 call $call-super/test5 ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 272 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 80 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2432,6 +2423,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:call-super ) diff --git a/tests/compiler/call-super.release.wat b/tests/compiler/call-super.release.wat index efaaeb7079..fd530409e5 100644 --- a/tests/compiler/call-super.release.wat +++ b/tests/compiler/call-super.release.wat @@ -38,10 +38,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1296 - call $~lib/rt/itcms/__visit - i32.const 1104 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/class-implements.debug.wat b/tests/compiler/class-implements.debug.wat index bf0b70087e..a76b230dc1 100644 --- a/tests/compiler/class-implements.debug.wat +++ b/tests/compiler/class-implements.debug.wat @@ -2633,64 +2633,6 @@ local.get $0 call $class-implements/B2#get:foo ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $class-implements/a - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $class-implements/c - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $class-implements/d - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $class-implements/e - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $class-implements/f - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $class-implements/g - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $class-implements/h - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2779,6 +2721,58 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $class-implements/a + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $class-implements/c + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $class-implements/d + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $class-implements/e + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $class-implements/f + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $class-implements/g + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $class-implements/h + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start call $start:class-implements ) diff --git a/tests/compiler/class-implements.release.wat b/tests/compiler/class-implements.release.wat index 5d0ad2a21e..48fbf8579b 100644 --- a/tests/compiler/class-implements.release.wat +++ b/tests/compiler/class-implements.release.wat @@ -87,10 +87,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/class-overloading-cast.debug.wat b/tests/compiler/class-overloading-cast.debug.wat index 677c68b11c..41ec8fb7e5 100644 --- a/tests/compiler/class-overloading-cast.debug.wat +++ b/tests/compiler/class-overloading-cast.debug.wat @@ -2469,43 +2469,6 @@ local.get $1 call $class-overloading-cast/A<~lib/string/String>#foo ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $class-overloading-cast/v - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $class-overloading-cast/v2 - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $class-overloading-cast/v3 - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $class-overloading-cast/c - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2573,6 +2536,37 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $class-overloading-cast/v + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $class-overloading-cast/v2 + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $class-overloading-cast/v3 + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $class-overloading-cast/c + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start global.get $~started if diff --git a/tests/compiler/class-overloading-cast.release.wat b/tests/compiler/class-overloading-cast.release.wat index 8b131f6fab..47ded2d1bf 100644 --- a/tests/compiler/class-overloading-cast.release.wat +++ b/tests/compiler/class-overloading-cast.release.wat @@ -75,10 +75,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/class-overloading.debug.wat b/tests/compiler/class-overloading.debug.wat index d84b9f7cce..884e449b88 100644 --- a/tests/compiler/class-overloading.debug.wat +++ b/tests/compiler/class-overloading.debug.wat @@ -2753,57 +2753,6 @@ local.get $0 call $class-overloading/A1#baz ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $class-overloading/which - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $class-overloading/a - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $class-overloading/c - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $class-overloading/ia - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $class-overloading/ic - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $class-overloading/b2 - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 256 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 64 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2883,6 +2832,44 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $class-overloading/a + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $class-overloading/c + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $class-overloading/ia + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $class-overloading/ic + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $class-overloading/b2 + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start global.get $~started if diff --git a/tests/compiler/class-overloading.release.wat b/tests/compiler/class-overloading.release.wat index 777b8bf3cc..2d7858ac53 100644 --- a/tests/compiler/class-overloading.release.wat +++ b/tests/compiler/class-overloading.release.wat @@ -61,12 +61,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - global.get $class-overloading/which - local.tee $0 - if - local.get $0 - call $~lib/rt/itcms/__visit - end global.get $class-overloading/a local.tee $0 if @@ -97,10 +91,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 1280 - call $~lib/rt/itcms/__visit - i32.const 1088 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/class-override.debug.wat b/tests/compiler/class-override.debug.wat index c354bbb2c2..f70b7784f9 100644 --- a/tests/compiler/class-override.debug.wat +++ b/tests/compiler/class-override.debug.wat @@ -2323,22 +2323,6 @@ local.get $1 call $class-override/A#f ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $class-override/x - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2388,6 +2372,16 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $class-override/x + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start call $start:class-override ) diff --git a/tests/compiler/class-override.release.wat b/tests/compiler/class-override.release.wat index 6dc55da64d..946652537f 100644 --- a/tests/compiler/class-override.release.wat +++ b/tests/compiler/class-override.release.wat @@ -46,10 +46,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/class.debug.wat b/tests/compiler/class.debug.wat index 7e5b928f9c..2f0d24bac5 100644 --- a/tests/compiler/class.debug.wat +++ b/tests/compiler/class.debug.wat @@ -2433,18 +2433,6 @@ call $class/GenericInitializer#constructor drop ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 432 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2519,6 +2507,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:class memory.size diff --git a/tests/compiler/class.release.wat b/tests/compiler/class.release.wat index d0d28890f0..8eb6ccf965 100644 --- a/tests/compiler/class.release.wat +++ b/tests/compiler/class.release.wat @@ -42,12 +42,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1456 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/constructor.debug.wat b/tests/compiler/constructor.debug.wat index b607b591d6..564780c88b 100644 --- a/tests/compiler/constructor.debug.wat +++ b/tests/compiler/constructor.debug.wat @@ -2329,92 +2329,6 @@ local.get $c i32.store ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $constructor/emptyCtor - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $constructor/emptyCtorWithFieldInit - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $constructor/emptyCtorWithFieldNoInit - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $constructor/emptyCtorWithFieldAccess - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $constructor/none - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $constructor/justFieldInit - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $constructor/justFieldNoInit - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $constructor/ctorReturns - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $constructor/ctorConditionallyReturns - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $constructor/ctorConditionallyReturnsThis - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $constructor/ctorFieldInitOrder - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2488,6 +2402,72 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $constructor/emptyCtor + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $constructor/emptyCtorWithFieldInit + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $constructor/emptyCtorWithFieldNoInit + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $constructor/emptyCtorWithFieldAccess + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $constructor/none + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $constructor/justFieldInit + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $constructor/justFieldNoInit + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $constructor/ctorConditionallyReturnsThis + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $constructor/ctorFieldInitOrder + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start call $start:constructor ) diff --git a/tests/compiler/constructor.release.wat b/tests/compiler/constructor.release.wat index 339b5624fc..18585c9c7c 100644 --- a/tests/compiler/constructor.release.wat +++ b/tests/compiler/constructor.release.wat @@ -101,10 +101,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/do.debug.wat b/tests/compiler/do.debug.wat index 21952a0df2..e72efe6f82 100644 --- a/tests/compiler/do.debug.wat +++ b/tests/compiler/do.debug.wat @@ -3008,15 +3008,6 @@ end call $~lib/rt/itcms/__collect ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 256 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 64 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -3057,6 +3048,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:do ) diff --git a/tests/compiler/do.release.wat b/tests/compiler/do.release.wat index 780e6e3cf4..95c37e89ef 100644 --- a/tests/compiler/do.release.wat +++ b/tests/compiler/do.release.wat @@ -37,10 +37,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1280 - call $~lib/rt/itcms/__visit - i32.const 1088 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/duplicate-fields.debug.wat b/tests/compiler/duplicate-fields.debug.wat index d8ebed0ef6..b78c9facd0 100644 --- a/tests/compiler/duplicate-fields.debug.wat +++ b/tests/compiler/duplicate-fields.debug.wat @@ -2377,29 +2377,6 @@ local.get $pub i32.store offset=4 ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $duplicate-fields/foo - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $duplicate-fields/raz - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2484,6 +2461,23 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $duplicate-fields/foo + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $duplicate-fields/raz + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start call $start:duplicate-fields ) diff --git a/tests/compiler/duplicate-fields.release.wat b/tests/compiler/duplicate-fields.release.wat index 5bd2b707b9..ce79d84685 100644 --- a/tests/compiler/duplicate-fields.release.wat +++ b/tests/compiler/duplicate-fields.release.wat @@ -51,10 +51,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/empty-exportruntime.debug.wat b/tests/compiler/empty-exportruntime.debug.wat index 7dfec531fb..21da5200d5 100644 --- a/tests/compiler/empty-exportruntime.debug.wat +++ b/tests/compiler/empty-exportruntime.debug.wat @@ -2362,21 +2362,6 @@ i32.const 0 drop ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 432 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 496 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2414,6 +2399,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start memory.size i32.const 16 diff --git a/tests/compiler/empty-exportruntime.release.wat b/tests/compiler/empty-exportruntime.release.wat index 5d32a49a36..9ff1c23a84 100644 --- a/tests/compiler/empty-exportruntime.release.wat +++ b/tests/compiler/empty-exportruntime.release.wat @@ -45,14 +45,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit - i32.const 1456 - call $~lib/rt/itcms/__visit - i32.const 1520 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/empty-new.debug.wat b/tests/compiler/empty-new.debug.wat index 7d7b9b7c2f..8e3671786f 100644 --- a/tests/compiler/empty-new.debug.wat +++ b/tests/compiler/empty-new.debug.wat @@ -2264,15 +2264,6 @@ call $~lib/rt/itcms/__new drop ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2310,6 +2301,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:empty-new ) diff --git a/tests/compiler/empty-new.release.wat b/tests/compiler/empty-new.release.wat index ec0402c94c..5c2f430b2b 100644 --- a/tests/compiler/empty-new.release.wat +++ b/tests/compiler/empty-new.release.wat @@ -34,10 +34,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/exportstar-rereexport.debug.wat b/tests/compiler/exportstar-rereexport.debug.wat index 47375975e0..89a9519b7b 100644 --- a/tests/compiler/exportstar-rereexport.debug.wat +++ b/tests/compiler/exportstar-rereexport.debug.wat @@ -2290,36 +2290,6 @@ ) (func $export-default/theDefault ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 272 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 80 - local.get $0 - call $~lib/rt/itcms/__visit - global.get $rereexport/car - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $rereexport/exportsNamespaceCar - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $reexport/car - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2360,6 +2330,30 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $rereexport/car + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $rereexport/exportsNamespaceCar + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $reexport/car + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start call $start:exportstar-rereexport ) diff --git a/tests/compiler/exportstar-rereexport.release.wat b/tests/compiler/exportstar-rereexport.release.wat index 4a5b09f453..fe36273f3a 100644 --- a/tests/compiler/exportstar-rereexport.release.wat +++ b/tests/compiler/exportstar-rereexport.release.wat @@ -50,10 +50,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1296 - call $~lib/rt/itcms/__visit - i32.const 1104 - call $~lib/rt/itcms/__visit global.get $rereexport/car local.tee $0 if diff --git a/tests/compiler/extends-baseaggregate.debug.wat b/tests/compiler/extends-baseaggregate.debug.wat index ae6d22ffe4..8682b226b6 100644 --- a/tests/compiler/extends-baseaggregate.debug.wat +++ b/tests/compiler/extends-baseaggregate.debug.wat @@ -2409,32 +2409,6 @@ local.get $length_ i32.store offset=12 ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $extends-baseaggregate/poolB - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $extends-baseaggregate/poolA - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 384 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 592 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 192 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2575,6 +2549,23 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $extends-baseaggregate/poolB + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $extends-baseaggregate/poolA + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start call $start:extends-baseaggregate ) diff --git a/tests/compiler/extends-baseaggregate.release.wat b/tests/compiler/extends-baseaggregate.release.wat index 997ed95a65..868cf26cfb 100644 --- a/tests/compiler/extends-baseaggregate.release.wat +++ b/tests/compiler/extends-baseaggregate.release.wat @@ -53,12 +53,6 @@ call $~lib/rt/itcms/__visit i32.const 1168 call $~lib/rt/itcms/__visit - i32.const 1408 - call $~lib/rt/itcms/__visit - i32.const 1616 - call $~lib/rt/itcms/__visit - i32.const 1216 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/extends-recursive.debug.wat b/tests/compiler/extends-recursive.debug.wat index e0d1b59343..a3ad3bfc4f 100644 --- a/tests/compiler/extends-recursive.debug.wat +++ b/tests/compiler/extends-recursive.debug.wat @@ -2340,15 +2340,6 @@ call $extends-recursive/Child#constructor drop ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2413,6 +2404,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:extends-recursive ) diff --git a/tests/compiler/extends-recursive.release.wat b/tests/compiler/extends-recursive.release.wat index 5ccacc74bf..5114c62fe0 100644 --- a/tests/compiler/extends-recursive.release.wat +++ b/tests/compiler/extends-recursive.release.wat @@ -35,10 +35,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/field-initialization.debug.wat b/tests/compiler/field-initialization.debug.wat index 9966c1244e..e5aaf41248 100644 --- a/tests/compiler/field-initialization.debug.wat +++ b/tests/compiler/field-initialization.debug.wat @@ -2686,18 +2686,6 @@ local.get $this i32.load ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 512 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -3012,6 +3000,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:field-initialization ) diff --git a/tests/compiler/field-initialization.release.wat b/tests/compiler/field-initialization.release.wat index 8d91dd1b64..f813ad6d17 100644 --- a/tests/compiler/field-initialization.release.wat +++ b/tests/compiler/field-initialization.release.wat @@ -53,12 +53,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1536 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/field.debug.wat b/tests/compiler/field.debug.wat index 6623182b6f..abcef00999 100644 --- a/tests/compiler/field.debug.wat +++ b/tests/compiler/field.debug.wat @@ -2406,15 +2406,6 @@ call $field/testNoStaticConflict call $~lib/rt/itcms/__collect ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2512,6 +2503,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:field ) diff --git a/tests/compiler/field.release.wat b/tests/compiler/field.release.wat index c267b61219..4386055915 100644 --- a/tests/compiler/field.release.wat +++ b/tests/compiler/field.release.wat @@ -38,10 +38,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/for.debug.wat b/tests/compiler/for.debug.wat index 6e699486f2..fb03965dab 100644 --- a/tests/compiler/for.debug.wat +++ b/tests/compiler/for.debug.wat @@ -3015,15 +3015,6 @@ end call $~lib/rt/itcms/__collect ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 256 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 64 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -3064,6 +3055,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:for ) diff --git a/tests/compiler/for.release.wat b/tests/compiler/for.release.wat index 6c772a187c..2f5e477311 100644 --- a/tests/compiler/for.release.wat +++ b/tests/compiler/for.release.wat @@ -37,10 +37,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1280 - call $~lib/rt/itcms/__visit - i32.const 1088 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/function-call.debug.wat b/tests/compiler/function-call.debug.wat index 85c7ac0268..37f58c9f7b 100644 --- a/tests/compiler/function-call.debug.wat +++ b/tests/compiler/function-call.debug.wat @@ -2290,22 +2290,6 @@ i32.add return ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $function-call/foo - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 448 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 256 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2436,6 +2420,16 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $function-call/foo + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start call $start:function-call ) diff --git a/tests/compiler/function-call.release.wat b/tests/compiler/function-call.release.wat index ab9646583b..7f3ea6bf92 100644 --- a/tests/compiler/function-call.release.wat +++ b/tests/compiler/function-call.release.wat @@ -75,10 +75,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 1472 - call $~lib/rt/itcms/__visit - i32.const 1280 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/function-expression.debug.wat b/tests/compiler/function-expression.debug.wat index 4564289ea6..73319afb52 100644 --- a/tests/compiler/function-expression.debug.wat +++ b/tests/compiler/function-expression.debug.wat @@ -2564,15 +2564,6 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 768 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 576 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2716,6 +2707,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:function-expression ) diff --git a/tests/compiler/function-expression.release.wat b/tests/compiler/function-expression.release.wat index b3f4027a8c..2f8f4780d7 100644 --- a/tests/compiler/function-expression.release.wat +++ b/tests/compiler/function-expression.release.wat @@ -101,10 +101,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1792 - call $~lib/rt/itcms/__visit - i32.const 1600 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/getter-call.debug.wat b/tests/compiler/getter-call.debug.wat index 7ac0d77688..87c5e7af4b 100644 --- a/tests/compiler/getter-call.debug.wat +++ b/tests/compiler/getter-call.debug.wat @@ -2251,15 +2251,6 @@ i32.const 432 return ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2318,6 +2309,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start memory.size i32.const 16 diff --git a/tests/compiler/getter-call.release.wat b/tests/compiler/getter-call.release.wat index 907d6feeec..f9936f4c7c 100644 --- a/tests/compiler/getter-call.release.wat +++ b/tests/compiler/getter-call.release.wat @@ -40,10 +40,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/incremental-gc/call-indirect.debug.wat b/tests/compiler/incremental-gc/call-indirect.debug.wat index 15fb51f132..6849931ad2 100644 --- a/tests/compiler/incremental-gc/call-indirect.debug.wat +++ b/tests/compiler/incremental-gc/call-indirect.debug.wat @@ -2340,15 +2340,6 @@ unreachable end ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 160 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 368 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2410,6 +2401,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:incremental-gc/call-indirect ) diff --git a/tests/compiler/incremental-gc/call-indirect.release.wat b/tests/compiler/incremental-gc/call-indirect.release.wat index 142078dea4..f136e86470 100644 --- a/tests/compiler/incremental-gc/call-indirect.release.wat +++ b/tests/compiler/incremental-gc/call-indirect.release.wat @@ -43,10 +43,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1168 - call $~lib/rt/itcms/__visit - i32.const 1376 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/infer-array.debug.wat b/tests/compiler/infer-array.debug.wat index b864b32944..250145cf03 100644 --- a/tests/compiler/infer-array.debug.wat +++ b/tests/compiler/infer-array.debug.wat @@ -2479,21 +2479,6 @@ local.get $this i32.load offset=4 ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 256 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 720 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 1024 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 64 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2678,6 +2663,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:infer-array ) diff --git a/tests/compiler/infer-array.release.wat b/tests/compiler/infer-array.release.wat index 4e368e641f..740858645f 100644 --- a/tests/compiler/infer-array.release.wat +++ b/tests/compiler/infer-array.release.wat @@ -73,14 +73,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1280 - call $~lib/rt/itcms/__visit - i32.const 1744 - call $~lib/rt/itcms/__visit - i32.const 2048 - call $~lib/rt/itcms/__visit - i32.const 1088 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/infer-generic.debug.wat b/tests/compiler/infer-generic.debug.wat index e5325dead1..9a7391afc0 100644 --- a/tests/compiler/infer-generic.debug.wat +++ b/tests/compiler/infer-generic.debug.wat @@ -2323,22 +2323,6 @@ local.get $this i32.load ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $infer-generic/arr - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 400 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 208 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2469,6 +2453,16 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $infer-generic/arr + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start call $start:infer-generic ) diff --git a/tests/compiler/infer-generic.release.wat b/tests/compiler/infer-generic.release.wat index c09c4b901d..0254691057 100644 --- a/tests/compiler/infer-generic.release.wat +++ b/tests/compiler/infer-generic.release.wat @@ -64,10 +64,6 @@ (local $1 i32) i32.const 1152 call $~lib/rt/itcms/__visit - i32.const 1424 - call $~lib/rt/itcms/__visit - i32.const 1232 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/inlining.debug.wat b/tests/compiler/inlining.debug.wat index 1478d40aca..c4367686a9 100644 --- a/tests/compiler/inlining.debug.wat +++ b/tests/compiler/inlining.debug.wat @@ -2763,15 +2763,6 @@ f64.div return ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 304 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 112 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2836,6 +2827,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:inlining ) diff --git a/tests/compiler/inlining.release.wat b/tests/compiler/inlining.release.wat index bb306de122..381ebf4cdd 100644 --- a/tests/compiler/inlining.release.wat +++ b/tests/compiler/inlining.release.wat @@ -54,10 +54,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1328 - call $~lib/rt/itcms/__visit - i32.const 1136 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/instanceof.debug.wat b/tests/compiler/instanceof.debug.wat index 43f6efa61f..01cb5f2faa 100644 --- a/tests/compiler/instanceof.debug.wat +++ b/tests/compiler/instanceof.debug.wat @@ -4450,6 +4450,103 @@ end i32.const 1 ) + (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $1 + call $~lib/object/Object~visit + local.get $0 + i32.load + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/object/Object~visit (param $0 i32) (param $1 i32) + ) + (func $~lib/rt/__visit_members (param $0 i32) (param $1 i32) + block $invalid + block $instanceof/IE + block $instanceof/Z + block $instanceof/IC + block $instanceof/ID + block $instanceof/Y + block $instanceof/IA + block $instanceof/IB + block $instanceof/X + block $instanceof/W + block $instanceof/BlackCat + block $instanceof/Cat + block $instanceof/Animal + block $instanceof/SomethingElse + block $instanceof/Parent + block $instanceof/Child + block $instanceof/Parent + block $instanceof/Child + block $instanceof/C + block $instanceof/B + block $instanceof/A + block $~lib/arraybuffer/ArrayBufferView + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + block $~lib/object/Object + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/object/Object $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $instanceof/A $instanceof/B $instanceof/C $instanceof/Child $instanceof/Parent $instanceof/Child $instanceof/Parent $instanceof/SomethingElse $instanceof/Animal $instanceof/Cat $instanceof/BlackCat $instanceof/W $instanceof/X $instanceof/IB $instanceof/IA $instanceof/Y $instanceof/ID $instanceof/IC $instanceof/Z $instanceof/IE $invalid + end + return + end + return + end + return + end + local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView~visit + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + unreachable + ) (func $~lib/rt/__visit_globals (param $0 i32) (local $1 i32) global.get $instanceof/a @@ -4578,109 +4675,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) - (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - local.get $1 - call $~lib/object/Object~visit - local.get $0 - i32.load - local.get $1 - call $~lib/rt/itcms/__visit - ) - (func $~lib/object/Object~visit (param $0 i32) (param $1 i32) - ) - (func $~lib/rt/__visit_members (param $0 i32) (param $1 i32) - block $invalid - block $instanceof/IE - block $instanceof/Z - block $instanceof/IC - block $instanceof/ID - block $instanceof/Y - block $instanceof/IA - block $instanceof/IB - block $instanceof/X - block $instanceof/W - block $instanceof/BlackCat - block $instanceof/Cat - block $instanceof/Animal - block $instanceof/SomethingElse - block $instanceof/Parent - block $instanceof/Child - block $instanceof/Parent - block $instanceof/Child - block $instanceof/C - block $instanceof/B - block $instanceof/A - block $~lib/arraybuffer/ArrayBufferView - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - block $~lib/object/Object - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/object/Object $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $instanceof/A $instanceof/B $instanceof/C $instanceof/Child $instanceof/Parent $instanceof/Child $instanceof/Parent $instanceof/SomethingElse $instanceof/Animal $instanceof/Cat $instanceof/BlackCat $instanceof/W $instanceof/X $instanceof/IB $instanceof/IA $instanceof/Y $instanceof/ID $instanceof/IC $instanceof/Z $instanceof/IE $invalid - end - return - end - return - end - return - end - local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBufferView~visit - return - end - return - end - return - end - return - end - return - end - return - end - return - end - return - end - return - end - return - end - return - end - return - end - return - end - return - end - return - end - return - end - return - end - return - end - return - end - return - end - return - end - unreachable ) (func $~start call $start:instanceof diff --git a/tests/compiler/instanceof.release.wat b/tests/compiler/instanceof.release.wat index 3ee62101c1..4c1f9bc86a 100644 --- a/tests/compiler/instanceof.release.wat +++ b/tests/compiler/instanceof.release.wat @@ -142,10 +142,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/issues/1095.debug.wat b/tests/compiler/issues/1095.debug.wat index 14796c217b..c290397a28 100644 --- a/tests/compiler/issues/1095.debug.wat +++ b/tests/compiler/issues/1095.debug.wat @@ -2325,15 +2325,6 @@ local.get $this i32.load ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2387,6 +2378,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:issues/1095 ) diff --git a/tests/compiler/issues/1095.release.wat b/tests/compiler/issues/1095.release.wat index 05e4b9ab36..909fb1d6b7 100644 --- a/tests/compiler/issues/1095.release.wat +++ b/tests/compiler/issues/1095.release.wat @@ -41,10 +41,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/issues/1225.debug.wat b/tests/compiler/issues/1225.debug.wat index b87f40c3c9..59d083552b 100644 --- a/tests/compiler/issues/1225.debug.wat +++ b/tests/compiler/issues/1225.debug.wat @@ -2368,22 +2368,6 @@ global.set $issues/1225/x call $~lib/rt/itcms/__collect ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $issues/1225/x - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2424,6 +2408,16 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $issues/1225/x + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start call $start:issues/1225 ) diff --git a/tests/compiler/issues/1225.release.wat b/tests/compiler/issues/1225.release.wat index be387fc91c..4b417a4cd7 100644 --- a/tests/compiler/issues/1225.release.wat +++ b/tests/compiler/issues/1225.release.wat @@ -46,10 +46,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/issues/1699.debug.wat b/tests/compiler/issues/1699.debug.wat index 168e3faaaf..986d1b1cad 100644 --- a/tests/compiler/issues/1699.debug.wat +++ b/tests/compiler/issues/1699.debug.wat @@ -2429,21 +2429,6 @@ global.set $~lib/rt/itcms/fromSpace call $issues/1699/test ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 320 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 528 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 128 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2502,6 +2487,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:issues/1699 ) diff --git a/tests/compiler/issues/1699.release.wat b/tests/compiler/issues/1699.release.wat index 80c73bc8a5..b71a43fe25 100644 --- a/tests/compiler/issues/1699.release.wat +++ b/tests/compiler/issues/1699.release.wat @@ -44,14 +44,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1344 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit - i32.const 1552 - call $~lib/rt/itcms/__visit - i32.const 1152 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/issues/2166.debug.wat b/tests/compiler/issues/2166.debug.wat index 701aad2877..cdd3bd2d31 100644 --- a/tests/compiler/issues/2166.debug.wat +++ b/tests/compiler/issues/2166.debug.wat @@ -2365,15 +2365,6 @@ i32.const 0 return ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2417,6 +2408,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:issues/2166 ) diff --git a/tests/compiler/issues/2166.release.wat b/tests/compiler/issues/2166.release.wat index 1d28375ece..f0916938be 100644 --- a/tests/compiler/issues/2166.release.wat +++ b/tests/compiler/issues/2166.release.wat @@ -46,10 +46,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/issues/2322/index.debug.wat b/tests/compiler/issues/2322/index.debug.wat index febbe4e10f..0536bed574 100644 --- a/tests/compiler/issues/2322/index.debug.wat +++ b/tests/compiler/issues/2322/index.debug.wat @@ -2249,15 +2249,6 @@ ) (func $issues/2322/lib/test (param $t i32) ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2298,6 +2289,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start memory.size i32.const 16 diff --git a/tests/compiler/issues/2322/index.release.wat b/tests/compiler/issues/2322/index.release.wat index 9349beea7c..424664868b 100644 --- a/tests/compiler/issues/2322/index.release.wat +++ b/tests/compiler/issues/2322/index.release.wat @@ -36,10 +36,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/issues/2622.debug.wat b/tests/compiler/issues/2622.debug.wat index 07020ccd43..98e7d3708a 100644 --- a/tests/compiler/issues/2622.debug.wat +++ b/tests/compiler/issues/2622.debug.wat @@ -2277,6 +2277,49 @@ global.get $issues/2622/_b/t2 global.set $issues/2622/b ) + (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $1 + call $~lib/object/Object~visit + local.get $0 + i32.load + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/object/Object~visit (param $0 i32) (param $1 i32) + ) + (func $~lib/rt/__visit_members (param $0 i32) (param $1 i32) + block $invalid + block $issues/2622/_b/T2 + block $issues/2622/_a/T1 + block $~lib/arraybuffer/ArrayBufferView + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + block $~lib/object/Object + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/object/Object $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $issues/2622/_a/T1 $issues/2622/_b/T2 $invalid + end + return + end + return + end + return + end + local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView~visit + return + end + return + end + return + end + unreachable + ) (func $~lib/rt/__visit_globals (param $0 i32) (local $1 i32) global.get $issues/2622/a @@ -2293,12 +2336,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit global.get $issues/2622/_a/t1 local.tee $1 if @@ -2328,49 +2365,6 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - local.get $1 - call $~lib/object/Object~visit - local.get $0 - i32.load - local.get $1 - call $~lib/rt/itcms/__visit - ) - (func $~lib/object/Object~visit (param $0 i32) (param $1 i32) - ) - (func $~lib/rt/__visit_members (param $0 i32) (param $1 i32) - block $invalid - block $issues/2622/_b/T2 - block $issues/2622/_a/T1 - block $~lib/arraybuffer/ArrayBufferView - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - block $~lib/object/Object - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/object/Object $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $issues/2622/_a/T1 $issues/2622/_b/T2 $invalid - end - return - end - return - end - return - end - local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBufferView~visit - return - end - return - end - return - end - unreachable - ) (func $~start call $start:issues/2622 ) diff --git a/tests/compiler/issues/2622.release.wat b/tests/compiler/issues/2622.release.wat index 835db6b8c6..8622413d7d 100644 --- a/tests/compiler/issues/2622.release.wat +++ b/tests/compiler/issues/2622.release.wat @@ -51,10 +51,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $issues/2622/_a/t1 local.tee $0 if diff --git a/tests/compiler/issues/2707.debug.wat b/tests/compiler/issues/2707.debug.wat index bf7710636a..19978d0e4f 100644 --- a/tests/compiler/issues/2707.debug.wat +++ b/tests/compiler/issues/2707.debug.wat @@ -2335,15 +2335,6 @@ end end ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 304 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 112 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2417,6 +2408,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:issues/2707 ) diff --git a/tests/compiler/issues/2707.release.wat b/tests/compiler/issues/2707.release.wat index bdafcad22f..963eb97fa9 100644 --- a/tests/compiler/issues/2707.release.wat +++ b/tests/compiler/issues/2707.release.wat @@ -44,10 +44,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1328 - call $~lib/rt/itcms/__visit - i32.const 1136 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/issues/2873.debug.wat b/tests/compiler/issues/2873.debug.wat index d33ceba234..7b6749a419 100644 --- a/tests/compiler/issues/2873.debug.wat +++ b/tests/compiler/issues/2873.debug.wat @@ -4159,29 +4159,6 @@ end return ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $issues/2873/f32arr - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $issues/2873/f64arr - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 1760 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 1568 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -4255,6 +4232,23 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $issues/2873/f32arr + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $issues/2873/f64arr + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start call $start:issues/2873 ) diff --git a/tests/compiler/issues/2873.release.wat b/tests/compiler/issues/2873.release.wat index 6b6cd33c92..22ad91ad9b 100644 --- a/tests/compiler/issues/2873.release.wat +++ b/tests/compiler/issues/2873.release.wat @@ -1255,10 +1255,6 @@ call $~lib/rt/itcms/__visit i32.const 3312 call $~lib/rt/itcms/__visit - i32.const 2784 - call $~lib/rt/itcms/__visit - i32.const 2592 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/logical.debug.wat b/tests/compiler/logical.debug.wat index 78f3bc8b0e..6300adb8c0 100644 --- a/tests/compiler/logical.debug.wat +++ b/tests/compiler/logical.debug.wat @@ -2307,29 +2307,6 @@ end return ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $logical/b - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $logical/c - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 272 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 80 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2379,6 +2356,23 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $logical/b + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $logical/c + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start call $start:logical ) diff --git a/tests/compiler/logical.release.wat b/tests/compiler/logical.release.wat index 185b69545e..4079b14992 100644 --- a/tests/compiler/logical.release.wat +++ b/tests/compiler/logical.release.wat @@ -51,10 +51,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 1296 - call $~lib/rt/itcms/__visit - i32.const 1104 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/managed-cast.debug.wat b/tests/compiler/managed-cast.debug.wat index 9aa6652349..ed0cad4857 100644 --- a/tests/compiler/managed-cast.debug.wat +++ b/tests/compiler/managed-cast.debug.wat @@ -2311,15 +2311,6 @@ end i32.const 1 ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2363,6 +2354,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:managed-cast ) diff --git a/tests/compiler/managed-cast.release.wat b/tests/compiler/managed-cast.release.wat index 48251000ec..12bd0498dc 100644 --- a/tests/compiler/managed-cast.release.wat +++ b/tests/compiler/managed-cast.release.wat @@ -41,10 +41,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/new.debug.wat b/tests/compiler/new.debug.wat index f0dc63a471..b67ca9aca0 100644 --- a/tests/compiler/new.debug.wat +++ b/tests/compiler/new.debug.wat @@ -2259,57 +2259,6 @@ local.get $this return ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $new/ref - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $new/gen - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $new/ref2 - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $new/genext - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $new/genext2 - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $new/genext3 - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2359,6 +2308,51 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $new/ref + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $new/gen + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $new/ref2 + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $new/genext + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $new/genext2 + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $new/genext3 + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start call $start:new ) diff --git a/tests/compiler/new.release.wat b/tests/compiler/new.release.wat index 72a7a42fe2..41d17af11e 100644 --- a/tests/compiler/new.release.wat +++ b/tests/compiler/new.release.wat @@ -77,10 +77,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/object-literal.debug.wat b/tests/compiler/object-literal.debug.wat index b7d7b949ca..9510d2cf0c 100644 --- a/tests/compiler/object-literal.debug.wat +++ b/tests/compiler/object-literal.debug.wat @@ -2823,15 +2823,6 @@ i32.const 0 drop ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 176 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 288 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2948,6 +2939,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:object-literal ) diff --git a/tests/compiler/object-literal.release.wat b/tests/compiler/object-literal.release.wat index 1ce89a0e76..b63d47d095 100644 --- a/tests/compiler/object-literal.release.wat +++ b/tests/compiler/object-literal.release.wat @@ -237,10 +237,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1200 - call $~lib/rt/itcms/__visit - i32.const 1312 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/operator-overload-non-ambiguity.debug.wat b/tests/compiler/operator-overload-non-ambiguity.debug.wat index 243a2fc1ae..de3222c17d 100644 --- a/tests/compiler/operator-overload-non-ambiguity.debug.wat +++ b/tests/compiler/operator-overload-non-ambiguity.debug.wat @@ -2262,15 +2262,6 @@ i32.const 1 return ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2320,6 +2311,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:operator-overload-non-ambiguity ) diff --git a/tests/compiler/operator-overload-non-ambiguity.release.wat b/tests/compiler/operator-overload-non-ambiguity.release.wat index f80cb51cd9..213cf6d0dd 100644 --- a/tests/compiler/operator-overload-non-ambiguity.release.wat +++ b/tests/compiler/operator-overload-non-ambiguity.release.wat @@ -37,10 +37,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/optional-typeparameters.debug.wat b/tests/compiler/optional-typeparameters.debug.wat index 181ae2e1ec..e8105fda61 100644 --- a/tests/compiler/optional-typeparameters.debug.wat +++ b/tests/compiler/optional-typeparameters.debug.wat @@ -2273,43 +2273,6 @@ i32.eq drop ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $optional-typeparameters/tConcrete - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $optional-typeparameters/tDerived - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $optional-typeparameters/tMethodDerived - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $optional-typeparameters/tMethodDerived2 - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2385,6 +2348,37 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $optional-typeparameters/tConcrete + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $optional-typeparameters/tDerived + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $optional-typeparameters/tMethodDerived + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $optional-typeparameters/tMethodDerived2 + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start call $start:optional-typeparameters ) diff --git a/tests/compiler/optional-typeparameters.release.wat b/tests/compiler/optional-typeparameters.release.wat index da3cdefbb6..68d21b5c4f 100644 --- a/tests/compiler/optional-typeparameters.release.wat +++ b/tests/compiler/optional-typeparameters.release.wat @@ -63,10 +63,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/reexport.debug.wat b/tests/compiler/reexport.debug.wat index 6343f7999e..af425b0bf0 100644 --- a/tests/compiler/reexport.debug.wat +++ b/tests/compiler/reexport.debug.wat @@ -2300,22 +2300,6 @@ ) (func $export-default/theDefault ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $reexport/car - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 272 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 80 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2356,6 +2340,16 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $reexport/car + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start call $start:reexport ) diff --git a/tests/compiler/reexport.release.wat b/tests/compiler/reexport.release.wat index 336ee88140..02791c8009 100644 --- a/tests/compiler/reexport.release.wat +++ b/tests/compiler/reexport.release.wat @@ -70,10 +70,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 1296 - call $~lib/rt/itcms/__visit - i32.const 1104 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/rereexport.debug.wat b/tests/compiler/rereexport.debug.wat index 8d023dca80..fc2360aea2 100644 --- a/tests/compiler/rereexport.debug.wat +++ b/tests/compiler/rereexport.debug.wat @@ -2287,36 +2287,6 @@ ) (func $export-default/theDefault ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $rereexport/car - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $rereexport/exportsNamespaceCar - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 272 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 80 - local.get $0 - call $~lib/rt/itcms/__visit - global.get $reexport/car - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2357,6 +2327,30 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $rereexport/car + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $rereexport/exportsNamespaceCar + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $reexport/car + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start call $start:rereexport ) diff --git a/tests/compiler/rereexport.release.wat b/tests/compiler/rereexport.release.wat index ebef106da3..c97fd0fd11 100644 --- a/tests/compiler/rereexport.release.wat +++ b/tests/compiler/rereexport.release.wat @@ -62,10 +62,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 1296 - call $~lib/rt/itcms/__visit - i32.const 1104 - call $~lib/rt/itcms/__visit global.get $reexport/car local.tee $0 if diff --git a/tests/compiler/resolve-access.debug.wat b/tests/compiler/resolve-access.debug.wat index 6dc9f58eb4..381947af79 100644 --- a/tests/compiler/resolve-access.debug.wat +++ b/tests/compiler/resolve-access.debug.wat @@ -2965,21 +2965,6 @@ call $~lib/util/number/utoa32 return ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 256 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 64 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 1136 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 2192 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -3056,6 +3041,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start memory.size i32.const 16 diff --git a/tests/compiler/resolve-access.release.wat b/tests/compiler/resolve-access.release.wat index 7e043af3e4..19f448446a 100644 --- a/tests/compiler/resolve-access.release.wat +++ b/tests/compiler/resolve-access.release.wat @@ -55,14 +55,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1280 - call $~lib/rt/itcms/__visit - i32.const 1088 - call $~lib/rt/itcms/__visit - i32.const 2160 - call $~lib/rt/itcms/__visit - i32.const 3216 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/resolve-binary.debug.wat b/tests/compiler/resolve-binary.debug.wat index 85528b7fcc..2142386827 100644 --- a/tests/compiler/resolve-binary.debug.wat +++ b/tests/compiler/resolve-binary.debug.wat @@ -5557,49 +5557,6 @@ local.get $left return ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $resolve-binary/foo - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $resolve-binary/bar - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $resolve-binary/bar2 - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $resolve-binary/baz - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 576 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 384 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 1184 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 2240 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -5646,6 +5603,37 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $resolve-binary/foo + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $resolve-binary/bar + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $resolve-binary/bar2 + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $resolve-binary/baz + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start call $start:resolve-binary ) diff --git a/tests/compiler/resolve-binary.release.wat b/tests/compiler/resolve-binary.release.wat index 30919db575..306d879367 100644 --- a/tests/compiler/resolve-binary.release.wat +++ b/tests/compiler/resolve-binary.release.wat @@ -264,14 +264,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 1600 - call $~lib/rt/itcms/__visit - i32.const 1408 - call $~lib/rt/itcms/__visit - i32.const 2208 - call $~lib/rt/itcms/__visit - i32.const 3264 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/resolve-elementaccess.debug.wat b/tests/compiler/resolve-elementaccess.debug.wat index 19b64a3360..cfa8d73e0a 100644 --- a/tests/compiler/resolve-elementaccess.debug.wat +++ b/tests/compiler/resolve-elementaccess.debug.wat @@ -4291,38 +4291,6 @@ call $~lib/util/number/utoa32 return ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $resolve-elementaccess/arr - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $resolve-elementaccess/buf - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 336 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 144 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 2544 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 3600 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -4393,6 +4361,23 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $resolve-elementaccess/arr + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $resolve-elementaccess/buf + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start call $start:resolve-elementaccess ) diff --git a/tests/compiler/resolve-elementaccess.release.wat b/tests/compiler/resolve-elementaccess.release.wat index 9760a11e21..5b72a195b3 100644 --- a/tests/compiler/resolve-elementaccess.release.wat +++ b/tests/compiler/resolve-elementaccess.release.wat @@ -105,16 +105,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 1360 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit - i32.const 1168 - call $~lib/rt/itcms/__visit - i32.const 3568 - call $~lib/rt/itcms/__visit - i32.const 4624 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/resolve-function-expression.debug.wat b/tests/compiler/resolve-function-expression.debug.wat index c111bd2b58..49de27770a 100644 --- a/tests/compiler/resolve-function-expression.debug.wat +++ b/tests/compiler/resolve-function-expression.debug.wat @@ -2807,21 +2807,6 @@ i32.const 0 return ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 624 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 432 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 1232 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 2288 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2877,6 +2862,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:resolve-function-expression ) diff --git a/tests/compiler/resolve-function-expression.release.wat b/tests/compiler/resolve-function-expression.release.wat index d8b70cbaa4..9b326afe72 100644 --- a/tests/compiler/resolve-function-expression.release.wat +++ b/tests/compiler/resolve-function-expression.release.wat @@ -74,14 +74,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1648 - call $~lib/rt/itcms/__visit - i32.const 1456 - call $~lib/rt/itcms/__visit - i32.const 2256 - call $~lib/rt/itcms/__visit - i32.const 3312 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/resolve-new.debug.wat b/tests/compiler/resolve-new.debug.wat index 0a56bb3df4..be8b01d66f 100644 --- a/tests/compiler/resolve-new.debug.wat +++ b/tests/compiler/resolve-new.debug.wat @@ -2244,22 +2244,6 @@ ) (func $resolve-new/Foo#bar (param $this i32) ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $resolve-new/foo - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2300,6 +2284,16 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $resolve-new/foo + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start call $start:resolve-new ) diff --git a/tests/compiler/resolve-new.release.wat b/tests/compiler/resolve-new.release.wat index 96c78f0c84..1ad0cd7080 100644 --- a/tests/compiler/resolve-new.release.wat +++ b/tests/compiler/resolve-new.release.wat @@ -42,10 +42,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/resolve-propertyaccess.debug.wat b/tests/compiler/resolve-propertyaccess.debug.wat index f3e37c2895..30fb5bb2d4 100644 --- a/tests/compiler/resolve-propertyaccess.debug.wat +++ b/tests/compiler/resolve-propertyaccess.debug.wat @@ -2824,21 +2824,6 @@ i32.const 8 return ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 448 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 256 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 1056 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 2112 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2879,6 +2864,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:resolve-propertyaccess ) diff --git a/tests/compiler/resolve-propertyaccess.release.wat b/tests/compiler/resolve-propertyaccess.release.wat index 96be668c1e..ce4c5aa85a 100644 --- a/tests/compiler/resolve-propertyaccess.release.wat +++ b/tests/compiler/resolve-propertyaccess.release.wat @@ -73,14 +73,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1472 - call $~lib/rt/itcms/__visit - i32.const 1280 - call $~lib/rt/itcms/__visit - i32.const 2080 - call $~lib/rt/itcms/__visit - i32.const 3136 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/resolve-ternary.debug.wat b/tests/compiler/resolve-ternary.debug.wat index d765983685..af05849cfc 100644 --- a/tests/compiler/resolve-ternary.debug.wat +++ b/tests/compiler/resolve-ternary.debug.wat @@ -4212,21 +4212,6 @@ i32.add return ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 448 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 256 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 1056 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 2112 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -4282,6 +4267,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:resolve-ternary ) diff --git a/tests/compiler/resolve-ternary.release.wat b/tests/compiler/resolve-ternary.release.wat index d52b01b12f..15c455fea5 100644 --- a/tests/compiler/resolve-ternary.release.wat +++ b/tests/compiler/resolve-ternary.release.wat @@ -79,14 +79,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1472 - call $~lib/rt/itcms/__visit - i32.const 1280 - call $~lib/rt/itcms/__visit - i32.const 2080 - call $~lib/rt/itcms/__visit - i32.const 3136 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/resolve-unary.debug.wat b/tests/compiler/resolve-unary.debug.wat index a38f493802..adcfe8cc35 100644 --- a/tests/compiler/resolve-unary.debug.wat +++ b/tests/compiler/resolve-unary.debug.wat @@ -2876,35 +2876,6 @@ ) (func $resolve-unary/generic<~lib/string/String> (param $v i32) ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $resolve-unary/foo - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $resolve-unary/bar - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 448 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 256 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 1056 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 2112 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2966,6 +2937,23 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $resolve-unary/foo + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $resolve-unary/bar + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start call $start:resolve-unary ) diff --git a/tests/compiler/resolve-unary.release.wat b/tests/compiler/resolve-unary.release.wat index f598875764..7a629c67c1 100644 --- a/tests/compiler/resolve-unary.release.wat +++ b/tests/compiler/resolve-unary.release.wat @@ -99,14 +99,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 1472 - call $~lib/rt/itcms/__visit - i32.const 1280 - call $~lib/rt/itcms/__visit - i32.const 2080 - call $~lib/rt/itcms/__visit - i32.const 3136 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/return-unreachable.debug.wat b/tests/compiler/return-unreachable.debug.wat index f66ebe5b52..ea4a26e839 100644 --- a/tests/compiler/return-unreachable.debug.wat +++ b/tests/compiler/return-unreachable.debug.wat @@ -2355,18 +2355,6 @@ i32.store unreachable ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 320 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 128 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2422,6 +2410,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start memory.size i32.const 16 diff --git a/tests/compiler/return-unreachable.release.wat b/tests/compiler/return-unreachable.release.wat index 3e068205cc..4d9b25bcf9 100644 --- a/tests/compiler/return-unreachable.release.wat +++ b/tests/compiler/return-unreachable.release.wat @@ -41,12 +41,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1344 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit - i32.const 1152 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/rt/finalize.debug.wat b/tests/compiler/rt/finalize.debug.wat index 9f6475284f..86cd3fc196 100644 --- a/tests/compiler/rt/finalize.debug.wat +++ b/tests/compiler/rt/finalize.debug.wat @@ -2344,15 +2344,6 @@ unreachable end ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2393,6 +2384,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start global.get $~started if diff --git a/tests/compiler/rt/finalize.release.wat b/tests/compiler/rt/finalize.release.wat index b61f14014d..1e478ed5a5 100644 --- a/tests/compiler/rt/finalize.release.wat +++ b/tests/compiler/rt/finalize.release.wat @@ -40,10 +40,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/rt/issue-2719.debug.wat b/tests/compiler/rt/issue-2719.debug.wat index 2c202baebd..64339fedbd 100644 --- a/tests/compiler/rt/issue-2719.debug.wat +++ b/tests/compiler/rt/issue-2719.debug.wat @@ -2297,15 +2297,6 @@ local.get $this i32.load ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2346,6 +2337,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:rt/issue-2719 ) diff --git a/tests/compiler/rt/issue-2719.release.wat b/tests/compiler/rt/issue-2719.release.wat index 376cd994e9..13e6faa4f2 100644 --- a/tests/compiler/rt/issue-2719.release.wat +++ b/tests/compiler/rt/issue-2719.release.wat @@ -37,10 +37,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/rt/runtime-incremental-export.debug.wat b/tests/compiler/rt/runtime-incremental-export.debug.wat index 7dfec531fb..21da5200d5 100644 --- a/tests/compiler/rt/runtime-incremental-export.debug.wat +++ b/tests/compiler/rt/runtime-incremental-export.debug.wat @@ -2362,21 +2362,6 @@ i32.const 0 drop ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 432 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 496 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2414,6 +2399,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start memory.size i32.const 16 diff --git a/tests/compiler/rt/runtime-incremental-export.release.wat b/tests/compiler/rt/runtime-incremental-export.release.wat index 5d32a49a36..9ff1c23a84 100644 --- a/tests/compiler/rt/runtime-incremental-export.release.wat +++ b/tests/compiler/rt/runtime-incremental-export.release.wat @@ -45,14 +45,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit - i32.const 1456 - call $~lib/rt/itcms/__visit - i32.const 1520 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/rt/runtime-minimal-export.debug.wat b/tests/compiler/rt/runtime-minimal-export.debug.wat index 95a809eadd..564100e160 100644 --- a/tests/compiler/rt/runtime-minimal-export.debug.wat +++ b/tests/compiler/rt/runtime-minimal-export.debug.wat @@ -2015,18 +2015,6 @@ call $~lib/rt/tcms/Object#linkTo end ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 32 - local.get $0 - call $~lib/rt/tcms/__visit - i32.const 256 - local.get $0 - call $~lib/rt/tcms/__visit - i32.const 352 - local.get $0 - call $~lib/rt/tcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2064,6 +2052,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start i32.const 208 call $~lib/rt/tcms/initLazy diff --git a/tests/compiler/rt/runtime-minimal-export.release.wat b/tests/compiler/rt/runtime-minimal-export.release.wat index bbaf5cc296..d702a45a51 100644 --- a/tests/compiler/rt/runtime-minimal-export.release.wat +++ b/tests/compiler/rt/runtime-minimal-export.release.wat @@ -1,6 +1,6 @@ (module - (type $0 (func (param i32))) - (type $1 (func)) + (type $0 (func)) + (type $1 (func (param i32))) (type $2 (func (param i32 i32))) (type $3 (func (param i32 i32) (result i32))) (type $4 (func (param i32 i32 i32 i32))) @@ -1176,12 +1176,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - i32.const 1056 - call $~lib/rt/tcms/__visit - i32.const 1280 - call $~lib/rt/tcms/__visit - i32.const 1376 - call $~lib/rt/tcms/__visit global.get $~lib/rt/tcms/pinSpace local.tee $1 i32.load offset=4 @@ -1374,53 +1368,9 @@ local.get $3 global.set $~lib/rt/tcms/white ) - (func $~lib/rt/tcms/__visit (param $0 i32) + (func $~lib/rt/__visit_members (param $0 i32) (local $1 i32) (local $2 i32) - local.get $0 - i32.eqz - if - return - end - global.get $~lib/rt/tcms/white - local.get $0 - i32.const 20 - i32.sub - local.tee $1 - i32.load offset=4 - i32.const 3 - i32.and - i32.eq - if - local.get $1 - call $~lib/rt/tcms/Object#unlink - global.get $~lib/rt/tcms/toSpace - local.tee $0 - i32.load offset=8 - local.set $2 - local.get $1 - local.get $0 - global.get $~lib/rt/tcms/white - i32.eqz - i32.or - i32.store offset=4 - local.get $1 - local.get $2 - i32.store offset=8 - local.get $2 - local.get $1 - local.get $2 - i32.load offset=4 - i32.const 3 - i32.and - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.store offset=8 - end - ) - (func $~lib/rt/__visit_members (param $0 i32) block $invalid block $~lib/arraybuffer/ArrayBufferView block $~lib/string/String @@ -1440,7 +1390,46 @@ end local.get $0 i32.load - call $~lib/rt/tcms/__visit + local.tee $0 + if + global.get $~lib/rt/tcms/white + local.get $0 + i32.const 20 + i32.sub + local.tee $1 + i32.load offset=4 + i32.const 3 + i32.and + i32.eq + if + local.get $1 + call $~lib/rt/tcms/Object#unlink + global.get $~lib/rt/tcms/toSpace + local.tee $0 + i32.load offset=8 + local.set $2 + local.get $1 + local.get $0 + global.get $~lib/rt/tcms/white + i32.eqz + i32.or + i32.store offset=4 + local.get $1 + local.get $2 + i32.store offset=8 + local.get $2 + local.get $1 + local.get $2 + i32.load offset=4 + i32.const 3 + i32.and + i32.or + i32.store offset=4 + local.get $0 + local.get $1 + i32.store offset=8 + end + end return end unreachable diff --git a/tests/compiler/simd.debug.wat b/tests/compiler/simd.debug.wat index 03792d9a1d..1d7a139aed 100644 --- a/tests/compiler/simd.debug.wat +++ b/tests/compiler/simd.debug.wat @@ -6795,15 +6795,6 @@ f64x2.replace_lane 1 return ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 272 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 80 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -6877,6 +6868,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:simd ) diff --git a/tests/compiler/simd.release.wat b/tests/compiler/simd.release.wat index df1c762f6a..06510799b7 100644 --- a/tests/compiler/simd.release.wat +++ b/tests/compiler/simd.release.wat @@ -68,10 +68,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1296 - call $~lib/rt/itcms/__visit - i32.const 1104 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/std/array-literal.debug.wat b/tests/compiler/std/array-literal.debug.wat index b6f795367b..f35df519bb 100644 --- a/tests/compiler/std/array-literal.debug.wat +++ b/tests/compiler/std/array-literal.debug.wat @@ -2503,67 +2503,6 @@ i32.const 0 drop ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $std/array-literal/staticArrayI8 - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/array-literal/staticArrayI32 - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/array-literal/emptyArrayI32 - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/array-literal/dynamicArrayI8 - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/array-literal/dynamicArrayI32 - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/array-literal/dynamicArrayRef - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/array-literal/dynamicArrayRefWithCtor - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 176 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 784 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 448 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2679,6 +2618,58 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $std/array-literal/staticArrayI8 + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $std/array-literal/staticArrayI32 + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $std/array-literal/emptyArrayI32 + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $std/array-literal/dynamicArrayI8 + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $std/array-literal/dynamicArrayI32 + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $std/array-literal/dynamicArrayRef + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $std/array-literal/dynamicArrayRefWithCtor + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start call $start:std/array-literal ) diff --git a/tests/compiler/std/array-literal.release.wat b/tests/compiler/std/array-literal.release.wat index 0fa3c9f108..5e8b8ef156 100644 --- a/tests/compiler/std/array-literal.release.wat +++ b/tests/compiler/std/array-literal.release.wat @@ -96,12 +96,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 1200 - call $~lib/rt/itcms/__visit - i32.const 1808 - call $~lib/rt/itcms/__visit - i32.const 1472 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/std/array.debug.wat b/tests/compiler/std/array.debug.wat index 3f0fbbcfca..5f409dab64 100644 --- a/tests/compiler/std/array.debug.wat +++ b/tests/compiler/std/array.debug.wat @@ -9238,58 +9238,6 @@ i32.const 0 drop ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $std/array/arr - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/array/charset - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/array/inputStabArr - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/array/outputStabArr - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 320 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 1616 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 5392 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 128 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 7120 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 8176 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -10045,6 +9993,30 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $std/array/arr + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $std/array/inputStabArr + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $std/array/outputStabArr + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start global.get $~started if diff --git a/tests/compiler/std/array.release.wat b/tests/compiler/std/array.release.wat index ebdfcda2cc..b9459928b6 100644 --- a/tests/compiler/std/array.release.wat +++ b/tests/compiler/std/array.release.wat @@ -669,8 +669,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 10032 - call $~lib/rt/itcms/__visit global.get $std/array/inputStabArr local.tee $0 if @@ -683,20 +681,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 1344 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit - i32.const 2640 - call $~lib/rt/itcms/__visit - i32.const 6416 - call $~lib/rt/itcms/__visit - i32.const 1152 - call $~lib/rt/itcms/__visit - i32.const 8144 - call $~lib/rt/itcms/__visit - i32.const 9200 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/std/arraybuffer.debug.wat b/tests/compiler/std/arraybuffer.debug.wat index ed31bd6c6a..2ff1a68a1c 100644 --- a/tests/compiler/std/arraybuffer.debug.wat +++ b/tests/compiler/std/arraybuffer.debug.wat @@ -2667,18 +2667,6 @@ i32.const 0 drop ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 336 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 144 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2871,6 +2859,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:std/arraybuffer ) diff --git a/tests/compiler/std/arraybuffer.release.wat b/tests/compiler/std/arraybuffer.release.wat index 19c0a0192a..049e737fa2 100644 --- a/tests/compiler/std/arraybuffer.release.wat +++ b/tests/compiler/std/arraybuffer.release.wat @@ -46,12 +46,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1360 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit - i32.const 1168 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/std/dataview.debug.wat b/tests/compiler/std/dataview.debug.wat index 9b9e4e7e62..0787c27128 100644 --- a/tests/compiler/std/dataview.debug.wat +++ b/tests/compiler/std/dataview.debug.wat @@ -2555,18 +2555,6 @@ i32.const 0 drop ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 336 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 144 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2631,6 +2619,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:std/dataview ) diff --git a/tests/compiler/std/dataview.release.wat b/tests/compiler/std/dataview.release.wat index d1290df97c..1a5787fdd1 100644 --- a/tests/compiler/std/dataview.release.wat +++ b/tests/compiler/std/dataview.release.wat @@ -54,12 +54,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1360 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit - i32.const 1168 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/std/date.debug.wat b/tests/compiler/std/date.debug.wat index f76228e436..ff0750d4e3 100644 --- a/tests/compiler/std/date.debug.wat +++ b/tests/compiler/std/date.debug.wat @@ -3653,30 +3653,6 @@ local.get $this i32.load offset=4 ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 368 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 5760 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 5808 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 176 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 1280 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 2336 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -3804,6 +3780,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start global.get $~started if diff --git a/tests/compiler/std/date.release.wat b/tests/compiler/std/date.release.wat index 9c9a523680..cb20c96d68 100644 --- a/tests/compiler/std/date.release.wat +++ b/tests/compiler/std/date.release.wat @@ -429,20 +429,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1392 - call $~lib/rt/itcms/__visit - i32.const 6784 - call $~lib/rt/itcms/__visit - i32.const 6832 - call $~lib/rt/itcms/__visit - i32.const 1200 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit - i32.const 2304 - call $~lib/rt/itcms/__visit - i32.const 3360 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/std/map.debug.wat b/tests/compiler/std/map.debug.wat index da8784b71b..110dbd01cb 100644 --- a/tests/compiler/std/map.debug.wat +++ b/tests/compiler/std/map.debug.wat @@ -5225,21 +5225,6 @@ call $"std/map/testNumeric" call $~lib/rt/itcms/__collect ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 432 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 592 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -5723,6 +5708,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:std/map ) diff --git a/tests/compiler/std/map.release.wat b/tests/compiler/std/map.release.wat index 4148a7ac94..42b63c0336 100644 --- a/tests/compiler/std/map.release.wat +++ b/tests/compiler/std/map.release.wat @@ -65,14 +65,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1456 - call $~lib/rt/itcms/__visit - i32.const 1616 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/std/new.debug.wat b/tests/compiler/std/new.debug.wat index 04a2b09a95..38084b2f58 100644 --- a/tests/compiler/std/new.debug.wat +++ b/tests/compiler/std/new.debug.wat @@ -2282,22 +2282,6 @@ call $std/new/AClass#constructor global.set $std/new/aClass ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $std/new/aClass - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2338,6 +2322,16 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $std/new/aClass + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start call $start:std/new ) diff --git a/tests/compiler/std/new.release.wat b/tests/compiler/std/new.release.wat index 941f28ce40..48954c3692 100644 --- a/tests/compiler/std/new.release.wat +++ b/tests/compiler/std/new.release.wat @@ -42,10 +42,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/std/operator-overloading.debug.wat b/tests/compiler/std/operator-overloading.debug.wat index 0abd1231af..d52ad85bfe 100644 --- a/tests/compiler/std/operator-overloading.debug.wat +++ b/tests/compiler/std/operator-overloading.debug.wat @@ -2722,6 +2722,55 @@ local.get $this i32.load offset=4 ) + (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $1 + call $~lib/object/Object~visit + local.get $0 + i32.load + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/object/Object~visit (param $0 i32) (param $1 i32) + ) + (func $~lib/rt/__visit_members (param $0 i32) (param $1 i32) + block $invalid + block $std/operator-overloading/TesterElementAccess + block $std/operator-overloading/TesterInlineInstance + block $std/operator-overloading/TesterInlineStatic + block $std/operator-overloading/Tester + block $~lib/arraybuffer/ArrayBufferView + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + block $~lib/object/Object + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/object/Object $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $std/operator-overloading/Tester $std/operator-overloading/TesterInlineStatic $std/operator-overloading/TesterInlineInstance $std/operator-overloading/TesterElementAccess $invalid + end + return + end + return + end + return + end + local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView~visit + return + end + return + end + return + end + return + end + return + end + unreachable + ) (func $~lib/rt/__visit_globals (param $0 i32) (local $1 i32) global.get $std/operator-overloading/a1 @@ -3144,61 +3193,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) - (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - local.get $1 - call $~lib/object/Object~visit - local.get $0 - i32.load - local.get $1 - call $~lib/rt/itcms/__visit - ) - (func $~lib/object/Object~visit (param $0 i32) (param $1 i32) - ) - (func $~lib/rt/__visit_members (param $0 i32) (param $1 i32) - block $invalid - block $std/operator-overloading/TesterElementAccess - block $std/operator-overloading/TesterInlineInstance - block $std/operator-overloading/TesterInlineStatic - block $std/operator-overloading/Tester - block $~lib/arraybuffer/ArrayBufferView - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - block $~lib/object/Object - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/object/Object $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $std/operator-overloading/Tester $std/operator-overloading/TesterInlineStatic $std/operator-overloading/TesterInlineInstance $std/operator-overloading/TesterElementAccess $invalid - end - return - end - return - end - return - end - local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBufferView~visit - return - end - return - end - return - end - return - end - return - end - unreachable ) (func $~start call $start:std/operator-overloading diff --git a/tests/compiler/std/operator-overloading.release.wat b/tests/compiler/std/operator-overloading.release.wat index 5e5c560d3b..b0c9b9b93b 100644 --- a/tests/compiler/std/operator-overloading.release.wat +++ b/tests/compiler/std/operator-overloading.release.wat @@ -1621,6 +1621,43 @@ end local.get $2 ) + (func $~lib/rt/__visit_members (param $0 i32) + block $invalid + block $std/operator-overloading/TesterElementAccess + block $std/operator-overloading/TesterInlineInstance + block $std/operator-overloading/TesterInlineStatic + block $std/operator-overloading/Tester + block $~lib/arraybuffer/ArrayBufferView + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + block $~lib/object/Object + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/object/Object $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $std/operator-overloading/Tester $std/operator-overloading/TesterInlineStatic $std/operator-overloading/TesterInlineInstance $std/operator-overloading/TesterElementAccess $invalid + end + return + end + return + end + return + end + local.get $0 + i32.load + call $~lib/rt/itcms/__visit + return + end + return + end + return + end + return + end + return + end + unreachable + ) (func $~lib/rt/__visit_globals (local $0 i32) global.get $std/operator-overloading/a1 @@ -1983,47 +2020,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit - ) - (func $~lib/rt/__visit_members (param $0 i32) - block $invalid - block $std/operator-overloading/TesterElementAccess - block $std/operator-overloading/TesterInlineInstance - block $std/operator-overloading/TesterInlineStatic - block $std/operator-overloading/Tester - block $~lib/arraybuffer/ArrayBufferView - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - block $~lib/object/Object - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/object/Object $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $std/operator-overloading/Tester $std/operator-overloading/TesterInlineStatic $std/operator-overloading/TesterInlineInstance $std/operator-overloading/TesterElementAccess $invalid - end - return - end - return - end - return - end - local.get $0 - i32.load - call $~lib/rt/itcms/__visit - return - end - return - end - return - end - return - end - return - end - unreachable ) (func $~start call $start:std/operator-overloading diff --git a/tests/compiler/std/set.debug.wat b/tests/compiler/std/set.debug.wat index b643b683f8..263274bf4a 100644 --- a/tests/compiler/std/set.debug.wat +++ b/tests/compiler/std/set.debug.wat @@ -4329,18 +4329,6 @@ call $std/set/testNumeric call $~lib/rt/itcms/__collect ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 432 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -4698,6 +4686,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:std/set ) diff --git a/tests/compiler/std/set.release.wat b/tests/compiler/std/set.release.wat index 2a2f9d8ff2..2f410b0204 100644 --- a/tests/compiler/std/set.release.wat +++ b/tests/compiler/std/set.release.wat @@ -58,12 +58,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1456 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/std/static-array.debug.wat b/tests/compiler/std/static-array.debug.wat index 9cb6bc3014..bae1c0d536 100644 --- a/tests/compiler/std/static-array.debug.wat +++ b/tests/compiler/std/static-array.debug.wat @@ -2441,46 +2441,6 @@ local.get $length_ i32.store offset=12 ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $std/static-array/i - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/static-array/I - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/static-array/f - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/static-array/F - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 448 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 560 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 608 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2590,6 +2550,37 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $std/static-array/i + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $std/static-array/I + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $std/static-array/f + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $std/static-array/F + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start call $start:std/static-array ) diff --git a/tests/compiler/std/static-array.release.wat b/tests/compiler/std/static-array.release.wat index 9b5ed278de..78e3425a32 100644 --- a/tests/compiler/std/static-array.release.wat +++ b/tests/compiler/std/static-array.release.wat @@ -70,12 +70,6 @@ call $~lib/rt/itcms/__visit i32.const 1360 call $~lib/rt/itcms/__visit - i32.const 1472 - call $~lib/rt/itcms/__visit - i32.const 1584 - call $~lib/rt/itcms/__visit - i32.const 1632 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/std/staticarray.debug.wat b/tests/compiler/std/staticarray.debug.wat index d083482d6b..b4304c4e4a 100644 --- a/tests/compiler/std/staticarray.debug.wat +++ b/tests/compiler/std/staticarray.debug.wat @@ -3512,49 +3512,6 @@ i32.const 0 drop ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $std/staticarray/arr1 - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/staticarray/arr2 - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/staticarray/arr3 - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/staticarray/arr4 - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 64 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 656 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 1312 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 320 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -3832,6 +3789,16 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $std/staticarray/arr4 + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/staticarray/StaticArray~visit + end + ) (func $~start call $start:std/staticarray ) diff --git a/tests/compiler/std/staticarray.release.wat b/tests/compiler/std/staticarray.release.wat index eeafb67230..856a320461 100644 --- a/tests/compiler/std/staticarray.release.wat +++ b/tests/compiler/std/staticarray.release.wat @@ -175,30 +175,12 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1056 - call $~lib/rt/itcms/__visit - i32.const 1280 - call $~lib/rt/itcms/__visit - global.get $std/staticarray/arr3 - local.tee $0 - if - local.get $0 - call $~lib/rt/itcms/__visit - end global.get $std/staticarray/arr4 local.tee $0 if local.get $0 - call $~lib/rt/itcms/__visit + call $~lib/staticarray/StaticArray#__visit end - i32.const 1088 - call $~lib/rt/itcms/__visit - i32.const 1680 - call $~lib/rt/itcms/__visit - i32.const 2336 - call $~lib/rt/itcms/__visit - i32.const 1344 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 @@ -260,7 +242,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$267 + block $__inlined_func$~lib/rt/itcms/Object#unlink$269 local.get $0 i32.load offset=4 i32.const -4 @@ -284,7 +266,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$267 + br $__inlined_func$~lib/rt/itcms/Object#unlink$269 end local.get $0 i32.load offset=8 @@ -2220,7 +2202,7 @@ local.get $1 i32.sub ) - (func $~lib/staticarray/StaticArray~visit (param $0 i32) + (func $~lib/staticarray/StaticArray#__visit (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2292,7 +2274,7 @@ return end local.get $0 - call $~lib/staticarray/StaticArray~visit + call $~lib/staticarray/StaticArray#__visit return end global.get $~lib/memory/__stack_pointer @@ -2309,7 +2291,7 @@ br $folding-inner1 end local.get $0 - call $~lib/staticarray/StaticArray~visit + call $~lib/staticarray/StaticArray#__visit return end global.get $~lib/memory/__stack_pointer @@ -3376,7 +3358,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store - block $__inlined_func$~lib/staticarray/StaticArray<~lib/string/String>#indexOf$274 + block $__inlined_func$~lib/staticarray/StaticArray<~lib/string/String>#indexOf$276 local.get $0 i32.const 20 i32.sub @@ -3396,7 +3378,7 @@ global.set $~lib/memory/__stack_pointer i32.const -1 local.set $2 - br $__inlined_func$~lib/staticarray/StaticArray<~lib/string/String>#indexOf$274 + br $__inlined_func$~lib/staticarray/StaticArray<~lib/string/String>#indexOf$276 end local.get $2 i32.const 0 @@ -3438,7 +3420,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/staticarray/StaticArray<~lib/string/String>#indexOf$274 + br $__inlined_func$~lib/staticarray/StaticArray<~lib/string/String>#indexOf$276 end local.get $2 i32.const 1 @@ -4088,7 +4070,7 @@ global.get $~lib/memory/__stack_pointer local.get $10 i32.store - block $__inlined_func$~lib/rt/itcms/__renew$224 + block $__inlined_func$~lib/rt/itcms/__renew$226 i32.const 1073741820 local.get $1 i32.const 1 @@ -4131,7 +4113,7 @@ i32.store offset=16 local.get $1 local.set $2 - br $__inlined_func$~lib/rt/itcms/__renew$224 + br $__inlined_func$~lib/rt/itcms/__renew$226 end local.get $4 local.get $3 @@ -6324,7 +6306,7 @@ call $~lib/builtins/abort unreachable end - block $__inlined_func$~lib/staticarray/StaticArray#includes$276 (result i32) + block $__inlined_func$~lib/staticarray/StaticArray#includes$278 (result i32) i32.const 8 i32.const 10 call $~lib/rt/itcms/__new @@ -6365,7 +6347,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 0 - br $__inlined_func$~lib/staticarray/StaticArray#includes$276 + br $__inlined_func$~lib/staticarray/StaticArray#includes$278 end loop $while-continue|0 local.get $1 @@ -6387,7 +6369,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 1 - br $__inlined_func$~lib/staticarray/StaticArray#includes$276 + br $__inlined_func$~lib/staticarray/StaticArray#includes$278 end local.get $1 i32.const 1 @@ -6411,7 +6393,7 @@ call $~lib/builtins/abort unreachable end - block $__inlined_func$~lib/staticarray/StaticArray#includes$277 (result i32) + block $__inlined_func$~lib/staticarray/StaticArray#includes$279 (result i32) i32.const 4 i32.const 11 call $~lib/rt/itcms/__new @@ -6452,7 +6434,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 0 - br $__inlined_func$~lib/staticarray/StaticArray#includes$277 + br $__inlined_func$~lib/staticarray/StaticArray#includes$279 end loop $while-continue|030 local.get $1 @@ -6474,7 +6456,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 1 - br $__inlined_func$~lib/staticarray/StaticArray#includes$277 + br $__inlined_func$~lib/staticarray/StaticArray#includes$279 end local.get $1 i32.const 1 diff --git a/tests/compiler/std/string-casemapping.debug.wat b/tests/compiler/std/string-casemapping.debug.wat index 946aa3b013..0738c9df24 100644 --- a/tests/compiler/std/string-casemapping.debug.wat +++ b/tests/compiler/std/string-casemapping.debug.wat @@ -3408,28 +3408,6 @@ call $~lib/util/number/itoa64 return ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 256 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 64 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 18608 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 19664 - local.get $0 - call $~lib/rt/itcms/__visit - global.get $~lib/util/casemap/SPECIALS_UPPER - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -3470,6 +3448,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:std/string-casemapping ) diff --git a/tests/compiler/std/string-casemapping.release.wat b/tests/compiler/std/string-casemapping.release.wat index 621340f408..5a8ca85c15 100644 --- a/tests/compiler/std/string-casemapping.release.wat +++ b/tests/compiler/std/string-casemapping.release.wat @@ -485,16 +485,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1280 - call $~lib/rt/itcms/__visit - i32.const 1088 - call $~lib/rt/itcms/__visit - i32.const 19632 - call $~lib/rt/itcms/__visit - i32.const 20688 - call $~lib/rt/itcms/__visit - i32.const 1488 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/std/string-encoding.debug.wat b/tests/compiler/std/string-encoding.debug.wat index 8b5dc5579c..6598e388ba 100644 --- a/tests/compiler/std/string-encoding.debug.wat +++ b/tests/compiler/std/string-encoding.debug.wat @@ -2859,25 +2859,6 @@ i32.const 0 drop ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $std/string-encoding/str - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 320 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 128 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 688 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2915,6 +2896,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:std/string-encoding ) diff --git a/tests/compiler/std/string-encoding.release.wat b/tests/compiler/std/string-encoding.release.wat index 3182351243..abdb669a31 100644 --- a/tests/compiler/std/string-encoding.release.wat +++ b/tests/compiler/std/string-encoding.release.wat @@ -74,14 +74,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1056 - call $~lib/rt/itcms/__visit - i32.const 1344 - call $~lib/rt/itcms/__visit - i32.const 1152 - call $~lib/rt/itcms/__visit - i32.const 1712 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/std/string.debug.wat b/tests/compiler/std/string.debug.wat index f75a97a1ea..d75dc8b0d9 100644 --- a/tests/compiler/std/string.debug.wat +++ b/tests/compiler/std/string.debug.wat @@ -5512,41 +5512,6 @@ global.get $std/string/str return ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $std/string/str - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/string/nullStr - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 240 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 13040 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 14688 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 352 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 15616 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 16672 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -5620,6 +5585,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:std/string ) diff --git a/tests/compiler/std/string.release.wat b/tests/compiler/std/string.release.wat index 11588257fe..3cf3bf5fe9 100644 --- a/tests/compiler/std/string.release.wat +++ b/tests/compiler/std/string.release.wat @@ -1070,24 +1070,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - global.get $std/string/str - local.tee $0 - if - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 1264 - call $~lib/rt/itcms/__visit - i32.const 14064 - call $~lib/rt/itcms/__visit - i32.const 15712 - call $~lib/rt/itcms/__visit - i32.const 1376 - call $~lib/rt/itcms/__visit - i32.const 16640 - call $~lib/rt/itcms/__visit - i32.const 17696 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/std/symbol.debug.wat b/tests/compiler/std/symbol.debug.wat index a6cb7d2d76..3c0893c799 100644 --- a/tests/compiler/std/symbol.debug.wat +++ b/tests/compiler/std/symbol.debug.wat @@ -2735,63 +2735,6 @@ local.get $taggedNext i32.store offset=8 ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $~lib/symbol/stringToId - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $~lib/symbol/idToString - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/symbol/key1 - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/symbol/key2 - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/symbol/key3 - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/symbol/key4 - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 304 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 512 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 624 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 112 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2857,6 +2800,23 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $~lib/symbol/stringToId + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $~lib/symbol/idToString + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start global.get $~started if diff --git a/tests/compiler/std/symbol.release.wat b/tests/compiler/std/symbol.release.wat index 51197770e1..9a5954d44e 100644 --- a/tests/compiler/std/symbol.release.wat +++ b/tests/compiler/std/symbol.release.wat @@ -113,38 +113,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - global.get $std/symbol/key1 - local.tee $0 - if - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/symbol/key2 - local.tee $0 - if - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/symbol/key3 - local.tee $0 - if - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/symbol/key4 - local.tee $0 - if - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 1328 - call $~lib/rt/itcms/__visit - i32.const 1536 - call $~lib/rt/itcms/__visit - i32.const 1648 - call $~lib/rt/itcms/__visit - i32.const 1136 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/std/typedarray.debug.wat b/tests/compiler/std/typedarray.debug.wat index ecf75231bf..6e263dc418 100644 --- a/tests/compiler/std/typedarray.debug.wat +++ b/tests/compiler/std/typedarray.debug.wat @@ -13081,80 +13081,6 @@ i32.const 0 drop ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $std/typedarray/forEachValues - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/typedarray/testArrayReverseValues - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/typedarray/testArrayIndexOfAndLastIndexOfValues - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/typedarray/testArrayWrapValues - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/typedarray/setSource1 - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/typedarray/setSource2 - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/typedarray/setSource3 - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $std/typedarray/setSource7 - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 336 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 144 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 7408 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 8464 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -14465,6 +14391,65 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $std/typedarray/forEachValues + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $std/typedarray/testArrayReverseValues + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $std/typedarray/testArrayIndexOfAndLastIndexOfValues + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $std/typedarray/testArrayWrapValues + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $std/typedarray/setSource1 + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $std/typedarray/setSource2 + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $std/typedarray/setSource3 + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $std/typedarray/setSource7 + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start call $start:std/typedarray ) diff --git a/tests/compiler/std/typedarray.release.wat b/tests/compiler/std/typedarray.release.wat index 9270604b3c..e77251370c 100644 --- a/tests/compiler/std/typedarray.release.wat +++ b/tests/compiler/std/typedarray.release.wat @@ -695,16 +695,6 @@ call $~lib/rt/itcms/__visit i32.const 11264 call $~lib/rt/itcms/__visit - i32.const 1360 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit - i32.const 1168 - call $~lib/rt/itcms/__visit - i32.const 8432 - call $~lib/rt/itcms/__visit - i32.const 9488 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/std/uri.debug.wat b/tests/compiler/std/uri.debug.wat index 5a8c5dce8f..3875cedeb2 100644 --- a/tests/compiler/std/uri.debug.wat +++ b/tests/compiler/std/uri.debug.wat @@ -3403,18 +3403,6 @@ i32.const 0 drop ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 352 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 160 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 560 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -3452,6 +3440,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:std/uri ) diff --git a/tests/compiler/std/uri.release.wat b/tests/compiler/std/uri.release.wat index f3835303da..3a070302d1 100644 --- a/tests/compiler/std/uri.release.wat +++ b/tests/compiler/std/uri.release.wat @@ -156,12 +156,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1376 - call $~lib/rt/itcms/__visit - i32.const 1184 - call $~lib/rt/itcms/__visit - i32.const 1584 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/super-inline.debug.wat b/tests/compiler/super-inline.debug.wat index 1037d7b726..fcf13e8907 100644 --- a/tests/compiler/super-inline.debug.wat +++ b/tests/compiler/super-inline.debug.wat @@ -2269,29 +2269,6 @@ local.get $0 call $super-inline/Foo#a ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $super-inline/foo - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $super-inline/bar - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2335,6 +2312,23 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $super-inline/foo + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $super-inline/bar + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start call $start:super-inline ) diff --git a/tests/compiler/super-inline.release.wat b/tests/compiler/super-inline.release.wat index 0f870aa03f..d10bf8d33b 100644 --- a/tests/compiler/super-inline.release.wat +++ b/tests/compiler/super-inline.release.wat @@ -49,10 +49,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 1248 - call $~lib/rt/itcms/__visit - i32.const 1056 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/switch.debug.wat b/tests/compiler/switch.debug.wat index 0c85ee2625..5449c4314b 100644 --- a/tests/compiler/switch.debug.wat +++ b/tests/compiler/switch.debug.wat @@ -2803,29 +2803,6 @@ local.get $value i32.store ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $switch/foo1 - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $switch/foo2 - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 496 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 304 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2869,6 +2846,23 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $switch/foo1 + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $switch/foo2 + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start call $start:switch ) diff --git a/tests/compiler/switch.release.wat b/tests/compiler/switch.release.wat index b53df8bee3..e52086405c 100644 --- a/tests/compiler/switch.release.wat +++ b/tests/compiler/switch.release.wat @@ -80,10 +80,6 @@ local.get $0 call $~lib/rt/itcms/__visit end - i32.const 1520 - call $~lib/rt/itcms/__visit - i32.const 1328 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/templateliteral.debug.wat b/tests/compiler/templateliteral.debug.wat index 204db8df29..0fcc4a1588 100644 --- a/tests/compiler/templateliteral.debug.wat +++ b/tests/compiler/templateliteral.debug.wat @@ -4373,21 +4373,6 @@ call $templateliteral/test_null call $templateliteral/test_recursive ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 384 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 192 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 1440 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 2496 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -4499,6 +4484,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start global.get $~started if diff --git a/tests/compiler/templateliteral.release.wat b/tests/compiler/templateliteral.release.wat index 24e06cf256..22092890b2 100644 --- a/tests/compiler/templateliteral.release.wat +++ b/tests/compiler/templateliteral.release.wat @@ -143,14 +143,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1408 - call $~lib/rt/itcms/__visit - i32.const 1216 - call $~lib/rt/itcms/__visit - i32.const 2464 - call $~lib/rt/itcms/__visit - i32.const 3520 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/throw.debug.wat b/tests/compiler/throw.debug.wat index 0b8420d409..24f498fa91 100644 --- a/tests/compiler/throw.debug.wat +++ b/tests/compiler/throw.debug.wat @@ -1802,12 +1802,6 @@ call $~lib/builtins/abort unreachable ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 464 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -1845,6 +1839,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:throw ) diff --git a/tests/compiler/throw.release.wat b/tests/compiler/throw.release.wat index d1427154ca..182771141b 100644 --- a/tests/compiler/throw.release.wat +++ b/tests/compiler/throw.release.wat @@ -48,8 +48,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1488 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/typeof.debug.wat b/tests/compiler/typeof.debug.wat index 2510d717ba..79786c952f 100644 --- a/tests/compiler/typeof.debug.wat +++ b/tests/compiler/typeof.debug.wat @@ -2381,29 +2381,6 @@ local.get $ptr return ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $typeof/s - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $typeof/c - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 528 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 336 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -2462,6 +2439,16 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $typeof/c + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + ) (func $~start global.get $~started if diff --git a/tests/compiler/typeof.release.wat b/tests/compiler/typeof.release.wat index 698d29d147..7b5254ca53 100644 --- a/tests/compiler/typeof.release.wat +++ b/tests/compiler/typeof.release.wat @@ -57,18 +57,12 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1264 - call $~lib/rt/itcms/__visit global.get $typeof/c local.tee $0 if local.get $0 call $~lib/rt/itcms/__visit end - i32.const 1552 - call $~lib/rt/itcms/__visit - i32.const 1360 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 diff --git a/tests/compiler/while.debug.wat b/tests/compiler/while.debug.wat index 1dfafed2d8..f030eaff37 100644 --- a/tests/compiler/while.debug.wat +++ b/tests/compiler/while.debug.wat @@ -3150,15 +3150,6 @@ end call $~lib/rt/itcms/__collect ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - i32.const 272 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 80 - local.get $0 - call $~lib/rt/itcms/__visit - ) (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 @@ -3199,6 +3190,9 @@ end unreachable ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + ) (func $~start call $start:while ) diff --git a/tests/compiler/while.release.wat b/tests/compiler/while.release.wat index c5b0c20429..4a654b4daf 100644 --- a/tests/compiler/while.release.wat +++ b/tests/compiler/while.release.wat @@ -37,10 +37,6 @@ (func $~lib/rt/itcms/visitRoots (local $0 i32) (local $1 i32) - i32.const 1296 - call $~lib/rt/itcms/__visit - i32.const 1104 - call $~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4