This is needed to support cases where memory with kernel binary was
allocated outside of Dart VM(for example, in Flutter Engine) has to be
released using appropriate mechanism too.
Bug:
Change-Id: I863db9e5a33469ba8fb5c1f8789c6498ddfbb385
Reviewed-on: https://dart-review.googlesource.com/5121
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2. Adjust the Dart front end to not require a 'main' method when the in memory filesystem is used, this allows execution of VM unit tests which all do not necessarily have a 'main' method (integrated CL from siggi)
3. Change kernel reader to not look for a 'main' methos when Dart_LoadKernel is called.
4. Change Dart_LoadScript to also support loading of dart programs when Dart front end is used
R=aam@google.com, sigmund@google.com
Review-Url: https://codereview.chromium.org/2948273002 .
2. Read the platform dill file at startup not for every isolate creation
3. Store the memory representation of kernel program in isolate data so that it is deleted when the isolate is shutdown
R=aam@google.com
Review-Url: https://codereview.chromium.org/2927493002 .
Only reload packages map when we are actually doing the isolate reload.
Snapshotting creates and destroys and loader object every time it loads a dart
file - which means kInitLoader is on the hot path and we should avoid rereading
packages map.
R=asiva@google.com, rmacnak@google.com
Review-Url: https://codereview.chromium.org/2901093002 .
The problem with these changes was that closed ports still continue to receive
messages and as a result we start using dead peer objects.
Fixing that would require more intrusive changes into message handler implementation - so instead we are reverting the changes and restoring manual PORT -> PEER mapping.
BUG=
R=erikcorry@google.com
Review-Url: https://codereview.chromium.org/2666063002 .
To run a script with the Dart->Kernel parser, use the -dfe option:
dart --dfe=runtime/tools/kernel-service.dart --packages=/src/d2/sdk/.packages foo.dart
The front end expects a directory named patched_sdk in the build directory (patched_sdk should be a sibling of the directory that contains the dart executable.)
Warning: using a debug build dart executable is very slow. It takes 2 minutes to run Hello World in a debug build, and about 7 seconds in a release build.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/2558673002 .
To run a script with the Dart->Kernel parser, use the -dfe option:
dart --dfe=runtime/tools/kernel-service.dart --packages=/src/d2/sdk/.packages foo.dart
The front end expects a directory named patched_sdk in the build directory (patched_sdk should be a sibling of the directory that contains the dart executable.)
Warning: using a debug build dart executable is very slow. It takes 2 minutes to run Hello World in a debug build, and about 7 seconds in a release build.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/2483373002 .
This CL allows native extension lookup to defer to the platform's
library lookup (e.g. dlopen) when the library cannot be found next to
the importing Dart library. It also allows dart-ext: to accept an
absolute path to the native library.
R=asiva@google.com
Review URL: https://codereview.chromium.org/2285223003 .
We now check all of the scripts which make up a library. If any
script is modified, then we consider that library to be modified. We
also consider any library which imports a modified library to be
modified. To propagate this info efficiently, we build and discard
the imported-by graph when beginning a reload.
The embedder must provide a FileModifiedCallback in order to support
the detection of modified scripts.
In order to detect changes to package: libraries, we have modified the
embedder interface to provide the resolved url when possible, so that
we don't need to re-resolve package uris when checking for reload.
This change is incompatible and all embedders will need to be updated.
We now support a "force" flag when reloading sources. This causes all
libraries to be reloaded regardless of whether the underlying scripts
have been updated.
Closes#26919R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2186423002 .
Fixes https://github.com/dart-lang/sdk/issues/26879
When a dart-ext is imported from within a package: library we need to fully resolve the package: to a file: (or whatever scheme:) so that we can locate the shared object for the extension file.
This CL sends this request through the service isolate so that the package: can be resolved even when a package config is being used.
R=asiva@google.com
Review URL: https://codereview.chromium.org/2146093002 .
Process::Exit does not do the normal shutdown procedure - this CL avoids
a crash in the static destructor of the loader info lock by making it
new-allocated.
Also remove --shutdown flag since the clean shutdown procedure is on by
default since a while now.
BUG=#26846
R=asiva@google.com, zra@google.com
Review URL: https://codereview.chromium.org/2147833002 .
- [x] The first caller of the tag handler blocks, recursive callers queue work and exit.
- [x] Use a NativeMessageHandler to receive I/O results from the service isolate.
- [x] Preserve load error message format.
- [x] Move packages map into service isolate.
- [x] Wire up Todd's native URI code.
R=turnidge@google.com
Review URL: https://codereview.chromium.org/1998963003 .