Skip to content

chore(compiler): Properly handle disable_stamps state #2272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compiler/test/__snapshots__/arrays.0f9e7d37.0.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ arrays › array_access
((stack_size_ptr 0) (stack_size_i32 0) (stack_size_i64 0)
(stack_size_f32 0) (stack_size_f64 0)))
(globals
(((id ((name x))) (mutable_ true) (allocation_type Managed)
(((id ((stamp 1113) (name x))) (mutable_ true) (allocation_type Managed)
(initial_value ()))))
(function_table_elements ())
(global_function_table_offset ((name function_table_global)))
(global_function_table_offset ((stamp 1119) (name function_table_global)))
(compilation_mode Normal) (type_metadata <opaque>)))
(signature <opaque>))
2 changes: 1 addition & 1 deletion compiler/test/__snapshots__/arrays.1deb7b51.0.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ arrays › array_access5
((stack_size_ptr 1) (stack_size_i32 0) (stack_size_i64 0)
(stack_size_f32 0) (stack_size_f64 0)))
(globals ()) (function_table_elements ())
(global_function_table_offset ((name function_table_global)))
(global_function_table_offset ((stamp 1119) (name function_table_global)))
(compilation_mode Normal) (type_metadata <opaque>)))
(signature <opaque>))
2 changes: 1 addition & 1 deletion compiler/test/__snapshots__/arrays.24453e6e.0.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ arrays › array1_trailing
((stack_size_ptr 0) (stack_size_i32 0) (stack_size_i64 0)
(stack_size_f32 0) (stack_size_f64 0)))
(globals ()) (function_table_elements ())
(global_function_table_offset ((name function_table_global)))
(global_function_table_offset ((stamp 1116) (name function_table_global)))
(compilation_mode Normal) (type_metadata <opaque>)))
(signature <opaque>))
4 changes: 2 additions & 2 deletions compiler/test/__snapshots__/arrays.28fcc534.0.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ arrays › array_access4
((stack_size_ptr 0) (stack_size_i32 0) (stack_size_i64 0)
(stack_size_f32 0) (stack_size_f64 0)))
(globals
(((id ((name x))) (mutable_ true) (allocation_type Managed)
(((id ((stamp 1113) (name x))) (mutable_ true) (allocation_type Managed)
(initial_value ()))))
(function_table_elements ())
(global_function_table_offset ((name function_table_global)))
(global_function_table_offset ((stamp 1119) (name function_table_global)))
(compilation_mode Normal) (type_metadata <opaque>)))
(signature <opaque>))
4 changes: 2 additions & 2 deletions compiler/test/__snapshots__/arrays.4c8c9f91.0.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ arrays › array_access2
((stack_size_ptr 0) (stack_size_i32 0) (stack_size_i64 0)
(stack_size_f32 0) (stack_size_f64 0)))
(globals
(((id ((name x))) (mutable_ true) (allocation_type Managed)
(((id ((stamp 1113) (name x))) (mutable_ true) (allocation_type Managed)
(initial_value ()))))
(function_table_elements ())
(global_function_table_offset ((name function_table_global)))
(global_function_table_offset ((stamp 1119) (name function_table_global)))
(compilation_mode Normal) (type_metadata <opaque>)))
(signature <opaque>))
4 changes: 2 additions & 2 deletions compiler/test/__snapshots__/arrays.6eac4e1f.0.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ arrays › array_access3
((stack_size_ptr 0) (stack_size_i32 0) (stack_size_i64 0)
(stack_size_f32 0) (stack_size_f64 0)))
(globals
(((id ((name x))) (mutable_ true) (allocation_type Managed)
(((id ((stamp 1113) (name x))) (mutable_ true) (allocation_type Managed)
(initial_value ()))))
(function_table_elements ())
(global_function_table_offset ((name function_table_global)))
(global_function_table_offset ((stamp 1119) (name function_table_global)))
(compilation_mode Normal) (type_metadata <opaque>)))
(signature <opaque>))
4 changes: 2 additions & 2 deletions compiler/test/__snapshots__/arrays.74d79181.0.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ arrays › array_access5
((stack_size_ptr 0) (stack_size_i32 0) (stack_size_i64 0)
(stack_size_f32 0) (stack_size_f64 0)))
(globals
(((id ((name x))) (mutable_ true) (allocation_type Managed)
(((id ((stamp 1113) (name x))) (mutable_ true) (allocation_type Managed)
(initial_value ()))))
(function_table_elements ())
(global_function_table_offset ((name function_table_global)))
(global_function_table_offset ((stamp 1119) (name function_table_global)))
(compilation_mode Normal) (type_metadata <opaque>)))
(signature <opaque>))
2 changes: 1 addition & 1 deletion compiler/test/__snapshots__/arrays.9e17b4d1.0.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ arrays › array3
((stack_size_ptr 0) (stack_size_i32 0) (stack_size_i64 0)
(stack_size_f32 0) (stack_size_f64 0)))
(globals ()) (function_table_elements ())
(global_function_table_offset ((name function_table_global)))
(global_function_table_offset ((stamp 1116) (name function_table_global)))
(compilation_mode Normal) (type_metadata <opaque>)))
(signature <opaque>))
2 changes: 1 addition & 1 deletion compiler/test/__snapshots__/arrays.b85cb7fc.0.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ arrays › array1_trailing_space
((stack_size_ptr 0) (stack_size_i32 0) (stack_size_i64 0)
(stack_size_f32 0) (stack_size_f64 0)))
(globals ()) (function_table_elements ())
(global_function_table_offset ((name function_table_global)))
(global_function_table_offset ((stamp 1116) (name function_table_global)))
(compilation_mode Normal) (type_metadata <opaque>)))
(signature <opaque>))
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ basic functionality › assignment1
((mash_code
((functions ())
(imports
(((mimp_id ((name *))) (mimp_mod pervasives.gr) (mimp_name *)
(((mimp_id ((stamp 1117) (name *))) (mimp_mod pervasives.gr)
(mimp_name *)
(mimp_type
(MFuncImport (Managed (Unmanaged WasmI32) (Unmanaged WasmI32))
((Unmanaged WasmI32))))
(mimp_kind MImportGrain) (mimp_setup MSetupNone) (mimp_used true))
((mimp_id ((name *))) (mimp_mod pervasives.gr) (mimp_name *)
(mimp_type (MGlobalImport Managed true)) (mimp_kind MImportGrain)
(mimp_setup MCallGetter) (mimp_used true))))
((mimp_id ((stamp 1117) (name *))) (mimp_mod pervasives.gr)
(mimp_name *) (mimp_type (MGlobalImport Managed true))
(mimp_kind MImportGrain) (mimp_setup MCallGetter) (mimp_used true))))
(exports ())
(main_body
(((instr_desc
Expand Down Expand Up @@ -50,9 +51,9 @@ basic functionality › assignment1
((stack_size_ptr 1) (stack_size_i32 0) (stack_size_i64 0)
(stack_size_f32 0) (stack_size_f64 0)))
(globals
(((id ((name t))) (mutable_ true) (allocation_type Managed)
(((id ((stamp 1113) (name t))) (mutable_ true) (allocation_type Managed)
(initial_value ()))))
(function_table_elements ())
(global_function_table_offset ((name function_table_global)))
(global_function_table_offset ((stamp 1119) (name function_table_global)))
(compilation_mode Normal) (type_metadata <opaque>)))
(signature <opaque>))
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ basic functionality › binop2.4
((stack_size_ptr 0) (stack_size_i32 0) (stack_size_i64 0)
(stack_size_f32 0) (stack_size_f64 0)))
(globals ()) (function_table_elements ())
(global_function_table_offset ((name function_table_global)))
(global_function_table_offset ((stamp 1114) (name function_table_global)))
(compilation_mode Normal) (type_metadata <opaque>)))
(signature <opaque>))
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ basic functionality › neg
((stack_size_ptr 0) (stack_size_i32 0) (stack_size_i64 0)
(stack_size_f32 0) (stack_size_f64 0)))
(globals ()) (function_table_elements ())
(global_function_table_offset ((name function_table_global)))
(global_function_table_offset ((stamp 1114) (name function_table_global)))
(compilation_mode Normal) (type_metadata <opaque>)))
(signature <opaque>))
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ basic functionality › comp5
((mash_code
((functions ())
(imports
(((mimp_id ((name <))) (mimp_mod pervasives.gr) (mimp_name <)
(((mimp_id ((stamp 1114) (name <))) (mimp_mod pervasives.gr)
(mimp_name <)
(mimp_type
(MFuncImport (Managed (Unmanaged WasmI32) (Unmanaged WasmI32))
((Unmanaged WasmI32))))
(mimp_kind MImportGrain) (mimp_setup MSetupNone) (mimp_used true))
((mimp_id ((name <))) (mimp_mod pervasives.gr) (mimp_name <)
(mimp_type (MGlobalImport Managed true)) (mimp_kind MImportGrain)
(mimp_setup MCallGetter) (mimp_used true))))
((mimp_id ((stamp 1114) (name <))) (mimp_mod pervasives.gr)
(mimp_name <) (mimp_type (MGlobalImport Managed true))
(mimp_kind MImportGrain) (mimp_setup MCallGetter) (mimp_used true))))
(exports ())
(main_body
(((instr_desc
Expand Down Expand Up @@ -45,6 +46,6 @@ basic functionality › comp5
((stack_size_ptr 0) (stack_size_i32 1) (stack_size_i64 0)
(stack_size_f32 0) (stack_size_f64 0)))
(globals ()) (function_table_elements ())
(global_function_table_offset ((name function_table_global)))
(global_function_table_offset ((stamp 1119) (name function_table_global)))
(compilation_mode Normal) (type_metadata <opaque>)))
(signature <opaque>))
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ basic functionality › assignment1
((stack_size_ptr 0) (stack_size_i32 0) (stack_size_i64 0)
(stack_size_f32 0) (stack_size_f64 0)))
(globals
(((id ((name t))) (mutable_ true) (allocation_type Managed)
(((id ((stamp 1113) (name t))) (mutable_ true) (allocation_type Managed)
(initial_value ()))))
(function_table_elements ())
(global_function_table_offset ((name function_table_global)))
(global_function_table_offset ((stamp 1117) (name function_table_global)))
(compilation_mode Normal) (type_metadata <opaque>)))
(signature <opaque>))
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ basic functionality › modulo4
((mash_code
((functions ())
(imports
(((mimp_id ((name %))) (mimp_mod pervasives.gr) (mimp_name %)
(((mimp_id ((stamp 1113) (name %))) (mimp_mod pervasives.gr)
(mimp_name %)
(mimp_type
(MFuncImport (Managed (Unmanaged WasmI32) (Unmanaged WasmI32))
((Unmanaged WasmI32))))
(mimp_kind MImportGrain) (mimp_setup MSetupNone) (mimp_used true))
((mimp_id ((name %))) (mimp_mod pervasives.gr) (mimp_name %)
(mimp_type (MGlobalImport Managed true)) (mimp_kind MImportGrain)
(mimp_setup MCallGetter) (mimp_used true))))
((mimp_id ((stamp 1113) (name %))) (mimp_mod pervasives.gr)
(mimp_name %) (mimp_type (MGlobalImport Managed true))
(mimp_kind MImportGrain) (mimp_setup MCallGetter) (mimp_used true))))
(exports ())
(main_body
(((instr_desc
Expand All @@ -30,6 +31,6 @@ basic functionality › modulo4
((stack_size_ptr 0) (stack_size_i32 0) (stack_size_i64 0)
(stack_size_f32 0) (stack_size_f64 0)))
(globals ()) (function_table_elements ())
(global_function_table_offset ((name function_table_global)))
(global_function_table_offset ((stamp 1116) (name function_table_global)))
(compilation_mode Normal) (type_metadata <opaque>)))
(signature <opaque>))
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ basic functionality › land4
((mash_code
((functions ())
(imports
(((mimp_id ((name &))) (mimp_mod pervasives.gr) (mimp_name &)
(((mimp_id ((stamp 1113) (name &))) (mimp_mod pervasives.gr)
(mimp_name &)
(mimp_type
(MFuncImport (Managed (Unmanaged WasmI32) (Unmanaged WasmI32))
((Unmanaged WasmI32))))
(mimp_kind MImportGrain) (mimp_setup MSetupNone) (mimp_used true))
((mimp_id ((name &))) (mimp_mod pervasives.gr) (mimp_name &)
(mimp_type (MGlobalImport Managed true)) (mimp_kind MImportGrain)
(mimp_setup MCallGetter) (mimp_used true))))
((mimp_id ((stamp 1113) (name &))) (mimp_mod pervasives.gr)
(mimp_name &) (mimp_type (MGlobalImport Managed true))
(mimp_kind MImportGrain) (mimp_setup MCallGetter) (mimp_used true))))
(exports ())
(main_body
(((instr_desc
Expand All @@ -30,6 +31,6 @@ basic functionality › land4
((stack_size_ptr 0) (stack_size_i32 0) (stack_size_i64 0)
(stack_size_f32 0) (stack_size_f64 0)))
(globals ()) (function_table_elements ())
(global_function_table_offset ((name function_table_global)))
(global_function_table_offset ((stamp 1116) (name function_table_global)))
(compilation_mode Normal) (type_metadata <opaque>)))
(signature <opaque>))
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ basic functionality › lxor1
((mash_code
((functions ())
(imports
(((mimp_id ((name ^))) (mimp_mod pervasives.gr) (mimp_name ^)
(((mimp_id ((stamp 1113) (name ^))) (mimp_mod pervasives.gr)
(mimp_name ^)
(mimp_type
(MFuncImport (Managed (Unmanaged WasmI32) (Unmanaged WasmI32))
((Unmanaged WasmI32))))
(mimp_kind MImportGrain) (mimp_setup MSetupNone) (mimp_used true))
((mimp_id ((name ^))) (mimp_mod pervasives.gr) (mimp_name ^)
(mimp_type (MGlobalImport Managed true)) (mimp_kind MImportGrain)
(mimp_setup MCallGetter) (mimp_used true))))
((mimp_id ((stamp 1113) (name ^))) (mimp_mod pervasives.gr)
(mimp_name ^) (mimp_type (MGlobalImport Managed true))
(mimp_kind MImportGrain) (mimp_setup MCallGetter) (mimp_used true))))
(exports ())
(main_body
(((instr_desc
Expand All @@ -30,6 +31,6 @@ basic functionality › lxor1
((stack_size_ptr 0) (stack_size_i32 0) (stack_size_i64 0)
(stack_size_f32 0) (stack_size_f64 0)))
(globals ()) (function_table_elements ())
(global_function_table_offset ((name function_table_global)))
(global_function_table_offset ((stamp 1116) (name function_table_global)))
(compilation_mode Normal) (type_metadata <opaque>)))
(signature <opaque>))
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ basic functionality › lor1
((mash_code
((functions ())
(imports
(((mimp_id ((name |))) (mimp_mod pervasives.gr) (mimp_name |)
(((mimp_id ((stamp 1113) (name |))) (mimp_mod pervasives.gr)
(mimp_name |)
(mimp_type
(MFuncImport (Managed (Unmanaged WasmI32) (Unmanaged WasmI32))
((Unmanaged WasmI32))))
(mimp_kind MImportGrain) (mimp_setup MSetupNone) (mimp_used true))
((mimp_id ((name |))) (mimp_mod pervasives.gr) (mimp_name |)
(mimp_type (MGlobalImport Managed true)) (mimp_kind MImportGrain)
(mimp_setup MCallGetter) (mimp_used true))))
((mimp_id ((stamp 1113) (name |))) (mimp_mod pervasives.gr)
(mimp_name |) (mimp_type (MGlobalImport Managed true))
(mimp_kind MImportGrain) (mimp_setup MCallGetter) (mimp_used true))))
(exports ())
(main_body
(((instr_desc
Expand All @@ -30,6 +31,6 @@ basic functionality › lor1
((stack_size_ptr 0) (stack_size_i32 0) (stack_size_i64 0)
(stack_size_f32 0) (stack_size_f64 0)))
(globals ()) (function_table_elements ())
(global_function_table_offset ((name function_table_global)))
(global_function_table_offset ((stamp 1116) (name function_table_global)))
(compilation_mode Normal) (type_metadata <opaque>)))
(signature <opaque>))
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ basic functionality › modulo6
((mash_code
((functions ())
(imports
(((mimp_id ((name %))) (mimp_mod pervasives.gr) (mimp_name %)
(((mimp_id ((stamp 1113) (name %))) (mimp_mod pervasives.gr)
(mimp_name %)
(mimp_type
(MFuncImport (Managed (Unmanaged WasmI32) (Unmanaged WasmI32))
((Unmanaged WasmI32))))
(mimp_kind MImportGrain) (mimp_setup MSetupNone) (mimp_used true))
((mimp_id ((name %))) (mimp_mod pervasives.gr) (mimp_name %)
(mimp_type (MGlobalImport Managed true)) (mimp_kind MImportGrain)
(mimp_setup MCallGetter) (mimp_used true))))
((mimp_id ((stamp 1113) (name %))) (mimp_mod pervasives.gr)
(mimp_name %) (mimp_type (MGlobalImport Managed true))
(mimp_kind MImportGrain) (mimp_setup MCallGetter) (mimp_used true))))
(exports ())
(main_body
(((instr_desc
Expand All @@ -30,6 +31,6 @@ basic functionality › modulo6
((stack_size_ptr 0) (stack_size_i32 0) (stack_size_i64 0)
(stack_size_f32 0) (stack_size_f64 0)))
(globals ()) (function_table_elements ())
(global_function_table_offset ((name function_table_global)))
(global_function_table_offset ((stamp 1116) (name function_table_global)))
(compilation_mode Normal) (type_metadata <opaque>)))
(signature <opaque>))
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,24 @@ basic functionality › precedence1
((mash_code
((functions ())
(imports
(((mimp_id ((name *))) (mimp_mod pervasives.gr) (mimp_name *)
(((mimp_id ((stamp 1116) (name *))) (mimp_mod pervasives.gr)
(mimp_name *)
(mimp_type
(MFuncImport (Managed (Unmanaged WasmI32) (Unmanaged WasmI32))
((Unmanaged WasmI32))))
(mimp_kind MImportGrain) (mimp_setup MSetupNone) (mimp_used true))
((mimp_id ((name *))) (mimp_mod pervasives.gr) (mimp_name *)
(mimp_type (MGlobalImport Managed true)) (mimp_kind MImportGrain)
(mimp_setup MCallGetter) (mimp_used true))
((mimp_id ((name +))) (mimp_mod pervasives.gr) (mimp_name +)
((mimp_id ((stamp 1116) (name *))) (mimp_mod pervasives.gr)
(mimp_name *) (mimp_type (MGlobalImport Managed true))
(mimp_kind MImportGrain) (mimp_setup MCallGetter) (mimp_used true))
((mimp_id ((stamp 1113) (name +))) (mimp_mod pervasives.gr)
(mimp_name +)
(mimp_type
(MFuncImport (Managed (Unmanaged WasmI32) (Unmanaged WasmI32))
((Unmanaged WasmI32))))
(mimp_kind MImportGrain) (mimp_setup MSetupNone) (mimp_used true))
((mimp_id ((name +))) (mimp_mod pervasives.gr) (mimp_name +)
(mimp_type (MGlobalImport Managed true)) (mimp_kind MImportGrain)
(mimp_setup MCallGetter) (mimp_used true))))
((mimp_id ((stamp 1113) (name +))) (mimp_mod pervasives.gr)
(mimp_name +) (mimp_type (MGlobalImport Managed true))
(mimp_kind MImportGrain) (mimp_setup MCallGetter) (mimp_used true))))
(exports ())
(main_body
(((instr_desc
Expand Down Expand Up @@ -55,6 +57,6 @@ basic functionality › precedence1
((stack_size_ptr 1) (stack_size_i32 0) (stack_size_i64 0)
(stack_size_f32 0) (stack_size_f64 0)))
(globals ()) (function_table_elements ())
(global_function_table_offset ((name function_table_global)))
(global_function_table_offset ((stamp 1119) (name function_table_global)))
(compilation_mode Normal) (type_metadata <opaque>)))
(signature <opaque>))
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ basic functionality › comp16
((mash_code
((functions ())
(imports
(((mimp_id ((name ==))) (mimp_mod pervasives.gr) (mimp_name ==)
(((mimp_id ((stamp 1113) (name ==))) (mimp_mod pervasives.gr)
(mimp_name ==)
(mimp_type
(MFuncImport (Managed (Unmanaged WasmI32) (Unmanaged WasmI32))
((Unmanaged WasmI32))))
(mimp_kind MImportGrain) (mimp_setup MSetupNone) (mimp_used true))
((mimp_id ((name ==))) (mimp_mod pervasives.gr) (mimp_name ==)
(mimp_type (MGlobalImport Managed true)) (mimp_kind MImportGrain)
(mimp_setup MCallGetter) (mimp_used true))))
((mimp_id ((stamp 1113) (name ==))) (mimp_mod pervasives.gr)
(mimp_name ==) (mimp_type (MGlobalImport Managed true))
(mimp_kind MImportGrain) (mimp_setup MCallGetter) (mimp_used true))))
(exports ())
(main_body
(((instr_desc
Expand All @@ -33,6 +34,6 @@ basic functionality › comp16
((stack_size_ptr 0) (stack_size_i32 0) (stack_size_i64 0)
(stack_size_f32 0) (stack_size_f64 0)))
(globals ()) (function_table_elements ())
(global_function_table_offset ((name function_table_global)))
(global_function_table_offset ((stamp 1114) (name function_table_global)))
(compilation_mode Normal) (type_metadata <opaque>)))
(signature <opaque>))
Loading
Loading