Skip to content

handle exceptional flow correctly in collapse_vars - #2574

Merged
alexlamsl merged 1 commit into
mishoo:masterfrom
alexlamsl:issue-2571
Dec 10, 2017
Merged

alexlamsl merged 1 commit into
mishoo:masterfrom
alexlamsl:issue-2571

Conversation

@alexlamsl

Copy link
Copy Markdown
Collaborator

fixes #2571

@alexlamsl
alexlamsl merged commit 0e16d92 into mishoo:master Dec 10, 2017
@alexlamsl
alexlamsl deleted the issue-2571 branch December 10, 2017 16:16
@kzc

kzc commented Dec 10, 2017

Copy link
Copy Markdown
Contributor

Just curious - how was this issue related to switch cases?

@alexlamsl

Copy link
Copy Markdown
Collaborator Author

Glad you asked - the previous (buggy) behaviour of collapse_vars also leads to an incorrect workaround for walking through AST_Switch - fixing this exceptional side effects issue makes that no longer effective.

@kzc

kzc commented Dec 10, 2017

Copy link
Copy Markdown
Contributor

A few extra classes may have to handled in AST_Node.may_throw() in harmony? Or is the default safe? I suppose it's an optimization opportunity to refine some harmony behaviors.

@alexlamsl

Copy link
Copy Markdown
Collaborator Author

harmony should work correctly albeit sub-optimally.

@alexlamsl

Copy link
Copy Markdown
Collaborator Author

OT: if JavaScript supports inter-scope/expression goto this would have been a nightmare.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ufuzz: collapse_vars bug

2 participants