Skip to content
This repository has been archived by the owner on Jan 29, 2025. It is now read-only.

Refactor control flow validation, allow break in switches #993

Merged
merged 1 commit into from
Jun 22, 2021

Conversation

kvark
Copy link
Member

@kvark kvark commented Jun 19, 2021

Helps #940

Copy link
Member

@jimblandy jimblandy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Comment on lines 365 to 359
S::Return { value } => {
if !context.flags.contains(Flags::CAN_JUMP) {
if !context.abilities.contains(ControlFlowAbility::RETURN) {
return Err(FunctionError::InvalidReturnSpot);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are Kill statements permitted in Loop continuing blocks?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume it is

@kvark
Copy link
Member Author

kvark commented Jun 22, 2021

Thank you for the review!

@kvark kvark merged commit 0642632 into gfx-rs:master Jun 22, 2021
@kvark kvark deleted the valid-break branch June 22, 2021 04:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants