-
Notifications
You must be signed in to change notification settings - Fork 8
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
Showing
15 changed files
with
230 additions
and
61 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
crates/codegen/tests/linker/fixtures/link_errors/sig_error_a.sntn
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 @@ | ||
target = "evm-ethereum-cancun" | ||
|
||
declare external %f(i64) -> i64; |
6 changes: 6 additions & 0 deletions
6
crates/codegen/tests/linker/fixtures/link_errors/sig_error_b.sntn
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,6 @@ | ||
target = "evm-ethereum-cancun" | ||
|
||
func public %f(v0.i64) { | ||
block0: | ||
return; | ||
} |
File renamed without changes.
File renamed without changes.
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,38 @@ | ||
--- | ||
source: crates/codegen/tests/linker.rs | ||
input_file: tests/linker/fixtures/link_ok/module.snap | ||
--- | ||
target = evm-ethereum-cancun | ||
|
||
type @foo = {i8, i16, *i64}; | ||
type @bar = {i8, [i8; 31]}; | ||
|
||
global public const i256 $ZERO = 0 | ||
global external const i256 $ONE | ||
|
||
declare func external %f_outer(i8) -> i8; | ||
|
||
func public %f_b(v0.i8, v1.i8) -> i8 { | ||
block0: | ||
v2.i8 = call %f_a v0; | ||
v3.i8 = add v0 v2; | ||
return; | ||
} | ||
|
||
func public %f_a(v0.i8) -> i8 { | ||
block0: | ||
return v0; | ||
} | ||
|
||
func private %types_a(v0.*i8, v1.[i8; 2], v2.[*i8; 2], v3.[[i8; 2]; 2], v4.@foo, v5.*@bar) -> i8 { | ||
block0: | ||
v6.i8 = mload v0 i8; | ||
v7.i8 = call %f_b v6 1.i8; | ||
call %f_outer; | ||
return v6; | ||
} | ||
|
||
func private %types_b(v0.*i8, v1.[i8; 2], v2.[*i8; 2], v3.[[i8; 2]; 2], v4.@bar, v5.*@foo) { | ||
block0: | ||
return; | ||
} |
25 changes: 25 additions & 0 deletions
25
crates/codegen/tests/linker/fixtures/link_ok/module_a.sntn
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,25 @@ | ||
target = "evm-ethereum-cancun" | ||
|
||
type @foo = { i8, i16, *i64 }; | ||
type @bar = <{ i8, [i8; 31] }>; | ||
|
||
declare external %f_b(i8, i8) -> i8; | ||
declare external %f_outer(i8) -> i8; | ||
|
||
|
||
global public const i256 $ZERO = 0 | ||
global external const i256 $ONE | ||
|
||
|
||
func public %f_a(v0.i8) -> i8 { | ||
block0: | ||
return v0; | ||
} | ||
|
||
func private %types_a(v0.*i8, v1.[i8; 2], v2.[*i8; 2], v3.[[i8; 2]; 2], v4.@foo, v5.*@bar) -> i8 { | ||
block0: | ||
v6.i8 = mload v0 i8; | ||
v7.i8 = call %f_b v6 1.i8; | ||
call %f_outer; | ||
return v6; | ||
} |
Oops, something went wrong.