-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into de-monomorph-cache
- Loading branch information
Showing
12 changed files
with
71 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.program: | ||
ji i4 | ||
noop | ||
DATA_SECTION_OFFSET[0..32] | ||
DATA_SECTION_OFFSET[32..64] | ||
lw $ds $is 1 | ||
add $$ds $$ds $is | ||
gtf $r0 $zero i1 ; get transaction field | ||
ret $r0 | ||
noop ; word-alignment of data section | ||
.data: |
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,8 @@ | ||
script { | ||
fn main() -> u64 { | ||
entry: | ||
v0 = const u64 0 | ||
v1 = gtf v0, 1 | ||
ret u64 v1 | ||
} | ||
} |
4 changes: 0 additions & 4 deletions
4
test/src/e2e_vm_tests/test_programs/should_fail/illegal_break/test.toml
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
6 changes: 1 addition & 5 deletions
6
test/src/e2e_vm_tests/test_programs/should_fail/illegal_continue/test.toml
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,7 @@ | ||
category = "fail" | ||
|
||
# check: $()fn main() { | ||
# nextln: $()continue; | ||
# nextln: $()not assigned to anything | ||
|
||
# check: $()This code is unreachable | ||
|
||
# check: $()fn main() { | ||
# nextln: $()continue; | ||
# nextln: $()"continue" used outside of a loop | ||
# nextln: $()"continue" used outside of a loop |
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
4 changes: 3 additions & 1 deletion
4
test/src/e2e_vm_tests/test_programs/should_pass/language/binary_and_hex_literals/test.toml
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,3 @@ | ||
category = "disabled" | ||
category = "run" | ||
expected_result = { action = "return", value = 1 } | ||
validate_abi = true |
4 changes: 4 additions & 0 deletions
4
...rc/e2e_vm_tests/test_programs/should_pass/language/break_and_continue_block_ret/Forc.lock
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,4 @@ | ||
[[package]] | ||
name = 'break_and_continue_block_ret' | ||
source = 'root' | ||
dependencies = [] |
6 changes: 6 additions & 0 deletions
6
...rc/e2e_vm_tests/test_programs/should_pass/language/break_and_continue_block_ret/Forc.toml
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 @@ | ||
[project] | ||
authors = ["Fuel Labs <[email protected]>"] | ||
entry = "main.sw" | ||
license = "Apache-2.0" | ||
name = "break_and_continue_block_ret" | ||
implicit-std = false |
15 changes: 15 additions & 0 deletions
15
.../e2e_vm_tests/test_programs/should_pass/language/break_and_continue_block_ret/src/main.sw
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,15 @@ | ||
script; | ||
|
||
fn main() { | ||
while true { | ||
if true { | ||
break; | ||
} | ||
} | ||
|
||
while true { | ||
if true { | ||
continue; | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...rc/e2e_vm_tests/test_programs/should_pass/language/break_and_continue_block_ret/test.toml
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 @@ | ||
category = "compile" | ||
|
||
# not: $()This returns a value of type unknown, which is not assigned to anything and is ignored. |