With generic methods, uninstantiated types will require 2 instantiators, one
reflecting the class type arguments (as of today) and one reflecting the
function type arguments (new).
This is work in progress and the second instantiator is always null for now.
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2799373002 .
Fix observatory tests broken by running dartfmt due to line and column changes.
Temporarily reverted formatting for evaluate_activation_test.dart as dartfmt doesn't yet handle multitests.
BUG=
R=johnmccutchan@google.com
Review-Url: https://codereview.chromium.org/2759973004 .
I've omitted files where the formatter output is significantly uglier
than the original code and I'll send those files in a separate CL
with options for how to make the code look reasonable while still
taking advantage of the formatter.
BUG=
R=johnmccutchan@google.com
Review-Url: https://codereview.chromium.org/2751423005 .
This reverts commit d44fec08b0.
Remove special-cases for known types (int, String, num, double, Smi). The generic
lowering into an instance call (_simpleInstanceOf) works just fine for these predefined
types.
Also, remove parameter for negated is-tests. Instead insert explicit negation when.
building the flow graph.
Diff to original CL:
* Correct number of arguments in invocation of _instanceOf in kernel_to_il.cc.
R=vegorov@google.comTBR=vegorov@google.com
Review-Url: https://codereview.chromium.org/2748063003 .
Remove special-cases for known types (int, String, num, double, Smi). The generic
lowering into an instance call (_simpleInstanceOf) works just fine for these predefined
types.
Also, remove parameter for negated is-tests. Instead insert explicit negation when.
building the flow graph.
R=rmacnak@google.com
Review-Url: https://codereview.chromium.org/2751543003 .
The implementation of patching in analyzer checks that signatures are identical.
This is stricter than it needs to be, but the required fixes in dart:core are
pretty simple.
BUG=
R=hausner@google.com
Review-Url: https://codereview.chromium.org/2655223005 .
- bring patched SDK generation scripts and VM patch tweaks that allow VM patch files to be parsed by analyzer front-end;
Patched SDK is an SDK with all VM patches spliced into it. Kernel compiler is based on the analyzer front-end which does
not have any patch files support/model so for it to produce Kernel files that match VM we need to generate a such patched SDKs.
- bring test script modifications that allow to test Kernel pipeline
BUG=
R=asiva@google.com, kmillikin@google.com, whesse@google.com, zra@google.com
Review URL: https://codereview.chromium.org/2434123003 .
This reverts commit 890f694de5.
Previous commit was passing field_type_map_ down in a place where it was not passed down before.
This caused some handles to be used across zones, which caused crashes.
BUG=
Review URL: https://codereview.chromium.org/2453463006 .
Start by removing all get:runtimeType overrides in the patch files to have a single point computing the runtime type - Object.get:runtimeType. Handle string, double and integer types inside both intrinsic and runtime call to unify their handling and guarantee that code works even with intrinsifier disabled.
With overrides removed we can easily check that get:runtimeType is unique function name within the application that is being precompiled and use that to convert InstanceCall(get:runtimeType, ...) into StaticCall even nothing is known about the receiver.
This enables us to check if both left side and right side of comparison are StaticCall(Object.get:runtimeType, ...) when specializing InstanceCall(==, x, y). If they are we convert InstanceCall(==, StaticCall(get:runtimeType, a), StaticCall(get:runtimeType, b)) into StaticCall(Object._hasSameRuntimeType, a, b). A canonicalization rule will later delete unused get:runtimeType invocations.
Object._hasSameRuntimeType is implemented in C++ and intrinsified. It operates without creating new runtime types (except for Closures - where it does for simplicity). Cases of different class ids (i.e. a.[cid] != b.[cid]) and non-parameterized types are handled completely in the intrinsic. The rest is handled in the runtime code.
Microbenchmarking results:
Same parameterized classes: 15x improvement
Different parameterized classes: 300x improvement
Different/same non-parameterized classes: 2x improvement
BUG=
R=fschneider@google.com, regis@google.com
Review URL: https://codereview.chromium.org/2379733002 .
Allow members of patch classes to be annotated with @patch. The VM
ignores the annotation. I simply replaces the original method
if the name matches, or reports an error if field names match.
Adding a bit is_patched to members to do more checking remains a
TODO. There are currently no unused bits available, and I don’t want
to increase the size of Function objects for this.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/2230383003 .
Annotate patch classes and top-level patch functions with @patch
instead of the pseudo-keyword patch. This allows the analyzer
to read patch files, and matches the syntax that dart2js uses.
The deprecated syntax is still supported, but a warning is printed when detected.
BUG=
Review URL: https://codereview.chromium.org/2220883004 .
In unoptimized code equality is now just another instance call.
The optimizer replaces it with a specialized implementation based on static
type information and type feedback.
Many of the manual optimizations of == in the optimizer are now just handled
by the generic inliner, plus polymorphic inlining of == calls is now possible.
This also eliminates the need for a lot of duplicated code in the backend.
I adapted the inlining heuristics to compensate for the slightly larger
inital flow graph size.
Review URL: https://codereview.chromium.org//27307005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29800 260f80e4-7a28-3924-810f-c04153c831b5