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 .
- Rename functions to make correspondence between JIT and AOT app snapshot clearer.
- Update documentation on assembly output of AOT snapshots.
- Remove old Dart_PrecompileJIT.
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2611343002 .
- Adjust fingerprints to be independent of the library's private key, which varies with load order.
- Use usage_counter in AOT inlining decisions if JIT feedback is available.
- Reduce inlining in cold functions.
dart2js product aot snapshot 15841351 -> 14436273 (-8.86%)
R=fschneider@google.com
Review-Url: https://codereview.chromium.org/2562693003 .
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 .
Install a signal handler in the standalone VM that dumps a backtrace
similar to what we already do on assertion failures.
For now only Linux and MacOS are supported.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/2514113002 .
- [x] Add arguments `rootLibUri` and `packagesUri` to the reload service rpc. These allow the uri of the root library and the .packages files to be overridden.
- [x] When pairing libraries during reload, support the base url changing.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/2512483002 .
i.e. #ifndef VM_WHATEVER -> #ifndef RUNTIME_VM_WHATEVER
This lets us remove a hack from the PRESUBMIT.py script that existed
for reasons that are no longer valid, and sets us up to add some
presubmit checks for the GN build.
R=asiva@google.com, rmacnak@google.com
Review URL: https://codereview.chromium.org/2450713004 .
For blobs, put all four pieces into a single file with a header describing their offsets.
For dynamic libraries, move the vm isolate and isolate pieces into the dynamic library as additional read-only sections.
Automatically detect if the script argument is an app snapshot and initialize the VM appropriately, similar to automatic detection of script snapshots.
R=asiva@google.com
Review URL: https://codereview.chromium.org/2405393002 .
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 .
- [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 .
Adds Dart_DefaultCanonicalizeUrl() to the dart embedding api.
Motivation:
As we try to get source reloading working for the standalone embedder, things get simpler if an isolate doesn't run Dart code while it is loading Dart code. We intend to solve this by moving the embedder tag handler calls to the service isolate. But making a blocking rpc into the service isolate whenever a url needs to be canonicalized during parsing seems like it would slow things down and make things complicated. By moving canonicalization into C++, we avoid this.
R=ahe@google.com, fschneider@google.com, johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2011543002 .
This is a cut of the work that Todd and I collaborated on in the reload branch.
In this CL, we've dropped the loader port hacks, in other words, on stack reloading in the standalone embedder does not work yet.
- [x] Support for hot reloading of isolate source code
- [x] Unit test harness and many tests
- [x] Service protocol and Observatory support
- [x] Product build does not include support for hot reloading.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1965823002 .