forked from ethereum/fe
-
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.
Lower stack-sized module constants to be inlined
Related to ethereum#192
- Loading branch information
Showing
19 changed files
with
289 additions
and
13 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
12 changes: 12 additions & 0 deletions
12
crates/analyzer/tests/snapshots/errors__module_const_non_base_type.snap
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,12 @@ | ||
--- | ||
source: crates/analyzer/tests/errors.rs | ||
expression: "error_string(&path, &src)" | ||
|
||
--- | ||
error: Non-base types not yet supported for constants | ||
┌─ compile_errors/module_const_non_base_type.fe:1:12 | ||
│ | ||
1 │ const FOO: String<3> = "foo" | ||
│ ^^^^^^^^^ this has type `String<3>`; expected a primitive type | ||
|
||
|
12 changes: 12 additions & 0 deletions
12
crates/analyzer/tests/snapshots/errors__module_const_not_literal.snap
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,12 @@ | ||
--- | ||
source: crates/analyzer/tests/errors.rs | ||
expression: "error_string(&path, &src)" | ||
|
||
--- | ||
error: non-literal expressions not yet supported for constants | ||
┌─ compile_errors/module_const_not_literal.fe:1:19 | ||
│ | ||
1 │ const FOO: u256 = 1 + 2 | ||
│ ^^^^^ not a literal | ||
|
||
|
12 changes: 12 additions & 0 deletions
12
crates/analyzer/tests/snapshots/errors__module_const_unknown_type.snap
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,12 @@ | ||
--- | ||
source: crates/analyzer/tests/errors.rs | ||
expression: "error_string(&path, &src)" | ||
|
||
--- | ||
error: undefined type | ||
┌─ compile_errors/module_const_unknown_type.fe:1:12 | ||
│ | ||
1 │ const FOO: Bar = 1 | ||
│ ^^^ this type name has not been defined | ||
|
||
|
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
Oops, something went wrong.