When precompiling, it is possible to encounter a compile-time
error when inlining because the target never went through unoptimized
compilation or optimized compilation where it was the root function. Some checks
for compile-time errors are not idemponent because have they have
side-effects: in particular, the checks for a cyclic redirecting factory or
const expressions that have a runtime error may not trigger the second
time they are parsed.
R=fschneider@google.com
Review URL: https://codereview.chromium.org/1568613007 .
- Give AwaitMarkerNode a token position.
- Make it possible to provide a token position for SaveContext, RestoreContext, StoreContext, and CurrentContext.
- Pass in a token position to internally generated StoreLocal and LoadLocal instructions for try-catch-finally.
- Introduce a Context ClassifyingTokenPosition to be used when we can't attribute a context related instruction to a source position.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1575953005 .
2. Add code to avoid multiple garbage collection requests on different threads to sync up and allow only one request to proceed at a time, other requests wait for this garbage collection request to be done and then proceed to allocation once the request is done.
R=iposva@google.com
Review URL: https://codereview.chromium.org/1562853003 .
This fixes some flaky failures and timeouts on Windows in tests where
an ASSERT fails.
This change requires Using OS::Abort in platform/assert.cc so that the
flag disabling tls destructors can be set.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1572913002 .
- Provide source positions for some ConstantInstrs.
- Classify all other ConstantInstrs.
- Use the token position of ++ rather than x in the expr: "x++;" for the add, constant 1, and final load operations.
- More tests
- Improvements to the test helpers.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1576583003 .
Super initializer calls get implicitly moved to the end of the initializer list, so we don't need the two-phase constructor protocol anymore.
Ryan, can you please look at the mirror changes and check wether I've missed something?
BUG=
R=asiva@google.com, rmacnak@google.com
Review URL: https://codereview.chromium.org/1569213003 .
- When using --compile_all + --noopt, run Dart_CompileAll before Dart_Precompile to avoid skipping functions dropped by Precompile / asserting out on functions retained but uncompiled by Precompile.
- Fail gracefully when attempting to use more than one of --noopt, --gen_precompiled_snapshot, or --run_precompiled_snapshot.
- Fix tree shaking roots to include the right VM entry point for creating assertion failures.
R=fschneider@google.com
Review URL: https://codereview.chromium.org/1567953002 .
Bug was introduced by 91bc8005fe.
- Move the Dart stack pointer from R19 (C preserved) to R15 (C volatile) so it isn't among the registers saved by the InvokeDartCode stub.
- Set a default cross compiler for ARM64.
- Use ARM32 instead of IA32 binary to build Observatory on ARM64 hosts.
R=regis@google.com
Review URL: https://codereview.chromium.org/1559223003 .
Arguably method extractors, invoke-field dispatchers and noSuchMethod dispatchers should also have their token position as kNoSourcePos instead of 0, but this would complicate how parser initializes its token iterator, so I'm leaving them as is.
R=hausner@google.com, johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1566553003 .
There were two exception handlers with the same index added to the code so that only the one added
last was executed. In case of an exception that means that a re-throw may be omitted, causing invalid
control flow.
Also, add assertion to ensure unique try-index for exception handlers.
BUG=#25333
R=hausner@google.com
Review URL: https://codereview.chromium.org/1569523002 .
Also drop stub-code generation code, which pulled in large parts of the assembler as well.
This reduces the size of dart_precompiled/libdart_precompiled by around 100K on x64.
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1560663002 .
- Don't consider hotness in inlining decisions as there is no counter
feedback. By itself this change would increase precompiled snapshot size by
~20%.
- Lower size threshold for always-inline.
- Lower size threshold for never-inline.
- Lower max inlining depth.
dart2js ARM precompiled snapshot: 23847465 => 25436213 (+6.67%)
--noopt benchmarks: geom mean +5.61% (ARM Cortex A53)
BUG=http://dartbug.com/25097R=fschneider@google.com, srdjan@google.com
Review URL: https://codereview.chromium.org/1556173002 .
- Split interface to provide direct access to raw clock value and clock frequency.
- Update Stopwatch to use raw clock value and clock frequency instead of microseconds.
- Fix possible initialization race on OSX
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1563473002 .
superclass is generic, in which case the type argument vector is not
necessarily empty, but definitely constant.
Until now, the fast cache was only used for classes without type arguments along
the whole superclass chain.
R=srdjan@google.com
Review URL: https://codereview.chromium.org/1556113002 .
Evaluate and canonicalize the parameters to the built-in function
identical(a,b) if they are strings. This guarantees that
identical(“ab”, “a”+”b”) evaluates to true.
Note: when the parser parses “a”+”b”, it doesn’t know whether the
expression will be used in a context that may require a
constant value. The canonicalization is thus deferred until it is
known that it is required.
BUG=25024
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1558033002 .