Skip to content

Make Isolate.spawn work without loading from source in JIT mode #31698

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

Closed
1 of 2 tasks
mraleph opened this issue Dec 20, 2017 · 3 comments
Closed
1 of 2 tasks

Make Isolate.spawn work without loading from source in JIT mode #31698

mraleph opened this issue Dec 20, 2017 · 3 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. front-end-kernel legacy-area-front-end Legacy: Use area-dart-model instead. P2 A bug or feature request we're likely to work on

Comments

@mraleph
Copy link
Member

mraleph commented Dec 20, 2017

Currently Isolate.spawn(func, ...) simply loads newly spawned isolate from source in JIT mode.

In the Dart 2 / Kernel world this seems to be an incorrect / partially working approach, because use cases like running from a dill file are broken as VM attempts to parse code for a newly spawned isolate using a legacy parser.

It seems strange attempt to parse the code again instead of loading it from Kernel binary.

I think we should try to solve this in two steps:

  • When spawning isolate through Isolate.spawn(func, ...), spawn it from the Kernel binary (if available) that spawned original isolate;
  • Figure out a way to spawn an isolate from decomposed Kernel binary available in the heap of the original isolate

/cc @kmillikin @jensjoha @kmillikin

@mraleph mraleph added area-kernel area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. labels Dec 20, 2017
@mraleph mraleph added this to the 2.0-alpha milestone Dec 20, 2017
@mkustermann mkustermann self-assigned this Dec 20, 2017
@mkustermann
Copy link
Member

I will try to see how hard this is.

@kmillikin kmillikin added the P2 A bug or feature request we're likely to work on label Jan 4, 2018
@a-siva a-siva modified the milestones: 2.0-alpha1, 2.0-alpha2 Jan 12, 2018
whesse pushed a commit that referenced this issue Jan 15, 2018
… a Kernel IR file

Issue #31698

Change-Id: Ifc6662a3fd56245c10f5d924f771ef85ed9b222c
Reviewed-on: https://dart-review.googlesource.com/34742
Reviewed-by: Vyacheslav Egorov <[email protected]>
@mkustermann
Copy link
Member

The VM can now be launched with a dill file and use Isolate.spawn. This was the main thing I wanted to get working, so the new sim* builders we've added run isolate tests which increases our coverage there.

The remaining things, regarding not loading it from disc again but rather use the kernel blobs from the spawning isolate as well as supporting spawning from URIs are two other things I don't plan on looking into.

@mkustermann mkustermann removed their assignment Jan 16, 2018
@JekCharlsonYu JekCharlsonYu modified the milestones: 2.0-alpha2, I/O Beta 3 Feb 23, 2018
@mraleph mraleph removed this from the Dart2 Beta 3 milestone Mar 19, 2018
@kmillikin kmillikin added legacy-area-front-end Legacy: Use area-dart-model instead. front-end-kernel and removed legacy-area-front-end Legacy: Use area-dart-model instead. area-kernel labels Sep 19, 2018
@mraleph
Copy link
Member Author

mraleph commented Dec 1, 2018

The rest of work is going to happen under #6610 umbrella, closing this one.

@mraleph mraleph closed this as completed Dec 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. front-end-kernel legacy-area-front-end Legacy: Use area-dart-model instead. P2 A bug or feature request we're likely to work on
Projects
None yet
Development

No branches or pull requests

5 participants