Fix a crash in debugger: in background compilation check if the function is still marked as optimizable; setting breakpoints at runtime can change that.
Add flag --stress-test-background-compilation which re-feeds compiled functions into the compilation queue.
Add various asserts related to background compilation.
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1884213004 .
- Some minor cleanups
- Return an empty array right away in the parser instead of creating an
empty array and canonicalizing it
- The canonical bit was not being set for some of the singleton objects.
R=regis@google.com
Review URL: https://codereview.chromium.org/1873143003 .
The slow string comparison is only necessary when looking up
non-symbols or untangled private names.
Compiling all of dart2js seems to be about 1% faster, but it's really in the noise.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1868803002 .
HashMap to store the Canonical constants of Instances/Arrays. The goal is
to continue to use an array for Numbers (Mint, Bigint, Double) and use a
HashMap for other Instances/Arrays.
- Check first for the array length and elements being same before checking
if the TypeArguments are equivalent
- Removed some unused code
R=regis@google.com
Review URL: https://codereview.chromium.org/1866713003 .
Background compilation requires that a function was run through parser in mutator thread at least once. Because snapshots can/could preload ICData and code they are not reliable signals if the function was compiled or not. Add a bit to function object.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1857273002 .
- No new fields or patching of existing fields can be done
- Only external methods that have not already executed (i.e code for it has been generated) can be patched
This change enables patching of JS Interop methods into a class and provides close to 5 sec drop in start up times for Green Tea app.
R=hausner@google.com, regis@google.com
Review URL: https://codereview.chromium.org/1850653003 .
Reference Instructions only through Code::entry_point_ (or Function::entry_point_). Store the instructions size in its corresponding Code object.
precompiled dart2js x64 22163470 -> 21621102 (-2.45%)
R=fschneider@google.com
Review URL: https://codereview.chromium.org/1808553002 .
Abort background compilation if deferred loading occurs during parsing, since the code generated would not match the saved ICData (deopt-id assignments change, since LibraryPrefix.is_loaded changes in mutator thread while compiling in background)
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1830283002 .
It is only used to test if the Code has been disabled, and we can instead test if the active entry point matches the Instruction's entry point. A Code's entry point is either for its own Instructions or Instructions of stub code in the VM isolate, so we don't need this field to keep the Instructions alive.
precompiled dart2js x64 22254552 -> 22165795 (-0.39%)
BUG=http://dartbug.com/25992R=fschneider@google.com
Review URL: https://codereview.chromium.org/1814623003 .
This removes the additional indirection to the VM's implementation
for all the factory constructors.
Additionally, it removes one class per typed data list type, thus reducing
snapshot and generated code size.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1790593002 .
Load the Code from the ic data array instead of the ObjectPool because we still need the Code object in the frame to find stackmaps / build stacktraces / build profile results.
Keep doing things the old way until all compilation is finished because evaluation of constants still needs functional lazy compilation and the compiler works with ICData that may contain as-yet-uncompiled functions. After compilation is finished, transform all the ICData from (cid, target function, count) to (cid, target code, entry point) and switch to the ICLookup stub that works with this representation.
Golem average +3.133% on ARM, +3.544% on x64
R=srdjan@google.com
Review URL: https://codereview.chromium.org/1799793002 .
API changes:
- Remove isolate specific Timeline APIs.
- Remove Dart_EmbedderTimelineGetTimeline callback.
- Add Dart_TimelineEvent so that arbitrary trace events can be added.
Internal changes:
- Remove isolate specific streams which were never used or controllable from outside the VM.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1811613002 .
The stack overflow check on the back-branch of the loop must
be at the same context level as the (outer) loop block of
the for-loop.
Before this change, the stack check was recorded to be at a
token position that is outside of the loop block, which caused
a context mismatch on some stack traces when the debugger
or the observatory interrupted the isolate on that back
branch.
It is not practical to write a test for this, unfortunately.
BUG=25684
R=fschneider@google.com
Review URL: https://codereview.chromium.org/1768763002 .
For now, change compilation-related flags to be regular
command line options. They won't affect the size of the
precompiled runtime anyway since the compiler is not included
there.
Also introduce a separate switch for precompiled runtime. This can be
used instead of the macro since it is a compile-time constant in the
precompiled runtime.
BUG=
Review URL: https://codereview.chromium.org/1759913002 .
- Fix bug in inlined call token positios.
- Add ProfileFunctionSourcePosition for tracking source positions within functions.
- Keep a list of ProfileFunctionSourcePosition in each function.
- Add unit test helper functions.
- Add unoptimized unit tests that verify source positions in function profiles.
- Add optimized/inlined unit tests that verify source positions in function profiles.
R=srdjan@google.com
Review URL: https://codereview.chromium.org/1758653003 .