-
Notifications
You must be signed in to change notification settings - Fork 98
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
experiment: simpler version of claudio/self-pass #4735
Merged
Merged
Conversation
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
crusso
commented
Oct 17, 2024
@@ -90,8 +90,8 @@ and exp' at note = function | |||
(breakE "!" (nullE())) | |||
(* case ? v : *) | |||
(varP v) (varE v) ty).it | |||
| S.ObjBlockE (s, _t, dfs) -> | |||
obj_block at s None dfs note.Note.typ | |||
| S.ObjBlockE (s, (self_id_opt,_), dfs) -> |
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.
This was the bug, which was failing to introduce a the self declaration for some cases.
Closed
ggreif
reviewed
Oct 17, 2024
ggreif
approved these changes
Oct 17, 2024
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.
LGTM! Nice improvement.
11 tasks
mergify bot
pushed a commit
that referenced
this pull request
Oct 17, 2024
…ialisers (#4719) This PR accomplishes following improvements: - allow `actor Self { ... Self ... }` in the actor initialiser (similarly for `actor class`) - ditto for accessing all public methods `Self.method` from the actor initialiser - accessing these from under lambdas without making the respective methods undefined when using them The latter should allow setting up timers: `addTimer(b, period, Self.method)` from actor initialiser. Also fixes the hole in definedness analysis (#4731). ------------- _NOTES_: - calling `Self.method` from actor initialiser is prohibited by the capability checker - accessing `Self.method` from actor initialiser is currently allowed when `method` is not defined yet, and results in a descriptor (pair) - comparison (in terms of `shared`) of the internal methods with external methods is trapping in the interpreter, but should work in the deployed actor. There is an idea inside to fix these problems. ---- TODO: - adapt `renaming.ml`? — nope, I don't have business in IR - [x] test `actor class` too - [x] test clashing `Self` — there is already `self-shadow.mo` - [x] `test/run/issue1464ok.mo` fails — fixed snafu - [x] deal with `FIXME`s - [x] `shared` method equality in the interpreters - [x] `shared` call viability checking (in interpreters) - [x] fix #4731 - [x] write issue about the mixed (pair/closure) `shared func` comparison problem — here: #4732 - [x] resolve the `Promise.is_fulfilled` problem — #4735 - [x] check the "For actors, this may be too permissive" comment in the code — irrelevant, removed! - [ ] try out the "crazy idea" mentioned in the feedback
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.
There's no need to add
self_id
toActorE
after all, thus avoiding much complexity.The internal self declaration, if present, is enough.
The real culprit was some bad lowering that wasn't passing down the self-binding in the
ObjBlockE
case (now fixed).