Initializer expressions are evaluated only once. Therefore, do not store
constant expressions in the constant cache, since they will never be
used again.
Except: when generating a stack trace and accessing the local variables
in a the stack frame of an initializer expression (static final getter function),
the constant will have to be recomputed instead of retrieved from the cache.
This CL also disables the stacktrace_every stress flag while a stack trace
is being collected, to avoid recursive requests for stack traces.
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1934733002 .
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 .
stack_limit_,
stack_overflow_flags_,
saved_stack_limit_,
stack_overflow_count_ and
other interrupts mask fields from Isolate structure to Thread structure
- Change the stack overflow check in the prolog to load the stack limit
from the THR register, this removes the back to back dependent loads to
load the stack limit from the Isolate structure
R=johnmccutchan@google.com, rmacnak@google.com
Review URL: https://codereview.chromium.org/1812753002 .
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 .
identical names. The library name is not always helpful, and the prefix confuses
users when the types are function types.
Instead, enumerate all appearing types with their URIs.
This should help debug issue #27229258.
R=srdjan@google.com
Review URL: https://codereview.chromium.org/1743653002 .
Independently patchable entries are not required for debugging because breakpoints are only added to unoptimized code, nor for deopt because deopt patches the instruction stream and not the object pool.
Future work: Reduce the static call table from (pc offset, function, code) triples to (pc offset, function or allocation stub) pairs.
precompiled dart2js arm 20747140 -> 20674954 (-0.34%)
R=fschneider@google.com
Review URL: https://codereview.chromium.org/1713853003 .
Move optimizations for precompilation into separate file.
Remove precompilation-specific code from flow_graph_optimizer.cc.
Add precompilation-flags: They are const in the precompiled runtime. Started moving flags to use the new flag-definition macros.
Add libdart_lib_precompiled target.
Define PRECOMPILED_RUNTIME_MACRO in more places (dart_precompiled_runtime)
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1714743002 .
- Use TokenDescriptor instead of intptr_t for all token positions.
- Use TokenDescriptor in raw_object instead of int32_t.
- TokenDescriptor is a POD with an int32_t (this shrinks the size of AST and IR nodes by 32-bits on 64-bit architectures).
There are some cleanups I plan on doing as a follow up CL:
- Replace TokenDescriptor::value() with TokenDescriptor::TokenPos()
R=iposva@google.com, rmacnak@google.com
Review URL: https://codereview.chromium.org/1644793002 .
Replace always_optimize_ and allow_recompilation_ with
FLAG_precompilation and !FLAG_precompilation.
They are equivalent and set only once according to the
--precompilation flag
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1657153002 .
They were used as the class of closure instances and as the type class of
function types.
All closure instances now have class _Closure and function types are represented
by a new class FunctionType extending AbstractType.
Fix issue 24567 and add regression test.
R=asiva@google.com, rmacnak@google.com
Review URL: https://codereview.chromium.org/1584223006 .
This removes most of the compiler-related code from dart_precompiled:
x64 stripped binary size 13M -> 9.1M
ARM stripped binary size 12M -> 8.3M
The precompiled build defines the DART_PRECOMPILED macro. This
stubs out the public interface to the compiler/parser with empty
function bodies.
Use gcc options -ffunction-sections and --gc-sections to make the linker remove
unused functions/symbols.
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1459443002 .
- Defer deoptimization from optimizing compiler to code installation in mutator thread.
- Defer registration of field and leaf class dependency until code is installed in mutator thread.
- Cleanup.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1433243003 .
Set invocation counter to INT_MIN once a function is entered into the optimization queue, so that it does not get repeatedly triggered. Mutex on megamorphic cache lookup. Make AttachCode thread safe. Cleanups.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1413233004 .