Static initializers were compiled without any optimizations. They are only
executed once, but the optimizer can potentially extract static type information
and may also produce a bit smaller code. (7K size savings when compiling dart2js -- i.e. < 0.1%)
This CL enables optimizations for them. The space savings
are not great, but I still think it's nicer to only have
optimized code when precompiling, instead of a mixture of
unoptimized and optimized.
Also, fix printing disassembly for initializers, and insert additional assertions.
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1958913003 .
- 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 .
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 .
Add mirror regression test.
Adjust expectation of a mirror test.
Fix parser to mark current class as typedef before parsing signature.
Fix canonicalization of typedef function types (a typedef class can be the scope
class of more than one function type, even if not generic).
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1890013002 .
- 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 .
- 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 .
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 .
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 .
Looking up a name x in the library scope or in a prefix can also return
the setter name x=. There were several situations that were not handled
right.
- a getter x and a setter x= should not result in a duplicate name
error (and thus a resolution error at runtime).
- when looking for an untangled name x but a setter x= is found first,
keep looking for x.
BUG=25625
R=regis@google.com
Review URL: https://codereview.chromium.org/1752203002 .
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 .