Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't expect NodeUtil.getString|NumberValue() to check for side effects
This change helps to unblock a refactoring of mayHaveSideEffects() s.t. it will always have access to the compiler object. A recent change removed the one case where getStringValue() was actually checking for side effects. The peephole optimizations may have been relying on this behavior in some way that is hard to see clearly. So, to reduce the risk of present or future bugs, I'm changing them to explicitly check for side effects when calling getStringValue(). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=247508953
- Loading branch information
Showing
7 changed files
with
140 additions
and
91 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
Oops, something went wrong.