-
Notifications
You must be signed in to change notification settings - Fork 0
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
8fa5c9e
commit 552cb8e
Showing
9 changed files
with
97 additions
and
25 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
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import True from './runtime/constants.br'; | ||
import wasm print: (i32) => i32 from 'env'; | ||
print(True); |
Binary file not shown.
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 +1,4 @@ | ||
export const heapOffset: i32 = 0n; | ||
// export const heapOffset: i32 = 0n; | ||
import wasm print: (f32) => i32 from 'env'; | ||
print(1f); | ||
export const True: i32 = 1n; |
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,59 @@ | ||
(module $./runtime/constants.br | ||
(type (;0;) (func)) | ||
(func $_start (type 0) | ||
(global.set 1 | ||
(i32.const 0))) | ||
(module $./Resources/CodeGen.br | ||
(type (;0;) (func (param i32) (result i32))) | ||
(type (;1;) (func (param i32 i32) (result i32))) | ||
(type (;2;) (func)) | ||
(import "env" "print" (func $print (type 0))) | ||
(func $loop (type 1) (param $t2 i32) (param $index3 i32) (result i32) | ||
(local $test4 i32) | ||
(local.set $test4 | ||
(call_indirect (type 0) | ||
(local.get $index3) | ||
(local.get $t2))) | ||
(local.set $index3 | ||
(i32.add | ||
(local.get $index3) | ||
(i32.const 1))) | ||
(if ;; label = @1 | ||
(i32.eq | ||
(local.get $test4) | ||
(i32.const 1)) | ||
(then | ||
(drop | ||
(call_indirect (type 1) | ||
(local.get $t2) | ||
(local.get $index3) | ||
(global.get 2))))) | ||
(return | ||
(i32.const 1))) | ||
(func $AmbiguousFunction2 (type 0) (param $index5 i32) (result i32) | ||
(drop | ||
(call_indirect (type 0) | ||
(local.get $index5) | ||
(global.get 1))) | ||
(if ;; label = @1 | ||
(i32.eq | ||
(local.get $index5) | ||
(i32.const 100)) | ||
(then | ||
(return | ||
(i32.const 0)))) | ||
(return | ||
(i32.const 1))) | ||
(func $_start (type 2) | ||
(global.set 2 | ||
(i32.const 1)) | ||
(drop | ||
(call_indirect (type 1) | ||
(i32.const 2) | ||
(i32.const 0) | ||
(global.get 2)))) | ||
(table (;0;) 3 funcref) | ||
(memory (;0;) 1) | ||
(global (;0;) i32 (i32.const 0)) | ||
(global (;1;) (mut i32) (i32.const 0)) | ||
(export "$Brisk$heapOffset" (global 1)) | ||
(global (;1;) i32 (i32.const 0)) | ||
(global (;2;) (mut i32) (i32.const 0)) | ||
(export "memory" (memory 0)) | ||
(start $_start)) | ||
(start $_start) | ||
(elem (;0;) (i32.const 0) func $print) | ||
(elem (;1;) (i32.const 1) func $loop) | ||
(elem (;2;) (i32.const 2) func $AmbiguousFunction2)) |