There are a few problems with this function:
* It returns uint64_t instead of int64_t, which is different from
core Dart library function identityHashCode()
* Dart_IdentityHash truncates negative Mint and Bigint values to 0,
while negative Smi values are converted to uint64_t.
The Dart_IdentityHash function is not used, so we decided to remove it
instead of fixing these problems.
R=zra@google.com
Review-Url: https://codereview.chromium.org/2980043002 .
2. Get rid of _getMainClosure()
3. Adjust the AOT compiler to ensure it retains the function associated with
the main closure without having to include '_getMainClosure()' in the list
of embedder specified entry points
4. Get rid of the hack in kernel reader to do a delayed patch of
'_getMainClosure()' in the builtin library.
BUG=
R=aam@google.com, rmacnak@google.com
Review-Url: https://codereview.chromium.org/2933603002 .
Only include OSR and field guards in the features descriptor for JIT code to avoid gen_snapshot and dart having different default values.
Disabled since core snapshots with code break tests with non-default flags for type checks, assertions, strict errors, OSR, or field guards.
R=zra@google.com
Review-Url: https://codereview.chromium.org/2902313004 .
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 .
This reverts commit d91f228766.
The commit causes a failure in
tools/build/mac/verify_order _ChromeMain "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}":
unordered symbols in out/Release/Chromium Framework.framework/Versions/A/Chromium Framework:
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2884383005 .
With this change one can run run_vm_tests and pass to it reference to kernel parser snapshot. For example,
out/DebugX64/run_vm_tests --dfe=out/DebugX64/gen/kernel-service.dart.snapshot Debugger_RemoveBreakpoint
As this represents first step, this change enables only tests in debugger_test.cc to run with kernel frontend. There will be follow-up cls that enable all of the VM tests to use kernel frontend.
BUG=https://github.com/dart-lang/sdk/issues/28264R=asiva@google.com
Review-Url: https://codereview.chromium.org/2881953002 .
In Debug mode we have assertions checking that we don't attempt OSR when
FLAG_use_osr is disabled - however app-jit snapshots are compiled with OSR
enabled and still contain countining and OSR attempting code, which causes
assertions to fail.
Refactor how getters for isolate flags are defined, consolidate all flags into
a single list.
Update test expectations and switch -c dartk configuration to use app-jit snapshot.
BUG=
R=rmacnak@google.com
Review-Url: https://codereview.chromium.org/2728163002 .
We have tests that disable it but we train app-jit snapshot for Kernel with field guards enabled so
we need to make sure that Kernel isolate runs with correct settings matching the settings at the time
when app-jit snapshot was created.
BUG=
R=rmacnak@google.com
Review-Url: https://codereview.chromium.org/2715213008 .
IsolateData contains AppSnapshot which might own some HeapPage-s, so we can't
destroy IsolateData in the Dart_IsolateShutdownCallback, because some thread
running in the isolate (e.g. background compiler) might still touch
thoses pages or objects they host.
We need to delay destruction of AppSnapshot until after the isolate shutdown.
Current API does not allow that, so we introduce a new isolate lifecycle
callback - Dart_IsolateCleanupCallback, which is invoked at the end of the
isolote lifecycle when things like background compiler have been stopped
and no Dart code is supposed to run.
BUG=
R=rmacnak@google.com
Review-Url: https://codereview.chromium.org/2720723005 .
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 .