-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow access to
Self
and its public methods from actor
init…
…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
- Loading branch information
Showing
31 changed files
with
240 additions
and
109 deletions.
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
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
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
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
Oops, something went wrong.