- [x] Add an is static call bit to ICData
- [x] Rewrite the reset ICData iterators to rely on that bit rather than the function's ic data map
BUG=
Review URL: https://codereview.chromium.org/2064693003 .
Rework how we check guarded state consistency in background compiler.
Background compiler was storing original fields inside guarded fields list. This caused a race during inlining when inliner would copy guarded fields one by one from the callee function into the caller, because ParsedFunction::AddToGuardedFields looks at the guarded_cid to filter out those fields that should not be guarded.
As a result if some guarded field transitioned to unguarded (kDynamicCid) after callee graph construction but before list of guarded fields were copied then AddToGuardedFields would simply skip that field because it now has guarded_cid() == kDynamicCid.
We fix this race by always placing copies into the list of guarded fields and unwrapping them only in FinalizeCode.
Placing the copies also allows us to simplify a lot of code that was trying to verify guarded state consistency before committing the generated optimized code - now that we store copies in the list we can just compare their state to the originals and abort if the state is different.
Additionally fix deduplication check that was comparing original fields with copies - resulting in adding the same field into the list multiple times.
Add an assertion that verifies that we are not trying to access guarded_cid of original field from background compiler.
R=fschneider@google.com
BUG=
Review URL: https://codereview.chromium.org/2006793002 .
table, this ensures that we do not linearly walk through
a large type list in the class calling the expensive
'Type::Equals' method (some applications have close to
1304 generic types in them)
- Use the stand hash table implementation for TypeArguments
canonicalization instead of a custom hash table
R=johnmccutchan@google.com, regis@google.com, rmacnak@google.com
Review URL: https://codereview.chromium.org/1965493004 .
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 .
- Ensure the uniqueness of private keys without having to
search the existing key space.
- Pass a thread parameter where useful to library methods.
BUG=
Review URL: https://codereview.chromium.org/1947393003 .
- Add a zone parameter to TokenStream::Iterator
- Add IsXXXX() functions in raw_object.h using GetClassId()
- Modify
- Function::owner
- Function::origin
- Type::IsMalformed
- Type::IsMalbounded
- Type::error
to not create a Handle in the common path
R=regis@google.com
Review URL: https://codereview.chromium.org/1952023002 .
This undoes most of b2f3e8efe1.
This optimization prevents precompiled code from being disabled and re-enabled, because disabling causes the code to lose its only reference to its own instructions. This was okay for precompilated code that ran without a JIT because it is never disabled, but precompiled code that runs in a JIT will become disabled when corresponding optimized code is compiled and re-abled after a deopt.
R=fschneider@google.com
Review URL: https://codereview.chromium.org/1925153003 .
Speeds up name resolution of code that uses extensive
“exports” clauses. The pathological example in the bug report
compiles about 50 times faster.
Introduces a trail of visited libraries to detect cycles when following the exports directives. This works better with the background compiler.
BUG= 26145
Review URL: https://codereview.chromium.org/1902563002 .
- 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 .