-
-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7dfcbbc
commit 757b442
Showing
10 changed files
with
122 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 34 additions & 47 deletions
81
compiler/test/__snapshots__/basic_functionality.16eea1e9.0.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,35 @@ | ||
basic functionality › binop2.6 | ||
(module | ||
(type $none_=>_i32 (func (result i32))) | ||
(type $none_=>_none (func)) | ||
(type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) | ||
(type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) | ||
(import \"_genv\" \"tbl\" (table $tbl 0 funcref)) | ||
(import \"_genv\" \"relocBase\" (global $relocBase_0 i32)) | ||
(import \"_genv\" \"moduleRuntimeId\" (global $moduleRuntimeId_0 i32)) | ||
(import \"_genv\" \"runtimeHeapStart\" (global $runtimeHeapStart_0 i32)) | ||
(import \"_genv\" \"runtimeHeapNextPtr\" (global $runtimeHeapNextPtr_0 (mut i32))) | ||
(import \"_genv\" \"metadataPtr\" (global $metadataPtr_0 i32)) | ||
(import \"GRAIN$MODULE$runtime/gc.gr\" \"GRAIN$EXPORT$incRef\" (global $GRAIN$EXPORT$incRef_0 (mut i32))) | ||
(import \"GRAIN$MODULE$pervasives.gr\" \"GRAIN$EXPORT$-\" (global $-_1113 (mut i32))) | ||
(import \"GRAIN$MODULE$runtime/gc.gr\" \"incRef\" (func $incRef_0 (param i32 i32) (result i32))) | ||
(import \"GRAIN$MODULE$pervasives.gr\" \"-\" (func $-_1113 (param i32 i32 i32) (result i32))) | ||
(global $GRAIN$TABLE_SIZE i32 (i32.const 0)) | ||
(memory $0 0) | ||
(elem $elem (global.get $relocBase_0)) | ||
(export \"memory\" (memory $0)) | ||
(export \"_gmain\" (func $_gmain)) | ||
(export \"_start\" (func $_start)) | ||
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) | ||
(func $_gmain (result i32) | ||
(local $0 i32) | ||
(local $1 i32) | ||
(local $2 i32) | ||
(local $3 i64) | ||
(local $4 f32) | ||
(local $5 f64) | ||
(block $compile_block.1 | ||
(return_call $-_1113 | ||
(call $incRef_0 | ||
(global.get $GRAIN$EXPORT$incRef_0) | ||
(global.get $-_1113) | ||
) | ||
(i32.const 5) | ||
(i32.const 5) | ||
) | ||
) | ||
) | ||
(func $_start | ||
(drop | ||
(call $_gmain) | ||
) | ||
) | ||
;; custom section \"cmi\", size 368 | ||
) | ||
((mash_code | ||
((functions ()) | ||
(imports | ||
(((mimp_id ((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)))) | ||
(exports ()) | ||
(main_body | ||
(((instr_desc | ||
(MReturnCallKnown (func -_1113) | ||
(closure | ||
((immediate_desc | ||
(MIncRef | ||
((immediate_desc (MImmBinding (MGlobalBind -_1113 Managed))) | ||
(immediate_analyses ((last_usage Last)))))) | ||
(immediate_analyses ((last_usage Unknown))))) | ||
(func_type ((Managed Managed) (Managed))) | ||
(args | ||
(((immediate_desc (MImmConst (MConstI32 2))) | ||
(immediate_analyses ((last_usage Unknown)))) | ||
((immediate_desc (MImmConst (MConstI32 2))) | ||
(immediate_analyses ((last_usage Unknown))))))))))) | ||
(main_body_stack_size | ||
((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))) | ||
(compilation_mode Normal) (type_metadata <opaque>))) | ||
(signature <opaque>)) |
81 changes: 34 additions & 47 deletions
81
compiler/test/__snapshots__/basic_functionality.7edbad66.0.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,35 @@ | ||
basic functionality › binop2.5 | ||
(module | ||
(type $none_=>_i32 (func (result i32))) | ||
(type $none_=>_none (func)) | ||
(type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) | ||
(type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) | ||
(import \"_genv\" \"tbl\" (table $tbl 0 funcref)) | ||
(import \"_genv\" \"relocBase\" (global $relocBase_0 i32)) | ||
(import \"_genv\" \"moduleRuntimeId\" (global $moduleRuntimeId_0 i32)) | ||
(import \"_genv\" \"runtimeHeapStart\" (global $runtimeHeapStart_0 i32)) | ||
(import \"_genv\" \"runtimeHeapNextPtr\" (global $runtimeHeapNextPtr_0 (mut i32))) | ||
(import \"_genv\" \"metadataPtr\" (global $metadataPtr_0 i32)) | ||
(import \"GRAIN$MODULE$runtime/gc.gr\" \"GRAIN$EXPORT$incRef\" (global $GRAIN$EXPORT$incRef_0 (mut i32))) | ||
(import \"GRAIN$MODULE$pervasives.gr\" \"GRAIN$EXPORT$-\" (global $-_1113 (mut i32))) | ||
(import \"GRAIN$MODULE$runtime/gc.gr\" \"incRef\" (func $incRef_0 (param i32 i32) (result i32))) | ||
(import \"GRAIN$MODULE$pervasives.gr\" \"-\" (func $-_1113 (param i32 i32 i32) (result i32))) | ||
(global $GRAIN$TABLE_SIZE i32 (i32.const 0)) | ||
(memory $0 0) | ||
(elem $elem (global.get $relocBase_0)) | ||
(export \"memory\" (memory $0)) | ||
(export \"_gmain\" (func $_gmain)) | ||
(export \"_start\" (func $_start)) | ||
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) | ||
(func $_gmain (result i32) | ||
(local $0 i32) | ||
(local $1 i32) | ||
(local $2 i32) | ||
(local $3 i64) | ||
(local $4 f32) | ||
(local $5 f64) | ||
(block $compile_block.1 | ||
(return_call $-_1113 | ||
(call $incRef_0 | ||
(global.get $GRAIN$EXPORT$incRef_0) | ||
(global.get $-_1113) | ||
) | ||
(i32.const 5) | ||
(i32.const 5) | ||
) | ||
) | ||
) | ||
(func $_start | ||
(drop | ||
(call $_gmain) | ||
) | ||
) | ||
;; custom section \"cmi\", size 368 | ||
) | ||
((mash_code | ||
((functions ()) | ||
(imports | ||
(((mimp_id ((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)))) | ||
(exports ()) | ||
(main_body | ||
(((instr_desc | ||
(MReturnCallKnown (func -_1113) | ||
(closure | ||
((immediate_desc | ||
(MIncRef | ||
((immediate_desc (MImmBinding (MGlobalBind -_1113 Managed))) | ||
(immediate_analyses ((last_usage Last)))))) | ||
(immediate_analyses ((last_usage Unknown))))) | ||
(func_type ((Managed Managed) (Managed))) | ||
(args | ||
(((immediate_desc (MImmConst (MConstI32 2))) | ||
(immediate_analyses ((last_usage Unknown)))) | ||
((immediate_desc (MImmConst (MConstI32 2))) | ||
(immediate_analyses ((last_usage Unknown))))))))))) | ||
(main_body_stack_size | ||
((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))) | ||
(compilation_mode Normal) (type_metadata <opaque>))) | ||
(signature <opaque>)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters