Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce TerminatorValue to force handling of divergence #5496

Merged
merged 21 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
a11e0ba
Introduce DivergingValue to force handling of divergence
jjcnn Jan 19, 2024
5b8ab56
Merge branch 'master' into jjcnn/use-compiled-values-in-ir-conversion
jjcnn Jan 19, 2024
845acee
merge fix
jjcnn Jan 19, 2024
0b1def5
Handle case where both branches in an if diverge
jjcnn Jan 19, 2024
53506e0
Implicit return must cause termination of compilation of current block
jjcnn Jan 19, 2024
557df84
Updated test output
jjcnn Jan 19, 2024
f844a96
fmt
jjcnn Jan 19, 2024
1cb894f
Simplify ValueDivergence and rename functions
jjcnn Jan 22, 2024
5f61e06
Merge branch 'master' of github.com:FuelLabs/sway into jjcnn/use-comp…
jjcnn Jan 22, 2024
8541494
Dummy jump to parameter-less block
jjcnn Jan 23, 2024
e9455c2
Merge branch 'master' of github.com:FuelLabs/sway into jjcnn/use-comp…
jjcnn Jan 23, 2024
1f735a2
fmt
jjcnn Jan 23, 2024
f97868a
Renaming and cleanup
jjcnn Jan 23, 2024
e573c45
Remove unnecessary check
jjcnn Jan 23, 2024
6840cff
fmt
jjcnn Jan 23, 2024
e6b9caf
Merge branch 'master' into jjcnn/use-compiled-values-in-ir-conversion
jjcnn Jan 23, 2024
d1d16af
Renaming and changing TerminatorValue to struct rather than enum. Als…
jjcnn Jan 24, 2024
bb692ed
Merge branch 'master' into jjcnn/use-compiled-values-in-ir-conversion
ironcev Jan 26, 2024
3396b4b
Merge branch 'master' into jjcnn/use-compiled-values-in-ir-conversion
jjcnn Jan 29, 2024
3806779
Remove unused Block::is_terminated()
jjcnn Jan 29, 2024
d2076c9
Change get_terminator to return None if final instruction is not a te…
jjcnn Jan 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sway-core/src/ir_generation/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ fn compile_fn(
logged_types_map,
messages_types_map,
);
let mut ret_val = compiler.compile_code_block(context, md_mgr, body)?;
let mut ret_val = compiler.compile_code_block_to_value(context, md_mgr, body)?;

// Special case: sometimes the returned value at the end of the function block is hacked
// together and is invalid. This can happen with diverging control flow or with implicit
Expand Down
Loading
Loading