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.
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: addressability #2731
base: master
Are you sure you want to change the base?
fix: addressability #2731
Changes from 26 commits
c8462ec
ef97274
7fa9f50
08563c3
3b78ae9
a0e13b9
ae55b84
990017d
3621dc7
9faf3df
8671ea5
816dbd6
77caea9
89a041c
9956c26
6940714
3f4f1b6
c16e5e9
ac79f00
df764cd
af12ca1
e498f1c
bee868c
9698461
b284b56
dfe024f
0e80801
804c17e
44cc298
548af87
8bec242
8fe3b37
26e8529
3c120ae
feee13d
b33f0b0
a8827ff
71afb10
2fc5c88
eddcd54
b3d9f9a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 394 in gnovm/pkg/gnolang/nodes.go
Codecov / codecov/patch
gnovm/pkg/gnolang/nodes.go#L393-L394
Check warning on line 405 in gnovm/pkg/gnolang/nodes.go
Codecov / codecov/patch
gnovm/pkg/gnolang/nodes.go#L404-L405
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.
For the cases like this where the addressability is assigned during preprocess, what do you think about moving Addressability as an attribute?
The reason why I say this is that we currently have a bunch of information which is not actually persisted, but recovered by using
Preprocess
. TheExpr
types here contain in their struct only information which comes directly out of the AST representation; not from preprocessing. I'm not entirely sure of why it's designed this way; but I think for consistency we should maintain the split between "preprocessed information" in Attributes, and AST information in the struct themselves.If addressability is an attribute, I also wonder if there's a way to remove the specific type and turn this into
Addressable() bool
instead.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.
I don't think there is a good way to make an
Addressable() bool
method due to reasons I outlined in responses to other comments -- there are one or more cases where addressability is not applicable so the preprocessor should handle execution as usual. That being said, while many other attributes apply only exist some of the time, the Addressability attribute exists for all addressable expressions -- everywhere it appears. For ease of access, I'd prefer not to make this an attribute.Check warning on line 475 in gnovm/pkg/gnolang/nodes.go
Codecov / codecov/patch
gnovm/pkg/gnolang/nodes.go#L474-L475
Check warning on line 484 in gnovm/pkg/gnolang/nodes.go
Codecov / codecov/patch
gnovm/pkg/gnolang/nodes.go#L483-L484
Check warning on line 497 in gnovm/pkg/gnolang/nodes.go
Codecov / codecov/patch
gnovm/pkg/gnolang/nodes.go#L497
Check warning on line 514 in gnovm/pkg/gnolang/nodes.go
Codecov / codecov/patch
gnovm/pkg/gnolang/nodes.go#L513-L514
Check warning on line 565 in gnovm/pkg/gnolang/nodes.go
Codecov / codecov/patch
gnovm/pkg/gnolang/nodes.go#L564-L565
Check warning on line 661 in gnovm/pkg/gnolang/nodes.go
Codecov / codecov/patch
gnovm/pkg/gnolang/nodes.go#L660-L661
Check warning on line 689 in gnovm/pkg/gnolang/nodes.go
Codecov / codecov/patch
gnovm/pkg/gnolang/nodes.go#L688-L689
Check warning on line 699 in gnovm/pkg/gnolang/nodes.go
Codecov / codecov/patch
gnovm/pkg/gnolang/nodes.go#L698-L699
Check warning on line 709 in gnovm/pkg/gnolang/nodes.go
Codecov / codecov/patch
gnovm/pkg/gnolang/nodes.go#L708-L709
Check warning on line 730 in gnovm/pkg/gnolang/nodes.go
Codecov / codecov/patch
gnovm/pkg/gnolang/nodes.go#L729-L730
Check warning on line 740 in gnovm/pkg/gnolang/nodes.go
Codecov / codecov/patch
gnovm/pkg/gnolang/nodes.go#L739-L740
Check warning on line 750 in gnovm/pkg/gnolang/nodes.go
Codecov / codecov/patch
gnovm/pkg/gnolang/nodes.go#L749-L750
Check warning on line 759 in gnovm/pkg/gnolang/nodes.go
Codecov / codecov/patch
gnovm/pkg/gnolang/nodes.go#L758-L759
Check warning on line 770 in gnovm/pkg/gnolang/nodes.go
Codecov / codecov/patch
gnovm/pkg/gnolang/nodes.go#L769-L770
Check warning on line 780 in gnovm/pkg/gnolang/nodes.go
Codecov / codecov/patch
gnovm/pkg/gnolang/nodes.go#L779-L780
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.
Check warning on line 1801 in gnovm/pkg/gnolang/nodes.go
Codecov / codecov/patch
gnovm/pkg/gnolang/nodes.go#L1800-L1801
Check warning on line 1804 in gnovm/pkg/gnolang/nodes.go
Codecov / codecov/patch
gnovm/pkg/gnolang/nodes.go#L1803-L1804