dyno: Begin resolving method calls and initializer calls#19359
Merged
dlongnecke-cray merged 11 commits intochapel-lang:mainfrom Mar 31, 2022
Merged
dyno: Begin resolving method calls and initializer calls#19359dlongnecke-cray merged 11 commits intochapel-lang:mainfrom
dlongnecke-cray merged 11 commits intochapel-lang:mainfrom
Conversation
Signed-off-by: David Longnecker <dlongnecke-cray@users.noreply.github.com>
Signed-off-by: David Longnecker <dlongnecke-cray@users.noreply.github.com>
Signed-off-by: David Longnecker <dlongnecke-cray@users.noreply.github.com>
Signed-off-by: David Longnecker <dlongnecke-cray@users.noreply.github.com>
Signed-off-by: David Longnecker <dlongnecke-cray@users.noreply.github.com>
Signed-off-by: David Longnecker <dlongnecke-cray@users.noreply.github.com>
mppf
approved these changes
Mar 14, 2022
Member
mppf
left a comment
There was a problem hiding this comment.
I'd like to see slightly more effort for draft code computing the POI details before merging. I'm not expecting that is too hard (just do a similar thing to the normal call resolution process).
| ci, | ||
| poi); | ||
|
|
||
| // TODO: also add POI info? |
Member
There was a problem hiding this comment.
I think you mean, TODO: also adjust poiInfo.
Seems to me you could make something based on this existing code:
if (anyInstantiated) {
instantiationPoiScope =
pointOfInstantiationScope(context, inScope, inPoiScope);
poiInfo.setPoiScope(instantiationPoiScope);
}
for (const TypedFnSignature* candidate : mostSpecific) {
if (candidate != nullptr) {
if (candidate->untyped()->idIsFunction()) {
accumulatePoisUsedByResolvingBody(context, candidate,
instantiationPoiScope, poiInfo);
}
}
}
Signed-off-by: David Longnecker <dlongnecke-cray@users.noreply.github.com>
Signed-off-by: David Longnecker <dlongnecke-cray@users.noreply.github.com>
Signed-off-by: David Longnecker <dlongnecke-cray@users.noreply.github.com>
Signed-off-by: David Longnecker <dlongnecke-cray@users.noreply.github.com>
mppf
added a commit
that referenced
this pull request
Apr 1, 2022
Fix problem compiling with GCC 5 Follow-up to PR #19359. GCC 5 doesn't include `std::hash` for enum types so we have to add our own versions for our enum types when they are needed. Trivial and not reviewed. - [x] verified that `CC=gcc-5 CXX=g++-5 make` works on my system
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.
dyno: Begin resolving method calls and new calls (#19359)
Begin resolving method calls and new calls in the dyno resolver.
The goal is to handle simple cases such a record with a zero argument
primary or secondary method, or a 'new r' for a record 'r'.
When resolving a 'new' expression also resolve an initializer call
as a side effect.
FUTURE WORK
in order to determine the final type
Reviewed by @mppf. Thanks!
Signed-off-by: David Longnecker dlongnecke-cray@users.noreply.github.com