diff --git a/compiler/test/__snapshots__/arrays.0f9e7d37.0.snapshot b/compiler/test/__snapshots__/arrays.0f9e7d37.0.snapshot index e21a772a2d..199190509b 100644 --- a/compiler/test/__snapshots__/arrays.0f9e7d37.0.snapshot +++ b/compiler/test/__snapshots__/arrays.0f9e7d37.0.snapshot @@ -14,12 +14,12 @@ arrays › array_access (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/exception\" \"printException\" (func $wimport_GRAIN$MODULE$runtime/exception_printException (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $x_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -48,13 +48,13 @@ arrays › array_access (local.get $0) (i32.const 7) ) - (global.set $global_0 + (global.set $x_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $x_1131) ) ) ) @@ -68,7 +68,7 @@ arrays › array_access (i32.const 0) (i32.load offset=4 (local.tee $1 - (global.get $global_0) + (global.get $x_1131) ) ) ) diff --git a/compiler/test/__snapshots__/arrays.24453e6e.0.snapshot b/compiler/test/__snapshots__/arrays.24453e6e.0.snapshot index c01b6f8677..055be6e2ef 100644 --- a/compiler/test/__snapshots__/arrays.24453e6e.0.snapshot +++ b/compiler/test/__snapshots__/arrays.24453e6e.0.snapshot @@ -7,11 +7,11 @@ arrays › array1_trailing (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store diff --git a/compiler/test/__snapshots__/arrays.28fcc534.0.snapshot b/compiler/test/__snapshots__/arrays.28fcc534.0.snapshot index e3bd6257b3..370273d8bc 100644 --- a/compiler/test/__snapshots__/arrays.28fcc534.0.snapshot +++ b/compiler/test/__snapshots__/arrays.28fcc534.0.snapshot @@ -14,12 +14,12 @@ arrays › array_access4 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/exception\" \"printException\" (func $wimport_GRAIN$MODULE$runtime/exception_printException (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $x_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -48,13 +48,13 @@ arrays › array_access4 (local.get $0) (i32.const 7) ) - (global.set $global_0 + (global.set $x_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $x_1131) ) ) ) @@ -68,7 +68,7 @@ arrays › array_access4 (i32.const 0) (i32.load offset=4 (local.tee $1 - (global.get $global_0) + (global.get $x_1131) ) ) ) diff --git a/compiler/test/__snapshots__/arrays.4c8c9f91.0.snapshot b/compiler/test/__snapshots__/arrays.4c8c9f91.0.snapshot index ca69f8dd73..ab6d3bebdd 100644 --- a/compiler/test/__snapshots__/arrays.4c8c9f91.0.snapshot +++ b/compiler/test/__snapshots__/arrays.4c8c9f91.0.snapshot @@ -14,12 +14,12 @@ arrays › array_access2 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/exception\" \"printException\" (func $wimport_GRAIN$MODULE$runtime/exception_printException (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $x_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -48,13 +48,13 @@ arrays › array_access2 (local.get $0) (i32.const 7) ) - (global.set $global_0 + (global.set $x_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $x_1131) ) ) ) @@ -68,7 +68,7 @@ arrays › array_access2 (i32.const 0) (i32.load offset=4 (local.tee $1 - (global.get $global_0) + (global.get $x_1131) ) ) ) diff --git a/compiler/test/__snapshots__/arrays.6eac4e1f.0.snapshot b/compiler/test/__snapshots__/arrays.6eac4e1f.0.snapshot index 58c0933480..df06e3e367 100644 --- a/compiler/test/__snapshots__/arrays.6eac4e1f.0.snapshot +++ b/compiler/test/__snapshots__/arrays.6eac4e1f.0.snapshot @@ -14,12 +14,12 @@ arrays › array_access3 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/exception\" \"printException\" (func $wimport_GRAIN$MODULE$runtime/exception_printException (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $x_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -48,13 +48,13 @@ arrays › array_access3 (local.get $0) (i32.const 7) ) - (global.set $global_0 + (global.set $x_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $x_1131) ) ) ) @@ -68,7 +68,7 @@ arrays › array_access3 (i32.const 0) (i32.load offset=4 (local.tee $1 - (global.get $global_0) + (global.get $x_1131) ) ) ) diff --git a/compiler/test/__snapshots__/arrays.74d79181.0.snapshot b/compiler/test/__snapshots__/arrays.74d79181.0.snapshot index f839f863c1..4959a4164f 100644 --- a/compiler/test/__snapshots__/arrays.74d79181.0.snapshot +++ b/compiler/test/__snapshots__/arrays.74d79181.0.snapshot @@ -14,12 +14,12 @@ arrays › array_access5 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/exception\" \"printException\" (func $wimport_GRAIN$MODULE$runtime/exception_printException (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $x_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -48,13 +48,13 @@ arrays › array_access5 (local.get $0) (i32.const 7) ) - (global.set $global_0 + (global.set $x_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $x_1131) ) ) ) @@ -68,7 +68,7 @@ arrays › array_access5 (i32.const 0) (i32.load offset=4 (local.tee $1 - (global.get $global_0) + (global.get $x_1131) ) ) ) diff --git a/compiler/test/__snapshots__/arrays.9e17b4d1.0.snapshot b/compiler/test/__snapshots__/arrays.9e17b4d1.0.snapshot index bf6641ff14..5d0aafbcbe 100644 --- a/compiler/test/__snapshots__/arrays.9e17b4d1.0.snapshot +++ b/compiler/test/__snapshots__/arrays.9e17b4d1.0.snapshot @@ -7,11 +7,11 @@ arrays › array3 (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store diff --git a/compiler/test/__snapshots__/arrays.b85cb7fc.0.snapshot b/compiler/test/__snapshots__/arrays.b85cb7fc.0.snapshot index b5082b9f2a..18a4eabbce 100644 --- a/compiler/test/__snapshots__/arrays.b85cb7fc.0.snapshot +++ b/compiler/test/__snapshots__/arrays.b85cb7fc.0.snapshot @@ -7,11 +7,11 @@ arrays › array1_trailing_space (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store diff --git a/compiler/test/__snapshots__/basic_functionality.00cfdb2e.0.snapshot b/compiler/test/__snapshots__/basic_functionality.00cfdb2e.0.snapshot index da069baeac..2f78a47d3c 100644 --- a/compiler/test/__snapshots__/basic_functionality.00cfdb2e.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.00cfdb2e.0.snapshot @@ -4,11 +4,11 @@ basic functionality › binop2.4 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const -3) ) diff --git a/compiler/test/__snapshots__/basic_functionality.03de4778.0.snapshot b/compiler/test/__snapshots__/basic_functionality.03de4778.0.snapshot index de758bf9cd..b744b80133 100644 --- a/compiler/test/__snapshots__/basic_functionality.03de4778.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.03de4778.0.snapshot @@ -4,11 +4,11 @@ basic functionality › neg (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const -79) ) diff --git a/compiler/test/__snapshots__/basic_functionality.040643b3.0.snapshot b/compiler/test/__snapshots__/basic_functionality.040643b3.0.snapshot index 0c785399f5..86b94957e4 100644 --- a/compiler/test/__snapshots__/basic_functionality.040643b3.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.040643b3.0.snapshot @@ -4,11 +4,11 @@ basic functionality › comp5 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 9) ) diff --git a/compiler/test/__snapshots__/basic_functionality.0996c5f7.0.snapshot b/compiler/test/__snapshots__/basic_functionality.0996c5f7.0.snapshot index 533f444e67..12516e9866 100644 --- a/compiler/test/__snapshots__/basic_functionality.0996c5f7.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.0996c5f7.0.snapshot @@ -10,11 +10,11 @@ basic functionality › modulo4 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$%\" (global $gimport_pervasives_% (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"%\" (func $gimport_pervasives_% (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_% (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.0a230f18.0.snapshot b/compiler/test/__snapshots__/basic_functionality.0a230f18.0.snapshot index fe131748b5..fa2052ac4f 100644 --- a/compiler/test/__snapshots__/basic_functionality.0a230f18.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.0a230f18.0.snapshot @@ -10,11 +10,11 @@ basic functionality › land4 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$&\" (global $gimport_pervasives_& (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"&\" (func $gimport_pervasives_& (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_& (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.0a2e4afa.0.snapshot b/compiler/test/__snapshots__/basic_functionality.0a2e4afa.0.snapshot index 271dfe1810..af5ffcd22a 100644 --- a/compiler/test/__snapshots__/basic_functionality.0a2e4afa.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.0a2e4afa.0.snapshot @@ -10,11 +10,11 @@ basic functionality › lxor1 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$^\" (global $gimport_pervasives_^ (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"^\" (func $gimport_pervasives_^ (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_^ (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.0c0b170b.0.snapshot b/compiler/test/__snapshots__/basic_functionality.0c0b170b.0.snapshot index 17eb0af089..58ba582a65 100644 --- a/compiler/test/__snapshots__/basic_functionality.0c0b170b.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.0c0b170b.0.snapshot @@ -10,11 +10,11 @@ basic functionality › lor1 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$|\" (global $gimport_pervasives_| (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"|\" (func $gimport_pervasives_| (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_| (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.0c400bde.0.snapshot b/compiler/test/__snapshots__/basic_functionality.0c400bde.0.snapshot index 638fbb7759..45a6c9de16 100644 --- a/compiler/test/__snapshots__/basic_functionality.0c400bde.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.0c400bde.0.snapshot @@ -10,11 +10,11 @@ basic functionality › modulo6 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$%\" (global $gimport_pervasives_% (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"%\" (func $gimport_pervasives_% (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_% (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.0e812a39.0.snapshot b/compiler/test/__snapshots__/basic_functionality.0e812a39.0.snapshot index 18fed726c6..d745cd07ee 100644 --- a/compiler/test/__snapshots__/basic_functionality.0e812a39.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.0e812a39.0.snapshot @@ -4,11 +4,11 @@ basic functionality › precedence1 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 55) ) diff --git a/compiler/test/__snapshots__/basic_functionality.0f79ce35.0.snapshot b/compiler/test/__snapshots__/basic_functionality.0f79ce35.0.snapshot index f6b9470419..7bd5a5c72e 100644 --- a/compiler/test/__snapshots__/basic_functionality.0f79ce35.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.0f79ce35.0.snapshot @@ -4,11 +4,11 @@ basic functionality › comp16 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const -2) ) diff --git a/compiler/test/__snapshots__/basic_functionality.10dda088.0.snapshot b/compiler/test/__snapshots__/basic_functionality.10dda088.0.snapshot index e23e73e1a3..0a212e2ba8 100644 --- a/compiler/test/__snapshots__/basic_functionality.10dda088.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.10dda088.0.snapshot @@ -4,11 +4,11 @@ basic functionality › comp3 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 11) ) diff --git a/compiler/test/__snapshots__/basic_functionality.125626a9.0.snapshot b/compiler/test/__snapshots__/basic_functionality.125626a9.0.snapshot index 4706419cda..e4fde6e501 100644 --- a/compiler/test/__snapshots__/basic_functionality.125626a9.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.125626a9.0.snapshot @@ -4,11 +4,11 @@ basic functionality › orshadow (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 7) ) diff --git a/compiler/test/__snapshots__/basic_functionality.13335202.0.snapshot b/compiler/test/__snapshots__/basic_functionality.13335202.0.snapshot index 92dc05fc0b..85ab13052a 100644 --- a/compiler/test/__snapshots__/basic_functionality.13335202.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.13335202.0.snapshot @@ -4,11 +4,11 @@ basic functionality › precedence2 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 55) ) diff --git a/compiler/test/__snapshots__/basic_functionality.1ad0f349.0.snapshot b/compiler/test/__snapshots__/basic_functionality.1ad0f349.0.snapshot index 72d025f23d..0465fa0801 100644 --- a/compiler/test/__snapshots__/basic_functionality.1ad0f349.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.1ad0f349.0.snapshot @@ -14,11 +14,11 @@ basic functionality › precedence3 (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"%\" (func $gimport_pervasives_% (param i32 i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/basic_functionality.1ae16d82.0.snapshot b/compiler/test/__snapshots__/basic_functionality.1ae16d82.0.snapshot index b0fcaf2d5d..c466b89d9c 100644 --- a/compiler/test/__snapshots__/basic_functionality.1ae16d82.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.1ae16d82.0.snapshot @@ -4,11 +4,11 @@ basic functionality › binop4 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 13) ) diff --git a/compiler/test/__snapshots__/basic_functionality.1b68c8db.0.snapshot b/compiler/test/__snapshots__/basic_functionality.1b68c8db.0.snapshot index fe8ea366af..6f7bb20d0f 100644 --- a/compiler/test/__snapshots__/basic_functionality.1b68c8db.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.1b68c8db.0.snapshot @@ -10,11 +10,11 @@ basic functionality › lsl1 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$<<\" (global $gimport_pervasives_<< (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"<<\" (func $gimport_pervasives_<< (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_<< (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.1bf5759c.0.snapshot b/compiler/test/__snapshots__/basic_functionality.1bf5759c.0.snapshot index ab8acd2875..d8a8a30999 100644 --- a/compiler/test/__snapshots__/basic_functionality.1bf5759c.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.1bf5759c.0.snapshot @@ -20,11 +20,11 @@ basic functionality › unsafe_wasm_globals (import \"GRAIN$MODULE$runtime/unsafe/printWasm\" \"printF32\" (func $gimport_runtime/unsafe/printWasm_printF32 (param i32 f32) (result i32))) (import \"GRAIN$MODULE$runtime/unsafe/printWasm\" \"printI64\" (func $gimport_runtime/unsafe/printWasm_printI64 (param i32 i64) (result i32))) (import \"GRAIN$MODULE$runtime/unsafe/printWasm\" \"printI32\" (func $gimport_runtime/unsafe/printWasm_printI32 (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (drop (call $gimport_runtime/unsafe/printWasm_printI32 diff --git a/compiler/test/__snapshots__/basic_functionality.1d2ec323.0.snapshot b/compiler/test/__snapshots__/basic_functionality.1d2ec323.0.snapshot index a3c871c418..0547a2657d 100644 --- a/compiler/test/__snapshots__/basic_functionality.1d2ec323.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.1d2ec323.0.snapshot @@ -17,11 +17,11 @@ basic functionality › comp22 (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"[...]\" (func $gimport_pervasives_[...] (param i32 i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"isnt\" (func $gimport_pervasives_isnt (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/basic_functionality.1e4b1f39.0.snapshot b/compiler/test/__snapshots__/basic_functionality.1e4b1f39.0.snapshot index a7e7fdac33..842b5b3228 100644 --- a/compiler/test/__snapshots__/basic_functionality.1e4b1f39.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.1e4b1f39.0.snapshot @@ -10,11 +10,11 @@ basic functionality › land1 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$&\" (global $gimport_pervasives_& (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"&\" (func $gimport_pervasives_& (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_& (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.1f787365.0.snapshot b/compiler/test/__snapshots__/basic_functionality.1f787365.0.snapshot index 7c563b88b2..07c9a12542 100644 --- a/compiler/test/__snapshots__/basic_functionality.1f787365.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.1f787365.0.snapshot @@ -9,11 +9,11 @@ basic functionality › orshort2 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$print\" (global $gimport_pervasives_print (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"print\" (func $gimport_pervasives_print (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (drop (call $gimport_pervasives_print diff --git a/compiler/test/__snapshots__/basic_functionality.20f7581b.0.snapshot b/compiler/test/__snapshots__/basic_functionality.20f7581b.0.snapshot index 3228a45128..a552323323 100644 --- a/compiler/test/__snapshots__/basic_functionality.20f7581b.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.20f7581b.0.snapshot @@ -4,11 +4,11 @@ basic functionality › simple_min (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const -2147483647) ) diff --git a/compiler/test/__snapshots__/basic_functionality.240ef39e.0.snapshot b/compiler/test/__snapshots__/basic_functionality.240ef39e.0.snapshot index 85e94d1961..43343112da 100644 --- a/compiler/test/__snapshots__/basic_functionality.240ef39e.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.240ef39e.0.snapshot @@ -4,11 +4,11 @@ basic functionality › comp4 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 11) ) diff --git a/compiler/test/__snapshots__/basic_functionality.2756b429.0.snapshot b/compiler/test/__snapshots__/basic_functionality.2756b429.0.snapshot index 01968d872f..3f02fd6709 100644 --- a/compiler/test/__snapshots__/basic_functionality.2756b429.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.2756b429.0.snapshot @@ -4,11 +4,11 @@ basic functionality › forty (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 81) ) diff --git a/compiler/test/__snapshots__/basic_functionality.28405f1f.0.snapshot b/compiler/test/__snapshots__/basic_functionality.28405f1f.0.snapshot index 593881f7eb..4657ea4b69 100644 --- a/compiler/test/__snapshots__/basic_functionality.28405f1f.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.28405f1f.0.snapshot @@ -14,11 +14,11 @@ basic functionality › precedence4 (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"%\" (func $gimport_pervasives_% (param i32 i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/basic_functionality.28bf4c9e.0.snapshot b/compiler/test/__snapshots__/basic_functionality.28bf4c9e.0.snapshot index 2d893a353a..148d10f468 100644 --- a/compiler/test/__snapshots__/basic_functionality.28bf4c9e.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.28bf4c9e.0.snapshot @@ -4,11 +4,11 @@ basic functionality › binop2 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 1) ) diff --git a/compiler/test/__snapshots__/basic_functionality.2bcc447b.0.snapshot b/compiler/test/__snapshots__/basic_functionality.2bcc447b.0.snapshot index e6232f7367..712a81d69a 100644 --- a/compiler/test/__snapshots__/basic_functionality.2bcc447b.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.2bcc447b.0.snapshot @@ -4,11 +4,11 @@ basic functionality › assert2 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 1879048190) ) diff --git a/compiler/test/__snapshots__/basic_functionality.2d7e34cf.0.snapshot b/compiler/test/__snapshots__/basic_functionality.2d7e34cf.0.snapshot index 215437ae4d..ccce24d4a9 100644 --- a/compiler/test/__snapshots__/basic_functionality.2d7e34cf.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.2d7e34cf.0.snapshot @@ -4,11 +4,11 @@ basic functionality › and2 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 2147483646) ) diff --git a/compiler/test/__snapshots__/basic_functionality.2f2f8795.0.snapshot b/compiler/test/__snapshots__/basic_functionality.2f2f8795.0.snapshot index b522541af8..938e90c01b 100644 --- a/compiler/test/__snapshots__/basic_functionality.2f2f8795.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.2f2f8795.0.snapshot @@ -10,11 +10,11 @@ basic functionality › lsl2 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$<<\" (global $gimport_pervasives_<< (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"<<\" (func $gimport_pervasives_<< (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_<< (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.2f53324c.0.snapshot b/compiler/test/__snapshots__/basic_functionality.2f53324c.0.snapshot index cc7fdb5f71..8bde491558 100644 --- a/compiler/test/__snapshots__/basic_functionality.2f53324c.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.2f53324c.0.snapshot @@ -10,11 +10,11 @@ basic functionality › comp17 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$isnt\" (global $gimport_pervasives_isnt (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"isnt\" (func $gimport_pervasives_isnt (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_isnt (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.2f65c8cf.0.snapshot b/compiler/test/__snapshots__/basic_functionality.2f65c8cf.0.snapshot index 18dff00369..b419167c14 100644 --- a/compiler/test/__snapshots__/basic_functionality.2f65c8cf.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.2f65c8cf.0.snapshot @@ -4,11 +4,11 @@ basic functionality › fals (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 2147483646) ) diff --git a/compiler/test/__snapshots__/basic_functionality.304ca65f.0.snapshot b/compiler/test/__snapshots__/basic_functionality.304ca65f.0.snapshot index 090c5b4671..9c3d107930 100644 --- a/compiler/test/__snapshots__/basic_functionality.304ca65f.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.304ca65f.0.snapshot @@ -4,11 +4,11 @@ basic functionality › oct_neg (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const -125) ) diff --git a/compiler/test/__snapshots__/basic_functionality.32a8c452.0.snapshot b/compiler/test/__snapshots__/basic_functionality.32a8c452.0.snapshot index 9c121dd905..7d49ee8a40 100644 --- a/compiler/test/__snapshots__/basic_functionality.32a8c452.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.32a8c452.0.snapshot @@ -9,11 +9,11 @@ basic functionality › complex2 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$print\" (global $gimport_pervasives_print (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"print\" (func $gimport_pervasives_print (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_print (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.34dcfbdd.0.snapshot b/compiler/test/__snapshots__/basic_functionality.34dcfbdd.0.snapshot index 23c8eae6a6..46cf1fdc6e 100644 --- a/compiler/test/__snapshots__/basic_functionality.34dcfbdd.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.34dcfbdd.0.snapshot @@ -7,11 +7,11 @@ basic functionality › int64_1 (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store diff --git a/compiler/test/__snapshots__/basic_functionality.3c2ba165.0.snapshot b/compiler/test/__snapshots__/basic_functionality.3c2ba165.0.snapshot index afafd4be12..0db47b1b47 100644 --- a/compiler/test/__snapshots__/basic_functionality.3c2ba165.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.3c2ba165.0.snapshot @@ -15,11 +15,11 @@ basic functionality › comp20 (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"[...]\" (func $gimport_pervasives_[...] (param i32 i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"isnt\" (func $gimport_pervasives_isnt (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/basic_functionality.3e5f990b.0.snapshot b/compiler/test/__snapshots__/basic_functionality.3e5f990b.0.snapshot index 4912397c60..b9aadb06f8 100644 --- a/compiler/test/__snapshots__/basic_functionality.3e5f990b.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.3e5f990b.0.snapshot @@ -10,11 +10,11 @@ basic functionality › lor3 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$|\" (global $gimport_pervasives_| (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"|\" (func $gimport_pervasives_| (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_| (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.3edefd23.0.snapshot b/compiler/test/__snapshots__/basic_functionality.3edefd23.0.snapshot index 02e81745b9..7b5d08e27e 100644 --- a/compiler/test/__snapshots__/basic_functionality.3edefd23.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.3edefd23.0.snapshot @@ -9,11 +9,11 @@ basic functionality › decr_3 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$decr\" (global $gimport_pervasives_decr (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"decr\" (func $gimport_pervasives_decr (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_decr (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.3ffd0bf3.0.snapshot b/compiler/test/__snapshots__/basic_functionality.3ffd0bf3.0.snapshot index a5426f7ef3..a369edad1a 100644 --- a/compiler/test/__snapshots__/basic_functionality.3ffd0bf3.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.3ffd0bf3.0.snapshot @@ -4,11 +4,11 @@ basic functionality › orshort1 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const -2) ) diff --git a/compiler/test/__snapshots__/basic_functionality.448497ab.0.snapshot b/compiler/test/__snapshots__/basic_functionality.448497ab.0.snapshot index 7fbcead500..86d85ecffe 100644 --- a/compiler/test/__snapshots__/basic_functionality.448497ab.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.448497ab.0.snapshot @@ -4,11 +4,11 @@ basic functionality › binop5 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 5) ) diff --git a/compiler/test/__snapshots__/basic_functionality.46348f36.0.snapshot b/compiler/test/__snapshots__/basic_functionality.46348f36.0.snapshot index 62cb764043..324b92bfc4 100644 --- a/compiler/test/__snapshots__/basic_functionality.46348f36.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.46348f36.0.snapshot @@ -4,11 +4,11 @@ basic functionality › precedence5 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const -2) ) diff --git a/compiler/test/__snapshots__/basic_functionality.48db380c.0.snapshot b/compiler/test/__snapshots__/basic_functionality.48db380c.0.snapshot index aabb598fbd..6f17e267ab 100644 --- a/compiler/test/__snapshots__/basic_functionality.48db380c.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.48db380c.0.snapshot @@ -4,11 +4,11 @@ basic functionality › if4 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 7) ) diff --git a/compiler/test/__snapshots__/basic_functionality.4d6f9417.0.snapshot b/compiler/test/__snapshots__/basic_functionality.4d6f9417.0.snapshot index 2e91797863..e93928d098 100644 --- a/compiler/test/__snapshots__/basic_functionality.4d6f9417.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.4d6f9417.0.snapshot @@ -4,11 +4,11 @@ basic functionality › not1 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 2147483646) ) diff --git a/compiler/test/__snapshots__/basic_functionality.4f5bd247.0.snapshot b/compiler/test/__snapshots__/basic_functionality.4f5bd247.0.snapshot index 3631946c0b..5b7e1b9dfc 100644 --- a/compiler/test/__snapshots__/basic_functionality.4f5bd247.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.4f5bd247.0.snapshot @@ -7,11 +7,11 @@ basic functionality › heap_number_i64_wrapper (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store diff --git a/compiler/test/__snapshots__/basic_functionality.52ca8e0e.0.snapshot b/compiler/test/__snapshots__/basic_functionality.52ca8e0e.0.snapshot index 01323b3d8d..da9fc552f9 100644 --- a/compiler/test/__snapshots__/basic_functionality.52ca8e0e.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.52ca8e0e.0.snapshot @@ -13,13 +13,13 @@ basic functionality › func_shadow (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"print\" (func $gimport_pervasives_print (param i32 i32) (result i32))) - (global $global_1 (mut i32) (i32.const 0)) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_3 i32 (i32.const 0)) + (global $foo_1133 (mut i32) (i32.const 0)) + (global $foo_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_3)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -45,13 +45,13 @@ basic functionality › func_shadow (local.get $0) (i32.const 0) ) - (global.set $global_0 + (global.set $foo_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $foo_1131) ) ) ) @@ -59,7 +59,7 @@ basic functionality › func_shadow (local.set $1 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $foo_1131) ) ) (i32.store @@ -134,13 +134,13 @@ basic functionality › func_shadow (local.get $0) (i32.const 0) ) - (global.set $global_1 + (global.set $foo_1133 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_1) + (global.get $foo_1133) ) ) ) @@ -148,7 +148,7 @@ basic functionality › func_shadow (local.set $2 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_1) + (global.get $foo_1133) ) ) (i32.store diff --git a/compiler/test/__snapshots__/basic_functionality.565dbeda.0.snapshot b/compiler/test/__snapshots__/basic_functionality.565dbeda.0.snapshot index e208506fab..88b8651b1a 100644 --- a/compiler/test/__snapshots__/basic_functionality.565dbeda.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.565dbeda.0.snapshot @@ -4,11 +4,11 @@ basic functionality › hex_neg (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const -509) ) diff --git a/compiler/test/__snapshots__/basic_functionality.5705b20c.0.snapshot b/compiler/test/__snapshots__/basic_functionality.5705b20c.0.snapshot index 36f7e9162c..bcc1ceffc8 100644 --- a/compiler/test/__snapshots__/basic_functionality.5705b20c.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.5705b20c.0.snapshot @@ -10,11 +10,11 @@ basic functionality › modulo5 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$%\" (global $gimport_pervasives_% (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"%\" (func $gimport_pervasives_% (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_% (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.593b8d63.0.snapshot b/compiler/test/__snapshots__/basic_functionality.593b8d63.0.snapshot index f96051713e..27d63d9bc6 100644 --- a/compiler/test/__snapshots__/basic_functionality.593b8d63.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.593b8d63.0.snapshot @@ -9,38 +9,38 @@ basic functionality › if_one_sided6 (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$decRef\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $x_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) - (global.set $global_0 + (global.set $x_1131 (tuple.extract 0 (tuple.make (i32.const 3) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $x_1131) ) ) ) ) - (global.set $global_0 + (global.set $x_1131 (tuple.extract 0 (tuple.make (i32.const 11) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $x_1131) ) ) ) ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $x_1131) ) ) (func $_start (; has Stack IR ;) diff --git a/compiler/test/__snapshots__/basic_functionality.5b56d472.0.snapshot b/compiler/test/__snapshots__/basic_functionality.5b56d472.0.snapshot index 2a66477f26..52b774726b 100644 --- a/compiler/test/__snapshots__/basic_functionality.5b56d472.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.5b56d472.0.snapshot @@ -4,11 +4,11 @@ basic functionality › and3 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 2147483646) ) diff --git a/compiler/test/__snapshots__/basic_functionality.5cd54e52.0.snapshot b/compiler/test/__snapshots__/basic_functionality.5cd54e52.0.snapshot index 23fcc1970f..bde03b50b0 100644 --- a/compiler/test/__snapshots__/basic_functionality.5cd54e52.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.5cd54e52.0.snapshot @@ -4,11 +4,11 @@ basic functionality › or4 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 2147483646) ) diff --git a/compiler/test/__snapshots__/basic_functionality.5d973a3e.0.snapshot b/compiler/test/__snapshots__/basic_functionality.5d973a3e.0.snapshot index 1940998852..3ce47bc957 100644 --- a/compiler/test/__snapshots__/basic_functionality.5d973a3e.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.5d973a3e.0.snapshot @@ -10,11 +10,11 @@ basic functionality › binop6 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$%\" (global $gimport_pervasives_% (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"%\" (func $gimport_pervasives_% (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_% (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.61c58118.0.snapshot b/compiler/test/__snapshots__/basic_functionality.61c58118.0.snapshot index f4787e45a3..0e44e447e8 100644 --- a/compiler/test/__snapshots__/basic_functionality.61c58118.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.61c58118.0.snapshot @@ -11,12 +11,12 @@ basic functionality › block_no_expression (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $f_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store @@ -40,13 +40,13 @@ basic functionality › block_no_expression (local.get $0) (i32.const 0) ) - (global.set $global_0 + (global.set $f_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $f_1131) ) ) ) @@ -54,7 +54,7 @@ basic functionality › block_no_expression (local.set $0 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $f_1131) ) ) (drop diff --git a/compiler/test/__snapshots__/basic_functionality.626b2e44.0.snapshot b/compiler/test/__snapshots__/basic_functionality.626b2e44.0.snapshot index c26d14cb7a..688c2a2241 100644 --- a/compiler/test/__snapshots__/basic_functionality.626b2e44.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.626b2e44.0.snapshot @@ -7,31 +7,31 @@ basic functionality › if_one_sided5 (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$decRef\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $x_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) - (global.set $global_0 + (global.set $x_1131 (tuple.extract 0 (tuple.make (i32.const 3) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $x_1131) ) ) ) ) - (global.set $global_0 + (global.set $x_1131 (tuple.extract 0 (tuple.make (i32.const 11) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $x_1131) ) ) ) diff --git a/compiler/test/__snapshots__/basic_functionality.65d36891.0.snapshot b/compiler/test/__snapshots__/basic_functionality.65d36891.0.snapshot index c4904c755e..26a79d78f6 100644 --- a/compiler/test/__snapshots__/basic_functionality.65d36891.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.65d36891.0.snapshot @@ -10,11 +10,11 @@ basic functionality › lor2 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$|\" (global $gimport_pervasives_| (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"|\" (func $gimport_pervasives_| (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_| (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.67d2cc45.0.snapshot b/compiler/test/__snapshots__/basic_functionality.67d2cc45.0.snapshot index d7ef75c094..2f4f9c18fe 100644 --- a/compiler/test/__snapshots__/basic_functionality.67d2cc45.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.67d2cc45.0.snapshot @@ -4,11 +4,11 @@ basic functionality › binop3 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const -3) ) diff --git a/compiler/test/__snapshots__/basic_functionality.684b6ecb.0.snapshot b/compiler/test/__snapshots__/basic_functionality.684b6ecb.0.snapshot index 0ade58cbf5..3b7de34916 100644 --- a/compiler/test/__snapshots__/basic_functionality.684b6ecb.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.684b6ecb.0.snapshot @@ -4,11 +4,11 @@ basic functionality › binop2.2 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 1) ) diff --git a/compiler/test/__snapshots__/basic_functionality.68d08483.0.snapshot b/compiler/test/__snapshots__/basic_functionality.68d08483.0.snapshot index 15d3305210..2dbfc237c2 100644 --- a/compiler/test/__snapshots__/basic_functionality.68d08483.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.68d08483.0.snapshot @@ -10,11 +10,11 @@ basic functionality › land2 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$&\" (global $gimport_pervasives_& (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"&\" (func $gimport_pervasives_& (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_& (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.6f9706c2.0.snapshot b/compiler/test/__snapshots__/basic_functionality.6f9706c2.0.snapshot index 03764018e8..3d3affc592 100644 --- a/compiler/test/__snapshots__/basic_functionality.6f9706c2.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.6f9706c2.0.snapshot @@ -4,11 +4,11 @@ basic functionality › or1 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const -2) ) diff --git a/compiler/test/__snapshots__/basic_functionality.704872bc.0.snapshot b/compiler/test/__snapshots__/basic_functionality.704872bc.0.snapshot index 962717e19f..40b1ace8d3 100644 --- a/compiler/test/__snapshots__/basic_functionality.704872bc.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.704872bc.0.snapshot @@ -4,11 +4,11 @@ basic functionality › assert1 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 1879048190) ) diff --git a/compiler/test/__snapshots__/basic_functionality.711a4824.0.snapshot b/compiler/test/__snapshots__/basic_functionality.711a4824.0.snapshot index 70c113feb0..01a2c618d1 100644 --- a/compiler/test/__snapshots__/basic_functionality.711a4824.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.711a4824.0.snapshot @@ -13,12 +13,12 @@ basic functionality › pattern_match_unsafe_wasm (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"print\" (func $gimport_pervasives_print (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $test_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $foo_1132 (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) (block $switch.31_outer (result i32) (drop @@ -247,13 +247,13 @@ basic functionality › pattern_match_unsafe_wasm (local.get $0) (i32.const 0) ) - (global.set $global_0 + (global.set $test_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $test_1131) ) ) ) @@ -261,7 +261,7 @@ basic functionality › pattern_match_unsafe_wasm (drop (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $test_1131) ) ) (i32.store diff --git a/compiler/test/__snapshots__/basic_functionality.7222ab37.0.snapshot b/compiler/test/__snapshots__/basic_functionality.7222ab37.0.snapshot index 5fa9370c0c..f5485127cf 100644 --- a/compiler/test/__snapshots__/basic_functionality.7222ab37.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.7222ab37.0.snapshot @@ -4,11 +4,11 @@ basic functionality › tru (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const -2) ) diff --git a/compiler/test/__snapshots__/basic_functionality.7287219f.0.snapshot b/compiler/test/__snapshots__/basic_functionality.7287219f.0.snapshot index 1c039ebe73..e78d258c10 100644 --- a/compiler/test/__snapshots__/basic_functionality.7287219f.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.7287219f.0.snapshot @@ -10,11 +10,11 @@ basic functionality › asr1 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$>>\" (global $gimport_pervasives_>> (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \">>\" (func $gimport_pervasives_>> (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_>> (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.7848308f.0.snapshot b/compiler/test/__snapshots__/basic_functionality.7848308f.0.snapshot index 6c3895ca19..48496413bd 100644 --- a/compiler/test/__snapshots__/basic_functionality.7848308f.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.7848308f.0.snapshot @@ -4,11 +4,11 @@ basic functionality › or3 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const -2) ) diff --git a/compiler/test/__snapshots__/basic_functionality.7b13e79a.0.snapshot b/compiler/test/__snapshots__/basic_functionality.7b13e79a.0.snapshot index e1d4be1341..e63a3506cc 100644 --- a/compiler/test/__snapshots__/basic_functionality.7b13e79a.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.7b13e79a.0.snapshot @@ -4,11 +4,11 @@ basic functionality › and4 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 2147483646) ) diff --git a/compiler/test/__snapshots__/basic_functionality.7ccc4940.0.snapshot b/compiler/test/__snapshots__/basic_functionality.7ccc4940.0.snapshot index 00054a7039..ccd6cff1cc 100644 --- a/compiler/test/__snapshots__/basic_functionality.7ccc4940.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.7ccc4940.0.snapshot @@ -7,11 +7,11 @@ basic functionality › division1 (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store diff --git a/compiler/test/__snapshots__/basic_functionality.7d0640b4.0.snapshot b/compiler/test/__snapshots__/basic_functionality.7d0640b4.0.snapshot index 6cee6b8b70..542c629513 100644 --- a/compiler/test/__snapshots__/basic_functionality.7d0640b4.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.7d0640b4.0.snapshot @@ -4,11 +4,11 @@ basic functionality › if_one_sided2 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 1879048190) ) diff --git a/compiler/test/__snapshots__/basic_functionality.86f332c6.0.snapshot b/compiler/test/__snapshots__/basic_functionality.86f332c6.0.snapshot index 9e5b305ea2..5dad1db884 100644 --- a/compiler/test/__snapshots__/basic_functionality.86f332c6.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.86f332c6.0.snapshot @@ -4,11 +4,11 @@ basic functionality › bin_neg (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const -19) ) diff --git a/compiler/test/__snapshots__/basic_functionality.9110d0f5.0.snapshot b/compiler/test/__snapshots__/basic_functionality.9110d0f5.0.snapshot index 5386111cfb..90e91fa489 100644 --- a/compiler/test/__snapshots__/basic_functionality.9110d0f5.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.9110d0f5.0.snapshot @@ -4,11 +4,11 @@ basic functionality › comp13 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const -2) ) diff --git a/compiler/test/__snapshots__/basic_functionality.9157dba1.0.snapshot b/compiler/test/__snapshots__/basic_functionality.9157dba1.0.snapshot index f5cb20f335..e04ef1c026 100644 --- a/compiler/test/__snapshots__/basic_functionality.9157dba1.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.9157dba1.0.snapshot @@ -4,11 +4,11 @@ basic functionality › andshadow (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 7) ) diff --git a/compiler/test/__snapshots__/basic_functionality.9379df0d.0.snapshot b/compiler/test/__snapshots__/basic_functionality.9379df0d.0.snapshot index 002540459b..20052b03ae 100644 --- a/compiler/test/__snapshots__/basic_functionality.9379df0d.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.9379df0d.0.snapshot @@ -15,11 +15,11 @@ basic functionality › comp21 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"[...]\" (func $gimport_pervasives_[...] (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/basic_functionality.950b8fda.0.snapshot b/compiler/test/__snapshots__/basic_functionality.950b8fda.0.snapshot index 42a6af4b96..a994c84770 100644 --- a/compiler/test/__snapshots__/basic_functionality.950b8fda.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.950b8fda.0.snapshot @@ -4,11 +4,11 @@ basic functionality › binop2.3 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const -3) ) diff --git a/compiler/test/__snapshots__/basic_functionality.970a2a2b.0.snapshot b/compiler/test/__snapshots__/basic_functionality.970a2a2b.0.snapshot index 0759455ecc..2c94f29ec1 100644 --- a/compiler/test/__snapshots__/basic_functionality.970a2a2b.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.970a2a2b.0.snapshot @@ -4,11 +4,11 @@ basic functionality › not2 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const -2) ) diff --git a/compiler/test/__snapshots__/basic_functionality.974b7936.0.snapshot b/compiler/test/__snapshots__/basic_functionality.974b7936.0.snapshot index 85185ea024..505d7621b8 100644 --- a/compiler/test/__snapshots__/basic_functionality.974b7936.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.974b7936.0.snapshot @@ -10,11 +10,11 @@ basic functionality › lxor3 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$^\" (global $gimport_pervasives_^ (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"^\" (func $gimport_pervasives_^ (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_^ (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.994117f8.0.snapshot b/compiler/test/__snapshots__/basic_functionality.994117f8.0.snapshot index d2804d371f..34dd407de4 100644 --- a/compiler/test/__snapshots__/basic_functionality.994117f8.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.994117f8.0.snapshot @@ -9,11 +9,11 @@ basic functionality › incr_3 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$incr\" (global $gimport_pervasives_incr (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"incr\" (func $gimport_pervasives_incr (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_incr (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.9b9c7047.0.snapshot b/compiler/test/__snapshots__/basic_functionality.9b9c7047.0.snapshot index 22992188fa..57ba7052ab 100644 --- a/compiler/test/__snapshots__/basic_functionality.9b9c7047.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.9b9c7047.0.snapshot @@ -7,11 +7,11 @@ basic functionality › void (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store diff --git a/compiler/test/__snapshots__/basic_functionality.9c18b19d.0.snapshot b/compiler/test/__snapshots__/basic_functionality.9c18b19d.0.snapshot index f835a9273c..77089684da 100644 --- a/compiler/test/__snapshots__/basic_functionality.9c18b19d.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.9c18b19d.0.snapshot @@ -7,31 +7,31 @@ basic functionality › if_one_sided3 (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$decRef\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $x_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) - (global.set $global_0 + (global.set $x_1131 (tuple.extract 0 (tuple.make (i32.const 3) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $x_1131) ) ) ) ) - (global.set $global_0 + (global.set $x_1131 (tuple.extract 0 (tuple.make (i32.const 5) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $x_1131) ) ) ) diff --git a/compiler/test/__snapshots__/basic_functionality.9df4a5e0.0.snapshot b/compiler/test/__snapshots__/basic_functionality.9df4a5e0.0.snapshot index 1de4a65d45..48a30c4939 100644 --- a/compiler/test/__snapshots__/basic_functionality.9df4a5e0.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.9df4a5e0.0.snapshot @@ -4,11 +4,11 @@ basic functionality › and1 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const -2) ) diff --git a/compiler/test/__snapshots__/basic_functionality.9fb01eb5.0.snapshot b/compiler/test/__snapshots__/basic_functionality.9fb01eb5.0.snapshot index 969a5a1b8e..cda85b5150 100644 --- a/compiler/test/__snapshots__/basic_functionality.9fb01eb5.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.9fb01eb5.0.snapshot @@ -4,11 +4,11 @@ basic functionality › simple_max (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 2147483647) ) diff --git a/compiler/test/__snapshots__/basic_functionality.a0045d1c.0.snapshot b/compiler/test/__snapshots__/basic_functionality.a0045d1c.0.snapshot index edc6ca8796..ed0d9732ba 100644 --- a/compiler/test/__snapshots__/basic_functionality.a0045d1c.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.a0045d1c.0.snapshot @@ -4,11 +4,11 @@ basic functionality › binop1 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 9) ) diff --git a/compiler/test/__snapshots__/basic_functionality.a0747361.0.snapshot b/compiler/test/__snapshots__/basic_functionality.a0747361.0.snapshot index 28af167f22..70bcf75c60 100644 --- a/compiler/test/__snapshots__/basic_functionality.a0747361.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.a0747361.0.snapshot @@ -4,11 +4,11 @@ basic functionality › hex (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 511) ) diff --git a/compiler/test/__snapshots__/basic_functionality.a2e63440.0.snapshot b/compiler/test/__snapshots__/basic_functionality.a2e63440.0.snapshot index 03b2f99467..6d3934e1a2 100644 --- a/compiler/test/__snapshots__/basic_functionality.a2e63440.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.a2e63440.0.snapshot @@ -4,11 +4,11 @@ basic functionality › comp9 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 21) ) diff --git a/compiler/test/__snapshots__/basic_functionality.a4ec9fca.0.snapshot b/compiler/test/__snapshots__/basic_functionality.a4ec9fca.0.snapshot index f9dfeff63d..5c59e2482d 100644 --- a/compiler/test/__snapshots__/basic_functionality.a4ec9fca.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.a4ec9fca.0.snapshot @@ -4,11 +4,11 @@ basic functionality › andshort2 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 2147483646) ) diff --git a/compiler/test/__snapshots__/basic_functionality.a58a9361.0.snapshot b/compiler/test/__snapshots__/basic_functionality.a58a9361.0.snapshot index 64a7233141..701efc32d3 100644 --- a/compiler/test/__snapshots__/basic_functionality.a58a9361.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.a58a9361.0.snapshot @@ -10,11 +10,11 @@ basic functionality › lxor2 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$^\" (global $gimport_pervasives_^ (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"^\" (func $gimport_pervasives_^ (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_^ (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.a5d5182f.0.snapshot b/compiler/test/__snapshots__/basic_functionality.a5d5182f.0.snapshot index 053bffc963..c677cc0b75 100644 --- a/compiler/test/__snapshots__/basic_functionality.a5d5182f.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.a5d5182f.0.snapshot @@ -4,11 +4,11 @@ basic functionality › comp2 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const -2) ) diff --git a/compiler/test/__snapshots__/basic_functionality.a72898d0.0.snapshot b/compiler/test/__snapshots__/basic_functionality.a72898d0.0.snapshot index 1ff2c92043..07b88f4c8a 100644 --- a/compiler/test/__snapshots__/basic_functionality.a72898d0.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.a72898d0.0.snapshot @@ -4,11 +4,11 @@ basic functionality › comp8 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 21) ) diff --git a/compiler/test/__snapshots__/basic_functionality.abd9d13c.0.snapshot b/compiler/test/__snapshots__/basic_functionality.abd9d13c.0.snapshot index c55da1395b..25f372a927 100644 --- a/compiler/test/__snapshots__/basic_functionality.abd9d13c.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.abd9d13c.0.snapshot @@ -4,11 +4,11 @@ basic functionality › comp7 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 17) ) diff --git a/compiler/test/__snapshots__/basic_functionality.b07cc734.0.snapshot b/compiler/test/__snapshots__/basic_functionality.b07cc734.0.snapshot index 0edc891dbc..683d160833 100644 --- a/compiler/test/__snapshots__/basic_functionality.b07cc734.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.b07cc734.0.snapshot @@ -9,11 +9,11 @@ basic functionality › if_one_sided (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$print\" (global $gimport_pervasives_print (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"print\" (func $gimport_pervasives_print (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_print (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.b6a1b657.0.snapshot b/compiler/test/__snapshots__/basic_functionality.b6a1b657.0.snapshot index cfaddc0490..e791140b1c 100644 --- a/compiler/test/__snapshots__/basic_functionality.b6a1b657.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.b6a1b657.0.snapshot @@ -10,11 +10,11 @@ basic functionality › lxor4 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$^\" (global $gimport_pervasives_^ (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"^\" (func $gimport_pervasives_^ (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_^ (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.b836b89a.0.snapshot b/compiler/test/__snapshots__/basic_functionality.b836b89a.0.snapshot index d6b4785916..20d2abdd1d 100644 --- a/compiler/test/__snapshots__/basic_functionality.b836b89a.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.b836b89a.0.snapshot @@ -9,11 +9,11 @@ basic functionality › complex1 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$print\" (global $gimport_pervasives_print (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"print\" (func $gimport_pervasives_print (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (drop (call $gimport_pervasives_print diff --git a/compiler/test/__snapshots__/basic_functionality.bd891a1f.0.snapshot b/compiler/test/__snapshots__/basic_functionality.bd891a1f.0.snapshot index 4805b568df..ef578a2373 100644 --- a/compiler/test/__snapshots__/basic_functionality.bd891a1f.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.bd891a1f.0.snapshot @@ -4,11 +4,11 @@ basic functionality › oct (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 127) ) diff --git a/compiler/test/__snapshots__/basic_functionality.bef9449e.0.snapshot b/compiler/test/__snapshots__/basic_functionality.bef9449e.0.snapshot index 0846ad8261..91bcf94fc7 100644 --- a/compiler/test/__snapshots__/basic_functionality.bef9449e.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.bef9449e.0.snapshot @@ -4,11 +4,11 @@ basic functionality › comp1 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const -2) ) diff --git a/compiler/test/__snapshots__/basic_functionality.c1554a92.0.snapshot b/compiler/test/__snapshots__/basic_functionality.c1554a92.0.snapshot index 792b5d9b6a..d29cf8b11c 100644 --- a/compiler/test/__snapshots__/basic_functionality.c1554a92.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.c1554a92.0.snapshot @@ -4,11 +4,11 @@ basic functionality › or2 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const -2) ) diff --git a/compiler/test/__snapshots__/basic_functionality.c2c74be4.0.snapshot b/compiler/test/__snapshots__/basic_functionality.c2c74be4.0.snapshot index 1bbb9d5f09..4e2e2bf26c 100644 --- a/compiler/test/__snapshots__/basic_functionality.c2c74be4.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.c2c74be4.0.snapshot @@ -10,11 +10,11 @@ basic functionality › lsr2 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$>>>\" (global $gimport_pervasives_>>> (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \">>>\" (func $gimport_pervasives_>>> (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_>>> (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.c4090bb1.0.snapshot b/compiler/test/__snapshots__/basic_functionality.c4090bb1.0.snapshot index ca39bc510d..7c097a8d4d 100644 --- a/compiler/test/__snapshots__/basic_functionality.c4090bb1.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.c4090bb1.0.snapshot @@ -11,11 +11,11 @@ basic functionality › toplevel_statements (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"print\" (func $gimport_pervasives_print (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (drop diff --git a/compiler/test/__snapshots__/basic_functionality.c49928a5.0.snapshot b/compiler/test/__snapshots__/basic_functionality.c49928a5.0.snapshot index 33b858d975..7671f407c7 100644 --- a/compiler/test/__snapshots__/basic_functionality.c49928a5.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.c49928a5.0.snapshot @@ -10,11 +10,11 @@ basic functionality › lsr1 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$>>>\" (global $gimport_pervasives_>>> (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \">>>\" (func $gimport_pervasives_>>> (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_>>> (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.c55feb83.0.snapshot b/compiler/test/__snapshots__/basic_functionality.c55feb83.0.snapshot index 7e580059b8..6b44c7d737 100644 --- a/compiler/test/__snapshots__/basic_functionality.c55feb83.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.c55feb83.0.snapshot @@ -4,11 +4,11 @@ basic functionality › comp14 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 2147483646) ) diff --git a/compiler/test/__snapshots__/basic_functionality.c8095f7c.0.snapshot b/compiler/test/__snapshots__/basic_functionality.c8095f7c.0.snapshot index 6ea7a3e13b..dfe2b75561 100644 --- a/compiler/test/__snapshots__/basic_functionality.c8095f7c.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.c8095f7c.0.snapshot @@ -9,11 +9,11 @@ basic functionality › incr_1 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$incr\" (global $gimport_pervasives_incr (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"incr\" (func $gimport_pervasives_incr (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_incr (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.c8144b17.0.snapshot b/compiler/test/__snapshots__/basic_functionality.c8144b17.0.snapshot index c5c5546eb4..2cdbcf9553 100644 --- a/compiler/test/__snapshots__/basic_functionality.c8144b17.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.c8144b17.0.snapshot @@ -4,11 +4,11 @@ basic functionality › bin (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 21) ) diff --git a/compiler/test/__snapshots__/basic_functionality.cb9c6c66.0.snapshot b/compiler/test/__snapshots__/basic_functionality.cb9c6c66.0.snapshot index ab87d1d48f..6373c9184c 100644 --- a/compiler/test/__snapshots__/basic_functionality.cb9c6c66.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.cb9c6c66.0.snapshot @@ -9,11 +9,11 @@ basic functionality › incr_2 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$incr\" (global $gimport_pervasives_incr (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"incr\" (func $gimport_pervasives_incr (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_incr (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.cdeddcd2.0.snapshot b/compiler/test/__snapshots__/basic_functionality.cdeddcd2.0.snapshot index 67211533a8..1c4881eb73 100644 --- a/compiler/test/__snapshots__/basic_functionality.cdeddcd2.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.cdeddcd2.0.snapshot @@ -10,11 +10,11 @@ basic functionality › modulo3 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$%\" (global $gimport_pervasives_% (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"%\" (func $gimport_pervasives_% (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_% (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.cefeb364.0.snapshot b/compiler/test/__snapshots__/basic_functionality.cefeb364.0.snapshot index 28e3f08d22..c25087dc64 100644 --- a/compiler/test/__snapshots__/basic_functionality.cefeb364.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.cefeb364.0.snapshot @@ -10,11 +10,11 @@ basic functionality › lor4 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$|\" (global $gimport_pervasives_| (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"|\" (func $gimport_pervasives_| (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_| (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.d0c0c62b.0.snapshot b/compiler/test/__snapshots__/basic_functionality.d0c0c62b.0.snapshot index 004abd0abd..2ff4faaada 100644 --- a/compiler/test/__snapshots__/basic_functionality.d0c0c62b.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.d0c0c62b.0.snapshot @@ -10,11 +10,11 @@ basic functionality › int64_pun_1 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$*\" (global $gimport_pervasives_* (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"*\" (func $gimport_pervasives_* (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_* (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.d0cb4f44.0.snapshot b/compiler/test/__snapshots__/basic_functionality.d0cb4f44.0.snapshot index af30a8ed78..d49bad800e 100644 --- a/compiler/test/__snapshots__/basic_functionality.d0cb4f44.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.d0cb4f44.0.snapshot @@ -9,11 +9,11 @@ basic functionality › decr_1 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$decr\" (global $gimport_pervasives_decr (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"decr\" (func $gimport_pervasives_decr (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_decr (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.d6ca4146.0.snapshot b/compiler/test/__snapshots__/basic_functionality.d6ca4146.0.snapshot index 3d83e0a23e..f63807acaf 100644 --- a/compiler/test/__snapshots__/basic_functionality.d6ca4146.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.d6ca4146.0.snapshot @@ -9,11 +9,11 @@ basic functionality › andshort1 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$print\" (global $gimport_pervasives_print (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"print\" (func $gimport_pervasives_print (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (drop (call $gimport_pervasives_print diff --git a/compiler/test/__snapshots__/basic_functionality.d8a7dcf9.0.snapshot b/compiler/test/__snapshots__/basic_functionality.d8a7dcf9.0.snapshot index 5e314c9fd3..e99f60cbe2 100644 --- a/compiler/test/__snapshots__/basic_functionality.d8a7dcf9.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.d8a7dcf9.0.snapshot @@ -10,11 +10,11 @@ basic functionality › modulo1 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$%\" (global $gimport_pervasives_% (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"%\" (func $gimport_pervasives_% (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_% (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.d9fc01df.0.snapshot b/compiler/test/__snapshots__/basic_functionality.d9fc01df.0.snapshot index ed542b0c90..0724aa4eb7 100644 --- a/compiler/test/__snapshots__/basic_functionality.d9fc01df.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.d9fc01df.0.snapshot @@ -10,11 +10,11 @@ basic functionality › land3 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$&\" (global $gimport_pervasives_& (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"&\" (func $gimport_pervasives_& (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_& (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.dbf5d3ff.0.snapshot b/compiler/test/__snapshots__/basic_functionality.dbf5d3ff.0.snapshot index 911955e6f9..c54f8a3a15 100644 --- a/compiler/test/__snapshots__/basic_functionality.dbf5d3ff.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.dbf5d3ff.0.snapshot @@ -10,11 +10,11 @@ basic functionality › comp18 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$isnt\" (global $gimport_pervasives_isnt (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"isnt\" (func $gimport_pervasives_isnt (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_isnt (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.df4cd2bf.0.snapshot b/compiler/test/__snapshots__/basic_functionality.df4cd2bf.0.snapshot index d443c21878..216b0a8bce 100644 --- a/compiler/test/__snapshots__/basic_functionality.df4cd2bf.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.df4cd2bf.0.snapshot @@ -4,11 +4,11 @@ basic functionality › comp15 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 2147483646) ) diff --git a/compiler/test/__snapshots__/basic_functionality.e2902464.0.snapshot b/compiler/test/__snapshots__/basic_functionality.e2902464.0.snapshot index ad7cc52d56..c7a59f4d0e 100644 --- a/compiler/test/__snapshots__/basic_functionality.e2902464.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.e2902464.0.snapshot @@ -4,11 +4,11 @@ basic functionality › comp10 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const -2) ) diff --git a/compiler/test/__snapshots__/basic_functionality.e3995c7d.0.snapshot b/compiler/test/__snapshots__/basic_functionality.e3995c7d.0.snapshot index 98b37da796..5888a1e01a 100644 --- a/compiler/test/__snapshots__/basic_functionality.e3995c7d.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.e3995c7d.0.snapshot @@ -9,38 +9,38 @@ basic functionality › if_one_sided4 (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$decRef\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $x_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) - (global.set $global_0 + (global.set $x_1131 (tuple.extract 0 (tuple.make (i32.const 3) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $x_1131) ) ) ) ) - (global.set $global_0 + (global.set $x_1131 (tuple.extract 0 (tuple.make (i32.const 5) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $x_1131) ) ) ) ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $x_1131) ) ) (func $_start (; has Stack IR ;) diff --git a/compiler/test/__snapshots__/basic_functionality.e56cd2a2.0.snapshot b/compiler/test/__snapshots__/basic_functionality.e56cd2a2.0.snapshot index 44d4cc45f0..1ca5d0665c 100644 --- a/compiler/test/__snapshots__/basic_functionality.e56cd2a2.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.e56cd2a2.0.snapshot @@ -4,11 +4,11 @@ basic functionality › comp6 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 19) ) diff --git a/compiler/test/__snapshots__/basic_functionality.e58c3266.0.snapshot b/compiler/test/__snapshots__/basic_functionality.e58c3266.0.snapshot index 302a5e3949..e3540ba7d5 100644 --- a/compiler/test/__snapshots__/basic_functionality.e58c3266.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.e58c3266.0.snapshot @@ -10,11 +10,11 @@ basic functionality › asr2 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$>>\" (global $gimport_pervasives_>> (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \">>\" (func $gimport_pervasives_>> (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_>> (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.e6ea6b06.0.snapshot b/compiler/test/__snapshots__/basic_functionality.e6ea6b06.0.snapshot index 0e05e8e716..6a15bda449 100644 --- a/compiler/test/__snapshots__/basic_functionality.e6ea6b06.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.e6ea6b06.0.snapshot @@ -7,11 +7,11 @@ basic functionality › int32_1 (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store diff --git a/compiler/test/__snapshots__/basic_functionality.e811c1e1.0.snapshot b/compiler/test/__snapshots__/basic_functionality.e811c1e1.0.snapshot index 46ada2c64e..0396bf448e 100644 --- a/compiler/test/__snapshots__/basic_functionality.e811c1e1.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.e811c1e1.0.snapshot @@ -4,11 +4,11 @@ basic functionality › binop2.1 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 1) ) diff --git a/compiler/test/__snapshots__/basic_functionality.ee7c0ebc.0.snapshot b/compiler/test/__snapshots__/basic_functionality.ee7c0ebc.0.snapshot index 82f700d1b7..976df7c6f9 100644 --- a/compiler/test/__snapshots__/basic_functionality.ee7c0ebc.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.ee7c0ebc.0.snapshot @@ -10,11 +10,11 @@ basic functionality › modulo2 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$%\" (global $gimport_pervasives_% (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"%\" (func $gimport_pervasives_% (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_% (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.f132ca8b.0.snapshot b/compiler/test/__snapshots__/basic_functionality.f132ca8b.0.snapshot index 667e599ff6..de25939e7e 100644 --- a/compiler/test/__snapshots__/basic_functionality.f132ca8b.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.f132ca8b.0.snapshot @@ -9,11 +9,11 @@ basic functionality › decr_2 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$decr\" (global $gimport_pervasives_decr (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"decr\" (func $gimport_pervasives_decr (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_decr (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.f58be537.0.snapshot b/compiler/test/__snapshots__/basic_functionality.f58be537.0.snapshot index e799b390ce..7932842886 100644 --- a/compiler/test/__snapshots__/basic_functionality.f58be537.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.f58be537.0.snapshot @@ -13,11 +13,11 @@ basic functionality › comp19 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"[...]\" (func $gimport_pervasives_[...] (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/basic_functionality.f90a3baa.0.snapshot b/compiler/test/__snapshots__/basic_functionality.f90a3baa.0.snapshot index 704b61ceaf..bef5814214 100644 --- a/compiler/test/__snapshots__/basic_functionality.f90a3baa.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.f90a3baa.0.snapshot @@ -7,11 +7,11 @@ basic functionality › heap_number_i32_wrapper_max (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store diff --git a/compiler/test/__snapshots__/basic_functionality.f9743171.0.snapshot b/compiler/test/__snapshots__/basic_functionality.f9743171.0.snapshot index 28892aaca9..f72b56614f 100644 --- a/compiler/test/__snapshots__/basic_functionality.f9743171.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.f9743171.0.snapshot @@ -7,11 +7,11 @@ basic functionality › heap_number_i32_wrapper (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store diff --git a/compiler/test/__snapshots__/basic_functionality.fd64a58f.0.snapshot b/compiler/test/__snapshots__/basic_functionality.fd64a58f.0.snapshot index 8cff1d294c..aef7f64382 100644 --- a/compiler/test/__snapshots__/basic_functionality.fd64a58f.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.fd64a58f.0.snapshot @@ -10,11 +10,11 @@ basic functionality › int64_pun_2 (import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$-\" (global $gimport_pervasives_- (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"-\" (func $gimport_pervasives_- (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_pervasives_- (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/basic_functionality.fe88cb04.0.snapshot b/compiler/test/__snapshots__/basic_functionality.fe88cb04.0.snapshot index dd6f9aa49b..c4c2021817 100644 --- a/compiler/test/__snapshots__/basic_functionality.fe88cb04.0.snapshot +++ b/compiler/test/__snapshots__/basic_functionality.fe88cb04.0.snapshot @@ -15,16 +15,16 @@ basic functionality › func_shadow_and_indirect_call (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"print\" (func $gimport_pervasives_print (param i32 i32) (result i32))) - (global $global_3 (mut i32) (i32.const 0)) - (global $global_2 (mut i32) (i32.const 0)) - (global $global_1 (mut i32) (i32.const 0)) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_5 i32 (i32.const 1)) + (global $foo_1137 (mut i32) (i32.const 0)) + (global $foo_1135 (mut i32) (i32.const 0)) + (global $foo_1133 (mut i32) (i32.const 0)) + (global $foo_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 1)) (elem $elem (global.get $wimport__grainEnv_relocBase) $func_1148) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_5)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $func_1148 (; has Stack IR ;) (param $0 i32) (result i32) (local $1 i32) (i32.store @@ -86,13 +86,13 @@ basic functionality › func_shadow_and_indirect_call (local.get $0) (i32.const 0) ) - (global.set $global_0 + (global.set $foo_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $foo_1131) ) ) ) @@ -100,7 +100,7 @@ basic functionality › func_shadow_and_indirect_call (local.set $1 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $foo_1131) ) ) (i32.store @@ -175,13 +175,13 @@ basic functionality › func_shadow_and_indirect_call (local.get $0) (i32.const 0) ) - (global.set $global_1 + (global.set $foo_1133 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_1) + (global.get $foo_1133) ) ) ) @@ -189,7 +189,7 @@ basic functionality › func_shadow_and_indirect_call (local.set $2 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_1) + (global.get $foo_1133) ) ) (i32.store @@ -264,13 +264,13 @@ basic functionality › func_shadow_and_indirect_call (local.get $0) (i32.const 0) ) - (global.set $global_2 + (global.set $foo_1135 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_2) + (global.get $foo_1135) ) ) ) @@ -278,7 +278,7 @@ basic functionality › func_shadow_and_indirect_call (local.set $3 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_2) + (global.get $foo_1135) ) ) (i32.store @@ -308,7 +308,7 @@ basic functionality › func_shadow_and_indirect_call (local.get $3) ) ) - (global.set $global_3 + (global.set $foo_1137 (tuple.extract 0 (tuple.make (tuple.extract 0 @@ -319,7 +319,7 @@ basic functionality › func_shadow_and_indirect_call ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_3) + (global.get $foo_1137) ) ) ) @@ -331,7 +331,7 @@ basic functionality › func_shadow_and_indirect_call (local.tee $0 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_3) + (global.get $foo_1137) ) ) (i32.load offset=8 diff --git a/compiler/test/__snapshots__/boxes.08fca3f7.0.snapshot b/compiler/test/__snapshots__/boxes.08fca3f7.0.snapshot index 7a41459955..67eb461fbe 100644 --- a/compiler/test/__snapshots__/boxes.08fca3f7.0.snapshot +++ b/compiler/test/__snapshots__/boxes.08fca3f7.0.snapshot @@ -14,12 +14,12 @@ boxes › box_subtraction1 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"-\" (func $gimport_pervasives_- (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -41,13 +41,13 @@ boxes › box_subtraction1 (local.get $0) (i32.const 9) ) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -58,7 +58,7 @@ boxes › box_subtraction1 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) (i32.load offset=8 - (global.get $global_0) + (global.get $b_1131) ) ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef @@ -90,7 +90,7 @@ boxes › box_subtraction1 ) ) (i32.store offset=8 - (global.get $global_0) + (global.get $b_1131) (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -100,7 +100,7 @@ boxes › box_subtraction1 (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (i32.load offset=8 - (global.get $global_0) + (global.get $b_1131) ) ) ) diff --git a/compiler/test/__snapshots__/boxes.0c59fc4e.0.snapshot b/compiler/test/__snapshots__/boxes.0c59fc4e.0.snapshot index 475c5c9e01..69b7785549 100644 --- a/compiler/test/__snapshots__/boxes.0c59fc4e.0.snapshot +++ b/compiler/test/__snapshots__/boxes.0c59fc4e.0.snapshot @@ -14,12 +14,12 @@ boxes › box_multiplication2 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"*\" (func $gimport_pervasives_* (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -41,13 +41,13 @@ boxes › box_multiplication2 (local.get $0) (i32.const 9) ) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -58,7 +58,7 @@ boxes › box_multiplication2 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) (i32.load offset=8 - (global.get $global_0) + (global.get $b_1131) ) ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef @@ -90,7 +90,7 @@ boxes › box_multiplication2 ) ) (i32.store offset=8 - (global.get $global_0) + (global.get $b_1131) (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -100,7 +100,7 @@ boxes › box_multiplication2 (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (i32.load offset=8 - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -110,7 +110,7 @@ boxes › box_multiplication2 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) (i32.load offset=8 - (global.get $global_0) + (global.get $b_1131) ) ) ) diff --git a/compiler/test/__snapshots__/boxes.17668725.0.snapshot b/compiler/test/__snapshots__/boxes.17668725.0.snapshot index 9fbb173701..6885b70e7a 100644 --- a/compiler/test/__snapshots__/boxes.17668725.0.snapshot +++ b/compiler/test/__snapshots__/boxes.17668725.0.snapshot @@ -14,12 +14,12 @@ boxes › box_division2 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"/\" (func $gimport_pervasives_/ (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -41,13 +41,13 @@ boxes › box_division2 (local.get $0) (i32.const 153) ) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -58,7 +58,7 @@ boxes › box_division2 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) (i32.load offset=8 - (global.get $global_0) + (global.get $b_1131) ) ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef @@ -90,7 +90,7 @@ boxes › box_division2 ) ) (i32.store offset=8 - (global.get $global_0) + (global.get $b_1131) (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -100,7 +100,7 @@ boxes › box_division2 (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (i32.load offset=8 - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -110,7 +110,7 @@ boxes › box_division2 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) (i32.load offset=8 - (global.get $global_0) + (global.get $b_1131) ) ) ) diff --git a/compiler/test/__snapshots__/boxes.2b56febf.0.snapshot b/compiler/test/__snapshots__/boxes.2b56febf.0.snapshot index f922419494..cff53387d5 100644 --- a/compiler/test/__snapshots__/boxes.2b56febf.0.snapshot +++ b/compiler/test/__snapshots__/boxes.2b56febf.0.snapshot @@ -14,12 +14,12 @@ boxes › box_addition2 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -41,13 +41,13 @@ boxes › box_addition2 (local.get $0) (i32.const 9) ) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -58,7 +58,7 @@ boxes › box_addition2 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) (i32.load offset=8 - (global.get $global_0) + (global.get $b_1131) ) ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef @@ -90,7 +90,7 @@ boxes › box_addition2 ) ) (i32.store offset=8 - (global.get $global_0) + (global.get $b_1131) (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -100,7 +100,7 @@ boxes › box_addition2 (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (i32.load offset=8 - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -110,7 +110,7 @@ boxes › box_addition2 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) (i32.load offset=8 - (global.get $global_0) + (global.get $b_1131) ) ) ) diff --git a/compiler/test/__snapshots__/boxes.7d564476.0.snapshot b/compiler/test/__snapshots__/boxes.7d564476.0.snapshot index 419314a024..6e4ee2269f 100644 --- a/compiler/test/__snapshots__/boxes.7d564476.0.snapshot +++ b/compiler/test/__snapshots__/boxes.7d564476.0.snapshot @@ -14,12 +14,12 @@ boxes › box_division1 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"/\" (func $gimport_pervasives_/ (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -41,13 +41,13 @@ boxes › box_division1 (local.get $0) (i32.const 153) ) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -58,7 +58,7 @@ boxes › box_division1 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) (i32.load offset=8 - (global.get $global_0) + (global.get $b_1131) ) ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef @@ -90,7 +90,7 @@ boxes › box_division1 ) ) (i32.store offset=8 - (global.get $global_0) + (global.get $b_1131) (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -100,7 +100,7 @@ boxes › box_division1 (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (i32.load offset=8 - (global.get $global_0) + (global.get $b_1131) ) ) ) diff --git a/compiler/test/__snapshots__/boxes.9035923e.0.snapshot b/compiler/test/__snapshots__/boxes.9035923e.0.snapshot index b5a623d3d8..9635712eaa 100644 --- a/compiler/test/__snapshots__/boxes.9035923e.0.snapshot +++ b/compiler/test/__snapshots__/boxes.9035923e.0.snapshot @@ -14,12 +14,12 @@ boxes › box_subtraction2 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"-\" (func $gimport_pervasives_- (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -41,13 +41,13 @@ boxes › box_subtraction2 (local.get $0) (i32.const 9) ) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -58,7 +58,7 @@ boxes › box_subtraction2 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) (i32.load offset=8 - (global.get $global_0) + (global.get $b_1131) ) ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef @@ -90,7 +90,7 @@ boxes › box_subtraction2 ) ) (i32.store offset=8 - (global.get $global_0) + (global.get $b_1131) (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -100,7 +100,7 @@ boxes › box_subtraction2 (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (i32.load offset=8 - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -110,7 +110,7 @@ boxes › box_subtraction2 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) (i32.load offset=8 - (global.get $global_0) + (global.get $b_1131) ) ) ) diff --git a/compiler/test/__snapshots__/boxes.adbe1660.0.snapshot b/compiler/test/__snapshots__/boxes.adbe1660.0.snapshot index 8c809900f5..7366096c63 100644 --- a/compiler/test/__snapshots__/boxes.adbe1660.0.snapshot +++ b/compiler/test/__snapshots__/boxes.adbe1660.0.snapshot @@ -14,12 +14,12 @@ boxes › box_addition1 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -41,13 +41,13 @@ boxes › box_addition1 (local.get $0) (i32.const 9) ) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -58,7 +58,7 @@ boxes › box_addition1 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) (i32.load offset=8 - (global.get $global_0) + (global.get $b_1131) ) ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef @@ -90,7 +90,7 @@ boxes › box_addition1 ) ) (i32.store offset=8 - (global.get $global_0) + (global.get $b_1131) (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -100,7 +100,7 @@ boxes › box_addition1 (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (i32.load offset=8 - (global.get $global_0) + (global.get $b_1131) ) ) ) diff --git a/compiler/test/__snapshots__/boxes.bc258c1b.0.snapshot b/compiler/test/__snapshots__/boxes.bc258c1b.0.snapshot index 16896ab4b7..591780b413 100644 --- a/compiler/test/__snapshots__/boxes.bc258c1b.0.snapshot +++ b/compiler/test/__snapshots__/boxes.bc258c1b.0.snapshot @@ -14,12 +14,12 @@ boxes › box_multiplication1 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"*\" (func $gimport_pervasives_* (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -41,13 +41,13 @@ boxes › box_multiplication1 (local.get $0) (i32.const 9) ) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -58,7 +58,7 @@ boxes › box_multiplication1 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) (i32.load offset=8 - (global.get $global_0) + (global.get $b_1131) ) ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef @@ -90,7 +90,7 @@ boxes › box_multiplication1 ) ) (i32.store offset=8 - (global.get $global_0) + (global.get $b_1131) (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -100,7 +100,7 @@ boxes › box_multiplication1 (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (i32.load offset=8 - (global.get $global_0) + (global.get $b_1131) ) ) ) diff --git a/compiler/test/__snapshots__/boxes.eb81e542.0.snapshot b/compiler/test/__snapshots__/boxes.eb81e542.0.snapshot index 3cc615748c..04f1f1bd2d 100644 --- a/compiler/test/__snapshots__/boxes.eb81e542.0.snapshot +++ b/compiler/test/__snapshots__/boxes.eb81e542.0.snapshot @@ -9,11 +9,11 @@ boxes › test_set_extra1 (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$decRef\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/chars.200d9e1a.0.snapshot b/compiler/test/__snapshots__/chars.200d9e1a.0.snapshot index d1fdcb7017..6422d90dca 100644 --- a/compiler/test/__snapshots__/chars.200d9e1a.0.snapshot +++ b/compiler/test/__snapshots__/chars.200d9e1a.0.snapshot @@ -4,11 +4,11 @@ chars › char4 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 522) ) diff --git a/compiler/test/__snapshots__/chars.259e330c.0.snapshot b/compiler/test/__snapshots__/chars.259e330c.0.snapshot index 74eca11d1b..a41ce9fd3d 100644 --- a/compiler/test/__snapshots__/chars.259e330c.0.snapshot +++ b/compiler/test/__snapshots__/chars.259e330c.0.snapshot @@ -4,11 +4,11 @@ chars › char2 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 522) ) diff --git a/compiler/test/__snapshots__/chars.27fb7f30.0.snapshot b/compiler/test/__snapshots__/chars.27fb7f30.0.snapshot index 9b78f841a7..103bb24f06 100644 --- a/compiler/test/__snapshots__/chars.27fb7f30.0.snapshot +++ b/compiler/test/__snapshots__/chars.27fb7f30.0.snapshot @@ -4,11 +4,11 @@ chars › char8 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 80194) ) diff --git a/compiler/test/__snapshots__/chars.51010573.0.snapshot b/compiler/test/__snapshots__/chars.51010573.0.snapshot index c1d58e6cc7..f466afe675 100644 --- a/compiler/test/__snapshots__/chars.51010573.0.snapshot +++ b/compiler/test/__snapshots__/chars.51010573.0.snapshot @@ -4,11 +4,11 @@ chars › char7 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 1022450) ) diff --git a/compiler/test/__snapshots__/chars.7e0f68db.0.snapshot b/compiler/test/__snapshots__/chars.7e0f68db.0.snapshot index 89a7aaae37..8f0b20507f 100644 --- a/compiler/test/__snapshots__/chars.7e0f68db.0.snapshot +++ b/compiler/test/__snapshots__/chars.7e0f68db.0.snapshot @@ -4,11 +4,11 @@ chars › char6 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 1025402) ) diff --git a/compiler/test/__snapshots__/chars.af4b3613.0.snapshot b/compiler/test/__snapshots__/chars.af4b3613.0.snapshot index b233a02141..761c950dab 100644 --- a/compiler/test/__snapshots__/chars.af4b3613.0.snapshot +++ b/compiler/test/__snapshots__/chars.af4b3613.0.snapshot @@ -4,11 +4,11 @@ chars › char5 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 522) ) diff --git a/compiler/test/__snapshots__/chars.e1cac8cd.0.snapshot b/compiler/test/__snapshots__/chars.e1cac8cd.0.snapshot index fc0bb4fa5e..1269f3c3fc 100644 --- a/compiler/test/__snapshots__/chars.e1cac8cd.0.snapshot +++ b/compiler/test/__snapshots__/chars.e1cac8cd.0.snapshot @@ -4,11 +4,11 @@ chars › char3 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 522) ) diff --git a/compiler/test/__snapshots__/comments.573e549e.0.snapshot b/compiler/test/__snapshots__/comments.573e549e.0.snapshot index daaf2a3823..7cf0b56662 100644 --- a/compiler/test/__snapshots__/comments.573e549e.0.snapshot +++ b/compiler/test/__snapshots__/comments.573e549e.0.snapshot @@ -4,11 +4,11 @@ comments › comment_alone (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 21) ) diff --git a/compiler/test/__snapshots__/comments.8f52e899.0.snapshot b/compiler/test/__snapshots__/comments.8f52e899.0.snapshot index 1fec13a659..f78abedea1 100644 --- a/compiler/test/__snapshots__/comments.8f52e899.0.snapshot +++ b/compiler/test/__snapshots__/comments.8f52e899.0.snapshot @@ -4,11 +4,11 @@ comments › comment_block (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 21) ) diff --git a/compiler/test/__snapshots__/comments.ccf5fcf4.0.snapshot b/compiler/test/__snapshots__/comments.ccf5fcf4.0.snapshot index a9517f24b9..ac1c1e8369 100644 --- a/compiler/test/__snapshots__/comments.ccf5fcf4.0.snapshot +++ b/compiler/test/__snapshots__/comments.ccf5fcf4.0.snapshot @@ -4,11 +4,11 @@ comments › comment_shebang (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 21) ) diff --git a/compiler/test/__snapshots__/comments.fd91c233.0.snapshot b/compiler/test/__snapshots__/comments.fd91c233.0.snapshot index 3f63cb4ed3..a8650fc48d 100644 --- a/compiler/test/__snapshots__/comments.fd91c233.0.snapshot +++ b/compiler/test/__snapshots__/comments.fd91c233.0.snapshot @@ -4,11 +4,11 @@ comments › comment_doc (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 21) ) diff --git a/compiler/test/__snapshots__/enums.aa34084a.0.snapshot b/compiler/test/__snapshots__/enums.aa34084a.0.snapshot index 1f1f01d9d9..8730aa22d4 100644 --- a/compiler/test/__snapshots__/enums.aa34084a.0.snapshot +++ b/compiler/test/__snapshots__/enums.aa34084a.0.snapshot @@ -12,15 +12,15 @@ enums › adt_trailing (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_1 (mut i32) (i32.const 0)) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_3 i32 (i32.const 0)) + (global $Pepperoni_1133 (mut i32) (i32.const 0)) + (global $Cheese_1132 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) - (export \"GRAIN$EXPORT$Pepperoni\" (global $global_1)) - (export \"GRAIN$EXPORT$Cheese\" (global $global_0)) + (export \"GRAIN$EXPORT$Pepperoni\" (global $Pepperoni_1133)) + (export \"GRAIN$EXPORT$Cheese\" (global $Cheese_1132)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_3)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store @@ -110,13 +110,13 @@ enums › adt_trailing (local.get $0) (i32.const 0) ) - (global.set $global_0 + (global.set $Cheese_1132 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $Cheese_1132) ) ) ) @@ -149,20 +149,20 @@ enums › adt_trailing (local.get $0) (i32.const 0) ) - (global.set $global_1 + (global.set $Pepperoni_1133 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_1) + (global.get $Pepperoni_1133) ) ) ) ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_1) + (global.get $Pepperoni_1133) ) ) (func $_start (; has Stack IR ;) diff --git a/compiler/test/__snapshots__/enums.ae26523b.0.snapshot b/compiler/test/__snapshots__/enums.ae26523b.0.snapshot index ed41a01798..4e806ad71e 100644 --- a/compiler/test/__snapshots__/enums.ae26523b.0.snapshot +++ b/compiler/test/__snapshots__/enums.ae26523b.0.snapshot @@ -15,20 +15,20 @@ enums › enum_recursive_data_definition (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"print\" (func $gimport_pervasives_print (param i32 i32) (result i32))) - (global $global_3 (mut i32) (i32.const 0)) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_4 (mut i32) (i32.const 0)) - (global $global_1 (mut i32) (i32.const 0)) - (global $global_2 (mut i32) (i32.const 0)) - (global $global_6 i32 (i32.const 0)) + (global $Cons_1136 (mut i32) (i32.const 0)) + (global $Empty_1133 (mut i32) (i32.const 0)) + (global $forest_1145 (mut i32) (i32.const 0)) + (global $Node_1134 (mut i32) (i32.const 0)) + (global $Nil_1135 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) - (export \"GRAIN$EXPORT$Cons\" (global $global_3)) - (export \"GRAIN$EXPORT$Empty\" (global $global_0)) - (export \"GRAIN$EXPORT$Node\" (global $global_1)) - (export \"GRAIN$EXPORT$Nil\" (global $global_2)) + (export \"GRAIN$EXPORT$Cons\" (global $Cons_1136)) + (export \"GRAIN$EXPORT$Empty\" (global $Empty_1133)) + (export \"GRAIN$EXPORT$Node\" (global $Node_1134)) + (export \"GRAIN$EXPORT$Nil\" (global $Nil_1135)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_6)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $Node_1134 (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (i32.store @@ -296,13 +296,13 @@ enums › enum_recursive_data_definition (local.get $0) (i32.const 0) ) - (global.set $global_0 + (global.set $Empty_1133 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $Empty_1133) ) ) ) @@ -328,13 +328,13 @@ enums › enum_recursive_data_definition (local.get $0) (i32.const 0) ) - (global.set $global_1 + (global.set $Node_1134 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_1) + (global.get $Node_1134) ) ) ) @@ -364,13 +364,13 @@ enums › enum_recursive_data_definition (local.get $0) (i32.const 0) ) - (global.set $global_2 + (global.set $Nil_1135 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_2) + (global.get $Nil_1135) ) ) ) @@ -396,13 +396,13 @@ enums › enum_recursive_data_definition (local.get $0) (i32.const 0) ) - (global.set $global_3 + (global.set $Cons_1136 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_3) + (global.get $Cons_1136) ) ) ) @@ -469,7 +469,7 @@ enums › enum_recursive_data_definition (call $Node_1134 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_1) + (global.get $Node_1134) ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) @@ -477,7 +477,7 @@ enums › enum_recursive_data_definition ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_2) + (global.get $Nil_1135) ) ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef @@ -493,7 +493,7 @@ enums › enum_recursive_data_definition (call $Cons_1136 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_3) + (global.get $Cons_1136) ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) @@ -501,7 +501,7 @@ enums › enum_recursive_data_definition ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_2) + (global.get $Nil_1135) ) ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef @@ -517,7 +517,7 @@ enums › enum_recursive_data_definition (call $Node_1134 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_1) + (global.get $Node_1134) ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) @@ -535,13 +535,13 @@ enums › enum_recursive_data_definition ) ) ) - (global.set $global_4 + (global.set $forest_1145 (tuple.extract 0 (tuple.make (call $Cons_1136 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_3) + (global.get $Cons_1136) ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) @@ -549,12 +549,12 @@ enums › enum_recursive_data_definition ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_2) + (global.get $Nil_1135) ) ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_4) + (global.get $forest_1145) ) ) ) @@ -567,7 +567,7 @@ enums › enum_recursive_data_definition ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_4) + (global.get $forest_1145) ) ) ) diff --git a/compiler/test/__snapshots__/exceptions.a68ae348.0.snapshot b/compiler/test/__snapshots__/exceptions.a68ae348.0.snapshot index f1714272c9..dd6dc9f8fe 100644 --- a/compiler/test/__snapshots__/exceptions.a68ae348.0.snapshot +++ b/compiler/test/__snapshots__/exceptions.a68ae348.0.snapshot @@ -13,16 +13,16 @@ exceptions › exception_4 (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_1 (mut i32) (i32.const 0)) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_3 i32 (i32.const 0)) + (global $Bar_1133 (mut i32) (i32.const 0)) + (global $Foo_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"Foo\" (func $Foo_1131)) - (export \"GRAIN$EXPORT$Bar\" (global $global_1)) - (export \"GRAIN$EXPORT$Foo\" (global $global_0)) + (export \"GRAIN$EXPORT$Bar\" (global $Bar_1133)) + (export \"GRAIN$EXPORT$Foo\" (global $Foo_1131)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_3)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $Foo_1131 (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (i32.store @@ -171,13 +171,13 @@ exceptions › exception_4 (local.get $0) (i32.const 0) ) - (global.set $global_0 + (global.set $Foo_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $Foo_1131) ) ) ) @@ -210,20 +210,20 @@ exceptions › exception_4 (local.get $0) (i32.const 0) ) - (global.set $global_1 + (global.set $Bar_1133 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_1) + (global.get $Bar_1133) ) ) ) ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_1) + (global.get $Bar_1133) ) ) (func $_start (; has Stack IR ;) diff --git a/compiler/test/__snapshots__/exceptions.ccac3e71.0.snapshot b/compiler/test/__snapshots__/exceptions.ccac3e71.0.snapshot index 0fc5e45519..a9d34fb8b5 100644 --- a/compiler/test/__snapshots__/exceptions.ccac3e71.0.snapshot +++ b/compiler/test/__snapshots__/exceptions.ccac3e71.0.snapshot @@ -12,13 +12,13 @@ exceptions › exception_2 (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $Foo_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) - (export \"GRAIN$EXPORT$Foo\" (global $global_0)) + (export \"GRAIN$EXPORT$Foo\" (global $Foo_1131)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store @@ -99,20 +99,20 @@ exceptions › exception_2 (local.get $0) (i32.const 0) ) - (global.set $global_0 + (global.set $Foo_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $Foo_1131) ) ) ) ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $Foo_1131) ) ) (func $_start (; has Stack IR ;) diff --git a/compiler/test/__snapshots__/exports.6ebe81b3.0.snapshot b/compiler/test/__snapshots__/exports.6ebe81b3.0.snapshot index c553c9fbc3..1da8e2b366 100644 --- a/compiler/test/__snapshots__/exports.6ebe81b3.0.snapshot +++ b/compiler/test/__snapshots__/exports.6ebe81b3.0.snapshot @@ -8,11 +8,11 @@ exports › export7 (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef (mut i32))) (import \"GRAIN$MODULE$exportStar\" \"GRAIN$EXPORT$x\" (global $gimport_exportStar_x (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) diff --git a/compiler/test/__snapshots__/exports.a2013f43.0.snapshot b/compiler/test/__snapshots__/exports.a2013f43.0.snapshot index ad5b8e534b..0f668dbeb7 100644 --- a/compiler/test/__snapshots__/exports.a2013f43.0.snapshot +++ b/compiler/test/__snapshots__/exports.a2013f43.0.snapshot @@ -10,14 +10,14 @@ exports › let_rec_export (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$decRef\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $foo_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"foo\" (func $foo_1131)) - (export \"GRAIN$EXPORT$foo\" (global $global_0)) + (export \"GRAIN$EXPORT$foo\" (global $foo_1131)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $foo_1131 (; has Stack IR ;) (param $0 i32) (result i32) (drop (call $wimport_GRAIN$MODULE$runtime/gc_decRef @@ -50,13 +50,13 @@ exports › let_rec_export (local.get $0) (i32.const 0) ) - (global.set $global_0 + (global.set $foo_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $foo_1131) ) ) ) diff --git a/compiler/test/__snapshots__/exports.a24038e5.0.snapshot b/compiler/test/__snapshots__/exports.a24038e5.0.snapshot index bd5130c021..0e8ede68f1 100644 --- a/compiler/test/__snapshots__/exports.a24038e5.0.snapshot +++ b/compiler/test/__snapshots__/exports.a24038e5.0.snapshot @@ -8,11 +8,11 @@ exports › export4 (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef (mut i32))) (import \"GRAIN$MODULE$onlyXExported\" \"GRAIN$EXPORT$x\" (global $gimport_onlyXExported_x (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) diff --git a/compiler/test/__snapshots__/exports.d0b9a66c.0.snapshot b/compiler/test/__snapshots__/exports.d0b9a66c.0.snapshot index 0f2324eac1..61e39a7cc8 100644 --- a/compiler/test/__snapshots__/exports.d0b9a66c.0.snapshot +++ b/compiler/test/__snapshots__/exports.d0b9a66c.0.snapshot @@ -10,11 +10,11 @@ exports › export9 (import \"GRAIN$MODULE$exportStar\" \"GRAIN$EXPORT$y\" (global $gimport_exportStar_y (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$exportStar\" \"y\" (func $gimport_exportStar_y (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_exportStar_y (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/exports.de3bf2b8.0.snapshot b/compiler/test/__snapshots__/exports.de3bf2b8.0.snapshot index e01a0b5ebf..7aaee90ddd 100644 --- a/compiler/test/__snapshots__/exports.de3bf2b8.0.snapshot +++ b/compiler/test/__snapshots__/exports.de3bf2b8.0.snapshot @@ -15,11 +15,11 @@ exports › export8 (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$exportStar\" \"y\" (func $gimport_exportStar_y (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/functions.06134c8a.0.snapshot b/compiler/test/__snapshots__/functions.06134c8a.0.snapshot index ccd4238f89..3998bc14fd 100644 --- a/compiler/test/__snapshots__/functions.06134c8a.0.snapshot +++ b/compiler/test/__snapshots__/functions.06134c8a.0.snapshot @@ -11,12 +11,12 @@ functions › dup_func (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $foo_1135 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store @@ -40,13 +40,13 @@ functions › dup_func (local.get $0) (i32.const 0) ) - (global.set $global_0 + (global.set $foo_1135 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $foo_1135) ) ) ) @@ -54,7 +54,7 @@ functions › dup_func (local.set $0 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $foo_1135) ) ) (drop diff --git a/compiler/test/__snapshots__/functions.14922a92.0.snapshot b/compiler/test/__snapshots__/functions.14922a92.0.snapshot index 50897a292d..252812c79a 100644 --- a/compiler/test/__snapshots__/functions.14922a92.0.snapshot +++ b/compiler/test/__snapshots__/functions.14922a92.0.snapshot @@ -14,12 +14,12 @@ functions › shorthand_4 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $foo_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -44,13 +44,13 @@ functions › shorthand_4 (local.get $0) (i32.const 0) ) - (global.set $global_0 + (global.set $foo_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $foo_1131) ) ) ) @@ -58,7 +58,7 @@ functions › shorthand_4 (local.set $0 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $foo_1131) ) ) (local.set $1 diff --git a/compiler/test/__snapshots__/functions.1be5ecd5.0.snapshot b/compiler/test/__snapshots__/functions.1be5ecd5.0.snapshot index 983cee6587..46dfb6382d 100644 --- a/compiler/test/__snapshots__/functions.1be5ecd5.0.snapshot +++ b/compiler/test/__snapshots__/functions.1be5ecd5.0.snapshot @@ -11,12 +11,12 @@ functions › shorthand_1 (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $foo_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -41,13 +41,13 @@ functions › shorthand_1 (local.get $0) (i32.const 0) ) - (global.set $global_0 + (global.set $foo_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $foo_1131) ) ) ) @@ -55,7 +55,7 @@ functions › shorthand_1 (local.set $0 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $foo_1131) ) ) (local.set $1 diff --git a/compiler/test/__snapshots__/functions.23afd9c9.0.snapshot b/compiler/test/__snapshots__/functions.23afd9c9.0.snapshot index 193e891486..3a59010741 100644 --- a/compiler/test/__snapshots__/functions.23afd9c9.0.snapshot +++ b/compiler/test/__snapshots__/functions.23afd9c9.0.snapshot @@ -14,11 +14,11 @@ functions › lam_destructure_5 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/functions.28e0f2b3.0.snapshot b/compiler/test/__snapshots__/functions.28e0f2b3.0.snapshot index f1ee7df895..e7c49f90f7 100644 --- a/compiler/test/__snapshots__/functions.28e0f2b3.0.snapshot +++ b/compiler/test/__snapshots__/functions.28e0f2b3.0.snapshot @@ -11,12 +11,12 @@ functions › lambda_pat_any (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $x_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -42,13 +42,13 @@ functions › lambda_pat_any (local.get $0) (i32.const 0) ) - (global.set $global_0 + (global.set $x_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $x_1131) ) ) ) @@ -84,7 +84,7 @@ functions › lambda_pat_any (local.set $1 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $x_1131) ) ) (local.set $2 diff --git a/compiler/test/__snapshots__/functions.49ccab54.0.snapshot b/compiler/test/__snapshots__/functions.49ccab54.0.snapshot index 29a247f855..10d68ae446 100644 --- a/compiler/test/__snapshots__/functions.49ccab54.0.snapshot +++ b/compiler/test/__snapshots__/functions.49ccab54.0.snapshot @@ -15,13 +15,13 @@ functions › curried_func (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 1)) + (global $add_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 1)) (elem $elem (global.get $wimport__grainEnv_relocBase) $func_1141) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $func_1141 (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local.set $2 @@ -85,13 +85,13 @@ functions › curried_func (local.get $0) (i32.const 0) ) - (global.set $global_0 + (global.set $add_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $add_1131) ) ) ) @@ -99,7 +99,7 @@ functions › curried_func (local.set $1 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $add_1131) ) ) (i32.store diff --git a/compiler/test/__snapshots__/functions.6eacded0.0.snapshot b/compiler/test/__snapshots__/functions.6eacded0.0.snapshot index 4329880c07..d0da82534d 100644 --- a/compiler/test/__snapshots__/functions.6eacded0.0.snapshot +++ b/compiler/test/__snapshots__/functions.6eacded0.0.snapshot @@ -20,16 +20,16 @@ functions › func_recursive_closure (import \"GRAIN$MODULE$pervasives\" \"-\" (func $gimport_pervasives_- (param i32 i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"==\" (func $gimport_pervasives_== (param i32 i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_1 (mut i32) (i32.const 0)) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_3 i32 (i32.const 1)) + (global $truc_1134 (mut i32) (i32.const 0)) + (global $makeAdder_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 1)) (elem $elem (global.get $wimport__grainEnv_relocBase) $func_1165) (export \"memory\" (memory $0)) (export \"truc\" (func $truc_1134)) - (export \"GRAIN$EXPORT$truc\" (global $global_1)) + (export \"GRAIN$EXPORT$truc\" (global $truc_1134)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_3)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $truc_1134 (; has Stack IR ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -143,7 +143,7 @@ functions › func_recursive_closure (local.set $3 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $makeAdder_1131) ) ) (i32.store @@ -472,13 +472,13 @@ functions › func_recursive_closure (local.get $0) (i32.const 0) ) - (global.set $global_0 + (global.set $makeAdder_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $makeAdder_1131) ) ) ) @@ -504,13 +504,13 @@ functions › func_recursive_closure (local.get $0) (i32.const 0) ) - (global.set $global_1 + (global.set $truc_1134 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_1) + (global.get $truc_1134) ) ) ) @@ -518,7 +518,7 @@ functions › func_recursive_closure (call $truc_1134 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_1) + (global.get $truc_1134) ) ) ) diff --git a/compiler/test/__snapshots__/functions.7a8986a5.0.snapshot b/compiler/test/__snapshots__/functions.7a8986a5.0.snapshot index 305789b4b9..f394193875 100644 --- a/compiler/test/__snapshots__/functions.7a8986a5.0.snapshot +++ b/compiler/test/__snapshots__/functions.7a8986a5.0.snapshot @@ -11,11 +11,11 @@ functions › app_1 (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/functions.84b6e84b.0.snapshot b/compiler/test/__snapshots__/functions.84b6e84b.0.snapshot index 5fae7795db..71705b5150 100644 --- a/compiler/test/__snapshots__/functions.84b6e84b.0.snapshot +++ b/compiler/test/__snapshots__/functions.84b6e84b.0.snapshot @@ -11,12 +11,12 @@ functions › shorthand_3 (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $foo_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -41,13 +41,13 @@ functions › shorthand_3 (local.get $0) (i32.const 0) ) - (global.set $global_0 + (global.set $foo_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $foo_1131) ) ) ) @@ -55,7 +55,7 @@ functions › shorthand_3 (local.set $0 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $foo_1131) ) ) (local.set $1 diff --git a/compiler/test/__snapshots__/functions.8baf471f.0.snapshot b/compiler/test/__snapshots__/functions.8baf471f.0.snapshot index d5b051be48..8d291d8774 100644 --- a/compiler/test/__snapshots__/functions.8baf471f.0.snapshot +++ b/compiler/test/__snapshots__/functions.8baf471f.0.snapshot @@ -14,11 +14,11 @@ functions › lam_destructure_3 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/functions.9223245d.0.snapshot b/compiler/test/__snapshots__/functions.9223245d.0.snapshot index 2c944fbe12..749dda8b0f 100644 --- a/compiler/test/__snapshots__/functions.9223245d.0.snapshot +++ b/compiler/test/__snapshots__/functions.9223245d.0.snapshot @@ -14,11 +14,11 @@ functions › lam_destructure_7 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/functions.9fd69835.0.snapshot b/compiler/test/__snapshots__/functions.9fd69835.0.snapshot index 501d47f45d..f340e02874 100644 --- a/compiler/test/__snapshots__/functions.9fd69835.0.snapshot +++ b/compiler/test/__snapshots__/functions.9fd69835.0.snapshot @@ -14,12 +14,12 @@ functions › shorthand_2 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $foo_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -44,13 +44,13 @@ functions › shorthand_2 (local.get $0) (i32.const 0) ) - (global.set $global_0 + (global.set $foo_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $foo_1131) ) ) ) @@ -58,7 +58,7 @@ functions › shorthand_2 (local.set $0 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $foo_1131) ) ) (local.set $1 diff --git a/compiler/test/__snapshots__/functions.b37949b2.0.snapshot b/compiler/test/__snapshots__/functions.b37949b2.0.snapshot index 5642703938..c49cce6a09 100644 --- a/compiler/test/__snapshots__/functions.b37949b2.0.snapshot +++ b/compiler/test/__snapshots__/functions.b37949b2.0.snapshot @@ -14,12 +14,12 @@ functions › lam_destructure_4 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $foo_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -53,13 +53,13 @@ functions › lam_destructure_4 (local.get $0) (i32.const 0) ) - (global.set $global_0 + (global.set $foo_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $foo_1131) ) ) ) @@ -103,7 +103,7 @@ functions › lam_destructure_4 (local.set $9 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $foo_1131) ) ) (local.set $0 diff --git a/compiler/test/__snapshots__/functions.b3a8d88b.0.snapshot b/compiler/test/__snapshots__/functions.b3a8d88b.0.snapshot index c2b9c768f4..2b9f0c894d 100644 --- a/compiler/test/__snapshots__/functions.b3a8d88b.0.snapshot +++ b/compiler/test/__snapshots__/functions.b3a8d88b.0.snapshot @@ -14,12 +14,12 @@ functions › lam_destructure_8 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $foo_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -58,13 +58,13 @@ functions › lam_destructure_8 (local.get $0) (i32.const 0) ) - (global.set $global_0 + (global.set $foo_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $foo_1131) ) ) ) @@ -143,7 +143,7 @@ functions › lam_destructure_8 (local.set $14 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $foo_1131) ) ) (local.set $0 diff --git a/compiler/test/__snapshots__/functions.b632a2ab.0.snapshot b/compiler/test/__snapshots__/functions.b632a2ab.0.snapshot index ec6d0226a4..ef0517a421 100644 --- a/compiler/test/__snapshots__/functions.b632a2ab.0.snapshot +++ b/compiler/test/__snapshots__/functions.b632a2ab.0.snapshot @@ -11,11 +11,11 @@ functions › lam_destructure_1 (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/functions.c6e8a9aa.0.snapshot b/compiler/test/__snapshots__/functions.c6e8a9aa.0.snapshot index 8249cf4ad7..353773fcfd 100644 --- a/compiler/test/__snapshots__/functions.c6e8a9aa.0.snapshot +++ b/compiler/test/__snapshots__/functions.c6e8a9aa.0.snapshot @@ -11,12 +11,12 @@ functions › lam_destructure_2 (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $foo_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -42,13 +42,13 @@ functions › lam_destructure_2 (local.get $0) (i32.const 0) ) - (global.set $global_0 + (global.set $foo_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $foo_1131) ) ) ) @@ -84,7 +84,7 @@ functions › lam_destructure_2 (local.set $1 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $foo_1131) ) ) (local.set $2 diff --git a/compiler/test/__snapshots__/functions.ce978f54.0.snapshot b/compiler/test/__snapshots__/functions.ce978f54.0.snapshot index 7de68b069a..5dfee80ee3 100644 --- a/compiler/test/__snapshots__/functions.ce978f54.0.snapshot +++ b/compiler/test/__snapshots__/functions.ce978f54.0.snapshot @@ -4,11 +4,11 @@ functions › multi_bind2 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 7) ) diff --git a/compiler/test/__snapshots__/functions.d9466880.0.snapshot b/compiler/test/__snapshots__/functions.d9466880.0.snapshot index b6d3595778..e3b17a258e 100644 --- a/compiler/test/__snapshots__/functions.d9466880.0.snapshot +++ b/compiler/test/__snapshots__/functions.d9466880.0.snapshot @@ -14,12 +14,12 @@ functions › func_record_associativity2 (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 1)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 1)) (elem $elem (global.get $wimport__grainEnv_relocBase) $lam_lambda_1141) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $lam_lambda_1141 (; has Stack IR ;) (param $0 i32) (result i32) (drop (call $wimport_GRAIN$MODULE$runtime/gc_decRef diff --git a/compiler/test/__snapshots__/functions.e6c6212b.0.snapshot b/compiler/test/__snapshots__/functions.e6c6212b.0.snapshot index 3ee6d05332..761dafbd50 100644 --- a/compiler/test/__snapshots__/functions.e6c6212b.0.snapshot +++ b/compiler/test/__snapshots__/functions.e6c6212b.0.snapshot @@ -14,12 +14,12 @@ functions › fn_trailing_comma (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $testFn_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -44,13 +44,13 @@ functions › fn_trailing_comma (local.get $0) (i32.const 0) ) - (global.set $global_0 + (global.set $testFn_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $testFn_1131) ) ) ) @@ -58,7 +58,7 @@ functions › fn_trailing_comma (local.set $0 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $testFn_1131) ) ) (local.set $1 diff --git a/compiler/test/__snapshots__/functions.f400bb7b.0.snapshot b/compiler/test/__snapshots__/functions.f400bb7b.0.snapshot index 74d30e81ed..6ebb75b00e 100644 --- a/compiler/test/__snapshots__/functions.f400bb7b.0.snapshot +++ b/compiler/test/__snapshots__/functions.f400bb7b.0.snapshot @@ -14,12 +14,12 @@ functions › lam_destructure_6 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $foo_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -61,13 +61,13 @@ functions › lam_destructure_6 (local.get $0) (i32.const 0) ) - (global.set $global_0 + (global.set $foo_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $foo_1131) ) ) ) @@ -143,7 +143,7 @@ functions › lam_destructure_6 (local.set $17 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $foo_1131) ) ) (local.set $0 diff --git a/compiler/test/__snapshots__/functions.f647681b.0.snapshot b/compiler/test/__snapshots__/functions.f647681b.0.snapshot index 49b1d834fd..c3b520340e 100644 --- a/compiler/test/__snapshots__/functions.f647681b.0.snapshot +++ b/compiler/test/__snapshots__/functions.f647681b.0.snapshot @@ -14,12 +14,12 @@ functions › func_record_associativity1 (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 1)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 1)) (elem $elem (global.get $wimport__grainEnv_relocBase) $lam_lambda_1137) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $lam_lambda_1137 (; has Stack IR ;) (param $0 i32) (result i32) (drop (call $wimport_GRAIN$MODULE$runtime/gc_decRef diff --git a/compiler/test/__snapshots__/imports.0706ac31.0.snapshot b/compiler/test/__snapshots__/imports.0706ac31.0.snapshot index 2f727b83b4..bd47123543 100644 --- a/compiler/test/__snapshots__/imports.0706ac31.0.snapshot +++ b/compiler/test/__snapshots__/imports.0706ac31.0.snapshot @@ -11,11 +11,11 @@ imports › import_all_constructor (import \"GRAIN$MODULE$tlists\" \"GRAIN$EXPORT$Cons\" (global $gimport_tlists_Cons (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$tlists\" \"Cons\" (func $gimport_tlists_Cons (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_tlists_Cons (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/imports.0b2049ee.0.snapshot b/compiler/test/__snapshots__/imports.0b2049ee.0.snapshot index 91e9451f8a..bf3779d1fd 100644 --- a/compiler/test/__snapshots__/imports.0b2049ee.0.snapshot +++ b/compiler/test/__snapshots__/imports.0b2049ee.0.snapshot @@ -8,11 +8,11 @@ imports › import_some (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef (mut i32))) (import \"GRAIN$MODULE$exportStar\" \"GRAIN$EXPORT$x\" (global $gimport_exportStar_x (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) diff --git a/compiler/test/__snapshots__/imports.0e53f2e1.0.snapshot b/compiler/test/__snapshots__/imports.0e53f2e1.0.snapshot index 9fa845998a..b31a3a8404 100644 --- a/compiler/test/__snapshots__/imports.0e53f2e1.0.snapshot +++ b/compiler/test/__snapshots__/imports.0e53f2e1.0.snapshot @@ -8,11 +8,11 @@ imports › import_all_except_multiple (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef (mut i32))) (import \"GRAIN$MODULE$exportStar\" \"GRAIN$EXPORT$z\" (global $gimport_exportStar_z (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) diff --git a/compiler/test/__snapshots__/imports.259f419e.0.snapshot b/compiler/test/__snapshots__/imports.259f419e.0.snapshot index 4b18a14d81..10b6d13718 100644 --- a/compiler/test/__snapshots__/imports.259f419e.0.snapshot +++ b/compiler/test/__snapshots__/imports.259f419e.0.snapshot @@ -8,11 +8,11 @@ imports › import_relative_path1 (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef (mut i32))) (import \"GRAIN$MODULE$../test-libs/exportStar\" \"GRAIN$EXPORT$x\" (global $gimport_../test-libs/exportStar_x (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) diff --git a/compiler/test/__snapshots__/imports.2f957040.0.snapshot b/compiler/test/__snapshots__/imports.2f957040.0.snapshot index bae884886e..8f31d9e822 100644 --- a/compiler/test/__snapshots__/imports.2f957040.0.snapshot +++ b/compiler/test/__snapshots__/imports.2f957040.0.snapshot @@ -15,11 +15,11 @@ imports › import_alias_multiple_constructor (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$tlists\" \"Cons\" (func $gimport_tlists_Cons (param i32 i32 i32) (result i32))) (import \"GRAIN$MODULE$tlists\" \"sum\" (func $gimport_tlists_sum (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/imports.45beae05.0.snapshot b/compiler/test/__snapshots__/imports.45beae05.0.snapshot index 066a1d01a9..75bcb5c28e 100644 --- a/compiler/test/__snapshots__/imports.45beae05.0.snapshot +++ b/compiler/test/__snapshots__/imports.45beae05.0.snapshot @@ -8,11 +8,11 @@ imports › annotation_across_import (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef (mut i32))) (import \"GRAIN$MODULE$tlists\" \"GRAIN$EXPORT$Empty\" (global $gimport_tlists_Empty (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) diff --git a/compiler/test/__snapshots__/imports.4ac5b2fd.0.snapshot b/compiler/test/__snapshots__/imports.4ac5b2fd.0.snapshot index 85e2de859d..782ddf2eec 100644 --- a/compiler/test/__snapshots__/imports.4ac5b2fd.0.snapshot +++ b/compiler/test/__snapshots__/imports.4ac5b2fd.0.snapshot @@ -10,11 +10,11 @@ imports › import_alias_multiple (import \"GRAIN$MODULE$exportStar\" \"GRAIN$EXPORT$y\" (global $gimport_exportStar_y (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$exportStar\" \"y\" (func $gimport_exportStar_y (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_exportStar_y (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/imports.4edfc4fd.0.snapshot b/compiler/test/__snapshots__/imports.4edfc4fd.0.snapshot index 8f3740484f..f9fe666b24 100644 --- a/compiler/test/__snapshots__/imports.4edfc4fd.0.snapshot +++ b/compiler/test/__snapshots__/imports.4edfc4fd.0.snapshot @@ -8,11 +8,11 @@ imports › import_alias (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef (mut i32))) (import \"GRAIN$MODULE$exportStar\" \"GRAIN$EXPORT$x\" (global $gimport_exportStar_x (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) diff --git a/compiler/test/__snapshots__/imports.54ae58d4.0.snapshot b/compiler/test/__snapshots__/imports.54ae58d4.0.snapshot index 22e6674da7..d80e3dce76 100644 --- a/compiler/test/__snapshots__/imports.54ae58d4.0.snapshot +++ b/compiler/test/__snapshots__/imports.54ae58d4.0.snapshot @@ -10,11 +10,11 @@ imports › import_some_multiple_trailing (import \"GRAIN$MODULE$exportStar\" \"GRAIN$EXPORT$y\" (global $gimport_exportStar_y (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$exportStar\" \"y\" (func $gimport_exportStar_y (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_exportStar_y (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/imports.59fd966e.0.snapshot b/compiler/test/__snapshots__/imports.59fd966e.0.snapshot index 58eec19d80..7954809de2 100644 --- a/compiler/test/__snapshots__/imports.59fd966e.0.snapshot +++ b/compiler/test/__snapshots__/imports.59fd966e.0.snapshot @@ -10,11 +10,11 @@ imports › import_some_multiple (import \"GRAIN$MODULE$exportStar\" \"GRAIN$EXPORT$y\" (global $gimport_exportStar_y (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$exportStar\" \"y\" (func $gimport_exportStar_y (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_exportStar_y (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/imports.644a1413.0.snapshot b/compiler/test/__snapshots__/imports.644a1413.0.snapshot index 8781e5321c..2b062d08cb 100644 --- a/compiler/test/__snapshots__/imports.644a1413.0.snapshot +++ b/compiler/test/__snapshots__/imports.644a1413.0.snapshot @@ -13,11 +13,11 @@ imports › import_relative_path4 (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$./bar/bar\" \"bar\" (func $gimport_./bar/bar_bar (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"print\" (func $gimport_pervasives_print (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/imports.7cdfb4de.0.snapshot b/compiler/test/__snapshots__/imports.7cdfb4de.0.snapshot index 975db33795..6ff32caf5e 100644 --- a/compiler/test/__snapshots__/imports.7cdfb4de.0.snapshot +++ b/compiler/test/__snapshots__/imports.7cdfb4de.0.snapshot @@ -8,11 +8,11 @@ imports › import_all_except_constructor (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef (mut i32))) (import \"GRAIN$MODULE$tlists\" \"GRAIN$EXPORT$Empty\" (global $gimport_tlists_Empty (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) diff --git a/compiler/test/__snapshots__/imports.7fc65fd4.0.snapshot b/compiler/test/__snapshots__/imports.7fc65fd4.0.snapshot index f127c88a74..2789ba0894 100644 --- a/compiler/test/__snapshots__/imports.7fc65fd4.0.snapshot +++ b/compiler/test/__snapshots__/imports.7fc65fd4.0.snapshot @@ -11,11 +11,11 @@ imports › import_some_constructor (import \"GRAIN$MODULE$tlists\" \"GRAIN$EXPORT$Cons\" (global $gimport_tlists_Cons (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$tlists\" \"Cons\" (func $gimport_tlists_Cons (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_tlists_Cons (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/imports.8c14f403.0.snapshot b/compiler/test/__snapshots__/imports.8c14f403.0.snapshot index e7511ee59b..82ff7645ec 100644 --- a/compiler/test/__snapshots__/imports.8c14f403.0.snapshot +++ b/compiler/test/__snapshots__/imports.8c14f403.0.snapshot @@ -8,11 +8,11 @@ imports › import_module (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef (mut i32))) (import \"GRAIN$MODULE$exportStar\" \"GRAIN$EXPORT$x\" (global $gimport_exportStar_x (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) diff --git a/compiler/test/__snapshots__/imports.91b07561.0.snapshot b/compiler/test/__snapshots__/imports.91b07561.0.snapshot index 636054d24d..0adef5def3 100644 --- a/compiler/test/__snapshots__/imports.91b07561.0.snapshot +++ b/compiler/test/__snapshots__/imports.91b07561.0.snapshot @@ -10,11 +10,11 @@ imports › import_module2 (import \"GRAIN$MODULE$exportStar\" \"GRAIN$EXPORT$y\" (global $gimport_exportStar_y (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$exportStar\" \"y\" (func $gimport_exportStar_y (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_exportStar_y (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/imports.a3a21ec1.0.snapshot b/compiler/test/__snapshots__/imports.a3a21ec1.0.snapshot index e2af87ec36..44fd0f561b 100644 --- a/compiler/test/__snapshots__/imports.a3a21ec1.0.snapshot +++ b/compiler/test/__snapshots__/imports.a3a21ec1.0.snapshot @@ -11,11 +11,11 @@ imports › import_same_module_unify2 (import \"GRAIN$MODULE$tlists\" \"GRAIN$EXPORT$Cons\" (global $gimport_tlists_Cons (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$tlists\" \"Cons\" (func $gimport_tlists_Cons (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_tlists_Cons (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/imports.b31f1d0e.0.snapshot b/compiler/test/__snapshots__/imports.b31f1d0e.0.snapshot index 9aa1057aab..5c2a5acc5a 100644 --- a/compiler/test/__snapshots__/imports.b31f1d0e.0.snapshot +++ b/compiler/test/__snapshots__/imports.b31f1d0e.0.snapshot @@ -10,11 +10,11 @@ imports › import_with_export_multiple (import \"GRAIN$MODULE$sameExport\" \"GRAIN$EXPORT$foo\" (global $gimport_sameExport_foo (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$sameExport\" \"foo\" (func $gimport_sameExport_foo (param i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_sameExport_foo (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/imports.c06afb4d.0.snapshot b/compiler/test/__snapshots__/imports.c06afb4d.0.snapshot index 7418774767..4b724a8993 100644 --- a/compiler/test/__snapshots__/imports.c06afb4d.0.snapshot +++ b/compiler/test/__snapshots__/imports.c06afb4d.0.snapshot @@ -11,11 +11,11 @@ imports › import_same_module_unify (import \"GRAIN$MODULE$tlists\" \"GRAIN$EXPORT$Cons\" (global $gimport_tlists_Cons (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$tlists\" \"Cons\" (func $gimport_tlists_Cons (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_tlists_Cons (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/imports.cc67676f.0.snapshot b/compiler/test/__snapshots__/imports.cc67676f.0.snapshot index e8decb7435..026d565938 100644 --- a/compiler/test/__snapshots__/imports.cc67676f.0.snapshot +++ b/compiler/test/__snapshots__/imports.cc67676f.0.snapshot @@ -10,11 +10,11 @@ imports › import_all_except_multiple_constructor (import \"GRAIN$MODULE$tlists\" \"GRAIN$EXPORT$sum\" (global $gimport_tlists_sum (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$tlists\" \"sum\" (func $gimport_tlists_sum (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_tlists_sum (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/imports.daf4add5.0.snapshot b/compiler/test/__snapshots__/imports.daf4add5.0.snapshot index c9db7788b8..bed8f0fdd8 100644 --- a/compiler/test/__snapshots__/imports.daf4add5.0.snapshot +++ b/compiler/test/__snapshots__/imports.daf4add5.0.snapshot @@ -10,11 +10,11 @@ imports › import_some_multiple_trailing2 (import \"GRAIN$MODULE$exportStar\" \"GRAIN$EXPORT$y\" (global $gimport_exportStar_y (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$exportStar\" \"y\" (func $gimport_exportStar_y (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_exportStar_y (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/imports.dd1aa173.0.snapshot b/compiler/test/__snapshots__/imports.dd1aa173.0.snapshot index bf78404584..b8b798c303 100644 --- a/compiler/test/__snapshots__/imports.dd1aa173.0.snapshot +++ b/compiler/test/__snapshots__/imports.dd1aa173.0.snapshot @@ -10,11 +10,11 @@ imports › import_alias_constructor (import \"GRAIN$MODULE$tlists\" \"GRAIN$EXPORT$sum\" (global $gimport_tlists_sum (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$tlists\" \"sum\" (func $gimport_tlists_sum (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_tlists_sum (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/imports.e295854d.0.snapshot b/compiler/test/__snapshots__/imports.e295854d.0.snapshot index fd10ccb9bd..fcda647bb9 100644 --- a/compiler/test/__snapshots__/imports.e295854d.0.snapshot +++ b/compiler/test/__snapshots__/imports.e295854d.0.snapshot @@ -8,11 +8,11 @@ imports › import_relative_path2 (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef (mut i32))) (import \"GRAIN$MODULE$../../test/test-libs/exportStar\" \"GRAIN$EXPORT$x\" (global $gimport_../../test/test-libs/exportStar_x (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) diff --git a/compiler/test/__snapshots__/imports.e92f584f.0.snapshot b/compiler/test/__snapshots__/imports.e92f584f.0.snapshot index 9434913986..3cab8159c3 100644 --- a/compiler/test/__snapshots__/imports.e92f584f.0.snapshot +++ b/compiler/test/__snapshots__/imports.e92f584f.0.snapshot @@ -8,11 +8,11 @@ imports › import_relative_path3 (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef (mut i32))) (import \"GRAIN$MODULE$nested/nested\" \"GRAIN$EXPORT$j\" (global $gimport_nested/nested_j (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) diff --git a/compiler/test/__snapshots__/imports.f36bd08d.0.snapshot b/compiler/test/__snapshots__/imports.f36bd08d.0.snapshot index f3ffd97500..74ad91471a 100644 --- a/compiler/test/__snapshots__/imports.f36bd08d.0.snapshot +++ b/compiler/test/__snapshots__/imports.f36bd08d.0.snapshot @@ -12,11 +12,11 @@ imports › import_muliple_modules (import \"GRAIN$MODULE$tlists\" \"GRAIN$EXPORT$Cons\" (global $gimport_tlists_Cons (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$tlists\" \"Cons\" (func $gimport_tlists_Cons (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (call $gimport_tlists_Cons (call $wimport_GRAIN$MODULE$runtime/gc_incRef diff --git a/compiler/test/__snapshots__/imports.f4cfe044.0.snapshot b/compiler/test/__snapshots__/imports.f4cfe044.0.snapshot index 5aab1be55f..3e7d950746 100644 --- a/compiler/test/__snapshots__/imports.f4cfe044.0.snapshot +++ b/compiler/test/__snapshots__/imports.f4cfe044.0.snapshot @@ -15,11 +15,11 @@ imports › import_some_mixed (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$tlists\" \"Cons\" (func $gimport_tlists_Cons (param i32 i32 i32) (result i32))) (import \"GRAIN$MODULE$tlists\" \"sum\" (func $gimport_tlists_sum (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/let_mut.00e05fe2.0.snapshot b/compiler/test/__snapshots__/let_mut.00e05fe2.0.snapshot index d9359183b0..15366f7107 100644 --- a/compiler/test/__snapshots__/let_mut.00e05fe2.0.snapshot +++ b/compiler/test/__snapshots__/let_mut.00e05fe2.0.snapshot @@ -12,22 +12,22 @@ let mut › let-mut_division1 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"/\" (func $gimport_pervasives_/ (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (i32.const 153) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -42,7 +42,7 @@ let mut › let-mut_division1 ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) (i32.const 39) ) @@ -53,7 +53,7 @@ let mut › let-mut_division1 ) ) ) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -62,7 +62,7 @@ let mut › let-mut_division1 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) diff --git a/compiler/test/__snapshots__/let_mut.1176df90.0.snapshot b/compiler/test/__snapshots__/let_mut.1176df90.0.snapshot index 6974e479b2..a3db745f3f 100644 --- a/compiler/test/__snapshots__/let_mut.1176df90.0.snapshot +++ b/compiler/test/__snapshots__/let_mut.1176df90.0.snapshot @@ -12,22 +12,22 @@ let mut › let-mut_multiplication2 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"*\" (func $gimport_pervasives_* (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (i32.const 9) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -42,7 +42,7 @@ let mut › let-mut_multiplication2 ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) (i32.const 39) ) @@ -53,7 +53,7 @@ let mut › let-mut_multiplication2 ) ) ) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -62,7 +62,7 @@ let mut › let-mut_multiplication2 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -70,7 +70,7 @@ let mut › let-mut_multiplication2 (local.set $1 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) ) (drop diff --git a/compiler/test/__snapshots__/let_mut.3307d5a7.0.snapshot b/compiler/test/__snapshots__/let_mut.3307d5a7.0.snapshot index bcc873f320..28f115d41a 100644 --- a/compiler/test/__snapshots__/let_mut.3307d5a7.0.snapshot +++ b/compiler/test/__snapshots__/let_mut.3307d5a7.0.snapshot @@ -11,12 +11,12 @@ let mut › let-mut3 (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store @@ -36,13 +36,13 @@ let mut › let-mut3 (local.get $0) (i32.const 9) ) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -50,7 +50,7 @@ let mut › let-mut3 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) (i32.load offset=8 - (global.get $global_0) + (global.get $b_1131) ) ) ) diff --git a/compiler/test/__snapshots__/let_mut.43f6980c.0.snapshot b/compiler/test/__snapshots__/let_mut.43f6980c.0.snapshot index 89fd46c730..71a1287e00 100644 --- a/compiler/test/__snapshots__/let_mut.43f6980c.0.snapshot +++ b/compiler/test/__snapshots__/let_mut.43f6980c.0.snapshot @@ -12,22 +12,22 @@ let mut › let-mut_division3 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"/\" (func $gimport_pervasives_/ (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (i32.const 153) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -42,7 +42,7 @@ let mut › let-mut_division3 ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) (i32.const 39) ) @@ -53,7 +53,7 @@ let mut › let-mut_division3 ) ) ) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -62,7 +62,7 @@ let mut › let-mut_division3 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -70,7 +70,7 @@ let mut › let-mut_division3 (local.set $1 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) ) (drop diff --git a/compiler/test/__snapshots__/let_mut.48249b50.0.snapshot b/compiler/test/__snapshots__/let_mut.48249b50.0.snapshot index d93d3264f3..3dbc89562f 100644 --- a/compiler/test/__snapshots__/let_mut.48249b50.0.snapshot +++ b/compiler/test/__snapshots__/let_mut.48249b50.0.snapshot @@ -12,22 +12,22 @@ let mut › let-mut5 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"-\" (func $gimport_pervasives_- (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (i32.const 9) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -42,7 +42,7 @@ let mut › let-mut5 ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) (i32.const 3) ) @@ -53,7 +53,7 @@ let mut › let-mut5 ) ) ) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -62,7 +62,7 @@ let mut › let-mut5 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -70,7 +70,7 @@ let mut › let-mut5 (local.set $1 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) ) (drop diff --git a/compiler/test/__snapshots__/let_mut.4c3f3b2b.0.snapshot b/compiler/test/__snapshots__/let_mut.4c3f3b2b.0.snapshot index 0cb462d526..eb644cce21 100644 --- a/compiler/test/__snapshots__/let_mut.4c3f3b2b.0.snapshot +++ b/compiler/test/__snapshots__/let_mut.4c3f3b2b.0.snapshot @@ -11,12 +11,12 @@ let mut › let-mut2 (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -76,13 +76,13 @@ let mut › let-mut2 (local.get $1) ) ) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -90,7 +90,7 @@ let mut › let-mut2 (local.set $0 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) ) (drop diff --git a/compiler/test/__snapshots__/let_mut.4c75261e.0.snapshot b/compiler/test/__snapshots__/let_mut.4c75261e.0.snapshot index 2e46e89294..89c49904ec 100644 --- a/compiler/test/__snapshots__/let_mut.4c75261e.0.snapshot +++ b/compiler/test/__snapshots__/let_mut.4c75261e.0.snapshot @@ -12,22 +12,22 @@ let mut › let-mut_multiplication1 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"*\" (func $gimport_pervasives_* (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (i32.const 9) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -42,7 +42,7 @@ let mut › let-mut_multiplication1 ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) (i32.const 39) ) @@ -53,7 +53,7 @@ let mut › let-mut_multiplication1 ) ) ) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -62,7 +62,7 @@ let mut › let-mut_multiplication1 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) diff --git a/compiler/test/__snapshots__/let_mut.634331f0.0.snapshot b/compiler/test/__snapshots__/let_mut.634331f0.0.snapshot index bbab977187..482803d6d9 100644 --- a/compiler/test/__snapshots__/let_mut.634331f0.0.snapshot +++ b/compiler/test/__snapshots__/let_mut.634331f0.0.snapshot @@ -12,22 +12,22 @@ let mut › let-mut_multiplication3 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"*\" (func $gimport_pervasives_* (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (i32.const 9) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -42,7 +42,7 @@ let mut › let-mut_multiplication3 ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) (i32.const 39) ) @@ -53,7 +53,7 @@ let mut › let-mut_multiplication3 ) ) ) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -62,7 +62,7 @@ let mut › let-mut_multiplication3 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -70,7 +70,7 @@ let mut › let-mut_multiplication3 (local.set $1 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) ) (drop diff --git a/compiler/test/__snapshots__/let_mut.63c16374.0.snapshot b/compiler/test/__snapshots__/let_mut.63c16374.0.snapshot index 0858133666..96609c4725 100644 --- a/compiler/test/__snapshots__/let_mut.63c16374.0.snapshot +++ b/compiler/test/__snapshots__/let_mut.63c16374.0.snapshot @@ -9,38 +9,38 @@ let mut › let-mut4 (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$decRef\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (i32.const 9) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) ) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (i32.const 7) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) ) (func $_start (; has Stack IR ;) diff --git a/compiler/test/__snapshots__/let_mut.6796c72d.0.snapshot b/compiler/test/__snapshots__/let_mut.6796c72d.0.snapshot index 6466715a0f..12d3720a58 100644 --- a/compiler/test/__snapshots__/let_mut.6796c72d.0.snapshot +++ b/compiler/test/__snapshots__/let_mut.6796c72d.0.snapshot @@ -12,22 +12,22 @@ let mut › let-mut_subtraction1 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"-\" (func $gimport_pervasives_- (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (i32.const 9) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -42,7 +42,7 @@ let mut › let-mut_subtraction1 ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) (i32.const 39) ) @@ -53,7 +53,7 @@ let mut › let-mut_subtraction1 ) ) ) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -62,7 +62,7 @@ let mut › let-mut_subtraction1 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) diff --git a/compiler/test/__snapshots__/let_mut.baaea1d3.0.snapshot b/compiler/test/__snapshots__/let_mut.baaea1d3.0.snapshot index c45f7406b7..2d29970084 100644 --- a/compiler/test/__snapshots__/let_mut.baaea1d3.0.snapshot +++ b/compiler/test/__snapshots__/let_mut.baaea1d3.0.snapshot @@ -12,22 +12,22 @@ let mut › let-mut_subtraction2 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"-\" (func $gimport_pervasives_- (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (i32.const 9) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -42,7 +42,7 @@ let mut › let-mut_subtraction2 ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) (i32.const 39) ) @@ -53,7 +53,7 @@ let mut › let-mut_subtraction2 ) ) ) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -62,7 +62,7 @@ let mut › let-mut_subtraction2 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -70,7 +70,7 @@ let mut › let-mut_subtraction2 (local.set $1 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) ) (drop diff --git a/compiler/test/__snapshots__/let_mut.cbbbaeb4.0.snapshot b/compiler/test/__snapshots__/let_mut.cbbbaeb4.0.snapshot index 6669f0103f..f9eb9df772 100644 --- a/compiler/test/__snapshots__/let_mut.cbbbaeb4.0.snapshot +++ b/compiler/test/__snapshots__/let_mut.cbbbaeb4.0.snapshot @@ -12,22 +12,22 @@ let mut › let-mut_addition2 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (i32.const 9) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -42,7 +42,7 @@ let mut › let-mut_addition2 ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) (i32.const 39) ) @@ -53,7 +53,7 @@ let mut › let-mut_addition2 ) ) ) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -62,7 +62,7 @@ let mut › let-mut_addition2 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -70,7 +70,7 @@ let mut › let-mut_addition2 (local.set $1 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) ) (drop diff --git a/compiler/test/__snapshots__/let_mut.d2de286b.0.snapshot b/compiler/test/__snapshots__/let_mut.d2de286b.0.snapshot index 3a5e743d31..4b788aab27 100644 --- a/compiler/test/__snapshots__/let_mut.d2de286b.0.snapshot +++ b/compiler/test/__snapshots__/let_mut.d2de286b.0.snapshot @@ -12,22 +12,22 @@ let mut › let-mut_addition1 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (i32.const 9) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -42,7 +42,7 @@ let mut › let-mut_addition1 ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) (i32.const 39) ) @@ -53,7 +53,7 @@ let mut › let-mut_addition1 ) ) ) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -62,7 +62,7 @@ let mut › let-mut_addition1 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) diff --git a/compiler/test/__snapshots__/let_mut.e90db621.0.snapshot b/compiler/test/__snapshots__/let_mut.e90db621.0.snapshot index e770268f82..330d39b4f4 100644 --- a/compiler/test/__snapshots__/let_mut.e90db621.0.snapshot +++ b/compiler/test/__snapshots__/let_mut.e90db621.0.snapshot @@ -12,22 +12,22 @@ let mut › let-mut_subtraction3 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"-\" (func $gimport_pervasives_- (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (i32.const 9) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -42,7 +42,7 @@ let mut › let-mut_subtraction3 ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) (i32.const 39) ) @@ -53,7 +53,7 @@ let mut › let-mut_subtraction3 ) ) ) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -62,7 +62,7 @@ let mut › let-mut_subtraction3 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -70,7 +70,7 @@ let mut › let-mut_subtraction3 (local.set $1 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) ) (drop diff --git a/compiler/test/__snapshots__/let_mut.f8f208a2.0.snapshot b/compiler/test/__snapshots__/let_mut.f8f208a2.0.snapshot index fda7004e2f..3d6198cd27 100644 --- a/compiler/test/__snapshots__/let_mut.f8f208a2.0.snapshot +++ b/compiler/test/__snapshots__/let_mut.f8f208a2.0.snapshot @@ -12,22 +12,22 @@ let mut › let-mut_addition3 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (i32.const 9) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -42,7 +42,7 @@ let mut › let-mut_addition3 ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) (i32.const 39) ) @@ -53,7 +53,7 @@ let mut › let-mut_addition3 ) ) ) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -62,7 +62,7 @@ let mut › let-mut_addition3 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -70,7 +70,7 @@ let mut › let-mut_addition3 (local.set $1 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) ) (drop diff --git a/compiler/test/__snapshots__/let_mut.f9e32f30.0.snapshot b/compiler/test/__snapshots__/let_mut.f9e32f30.0.snapshot index 2b052591ed..893307f665 100644 --- a/compiler/test/__snapshots__/let_mut.f9e32f30.0.snapshot +++ b/compiler/test/__snapshots__/let_mut.f9e32f30.0.snapshot @@ -12,22 +12,22 @@ let mut › let-mut_division2 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"/\" (func $gimport_pervasives_/ (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (i32.const 153) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -42,7 +42,7 @@ let mut › let-mut_division2 ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) (i32.const 39) ) @@ -53,7 +53,7 @@ let mut › let-mut_division2 ) ) ) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -62,7 +62,7 @@ let mut › let-mut_division2 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -70,7 +70,7 @@ let mut › let-mut_division2 (local.set $1 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) ) (drop diff --git a/compiler/test/__snapshots__/let_mut.fcc9c65d.0.snapshot b/compiler/test/__snapshots__/let_mut.fcc9c65d.0.snapshot index 7269a806cb..fa8172a214 100644 --- a/compiler/test/__snapshots__/let_mut.fcc9c65d.0.snapshot +++ b/compiler/test/__snapshots__/let_mut.fcc9c65d.0.snapshot @@ -9,27 +9,27 @@ let mut › let-mut1 (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$decRef\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (i32.const 9) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) ) (func $_start (; has Stack IR ;) diff --git a/compiler/test/__snapshots__/lists.884ce894.0.snapshot b/compiler/test/__snapshots__/lists.884ce894.0.snapshot index 1677492b78..c40ab0451b 100644 --- a/compiler/test/__snapshots__/lists.884ce894.0.snapshot +++ b/compiler/test/__snapshots__/lists.884ce894.0.snapshot @@ -13,12 +13,12 @@ lists › list_spread (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"[...]\" (func $gimport_pervasives_[...] (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $a_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -44,7 +44,7 @@ lists › list_spread ) ) ) - (global.set $global_0 + (global.set $a_1131 (tuple.extract 0 (tuple.make (call $gimport_pervasives_[...] @@ -60,7 +60,7 @@ lists › list_spread ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $a_1131) ) ) ) @@ -76,7 +76,7 @@ lists › list_spread (i32.const 5) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $a_1131) ) ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef diff --git a/compiler/test/__snapshots__/lists.d9fd46fb.0.snapshot b/compiler/test/__snapshots__/lists.d9fd46fb.0.snapshot index f3b0799901..c7090f309e 100644 --- a/compiler/test/__snapshots__/lists.d9fd46fb.0.snapshot +++ b/compiler/test/__snapshots__/lists.d9fd46fb.0.snapshot @@ -13,11 +13,11 @@ lists › list1_trailing_space (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"[...]\" (func $gimport_pervasives_[...] (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/lists.e5378351.0.snapshot b/compiler/test/__snapshots__/lists.e5378351.0.snapshot index d0ca0685fb..a04bb7b0e1 100644 --- a/compiler/test/__snapshots__/lists.e5378351.0.snapshot +++ b/compiler/test/__snapshots__/lists.e5378351.0.snapshot @@ -13,11 +13,11 @@ lists › list1_trailing (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"[...]\" (func $gimport_pervasives_[...] (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/loops.0a25def1.0.snapshot b/compiler/test/__snapshots__/loops.0a25def1.0.snapshot index c267824de7..6d37ef4a26 100644 --- a/compiler/test/__snapshots__/loops.0a25def1.0.snapshot +++ b/compiler/test/__snapshots__/loops.0a25def1.0.snapshot @@ -18,13 +18,13 @@ loops › loop2 (import \"GRAIN$MODULE$pervasives\" \">\" (func $gimport_pervasives_> (param i32 i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"-\" (func $gimport_pervasives_- (param i32 i32 i32) (result i32))) - (global $global_1 (mut i32) (i32.const 0)) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_3 i32 (i32.const 0)) + (global $count_1132 (mut i32) (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_3)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -48,13 +48,13 @@ loops › loop2 (local.get $0) (i32.const 25) ) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -76,13 +76,13 @@ loops › loop2 (local.get $0) (i32.const 1) ) - (global.set $global_1 + (global.set $count_1132 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_1) + (global.get $count_1132) ) ) ) @@ -96,7 +96,7 @@ loops › loop2 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) (i32.load offset=8 - (global.get $global_0) + (global.get $b_1131) ) ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef @@ -133,7 +133,7 @@ loops › loop2 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) (i32.load offset=8 - (global.get $global_0) + (global.get $b_1131) ) ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef @@ -165,7 +165,7 @@ loops › loop2 ) ) (i32.store offset=8 - (global.get $global_0) + (global.get $b_1131) (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -175,7 +175,7 @@ loops › loop2 (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (i32.load offset=8 - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -187,7 +187,7 @@ loops › loop2 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) (i32.load offset=8 - (global.get $global_1) + (global.get $count_1132) ) ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef @@ -219,7 +219,7 @@ loops › loop2 ) ) (i32.store offset=8 - (global.get $global_1) + (global.get $count_1132) (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -229,7 +229,7 @@ loops › loop2 (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (i32.load offset=8 - (global.get $global_1) + (global.get $count_1132) ) ) ) @@ -243,7 +243,7 @@ loops › loop2 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) (i32.load offset=8 - (global.get $global_1) + (global.get $count_1132) ) ) ) diff --git a/compiler/test/__snapshots__/loops.0fafc5f0.0.snapshot b/compiler/test/__snapshots__/loops.0fafc5f0.0.snapshot index 0cd2964c1d..c1f117280b 100644 --- a/compiler/test/__snapshots__/loops.0fafc5f0.0.snapshot +++ b/compiler/test/__snapshots__/loops.0fafc5f0.0.snapshot @@ -16,34 +16,34 @@ loops › loop5 (import \"GRAIN$MODULE$pervasives\" \">=\" (func $gimport_pervasives_>= (param i32 i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"-\" (func $gimport_pervasives_- (param i32 i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_1 (mut i32) (i32.const 0)) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_3 i32 (i32.const 0)) + (global $count_1132 (mut i32) (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_3)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (i32.const 25) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) ) - (global.set $global_1 + (global.set $count_1132 (tuple.extract 0 (tuple.make (i32.const 1) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_1) + (global.get $count_1132) ) ) ) @@ -61,7 +61,7 @@ loops › loop5 ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) (i32.const 3) ) @@ -72,7 +72,7 @@ loops › loop5 ) ) ) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -81,7 +81,7 @@ loops › loop5 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -98,7 +98,7 @@ loops › loop5 ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) (i32.const 1) ) @@ -117,7 +117,7 @@ loops › loop5 ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_1) + (global.get $count_1132) ) (i32.const 3) ) @@ -128,7 +128,7 @@ loops › loop5 ) ) ) - (global.set $global_1 + (global.set $count_1132 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -137,7 +137,7 @@ loops › loop5 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_1) + (global.get $count_1132) ) ) ) @@ -149,7 +149,7 @@ loops › loop5 (local.set $1 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_1) + (global.get $count_1132) ) ) (drop diff --git a/compiler/test/__snapshots__/loops.c2b7bfc6.0.snapshot b/compiler/test/__snapshots__/loops.c2b7bfc6.0.snapshot index ba3c97e428..aa5c57209f 100644 --- a/compiler/test/__snapshots__/loops.c2b7bfc6.0.snapshot +++ b/compiler/test/__snapshots__/loops.c2b7bfc6.0.snapshot @@ -14,22 +14,22 @@ loops › loop3 (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \">\" (func $gimport_pervasives_> (param i32 i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"-\" (func $gimport_pervasives_- (param i32 i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (i32.const 7) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -45,7 +45,7 @@ loops › loop3 ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) (i32.const 1) ) @@ -62,7 +62,7 @@ loops › loop3 ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) (i32.const 3) ) @@ -73,7 +73,7 @@ loops › loop3 ) ) ) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -82,7 +82,7 @@ loops › loop3 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -96,7 +96,7 @@ loops › loop3 (local.set $1 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) ) (drop diff --git a/compiler/test/__snapshots__/loops.f1c03b79.0.snapshot b/compiler/test/__snapshots__/loops.f1c03b79.0.snapshot index 7499c6bfe0..00c759f7a1 100644 --- a/compiler/test/__snapshots__/loops.f1c03b79.0.snapshot +++ b/compiler/test/__snapshots__/loops.f1c03b79.0.snapshot @@ -16,35 +16,35 @@ loops › loop4 (import \"GRAIN$MODULE$pervasives\" \">\" (func $gimport_pervasives_> (param i32 i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"-\" (func $gimport_pervasives_- (param i32 i32 i32) (result i32))) - (global $global_1 (mut i32) (i32.const 0)) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_3 i32 (i32.const 0)) + (global $count_1132 (mut i32) (i32.const 0)) + (global $b_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_3)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (i32.const 25) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) ) - (global.set $global_1 + (global.set $count_1132 (tuple.extract 0 (tuple.make (i32.const 1) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_1) + (global.get $count_1132) ) ) ) @@ -60,7 +60,7 @@ loops › loop4 ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) (i32.const 1) ) @@ -77,7 +77,7 @@ loops › loop4 ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $b_1131) ) (i32.const 3) ) @@ -88,7 +88,7 @@ loops › loop4 ) ) ) - (global.set $global_0 + (global.set $b_1131 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -97,7 +97,7 @@ loops › loop4 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $b_1131) ) ) ) @@ -112,7 +112,7 @@ loops › loop4 ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_1) + (global.get $count_1132) ) (i32.const 3) ) @@ -123,7 +123,7 @@ loops › loop4 ) ) ) - (global.set $global_1 + (global.set $count_1132 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -132,7 +132,7 @@ loops › loop4 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_1) + (global.get $count_1132) ) ) ) @@ -146,7 +146,7 @@ loops › loop4 (local.set $2 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_1) + (global.get $count_1132) ) ) (drop diff --git a/compiler/test/__snapshots__/optimizations.d72b00c6.0.snapshot b/compiler/test/__snapshots__/optimizations.d72b00c6.0.snapshot index 8fd85ccc98..2f11ea3904 100644 --- a/compiler/test/__snapshots__/optimizations.d72b00c6.0.snapshot +++ b/compiler/test/__snapshots__/optimizations.d72b00c6.0.snapshot @@ -11,12 +11,12 @@ optimizations › trs1 (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $f1_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -41,13 +41,13 @@ optimizations › trs1 (local.get $0) (i32.const 0) ) - (global.set $global_0 + (global.set $f1_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $f1_1131) ) ) ) @@ -55,7 +55,7 @@ optimizations › trs1 (local.set $0 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $f1_1131) ) ) (local.set $1 diff --git a/compiler/test/__snapshots__/optimizations.ff6d5bfb.0.snapshot b/compiler/test/__snapshots__/optimizations.ff6d5bfb.0.snapshot index 0960cb84fa..9ca42f1705 100644 --- a/compiler/test/__snapshots__/optimizations.ff6d5bfb.0.snapshot +++ b/compiler/test/__snapshots__/optimizations.ff6d5bfb.0.snapshot @@ -14,13 +14,13 @@ optimizations › test_dead_branch_elimination_5 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_1 (mut i32) (i32.const 0)) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_3 i32 (i32.const 0)) + (global $y_1132 (mut i32) (i32.const 0)) + (global $x_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_3)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -42,13 +42,13 @@ optimizations › test_dead_branch_elimination_5 (local.get $0) (i32.const 3) ) - (global.set $global_0 + (global.set $x_1131 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $x_1131) ) ) ) @@ -70,40 +70,40 @@ optimizations › test_dead_branch_elimination_5 (local.get $0) (i32.const 5) ) - (global.set $global_1 + (global.set $y_1132 (tuple.extract 0 (tuple.make (local.get $0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_1) + (global.get $y_1132) ) ) ) ) (i32.store offset=8 - (global.get $global_0) + (global.get $x_1131) (tuple.extract 0 (tuple.make (i32.const 7) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (i32.load offset=8 - (global.get $global_0) + (global.get $x_1131) ) ) ) ) ) (i32.store offset=8 - (global.get $global_1) + (global.get $y_1132) (tuple.extract 0 (tuple.make (i32.const 9) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (i32.load offset=8 - (global.get $global_1) + (global.get $y_1132) ) ) ) @@ -115,7 +115,7 @@ optimizations › test_dead_branch_elimination_5 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) (i32.load offset=8 - (global.get $global_0) + (global.get $x_1131) ) ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef @@ -131,7 +131,7 @@ optimizations › test_dead_branch_elimination_5 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) (i32.load offset=8 - (global.get $global_1) + (global.get $y_1132) ) ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef diff --git a/compiler/test/__snapshots__/pattern_matching.0539d13e.0.snapshot b/compiler/test/__snapshots__/pattern_matching.0539d13e.0.snapshot index e82ddfcb99..5122b1bd35 100644 --- a/compiler/test/__snapshots__/pattern_matching.0539d13e.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.0539d13e.0.snapshot @@ -15,11 +15,11 @@ pattern matching › record_match_3 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.05b60a1e.0.snapshot b/compiler/test/__snapshots__/pattern_matching.05b60a1e.0.snapshot index fea9f1adc5..7cf5e6a2e2 100644 --- a/compiler/test/__snapshots__/pattern_matching.05b60a1e.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.05b60a1e.0.snapshot @@ -16,11 +16,11 @@ pattern matching › adt_match_deep (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"[...]\" (func $gimport_pervasives_[...] (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.0ad4ac05.0.snapshot b/compiler/test/__snapshots__/pattern_matching.0ad4ac05.0.snapshot index 4ff17b5852..3d43e2188c 100644 --- a/compiler/test/__snapshots__/pattern_matching.0ad4ac05.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.0ad4ac05.0.snapshot @@ -17,11 +17,11 @@ pattern matching › tuple_match_deep4 (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"[...]\" (func $gimport_pervasives_[...] (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.0bb6923e.0.snapshot b/compiler/test/__snapshots__/pattern_matching.0bb6923e.0.snapshot index 817538a58d..2226895a69 100644 --- a/compiler/test/__snapshots__/pattern_matching.0bb6923e.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.0bb6923e.0.snapshot @@ -15,11 +15,11 @@ pattern matching › adt_match_4 (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"[...]\" (func $gimport_pervasives_[...] (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.14dc7554.0.snapshot b/compiler/test/__snapshots__/pattern_matching.14dc7554.0.snapshot index 23873d59ce..a8d883927e 100644 --- a/compiler/test/__snapshots__/pattern_matching.14dc7554.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.14dc7554.0.snapshot @@ -12,11 +12,11 @@ pattern matching › record_match_2 (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.16cd197e.0.snapshot b/compiler/test/__snapshots__/pattern_matching.16cd197e.0.snapshot index 110f8039ac..11f042435a 100644 --- a/compiler/test/__snapshots__/pattern_matching.16cd197e.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.16cd197e.0.snapshot @@ -14,11 +14,11 @@ pattern matching › constant_match_3 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/equal\" \"equal\" (func $wimport_GRAIN$MODULE$runtime/equal_equal (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.16eb3dbf.0.snapshot b/compiler/test/__snapshots__/pattern_matching.16eb3dbf.0.snapshot index 8ed8b0fd18..f0fb3f1011 100644 --- a/compiler/test/__snapshots__/pattern_matching.16eb3dbf.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.16eb3dbf.0.snapshot @@ -14,11 +14,11 @@ pattern matching › guarded_match_2 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"==\" (func $gimport_pervasives_== (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.3722b060.0.snapshot b/compiler/test/__snapshots__/pattern_matching.3722b060.0.snapshot index 5c62f94cfb..44d20c70b3 100644 --- a/compiler/test/__snapshots__/pattern_matching.3722b060.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.3722b060.0.snapshot @@ -14,11 +14,11 @@ pattern matching › tuple_match_deep (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.46f91987.0.snapshot b/compiler/test/__snapshots__/pattern_matching.46f91987.0.snapshot index d7a09f4659..c3a5096786 100644 --- a/compiler/test/__snapshots__/pattern_matching.46f91987.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.46f91987.0.snapshot @@ -12,11 +12,11 @@ pattern matching › record_match_1 (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.5b158103.0.snapshot b/compiler/test/__snapshots__/pattern_matching.5b158103.0.snapshot index 260a18321b..1dde060837 100644 --- a/compiler/test/__snapshots__/pattern_matching.5b158103.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.5b158103.0.snapshot @@ -14,11 +14,11 @@ pattern matching › constant_match_2 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/equal\" \"equal\" (func $wimport_GRAIN$MODULE$runtime/equal_equal (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.5b6ff2d3.0.snapshot b/compiler/test/__snapshots__/pattern_matching.5b6ff2d3.0.snapshot index 52c1bee5dc..f94a79a6e4 100644 --- a/compiler/test/__snapshots__/pattern_matching.5b6ff2d3.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.5b6ff2d3.0.snapshot @@ -15,11 +15,11 @@ pattern matching › alias_match_5 (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/equal\" \"equal\" (func $wimport_GRAIN$MODULE$runtime/equal_equal (param i32 i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"Some\" (func $gimport_pervasives_Some (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.5ff49e44.0.snapshot b/compiler/test/__snapshots__/pattern_matching.5ff49e44.0.snapshot index 66679c2ae2..e374b9dbb9 100644 --- a/compiler/test/__snapshots__/pattern_matching.5ff49e44.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.5ff49e44.0.snapshot @@ -15,11 +15,11 @@ pattern matching › record_match_4 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.64686134.0.snapshot b/compiler/test/__snapshots__/pattern_matching.64686134.0.snapshot index fb4eb4afc8..61fe0fd5d3 100644 --- a/compiler/test/__snapshots__/pattern_matching.64686134.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.64686134.0.snapshot @@ -14,11 +14,11 @@ pattern matching › constant_match_1 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/equal\" \"equal\" (func $wimport_GRAIN$MODULE$runtime/equal_equal (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.702ed9b0.0.snapshot b/compiler/test/__snapshots__/pattern_matching.702ed9b0.0.snapshot index bc7ed7f9fa..1763077531 100644 --- a/compiler/test/__snapshots__/pattern_matching.702ed9b0.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.702ed9b0.0.snapshot @@ -17,11 +17,11 @@ pattern matching › tuple_match_deep6 (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"[...]\" (func $gimport_pervasives_[...] (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.7082d3ca.0.snapshot b/compiler/test/__snapshots__/pattern_matching.7082d3ca.0.snapshot index 4103dd434c..3f37d90d02 100644 --- a/compiler/test/__snapshots__/pattern_matching.7082d3ca.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.7082d3ca.0.snapshot @@ -11,11 +11,11 @@ pattern matching › tuple_match_3 (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.79346fef.0.snapshot b/compiler/test/__snapshots__/pattern_matching.79346fef.0.snapshot index c22ae92bf8..b133c2c61c 100644 --- a/compiler/test/__snapshots__/pattern_matching.79346fef.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.79346fef.0.snapshot @@ -15,11 +15,11 @@ pattern matching › tuple_match_deep3 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.7f7fe4ef.0.snapshot b/compiler/test/__snapshots__/pattern_matching.7f7fe4ef.0.snapshot index 9ffa69a4d1..7aeaa67bba 100644 --- a/compiler/test/__snapshots__/pattern_matching.7f7fe4ef.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.7f7fe4ef.0.snapshot @@ -4,11 +4,11 @@ pattern matching › alias_match_1 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const -2) ) diff --git a/compiler/test/__snapshots__/pattern_matching.8614dff3.0.snapshot b/compiler/test/__snapshots__/pattern_matching.8614dff3.0.snapshot index ae66d9b0df..cb833cfc81 100644 --- a/compiler/test/__snapshots__/pattern_matching.8614dff3.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.8614dff3.0.snapshot @@ -4,11 +4,11 @@ pattern matching › alias_match_2 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (select diff --git a/compiler/test/__snapshots__/pattern_matching.8c0dc67a.0.snapshot b/compiler/test/__snapshots__/pattern_matching.8c0dc67a.0.snapshot index d840881c29..14969c9d2b 100644 --- a/compiler/test/__snapshots__/pattern_matching.8c0dc67a.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.8c0dc67a.0.snapshot @@ -13,11 +13,11 @@ pattern matching › adt_match_1 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.9561763b.0.snapshot b/compiler/test/__snapshots__/pattern_matching.9561763b.0.snapshot index d6091652bb..d1bb317b55 100644 --- a/compiler/test/__snapshots__/pattern_matching.9561763b.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.9561763b.0.snapshot @@ -14,11 +14,11 @@ pattern matching › tuple_match_deep2 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.98756c45.0.snapshot b/compiler/test/__snapshots__/pattern_matching.98756c45.0.snapshot index bd61a7efa8..4f59959fa0 100644 --- a/compiler/test/__snapshots__/pattern_matching.98756c45.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.98756c45.0.snapshot @@ -12,11 +12,11 @@ pattern matching › record_match_deep (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.aa8d2963.0.snapshot b/compiler/test/__snapshots__/pattern_matching.aa8d2963.0.snapshot index 07785d5fe6..2762d2b9f0 100644 --- a/compiler/test/__snapshots__/pattern_matching.aa8d2963.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.aa8d2963.0.snapshot @@ -14,11 +14,11 @@ pattern matching › guarded_match_4 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"==\" (func $gimport_pervasives_== (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.ac58ffc3.0.snapshot b/compiler/test/__snapshots__/pattern_matching.ac58ffc3.0.snapshot index 042a7f78b1..e3a585b834 100644 --- a/compiler/test/__snapshots__/pattern_matching.ac58ffc3.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.ac58ffc3.0.snapshot @@ -14,11 +14,11 @@ pattern matching › guarded_match_1 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"==\" (func $gimport_pervasives_== (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.b1b060ad.0.snapshot b/compiler/test/__snapshots__/pattern_matching.b1b060ad.0.snapshot index 4b17b98050..7349853588 100644 --- a/compiler/test/__snapshots__/pattern_matching.b1b060ad.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.b1b060ad.0.snapshot @@ -15,11 +15,11 @@ pattern matching › adt_match_2 (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"[...]\" (func $gimport_pervasives_[...] (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.b9db0dd9.0.snapshot b/compiler/test/__snapshots__/pattern_matching.b9db0dd9.0.snapshot index 8964000717..3408074bbf 100644 --- a/compiler/test/__snapshots__/pattern_matching.b9db0dd9.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.b9db0dd9.0.snapshot @@ -14,11 +14,11 @@ pattern matching › guarded_match_3 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"==\" (func $gimport_pervasives_== (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.c91eac29.0.snapshot b/compiler/test/__snapshots__/pattern_matching.c91eac29.0.snapshot index 87b41f7d2e..89c3938180 100644 --- a/compiler/test/__snapshots__/pattern_matching.c91eac29.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.c91eac29.0.snapshot @@ -15,11 +15,11 @@ pattern matching › adt_match_3 (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"[...]\" (func $gimport_pervasives_[...] (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.c9582b6d.0.snapshot b/compiler/test/__snapshots__/pattern_matching.c9582b6d.0.snapshot index 9b0bac2547..6cdc8e9422 100644 --- a/compiler/test/__snapshots__/pattern_matching.c9582b6d.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.c9582b6d.0.snapshot @@ -14,11 +14,11 @@ pattern matching › alias_match_4 (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/equal\" \"equal\" (func $wimport_GRAIN$MODULE$runtime/equal_equal (param i32 i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"Some\" (func $gimport_pervasives_Some (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.d048ece0.0.snapshot b/compiler/test/__snapshots__/pattern_matching.d048ece0.0.snapshot index 30e003ccc1..78ef02a978 100644 --- a/compiler/test/__snapshots__/pattern_matching.d048ece0.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.d048ece0.0.snapshot @@ -15,11 +15,11 @@ pattern matching › adt_match_5 (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"[...]\" (func $gimport_pervasives_[...] (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.e41ad64e.0.snapshot b/compiler/test/__snapshots__/pattern_matching.e41ad64e.0.snapshot index f09b32fc3f..afa1ecb003 100644 --- a/compiler/test/__snapshots__/pattern_matching.e41ad64e.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.e41ad64e.0.snapshot @@ -17,11 +17,11 @@ pattern matching › tuple_match_deep5 (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"[...]\" (func $gimport_pervasives_[...] (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.eb4334e1.0.snapshot b/compiler/test/__snapshots__/pattern_matching.eb4334e1.0.snapshot index eac8837bed..0c1c2f69ee 100644 --- a/compiler/test/__snapshots__/pattern_matching.eb4334e1.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.eb4334e1.0.snapshot @@ -16,11 +16,11 @@ pattern matching › constant_match_4 (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/equal\" \"equal\" (func $wimport_GRAIN$MODULE$runtime/equal_equal (param i32 i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"==\" (func $gimport_pervasives_== (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.f0c08ea4.0.snapshot b/compiler/test/__snapshots__/pattern_matching.f0c08ea4.0.snapshot index ffa5e1dfb2..ad18dd2182 100644 --- a/compiler/test/__snapshots__/pattern_matching.f0c08ea4.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.f0c08ea4.0.snapshot @@ -17,11 +17,11 @@ pattern matching › tuple_match_deep7 (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"[...]\" (func $gimport_pervasives_[...] (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.f25e0163.0.snapshot b/compiler/test/__snapshots__/pattern_matching.f25e0163.0.snapshot index 41ce0f4744..bcbabd23b0 100644 --- a/compiler/test/__snapshots__/pattern_matching.f25e0163.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.f25e0163.0.snapshot @@ -13,11 +13,11 @@ pattern matching › or_match_3 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"[...]\" (func $gimport_pervasives_[...] (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/pattern_matching.f3d48b0e.0.snapshot b/compiler/test/__snapshots__/pattern_matching.f3d48b0e.0.snapshot index cc417ccf0c..5d5a6d5bc3 100644 --- a/compiler/test/__snapshots__/pattern_matching.f3d48b0e.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.f3d48b0e.0.snapshot @@ -4,11 +4,11 @@ pattern matching › or_match_1 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 7) ) diff --git a/compiler/test/__snapshots__/pattern_matching.f6c9c89c.0.snapshot b/compiler/test/__snapshots__/pattern_matching.f6c9c89c.0.snapshot index b44a619e0f..c0b613c732 100644 --- a/compiler/test/__snapshots__/pattern_matching.f6c9c89c.0.snapshot +++ b/compiler/test/__snapshots__/pattern_matching.f6c9c89c.0.snapshot @@ -14,11 +14,11 @@ pattern matching › or_match_2 (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/equal\" \"equal\" (func $wimport_GRAIN$MODULE$runtime/equal_equal (param i32 i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"Some\" (func $gimport_pervasives_Some (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/records.02742729.0.snapshot b/compiler/test/__snapshots__/records.02742729.0.snapshot index 7545fbe7aa..0ccf056e31 100644 --- a/compiler/test/__snapshots__/records.02742729.0.snapshot +++ b/compiler/test/__snapshots__/records.02742729.0.snapshot @@ -15,11 +15,11 @@ records › record_get_multiple (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/records.02af5946.0.snapshot b/compiler/test/__snapshots__/records.02af5946.0.snapshot index c46fdb2968..e16c8f6272 100644 --- a/compiler/test/__snapshots__/records.02af5946.0.snapshot +++ b/compiler/test/__snapshots__/records.02af5946.0.snapshot @@ -8,11 +8,11 @@ records › record_definition_trailing (import \"_grainEnv\" \"moduleRuntimeId\" (global $wimport__grainEnv_moduleRuntimeId i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store diff --git a/compiler/test/__snapshots__/records.2dc39420.0.snapshot b/compiler/test/__snapshots__/records.2dc39420.0.snapshot index 4f7d91f425..c3cd007cfa 100644 --- a/compiler/test/__snapshots__/records.2dc39420.0.snapshot +++ b/compiler/test/__snapshots__/records.2dc39420.0.snapshot @@ -8,11 +8,11 @@ records › record_pun (import \"_grainEnv\" \"moduleRuntimeId\" (global $wimport__grainEnv_moduleRuntimeId i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store diff --git a/compiler/test/__snapshots__/records.49dfc6ff.0.snapshot b/compiler/test/__snapshots__/records.49dfc6ff.0.snapshot index 85ac9cf107..0cc5ec032e 100644 --- a/compiler/test/__snapshots__/records.49dfc6ff.0.snapshot +++ b/compiler/test/__snapshots__/records.49dfc6ff.0.snapshot @@ -12,12 +12,12 @@ records › record_destruct_1 (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $foo_1132 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -167,13 +167,13 @@ records › record_destruct_1 ) ) ) - (global.set $global_0 + (global.set $foo_1132 (tuple.extract 0 (tuple.make (i32.const 0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $foo_1132) ) ) ) @@ -198,7 +198,7 @@ records › record_destruct_1 (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (block (result i32) - (global.set $global_0 + (global.set $foo_1132 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -207,7 +207,7 @@ records › record_destruct_1 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $foo_1132) ) ) ) @@ -219,7 +219,7 @@ records › record_destruct_1 (local.set $3 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $foo_1132) ) ) (drop diff --git a/compiler/test/__snapshots__/records.54f5977c.0.snapshot b/compiler/test/__snapshots__/records.54f5977c.0.snapshot index 755a01eccf..10ca52a460 100644 --- a/compiler/test/__snapshots__/records.54f5977c.0.snapshot +++ b/compiler/test/__snapshots__/records.54f5977c.0.snapshot @@ -15,14 +15,14 @@ records › record_destruct_4 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_1 (mut i32) (i32.const 0)) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 (mut i32) (i32.const 0)) - (global $global_4 i32 (i32.const 0)) + (global $bar_1133 (mut i32) (i32.const 0)) + (global $foo_1132 (mut i32) (i32.const 0)) + (global $baz_1134 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_4)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -143,35 +143,35 @@ records › record_destruct_4 ) ) ) - (global.set $global_0 + (global.set $foo_1132 (tuple.extract 0 (tuple.make (i32.const 0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $foo_1132) ) ) ) ) - (global.set $global_1 + (global.set $bar_1133 (tuple.extract 0 (tuple.make (i32.const 0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_1) + (global.get $bar_1133) ) ) ) ) - (global.set $global_2 + (global.set $baz_1134 (tuple.extract 0 (tuple.make (i32.const 0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_2) + (global.get $baz_1134) ) ) ) @@ -228,7 +228,7 @@ records › record_destruct_4 (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (block (result i32) - (global.set $global_2 + (global.set $baz_1134 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -237,7 +237,7 @@ records › record_destruct_4 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_2) + (global.get $baz_1134) ) ) ) @@ -250,7 +250,7 @@ records › record_destruct_4 (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (block (result i32) - (global.set $global_1 + (global.set $bar_1133 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -259,7 +259,7 @@ records › record_destruct_4 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_1) + (global.get $bar_1133) ) ) ) @@ -272,7 +272,7 @@ records › record_destruct_4 (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (block (result i32) - (global.set $global_0 + (global.set $foo_1132 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -281,7 +281,7 @@ records › record_destruct_4 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $foo_1132) ) ) ) @@ -300,11 +300,11 @@ records › record_destruct_4 ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $foo_1132) ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_1) + (global.get $bar_1133) ) ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef @@ -326,7 +326,7 @@ records › record_destruct_4 ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_2) + (global.get $baz_1134) ) ) ) diff --git a/compiler/test/__snapshots__/records.5f340064.0.snapshot b/compiler/test/__snapshots__/records.5f340064.0.snapshot index 823598dc0d..1bb9006e26 100644 --- a/compiler/test/__snapshots__/records.5f340064.0.snapshot +++ b/compiler/test/__snapshots__/records.5f340064.0.snapshot @@ -8,11 +8,11 @@ records › record_value_trailing (import \"_grainEnv\" \"moduleRuntimeId\" (global $wimport__grainEnv_moduleRuntimeId i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store diff --git a/compiler/test/__snapshots__/records.60c0a141.0.snapshot b/compiler/test/__snapshots__/records.60c0a141.0.snapshot index 59387867d3..b79c747ea9 100644 --- a/compiler/test/__snapshots__/records.60c0a141.0.snapshot +++ b/compiler/test/__snapshots__/records.60c0a141.0.snapshot @@ -15,11 +15,11 @@ records › record_recursive_data_definition (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"Some\" (func $gimport_pervasives_Some (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/records.60c7acc4.0.snapshot b/compiler/test/__snapshots__/records.60c7acc4.0.snapshot index cf8de959a1..88eb2c98ba 100644 --- a/compiler/test/__snapshots__/records.60c7acc4.0.snapshot +++ b/compiler/test/__snapshots__/records.60c7acc4.0.snapshot @@ -8,11 +8,11 @@ records › record_pun_mixed_trailing (import \"_grainEnv\" \"moduleRuntimeId\" (global $wimport__grainEnv_moduleRuntimeId i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store diff --git a/compiler/test/__snapshots__/records.63a951b8.0.snapshot b/compiler/test/__snapshots__/records.63a951b8.0.snapshot index adf9d2a80e..b4a799b91e 100644 --- a/compiler/test/__snapshots__/records.63a951b8.0.snapshot +++ b/compiler/test/__snapshots__/records.63a951b8.0.snapshot @@ -12,12 +12,12 @@ records › record_destruct_2 (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $bar_1132 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -167,13 +167,13 @@ records › record_destruct_2 ) ) ) - (global.set $global_0 + (global.set $bar_1132 (tuple.extract 0 (tuple.make (i32.const 0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $bar_1132) ) ) ) @@ -198,7 +198,7 @@ records › record_destruct_2 (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (block (result i32) - (global.set $global_0 + (global.set $bar_1132 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -207,7 +207,7 @@ records › record_destruct_2 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $bar_1132) ) ) ) @@ -219,7 +219,7 @@ records › record_destruct_2 (local.set $3 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $bar_1132) ) ) (drop diff --git a/compiler/test/__snapshots__/records.89d08e01.0.snapshot b/compiler/test/__snapshots__/records.89d08e01.0.snapshot index e15285b13a..1843cc625d 100644 --- a/compiler/test/__snapshots__/records.89d08e01.0.snapshot +++ b/compiler/test/__snapshots__/records.89d08e01.0.snapshot @@ -8,11 +8,11 @@ records › record_pun_trailing (import \"_grainEnv\" \"moduleRuntimeId\" (global $wimport__grainEnv_moduleRuntimeId i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store diff --git a/compiler/test/__snapshots__/records.98824516.0.snapshot b/compiler/test/__snapshots__/records.98824516.0.snapshot index d4c06d5157..2413783c92 100644 --- a/compiler/test/__snapshots__/records.98824516.0.snapshot +++ b/compiler/test/__snapshots__/records.98824516.0.snapshot @@ -12,12 +12,12 @@ records › record_destruct_deep (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 i32 (i32.const 0)) + (global $foo_1133 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_2)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -166,13 +166,13 @@ records › record_destruct_deep ) ) ) - (global.set $global_0 + (global.set $foo_1133 (tuple.extract 0 (tuple.make (i32.const 0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $foo_1133) ) ) ) @@ -213,7 +213,7 @@ records › record_destruct_deep (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (block (result i32) - (global.set $global_0 + (global.set $foo_1133 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -222,7 +222,7 @@ records › record_destruct_deep ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $foo_1133) ) ) ) @@ -234,7 +234,7 @@ records › record_destruct_deep (local.set $4 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $foo_1133) ) ) (drop diff --git a/compiler/test/__snapshots__/records.a3299dd2.0.snapshot b/compiler/test/__snapshots__/records.a3299dd2.0.snapshot index c853fa39a6..841a888ec8 100644 --- a/compiler/test/__snapshots__/records.a3299dd2.0.snapshot +++ b/compiler/test/__snapshots__/records.a3299dd2.0.snapshot @@ -15,13 +15,13 @@ records › record_destruct_3 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_1 (mut i32) (i32.const 0)) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_3 i32 (i32.const 0)) + (global $bar_1133 (mut i32) (i32.const 0)) + (global $foo_1132 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_3)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -140,24 +140,24 @@ records › record_destruct_3 ) ) ) - (global.set $global_0 + (global.set $foo_1132 (tuple.extract 0 (tuple.make (i32.const 0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $foo_1132) ) ) ) ) - (global.set $global_1 + (global.set $bar_1133 (tuple.extract 0 (tuple.make (i32.const 0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_1) + (global.get $bar_1133) ) ) ) @@ -198,7 +198,7 @@ records › record_destruct_3 (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (block (result i32) - (global.set $global_1 + (global.set $bar_1133 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -207,7 +207,7 @@ records › record_destruct_3 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_1) + (global.get $bar_1133) ) ) ) @@ -220,7 +220,7 @@ records › record_destruct_3 (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (block (result i32) - (global.set $global_0 + (global.set $foo_1132 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -229,7 +229,7 @@ records › record_destruct_3 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $foo_1132) ) ) ) @@ -246,11 +246,11 @@ records › record_destruct_3 ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $foo_1132) ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_1) + (global.get $bar_1133) ) ) ) diff --git a/compiler/test/__snapshots__/records.a702778a.0.snapshot b/compiler/test/__snapshots__/records.a702778a.0.snapshot index 0db8d72eac..dc0a2a0070 100644 --- a/compiler/test/__snapshots__/records.a702778a.0.snapshot +++ b/compiler/test/__snapshots__/records.a702778a.0.snapshot @@ -12,11 +12,11 @@ records › record_get_multilevel (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/records.a9c472b1.0.snapshot b/compiler/test/__snapshots__/records.a9c472b1.0.snapshot index f1615f1933..3354443d98 100644 --- a/compiler/test/__snapshots__/records.a9c472b1.0.snapshot +++ b/compiler/test/__snapshots__/records.a9c472b1.0.snapshot @@ -12,11 +12,11 @@ records › record_multiple_fields_definition_trailing (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/records.b50d234d.0.snapshot b/compiler/test/__snapshots__/records.b50d234d.0.snapshot index db1f14bbcf..6d80a6a00f 100644 --- a/compiler/test/__snapshots__/records.b50d234d.0.snapshot +++ b/compiler/test/__snapshots__/records.b50d234d.0.snapshot @@ -12,11 +12,11 @@ records › record_get_2 (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/records.d34c4740.0.snapshot b/compiler/test/__snapshots__/records.d34c4740.0.snapshot index d59df39299..cc820bd9f4 100644 --- a/compiler/test/__snapshots__/records.d34c4740.0.snapshot +++ b/compiler/test/__snapshots__/records.d34c4740.0.snapshot @@ -8,11 +8,11 @@ records › record_pun_mixed (import \"_grainEnv\" \"moduleRuntimeId\" (global $wimport__grainEnv_moduleRuntimeId i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store diff --git a/compiler/test/__snapshots__/records.d393173c.0.snapshot b/compiler/test/__snapshots__/records.d393173c.0.snapshot index 5a41de1019..15780d43a9 100644 --- a/compiler/test/__snapshots__/records.d393173c.0.snapshot +++ b/compiler/test/__snapshots__/records.d393173c.0.snapshot @@ -15,14 +15,14 @@ records › record_destruct_trailing (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"+\" (func $gimport_pervasives_+ (param i32 i32 i32) (result i32))) - (global $global_1 (mut i32) (i32.const 0)) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 (mut i32) (i32.const 0)) - (global $global_4 i32 (i32.const 0)) + (global $bar_1133 (mut i32) (i32.const 0)) + (global $foo_1132 (mut i32) (i32.const 0)) + (global $baz_1134 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_4)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -143,35 +143,35 @@ records › record_destruct_trailing ) ) ) - (global.set $global_0 + (global.set $foo_1132 (tuple.extract 0 (tuple.make (i32.const 0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $foo_1132) ) ) ) ) - (global.set $global_1 + (global.set $bar_1133 (tuple.extract 0 (tuple.make (i32.const 0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_1) + (global.get $bar_1133) ) ) ) ) - (global.set $global_2 + (global.set $baz_1134 (tuple.extract 0 (tuple.make (i32.const 0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_2) + (global.get $baz_1134) ) ) ) @@ -228,7 +228,7 @@ records › record_destruct_trailing (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (block (result i32) - (global.set $global_2 + (global.set $baz_1134 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -237,7 +237,7 @@ records › record_destruct_trailing ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_2) + (global.get $baz_1134) ) ) ) @@ -250,7 +250,7 @@ records › record_destruct_trailing (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (block (result i32) - (global.set $global_1 + (global.set $bar_1133 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -259,7 +259,7 @@ records › record_destruct_trailing ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_1) + (global.get $bar_1133) ) ) ) @@ -272,7 +272,7 @@ records › record_destruct_trailing (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (block (result i32) - (global.set $global_0 + (global.set $foo_1132 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -281,7 +281,7 @@ records › record_destruct_trailing ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $foo_1132) ) ) ) @@ -300,11 +300,11 @@ records › record_destruct_trailing ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $foo_1132) ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_1) + (global.get $bar_1133) ) ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef @@ -326,7 +326,7 @@ records › record_destruct_trailing ) (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_2) + (global.get $baz_1134) ) ) ) diff --git a/compiler/test/__snapshots__/records.d44e8007.0.snapshot b/compiler/test/__snapshots__/records.d44e8007.0.snapshot index 26283d7e41..e8c25e5da5 100644 --- a/compiler/test/__snapshots__/records.d44e8007.0.snapshot +++ b/compiler/test/__snapshots__/records.d44e8007.0.snapshot @@ -8,11 +8,11 @@ records › record_pun_mixed_2 (import \"_grainEnv\" \"moduleRuntimeId\" (global $wimport__grainEnv_moduleRuntimeId i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store diff --git a/compiler/test/__snapshots__/records.e4326567.0.snapshot b/compiler/test/__snapshots__/records.e4326567.0.snapshot index bae3821234..ba49651f7d 100644 --- a/compiler/test/__snapshots__/records.e4326567.0.snapshot +++ b/compiler/test/__snapshots__/records.e4326567.0.snapshot @@ -12,11 +12,11 @@ records › record_multiple_fields_both_trailing (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/records.e5b56da8.0.snapshot b/compiler/test/__snapshots__/records.e5b56da8.0.snapshot index 50e5cb7cd7..928d077bc3 100644 --- a/compiler/test/__snapshots__/records.e5b56da8.0.snapshot +++ b/compiler/test/__snapshots__/records.e5b56da8.0.snapshot @@ -8,11 +8,11 @@ records › record_both_trailing (import \"_grainEnv\" \"moduleRuntimeId\" (global $wimport__grainEnv_moduleRuntimeId i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store diff --git a/compiler/test/__snapshots__/records.e705a980.0.snapshot b/compiler/test/__snapshots__/records.e705a980.0.snapshot index 5fff56964b..ecdcd99f67 100644 --- a/compiler/test/__snapshots__/records.e705a980.0.snapshot +++ b/compiler/test/__snapshots__/records.e705a980.0.snapshot @@ -8,11 +8,11 @@ records › record_pun_multiple (import \"_grainEnv\" \"moduleRuntimeId\" (global $wimport__grainEnv_moduleRuntimeId i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store diff --git a/compiler/test/__snapshots__/records.f6e43cdb.0.snapshot b/compiler/test/__snapshots__/records.f6e43cdb.0.snapshot index 0d486d2642..3ef7c2b120 100644 --- a/compiler/test/__snapshots__/records.f6e43cdb.0.snapshot +++ b/compiler/test/__snapshots__/records.f6e43cdb.0.snapshot @@ -8,11 +8,11 @@ records › record_pun_multiple_trailing (import \"_grainEnv\" \"moduleRuntimeId\" (global $wimport__grainEnv_moduleRuntimeId i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store diff --git a/compiler/test/__snapshots__/records.f6feee77.0.snapshot b/compiler/test/__snapshots__/records.f6feee77.0.snapshot index 85ed398a51..503575b0d8 100644 --- a/compiler/test/__snapshots__/records.f6feee77.0.snapshot +++ b/compiler/test/__snapshots__/records.f6feee77.0.snapshot @@ -12,11 +12,11 @@ records › record_multiple_fields_value_trailing (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/records.fae50a8e.0.snapshot b/compiler/test/__snapshots__/records.fae50a8e.0.snapshot index 18dc3529fd..524865cc1f 100644 --- a/compiler/test/__snapshots__/records.fae50a8e.0.snapshot +++ b/compiler/test/__snapshots__/records.fae50a8e.0.snapshot @@ -8,11 +8,11 @@ records › record_pun_mixed_2_trailing (import \"_grainEnv\" \"moduleRuntimeId\" (global $wimport__grainEnv_moduleRuntimeId i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store diff --git a/compiler/test/__snapshots__/stdlib.179d20b9.0.snapshot b/compiler/test/__snapshots__/stdlib.179d20b9.0.snapshot index dda08120dc..40257eef10 100644 --- a/compiler/test/__snapshots__/stdlib.179d20b9.0.snapshot +++ b/compiler/test/__snapshots__/stdlib.179d20b9.0.snapshot @@ -4,11 +4,11 @@ stdlib › stdlib_equal_4 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const -2) ) diff --git a/compiler/test/__snapshots__/stdlib.1c0b04b7.0.snapshot b/compiler/test/__snapshots__/stdlib.1c0b04b7.0.snapshot index c78843fc46..fec799f273 100644 --- a/compiler/test/__snapshots__/stdlib.1c0b04b7.0.snapshot +++ b/compiler/test/__snapshots__/stdlib.1c0b04b7.0.snapshot @@ -15,11 +15,11 @@ stdlib › stdlib_equal_20 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"==\" (func $gimport_pervasives_== (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/stdlib.24cb9bbf.0.snapshot b/compiler/test/__snapshots__/stdlib.24cb9bbf.0.snapshot index d81a1845d6..4aea16937f 100644 --- a/compiler/test/__snapshots__/stdlib.24cb9bbf.0.snapshot +++ b/compiler/test/__snapshots__/stdlib.24cb9bbf.0.snapshot @@ -14,11 +14,11 @@ stdlib › stdlib_equal_18 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"==\" (func $gimport_pervasives_== (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/stdlib.323e410a.0.snapshot b/compiler/test/__snapshots__/stdlib.323e410a.0.snapshot index 15c2a23dd1..bbb9522173 100644 --- a/compiler/test/__snapshots__/stdlib.323e410a.0.snapshot +++ b/compiler/test/__snapshots__/stdlib.323e410a.0.snapshot @@ -11,11 +11,11 @@ stdlib › stdlib_equal_1 (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/stdlib.37483d2d.0.snapshot b/compiler/test/__snapshots__/stdlib.37483d2d.0.snapshot index 5c8a4c3228..58c53a6b66 100644 --- a/compiler/test/__snapshots__/stdlib.37483d2d.0.snapshot +++ b/compiler/test/__snapshots__/stdlib.37483d2d.0.snapshot @@ -13,11 +13,11 @@ stdlib › stdlib_cons (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"[...]\" (func $gimport_pervasives_[...] (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/stdlib.4a5061c2.0.snapshot b/compiler/test/__snapshots__/stdlib.4a5061c2.0.snapshot index be379c6228..d18391376e 100644 --- a/compiler/test/__snapshots__/stdlib.4a5061c2.0.snapshot +++ b/compiler/test/__snapshots__/stdlib.4a5061c2.0.snapshot @@ -15,11 +15,11 @@ stdlib › stdlib_equal_19 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"==\" (func $gimport_pervasives_== (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/stdlib.5fe88631.0.snapshot b/compiler/test/__snapshots__/stdlib.5fe88631.0.snapshot index 3babaf5eea..fd7ecf181a 100644 --- a/compiler/test/__snapshots__/stdlib.5fe88631.0.snapshot +++ b/compiler/test/__snapshots__/stdlib.5fe88631.0.snapshot @@ -14,11 +14,11 @@ stdlib › stdlib_equal_16 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"==\" (func $gimport_pervasives_== (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/stdlib.648f406e.0.snapshot b/compiler/test/__snapshots__/stdlib.648f406e.0.snapshot index c27cf8d74d..3448f83b32 100644 --- a/compiler/test/__snapshots__/stdlib.648f406e.0.snapshot +++ b/compiler/test/__snapshots__/stdlib.648f406e.0.snapshot @@ -14,11 +14,11 @@ stdlib › stdlib_equal_12 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"==\" (func $gimport_pervasives_== (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/stdlib.69635cff.0.snapshot b/compiler/test/__snapshots__/stdlib.69635cff.0.snapshot index 09016eaa55..0693e7d745 100644 --- a/compiler/test/__snapshots__/stdlib.69635cff.0.snapshot +++ b/compiler/test/__snapshots__/stdlib.69635cff.0.snapshot @@ -15,11 +15,11 @@ stdlib › stdlib_equal_21 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"==\" (func $gimport_pervasives_== (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/stdlib.6bf88430.0.snapshot b/compiler/test/__snapshots__/stdlib.6bf88430.0.snapshot index b29166c7e8..506e79b9e3 100644 --- a/compiler/test/__snapshots__/stdlib.6bf88430.0.snapshot +++ b/compiler/test/__snapshots__/stdlib.6bf88430.0.snapshot @@ -14,11 +14,11 @@ stdlib › stdlib_equal_15 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"==\" (func $gimport_pervasives_== (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/stdlib.6de47be2.0.snapshot b/compiler/test/__snapshots__/stdlib.6de47be2.0.snapshot index c8598f6899..0ac30c38f8 100644 --- a/compiler/test/__snapshots__/stdlib.6de47be2.0.snapshot +++ b/compiler/test/__snapshots__/stdlib.6de47be2.0.snapshot @@ -14,11 +14,11 @@ stdlib › stdlib_equal_14 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"==\" (func $gimport_pervasives_== (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/stdlib.8300ad7c.0.snapshot b/compiler/test/__snapshots__/stdlib.8300ad7c.0.snapshot index ea7ea985a6..ca6876392f 100644 --- a/compiler/test/__snapshots__/stdlib.8300ad7c.0.snapshot +++ b/compiler/test/__snapshots__/stdlib.8300ad7c.0.snapshot @@ -15,11 +15,11 @@ stdlib › stdlib_equal_3 (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"[...]\" (func $gimport_pervasives_[...] (param i32 i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"==\" (func $gimport_pervasives_== (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/stdlib.91a94037.0.snapshot b/compiler/test/__snapshots__/stdlib.91a94037.0.snapshot index 7d9240aba5..32b492049c 100644 --- a/compiler/test/__snapshots__/stdlib.91a94037.0.snapshot +++ b/compiler/test/__snapshots__/stdlib.91a94037.0.snapshot @@ -14,11 +14,11 @@ stdlib › stdlib_equal_11 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"==\" (func $gimport_pervasives_== (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/stdlib.a70e79ca.0.snapshot b/compiler/test/__snapshots__/stdlib.a70e79ca.0.snapshot index e6095bdba3..12aa3d6bdc 100644 --- a/compiler/test/__snapshots__/stdlib.a70e79ca.0.snapshot +++ b/compiler/test/__snapshots__/stdlib.a70e79ca.0.snapshot @@ -14,11 +14,11 @@ stdlib › stdlib_equal_9 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"==\" (func $gimport_pervasives_== (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/stdlib.b30d7785.0.snapshot b/compiler/test/__snapshots__/stdlib.b30d7785.0.snapshot index 44d1378ef9..19b7adf075 100644 --- a/compiler/test/__snapshots__/stdlib.b30d7785.0.snapshot +++ b/compiler/test/__snapshots__/stdlib.b30d7785.0.snapshot @@ -14,11 +14,11 @@ stdlib › stdlib_equal_2 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"==\" (func $gimport_pervasives_== (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/stdlib.c09a513a.0.snapshot b/compiler/test/__snapshots__/stdlib.c09a513a.0.snapshot index c63c232bdc..9a53844b8e 100644 --- a/compiler/test/__snapshots__/stdlib.c09a513a.0.snapshot +++ b/compiler/test/__snapshots__/stdlib.c09a513a.0.snapshot @@ -4,11 +4,11 @@ stdlib › stdlib_equal_6 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const -2) ) diff --git a/compiler/test/__snapshots__/stdlib.cbf0318e.0.snapshot b/compiler/test/__snapshots__/stdlib.cbf0318e.0.snapshot index 43de0e830a..325c356bfa 100644 --- a/compiler/test/__snapshots__/stdlib.cbf0318e.0.snapshot +++ b/compiler/test/__snapshots__/stdlib.cbf0318e.0.snapshot @@ -15,11 +15,11 @@ stdlib › stdlib_equal_22 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"==\" (func $gimport_pervasives_== (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/stdlib.d28dee65.0.snapshot b/compiler/test/__snapshots__/stdlib.d28dee65.0.snapshot index 566eb82919..958e90a544 100644 --- a/compiler/test/__snapshots__/stdlib.d28dee65.0.snapshot +++ b/compiler/test/__snapshots__/stdlib.d28dee65.0.snapshot @@ -14,11 +14,11 @@ stdlib › stdlib_equal_10 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"==\" (func $gimport_pervasives_== (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/stdlib.d4faa5bf.0.snapshot b/compiler/test/__snapshots__/stdlib.d4faa5bf.0.snapshot index bdb717f05e..3ef82e5d39 100644 --- a/compiler/test/__snapshots__/stdlib.d4faa5bf.0.snapshot +++ b/compiler/test/__snapshots__/stdlib.d4faa5bf.0.snapshot @@ -14,11 +14,11 @@ stdlib › stdlib_equal_13 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"==\" (func $gimport_pervasives_== (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/stdlib.d887bb04.0.snapshot b/compiler/test/__snapshots__/stdlib.d887bb04.0.snapshot index bdcd90e264..c24bebdf88 100644 --- a/compiler/test/__snapshots__/stdlib.d887bb04.0.snapshot +++ b/compiler/test/__snapshots__/stdlib.d887bb04.0.snapshot @@ -4,11 +4,11 @@ stdlib › stdlib_equal_7 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 2147483646) ) diff --git a/compiler/test/__snapshots__/stdlib.dae8b12a.0.snapshot b/compiler/test/__snapshots__/stdlib.dae8b12a.0.snapshot index 15d93fb5a8..82f1fb7b40 100644 --- a/compiler/test/__snapshots__/stdlib.dae8b12a.0.snapshot +++ b/compiler/test/__snapshots__/stdlib.dae8b12a.0.snapshot @@ -4,11 +4,11 @@ stdlib › stdlib_equal_5 (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 2147483646) ) diff --git a/compiler/test/__snapshots__/stdlib.e306600a.0.snapshot b/compiler/test/__snapshots__/stdlib.e306600a.0.snapshot index bd0aba1c06..029ab4c171 100644 --- a/compiler/test/__snapshots__/stdlib.e306600a.0.snapshot +++ b/compiler/test/__snapshots__/stdlib.e306600a.0.snapshot @@ -14,11 +14,11 @@ stdlib › stdlib_equal_8 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"==\" (func $gimport_pervasives_== (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/stdlib.e6349872.0.snapshot b/compiler/test/__snapshots__/stdlib.e6349872.0.snapshot index c1d70e93bf..7f412e9f4f 100644 --- a/compiler/test/__snapshots__/stdlib.e6349872.0.snapshot +++ b/compiler/test/__snapshots__/stdlib.e6349872.0.snapshot @@ -14,11 +14,11 @@ stdlib › stdlib_equal_17 (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"==\" (func $gimport_pervasives_== (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/strings.434adad0.0.snapshot b/compiler/test/__snapshots__/strings.434adad0.0.snapshot index d2a1a882bb..0e185bb4b2 100644 --- a/compiler/test/__snapshots__/strings.434adad0.0.snapshot +++ b/compiler/test/__snapshots__/strings.434adad0.0.snapshot @@ -7,11 +7,11 @@ strings › string2 (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store diff --git a/compiler/test/__snapshots__/strings.a67428df.0.snapshot b/compiler/test/__snapshots__/strings.a67428df.0.snapshot index a31ccc03ba..02491e589c 100644 --- a/compiler/test/__snapshots__/strings.a67428df.0.snapshot +++ b/compiler/test/__snapshots__/strings.a67428df.0.snapshot @@ -7,11 +7,11 @@ strings › string1 (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store diff --git a/compiler/test/__snapshots__/strings.b2ad5a89.0.snapshot b/compiler/test/__snapshots__/strings.b2ad5a89.0.snapshot index 1cc3441578..f4da804780 100644 --- a/compiler/test/__snapshots__/strings.b2ad5a89.0.snapshot +++ b/compiler/test/__snapshots__/strings.b2ad5a89.0.snapshot @@ -7,11 +7,11 @@ strings › string3 (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store diff --git a/compiler/test/__snapshots__/strings.fb85549f.0.snapshot b/compiler/test/__snapshots__/strings.fb85549f.0.snapshot index a2a6e839b3..a0929d38a5 100644 --- a/compiler/test/__snapshots__/strings.fb85549f.0.snapshot +++ b/compiler/test/__snapshots__/strings.fb85549f.0.snapshot @@ -14,11 +14,11 @@ strings › concat (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$pervasives\" \"++\" (func $gimport_pervasives_++ (param i32 i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) diff --git a/compiler/test/__snapshots__/tuples.1451773e.0.snapshot b/compiler/test/__snapshots__/tuples.1451773e.0.snapshot index 858d9e9b26..695d586902 100644 --- a/compiler/test/__snapshots__/tuples.1451773e.0.snapshot +++ b/compiler/test/__snapshots__/tuples.1451773e.0.snapshot @@ -11,15 +11,15 @@ tuples › nested_tup_3 (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_3 (mut i32) (i32.const 0)) - (global $global_2 (mut i32) (i32.const 0)) - (global $global_1 (mut i32) (i32.const 0)) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_5 i32 (i32.const 0)) + (global $b_1134 (mut i32) (i32.const 0)) + (global $a_1133 (mut i32) (i32.const 0)) + (global $y_1132 (mut i32) (i32.const 0)) + (global $x_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_5)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -132,24 +132,24 @@ tuples › nested_tup_3 ) ) ) - (global.set $global_0 + (global.set $x_1131 (tuple.extract 0 (tuple.make (i32.const 0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $x_1131) ) ) ) ) - (global.set $global_1 + (global.set $y_1132 (tuple.extract 0 (tuple.make (i32.const 0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_1) + (global.get $y_1132) ) ) ) @@ -190,7 +190,7 @@ tuples › nested_tup_3 (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (block (result i32) - (global.set $global_1 + (global.set $y_1132 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -199,7 +199,7 @@ tuples › nested_tup_3 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_1) + (global.get $y_1132) ) ) ) @@ -212,7 +212,7 @@ tuples › nested_tup_3 (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (block (result i32) - (global.set $global_0 + (global.set $x_1131 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -221,7 +221,7 @@ tuples › nested_tup_3 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $x_1131) ) ) ) @@ -235,7 +235,7 @@ tuples › nested_tup_3 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_1) + (global.get $y_1132) ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) @@ -244,24 +244,24 @@ tuples › nested_tup_3 ) ) ) - (global.set $global_2 + (global.set $a_1133 (tuple.extract 0 (tuple.make (i32.const 0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_2) + (global.get $a_1133) ) ) ) ) - (global.set $global_3 + (global.set $b_1134 (tuple.extract 0 (tuple.make (i32.const 0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_3) + (global.get $b_1134) ) ) ) @@ -302,7 +302,7 @@ tuples › nested_tup_3 (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (block (result i32) - (global.set $global_3 + (global.set $b_1134 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -311,7 +311,7 @@ tuples › nested_tup_3 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_3) + (global.get $b_1134) ) ) ) @@ -324,7 +324,7 @@ tuples › nested_tup_3 (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (block (result i32) - (global.set $global_2 + (global.set $a_1133 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -333,7 +333,7 @@ tuples › nested_tup_3 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_2) + (global.get $a_1133) ) ) ) @@ -345,7 +345,7 @@ tuples › nested_tup_3 (local.set $8 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_2) + (global.get $a_1133) ) ) (drop diff --git a/compiler/test/__snapshots__/tuples.1d60b40c.0.snapshot b/compiler/test/__snapshots__/tuples.1d60b40c.0.snapshot index 026916f268..7ca7196347 100644 --- a/compiler/test/__snapshots__/tuples.1d60b40c.0.snapshot +++ b/compiler/test/__snapshots__/tuples.1d60b40c.0.snapshot @@ -11,13 +11,13 @@ tuples › nested_tup_1 (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_1 (mut i32) (i32.const 0)) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_3 i32 (i32.const 0)) + (global $b_1132 (mut i32) (i32.const 0)) + (global $a_1131 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_3)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -127,24 +127,24 @@ tuples › nested_tup_1 ) ) ) - (global.set $global_0 + (global.set $a_1131 (tuple.extract 0 (tuple.make (i32.const 0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $a_1131) ) ) ) ) - (global.set $global_1 + (global.set $b_1132 (tuple.extract 0 (tuple.make (i32.const 0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_1) + (global.get $b_1132) ) ) ) @@ -185,7 +185,7 @@ tuples › nested_tup_1 (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (block (result i32) - (global.set $global_1 + (global.set $b_1132 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -194,7 +194,7 @@ tuples › nested_tup_1 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_1) + (global.get $b_1132) ) ) ) @@ -207,7 +207,7 @@ tuples › nested_tup_1 (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (block (result i32) - (global.set $global_0 + (global.set $a_1131 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -216,7 +216,7 @@ tuples › nested_tup_1 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $a_1131) ) ) ) @@ -228,7 +228,7 @@ tuples › nested_tup_1 (local.set $5 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_0) + (global.get $a_1131) ) ) (drop diff --git a/compiler/test/__snapshots__/tuples.2c91b91d.0.snapshot b/compiler/test/__snapshots__/tuples.2c91b91d.0.snapshot index edc4ddac4f..4dc4178a18 100644 --- a/compiler/test/__snapshots__/tuples.2c91b91d.0.snapshot +++ b/compiler/test/__snapshots__/tuples.2c91b91d.0.snapshot @@ -11,14 +11,14 @@ tuples › tup1_destruct_trailing (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_2 (mut i32) (i32.const 0)) - (global $global_1 (mut i32) (i32.const 0)) - (global $global_4 i32 (i32.const 0)) + (global $a_1131 (mut i32) (i32.const 0)) + (global $c_1133 (mut i32) (i32.const 0)) + (global $b_1132 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_4)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -61,35 +61,35 @@ tuples › tup1_destruct_trailing ) ) ) - (global.set $global_0 + (global.set $a_1131 (tuple.extract 0 (tuple.make (i32.const 0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $a_1131) ) ) ) ) - (global.set $global_1 + (global.set $b_1132 (tuple.extract 0 (tuple.make (i32.const 0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_1) + (global.get $b_1132) ) ) ) ) - (global.set $global_2 + (global.set $c_1133 (tuple.extract 0 (tuple.make (i32.const 0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_2) + (global.get $c_1133) ) ) ) @@ -146,7 +146,7 @@ tuples › tup1_destruct_trailing (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (block (result i32) - (global.set $global_2 + (global.set $c_1133 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -155,7 +155,7 @@ tuples › tup1_destruct_trailing ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_2) + (global.get $c_1133) ) ) ) @@ -168,7 +168,7 @@ tuples › tup1_destruct_trailing (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (block (result i32) - (global.set $global_1 + (global.set $b_1132 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -177,7 +177,7 @@ tuples › tup1_destruct_trailing ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_1) + (global.get $b_1132) ) ) ) @@ -190,7 +190,7 @@ tuples › tup1_destruct_trailing (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (block (result i32) - (global.set $global_0 + (global.set $a_1131 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -199,7 +199,7 @@ tuples › tup1_destruct_trailing ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $a_1131) ) ) ) diff --git a/compiler/test/__snapshots__/tuples.2f6e820d.0.snapshot b/compiler/test/__snapshots__/tuples.2f6e820d.0.snapshot index 98e95bae4c..0db61e50ab 100644 --- a/compiler/test/__snapshots__/tuples.2f6e820d.0.snapshot +++ b/compiler/test/__snapshots__/tuples.2f6e820d.0.snapshot @@ -7,11 +7,11 @@ tuples › singleton_tup_annotation (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store diff --git a/compiler/test/__snapshots__/tuples.843a836f.0.snapshot b/compiler/test/__snapshots__/tuples.843a836f.0.snapshot index 5c8221e627..51a4a29c8b 100644 --- a/compiler/test/__snapshots__/tuples.843a836f.0.snapshot +++ b/compiler/test/__snapshots__/tuples.843a836f.0.snapshot @@ -7,11 +7,11 @@ tuples › singleton_tup (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store diff --git a/compiler/test/__snapshots__/tuples.8d1f0463.0.snapshot b/compiler/test/__snapshots__/tuples.8d1f0463.0.snapshot index c4a7a2f7be..b00c89a5ca 100644 --- a/compiler/test/__snapshots__/tuples.8d1f0463.0.snapshot +++ b/compiler/test/__snapshots__/tuples.8d1f0463.0.snapshot @@ -7,11 +7,11 @@ tuples › tup1_trailing (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store diff --git a/compiler/test/__snapshots__/tuples.a34621a0.0.snapshot b/compiler/test/__snapshots__/tuples.a34621a0.0.snapshot index f8cf8da393..37649e8e4c 100644 --- a/compiler/test/__snapshots__/tuples.a34621a0.0.snapshot +++ b/compiler/test/__snapshots__/tuples.a34621a0.0.snapshot @@ -11,15 +11,15 @@ tuples › big_tup_access (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_3 (mut i32) (i32.const 0)) - (global $global_2 (mut i32) (i32.const 0)) - (global $global_1 (mut i32) (i32.const 0)) - (global $global_5 i32 (i32.const 0)) + (global $a_1131 (mut i32) (i32.const 0)) + (global $d_1134 (mut i32) (i32.const 0)) + (global $c_1133 (mut i32) (i32.const 0)) + (global $b_1132 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_5)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -67,46 +67,46 @@ tuples › big_tup_access ) ) ) - (global.set $global_0 + (global.set $a_1131 (tuple.extract 0 (tuple.make (i32.const 0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $a_1131) ) ) ) ) - (global.set $global_1 + (global.set $b_1132 (tuple.extract 0 (tuple.make (i32.const 0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_1) + (global.get $b_1132) ) ) ) ) - (global.set $global_2 + (global.set $c_1133 (tuple.extract 0 (tuple.make (i32.const 0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_2) + (global.get $c_1133) ) ) ) ) - (global.set $global_3 + (global.set $d_1134 (tuple.extract 0 (tuple.make (i32.const 0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_3) + (global.get $d_1134) ) ) ) @@ -179,7 +179,7 @@ tuples › big_tup_access (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (block (result i32) - (global.set $global_3 + (global.set $d_1134 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -188,7 +188,7 @@ tuples › big_tup_access ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_3) + (global.get $d_1134) ) ) ) @@ -201,7 +201,7 @@ tuples › big_tup_access (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (block (result i32) - (global.set $global_2 + (global.set $c_1133 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -210,7 +210,7 @@ tuples › big_tup_access ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_2) + (global.get $c_1133) ) ) ) @@ -223,7 +223,7 @@ tuples › big_tup_access (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (block (result i32) - (global.set $global_1 + (global.set $b_1132 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -232,7 +232,7 @@ tuples › big_tup_access ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_1) + (global.get $b_1132) ) ) ) @@ -245,7 +245,7 @@ tuples › big_tup_access (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (block (result i32) - (global.set $global_0 + (global.set $a_1131 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -254,7 +254,7 @@ tuples › big_tup_access ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $a_1131) ) ) ) @@ -266,7 +266,7 @@ tuples › big_tup_access (local.set $5 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_2) + (global.get $c_1133) ) ) (drop diff --git a/compiler/test/__snapshots__/tuples.b4f702d8.0.snapshot b/compiler/test/__snapshots__/tuples.b4f702d8.0.snapshot index 76b0aa7553..c14911a440 100644 --- a/compiler/test/__snapshots__/tuples.b4f702d8.0.snapshot +++ b/compiler/test/__snapshots__/tuples.b4f702d8.0.snapshot @@ -4,11 +4,11 @@ tuples › no_non_trailing_comma_singleton_tup (type $none_=>_none (func)) (import \"_grainEnv\" \"mem\" (memory $0 0)) (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (i32.const 3) ) diff --git a/compiler/test/__snapshots__/tuples.c1eb0a50.0.snapshot b/compiler/test/__snapshots__/tuples.c1eb0a50.0.snapshot index 9099cd9128..e9ec3db35a 100644 --- a/compiler/test/__snapshots__/tuples.c1eb0a50.0.snapshot +++ b/compiler/test/__snapshots__/tuples.c1eb0a50.0.snapshot @@ -11,15 +11,15 @@ tuples › nested_tup_2 (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32))) (import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32))) - (global $global_0 (mut i32) (i32.const 0)) - (global $global_3 (mut i32) (i32.const 0)) - (global $global_2 (mut i32) (i32.const 0)) - (global $global_1 (mut i32) (i32.const 0)) - (global $global_5 i32 (i32.const 0)) + (global $a_1131 (mut i32) (i32.const 0)) + (global $d_1134 (mut i32) (i32.const 0)) + (global $c_1133 (mut i32) (i32.const 0)) + (global $b_1132 (mut i32) (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_5)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) @@ -132,24 +132,24 @@ tuples › nested_tup_2 ) ) ) - (global.set $global_0 + (global.set $a_1131 (tuple.extract 0 (tuple.make (i32.const 0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $a_1131) ) ) ) ) - (global.set $global_1 + (global.set $b_1132 (tuple.extract 0 (tuple.make (i32.const 0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_1) + (global.get $b_1132) ) ) ) @@ -190,7 +190,7 @@ tuples › nested_tup_2 (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (block (result i32) - (global.set $global_1 + (global.set $b_1132 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -199,7 +199,7 @@ tuples › nested_tup_2 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_1) + (global.get $b_1132) ) ) ) @@ -212,7 +212,7 @@ tuples › nested_tup_2 (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (block (result i32) - (global.set $global_0 + (global.set $a_1131 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -221,7 +221,7 @@ tuples › nested_tup_2 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_0) + (global.get $a_1131) ) ) ) @@ -235,7 +235,7 @@ tuples › nested_tup_2 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_1) + (global.get $b_1132) ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) @@ -244,24 +244,24 @@ tuples › nested_tup_2 ) ) ) - (global.set $global_2 + (global.set $c_1133 (tuple.extract 0 (tuple.make (i32.const 0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_2) + (global.get $c_1133) ) ) ) ) - (global.set $global_3 + (global.set $d_1134 (tuple.extract 0 (tuple.make (i32.const 0) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_3) + (global.get $d_1134) ) ) ) @@ -302,7 +302,7 @@ tuples › nested_tup_2 (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (block (result i32) - (global.set $global_3 + (global.set $d_1134 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -311,7 +311,7 @@ tuples › nested_tup_2 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_3) + (global.get $d_1134) ) ) ) @@ -324,7 +324,7 @@ tuples › nested_tup_2 (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) (block (result i32) - (global.set $global_2 + (global.set $c_1133 (tuple.extract 0 (tuple.make (call $wimport_GRAIN$MODULE$runtime/gc_incRef @@ -333,7 +333,7 @@ tuples › nested_tup_2 ) (call $wimport_GRAIN$MODULE$runtime/gc_decRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef) - (global.get $global_2) + (global.get $c_1133) ) ) ) @@ -345,7 +345,7 @@ tuples › nested_tup_2 (local.set $8 (call $wimport_GRAIN$MODULE$runtime/gc_incRef (global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef) - (global.get $global_3) + (global.get $d_1134) ) ) (drop diff --git a/compiler/test/__snapshots__/tuples.f206002b.0.snapshot b/compiler/test/__snapshots__/tuples.f206002b.0.snapshot index 70e1a4f964..9cc056abb1 100644 --- a/compiler/test/__snapshots__/tuples.f206002b.0.snapshot +++ b/compiler/test/__snapshots__/tuples.f206002b.0.snapshot @@ -7,11 +7,11 @@ tuples › tup1_trailing_space (import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32)) (import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32))) (import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32))) - (global $global_1 i32 (i32.const 0)) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) (export \"memory\" (memory $0)) (export \"_gmain\" (func $_gmain)) (export \"_start\" (func $_start)) - (export \"GRAIN$TABLE_SIZE\" (global $global_1)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) (func $_gmain (; has Stack IR ;) (result i32) (local $0 i32) (i32.store