-
-
Notifications
You must be signed in to change notification settings - Fork 819
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
fix: guard against pop
and append
for constant dynamic arrays
#3189
Closed
Closed
Changes from 11 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
73f6bc7
pass VarInfo during folding
tserg 6d471b7
fetch varinfo in get_expr_info; reuse validate_modification
tserg da24091
fix import
tserg 3e07b3f
fix literals
tserg 5e23bfc
add tests
tserg 72b8d91
fix propagate VarInfo
tserg 3054e50
propagate only type or varinfo
tserg 2e92368
fix lint
tserg a0e7958
fix nested lists
tserg 127b108
fix mypy lint
tserg c274c09
move varinfo handling to analysis
tserg 4d82f4b
Merge branch 'master' of https://github.com/vyperlang/vyper into fix/…
tserg 9975d08
change to exprinfo
tserg 75094d3
remove varinfo
tserg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,7 +138,6 @@ def parse_Call(self): | |
"append", | ||
"pop", | ||
): | ||
# TODO: consider moving this to builtins | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is an outdated comment since |
||
darray = Expr(self.stmt.func.value, self.context).ir_node | ||
args = [Expr(x, self.context).ir_node for x in self.stmt.args] | ||
if self.stmt.func.attr == "append": | ||
|
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fyi - when i kind of complicated code inlined like this, i'd prefer to see a helper function to do this which is closer to the definition of
VarInfo
, it's too easy to update the fields ofVarInfo
and then forget to update all uses of the constructor. in particular, this looks like a good use case forVarInfo.copy_with_type(type_)
. but as i mentioned in #3189 (review), we probably want to use ExprInfo instead anyway.