Remove shift tokens and add shift built-in functions - #2713
Merged
Merged
Conversation
Fixes gpuweb#2092 * Remove the `>>`, `<<`, `>>=` and `<<=` tokens * Remove shift expressions and compound shift assignments * Add shiftLeft and shiftRight integer built-in functions
Contributor
dneto0
added a commit
to dneto0/gpuweb
that referenced
this pull request
May 31, 2022
Part 1: Revert "Remove shift tokens and add shift built-in functions (gpuweb#2713)" This reverts commit 48efd97. Part 2: Since the removal of shift operators, the shiftLeft and shiftRight builtins added the ability to take operands that were AbstractInt or vectors of AbstractInt. We already have a rule that creation-time expressions must not overflow. For shift-left, that can only be determined if both its operands are abstract. So split the description of shift-left into all-concrete operands, and all-abstract operands. Additionally, spell out the overflow condition for the all-abstract form of shift-left. Fixes: gpuweb#2092
dneto0
added a commit
to dneto0/gpuweb
that referenced
this pull request
May 31, 2022
Part 1: Revert "Remove shift tokens and add shift built-in functions (gpuweb#2713)" This reverts commit 48efd97. Part 2: Since the removal of shift operators, the shiftLeft and shiftRight builtins added the ability to take operands that were AbstractInt or vectors of AbstractInt. We already have a rule that creation-time expressions must not overflow. For shift-left, that can only be determined if both its operands are abstract. So split the description of shift-left into all-concrete operands, and all-abstract operands. Additionally, spell out the overflow condition for the all-abstract form of shift-left. Fixes: gpuweb#2092
dneto0
added a commit
that referenced
this pull request
Jun 1, 2022
* Add shift operators, remove shiftLeft, shiftRight builtins Part 1: Revert "Remove shift tokens and add shift built-in functions (#2713)" This reverts commit 48efd97. Part 2: Since the removal of shift operators, the shiftLeft and shiftRight builtins added the ability to take operands that were AbstractInt or vectors of AbstractInt. We already have a rule that creation-time expressions must not overflow. For shift-left, that can only be determined if both its operands are abstract. So split the description of shift-left into all-concrete operands, and all-abstract operands. Additionally, spell out the overflow condition for the all-abstract form of shift-left. Fixes: #2092 * Apply review feedback * Split right-shift into concrete and abstract forms
jdarpinian
pushed a commit
to jdarpinian/gpuweb
that referenced
this pull request
Aug 12, 2022
* Add shift operators, remove shiftLeft, shiftRight builtins Part 1: Revert "Remove shift tokens and add shift built-in functions (gpuweb#2713)" This reverts commit 48efd97. Part 2: Since the removal of shift operators, the shiftLeft and shiftRight builtins added the ability to take operands that were AbstractInt or vectors of AbstractInt. We already have a rule that creation-time expressions must not overflow. For shift-left, that can only be determined if both its operands are abstract. So split the description of shift-left into all-concrete operands, and all-abstract operands. Additionally, spell out the overflow condition for the all-abstract form of shift-left. Fixes: gpuweb#2092 * Apply review feedback * Split right-shift into concrete and abstract forms
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2092
>>,<<,>>=and<<=tokens