Vyacheslav Egorov
f4ec20abac
Recognize and optimize a.runtimeType == b.runtimeType pattern.
...
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 .
2016-10-25 10:03:06 +02:00
Konstantin Shcheglov
581e6bc6e1
Extract _ReferencedUris information from UnlinkedUnit.
...
I considered removing it altogether, but reading unlinked bundles costs
something. So, we might consider caching this graph information.
OTOH, I agree that we might want to delay adding caching until we solve
the extra invalidation problem in _verifyUnlinkedSignatureOfChangedFiles.
TBR
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2447903002 .
2016-10-24 14:05:45 -07:00
Konstantin Shcheglov
d2347b6903
Exclude the file URI from _ReferencedUris.
...
Also fix a bug with adding bundles with the same content hash, but
different URIs. Add directly into the corresponding Map(s) for now.
TBR
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2447873002 .
2016-10-24 13:13:43 -07:00
Konstantin Shcheglov
a42e0e94d8
Delay invalidating linked hashes until after checking the API signature of the changed file.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2443083002 .
2016-10-24 12:16:07 -07:00
Konstantin Shcheglov
b7c412c672
Apply tweaks to address other review comments.
...
TBR
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2444993003 .
2016-10-24 10:55:46 -07:00
Konstantin Shcheglov
795be1983a
Fixes for review comments.
...
TBR
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2450483002 .
2016-10-24 10:23:11 -07:00
William Hesse
057b9ceba7
Update pkgbuild status for analyzer and front-end.
...
BUG=https://github.com/dart-lang/sdk/issues/27655
BUG=https://github.com/dart-lang/sdk/issues/27654
R=sortie@google.com
Review URL: https://codereview.chromium.org/2440423002 .
2016-10-24 13:37:10 +02:00
Florian Loitsch
6bc6ea34b5
Use different bug-number for skipped test.
...
BUG=
Review URL: https://codereview.chromium.org/2442203003 .
2016-10-24 10:56:24 +02:00
Vijay Menon
a7f53aca4d
Mark canary as failing
...
Looks like a test (audiocontext) is behaving different on stable vs canary.
TBR=jmesserly@google.com ,alanknight@google.com
Review URL: https://codereview.chromium.org/2444773003 .
2016-10-24 09:10:36 +02:00
vsmenon
2cafc4d044
Update README.md
2016-10-24 09:01:50 +02:00
Konstantin Shcheglov
e0563e7dbd
Remove unused code.
...
TBR
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2440363002 .
2016-10-23 23:48:01 -07:00
Konstantin Shcheglov
6ca7d24211
Cache URIs resolution.
...
TBR
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2440343002 .
2016-10-23 21:34:20 -07:00
Konstantin Shcheglov
64c776d30d
Include linked hashes into the current file state.
...
Also put the file content into the AnalysisContext to avoid race
condition if the file content is being changed.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2447603002 .
2016-10-23 20:59:38 -07:00
Konstantin Shcheglov
e7b596ce5b
Initial implementation of AnalysisDriver.
...
I will need to add more documentation, implement state transitions,
actually implement computing analysis results, add optimizations, etc.
TBR
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2439343002 .
2016-10-23 20:08:04 -07:00
Konstantin Shcheglov
f275b096c2
Update ByteStore documentation.
...
TBR
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2445623002 .
2016-10-23 15:30:32 -07:00
Konstantin Shcheglov
46aa3ced6f
Update the API documentations with Paul review comments.
...
TBR
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2443013002 .
2016-10-23 13:55:54 -07:00
Konstantin Shcheglov
c3e7be4f12
API for the new AnalysisDriver.
...
TBR
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2442993002 .
2016-10-22 20:12:29 -07:00
Zachary Anderson
c39525802e
GN: Fix build
...
GN is unhappy when a rule that consumes a file generated by
another rule doesn't depend directly on that rule.
This change also quiets output from invoking Dart to follow the
rule of GN builds that a successful build generates no output.
Review URL: https://codereview.chromium.org/2446473002 .
2016-10-22 00:05:39 -07:00
Zachary Anderson
c9537f56e4
runtime: Use Linux timezone implementation on Fuchsia
...
BUG=
R=zra@google.com
Review URL: https://codereview.chromium.org/2435273003 .
2016-10-21 23:42:07 -07:00
Ryan Macnak
af7bf4dab0
GN: Build the SDK with app snapshots instead of script snapshots.
...
R=zra@google.com
Review URL: https://codereview.chromium.org/2442513003 .
2016-10-21 17:40:21 -07:00
Ryan Macnak
e56d8eef56
Complain if an embedder fails to provide a vm isolate or isolate snapshot to a VM built without DART_NO_SNAPSHOT.
...
Closes #27649
R=asiva@google.com
Review URL: https://codereview.chromium.org/2441193002 .
2016-10-21 16:51:59 -07:00
Ryan Macnak
7c14d5e7d7
Exit gen_snapshot and log an error if an output file path is invalid
...
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/2440113003 .
2016-10-21 16:04:32 -07:00
Zach Anderson
b6ea87c444
[windows] Make most file_win.cc functions use malloc for string conversions.
...
They have been using Dart_ScopeAllocate(), which makes them impossible
to use outside of a scope.
Also turn on inlining in the GN Debug windows build to match the gyp build
and speed things up a bit.
R=asiva@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org/2439173002 .
2016-10-21 14:55:37 -07:00
Florian Schneider
ba04d1d627
Skip flaky isolate test temporarily.
...
This test still fails on some architectures (simmips, windows)
TBR=floitsch@google.com ,
BUG=
Review URL: https://codereview.chromium.org/2435603008 .
2016-10-21 14:01:17 -07:00
Ryan Macnak
1627c70035
Fix http_server_response_test.dart not to use snapshots as its data.
...
Fixes #27633
R=fschneider@google.com
Review URL: https://codereview.chromium.org/2441073002 .
2016-10-21 13:56:52 -07:00
Zachary Anderson
2312ff7cf4
Fuchsia: Use mx_handle_wait_many in the eventhandler
...
This is to set up for more handles coming in from sockets, etc.
R=asiva@google.com
Review URL: https://codereview.chromium.org/2438903002 .
2016-10-21 13:38:06 -07:00
Brian Wilkerson
b719474fd9
Intial support for unifying command-line handling
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2441053003 .
2016-10-21 13:16:25 -07:00
Brian Wilkerson
785b949894
Improve error recovery (issue 27646)
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2444453002 .
2016-10-21 12:36:01 -07:00
Florian Schneider
a74262c0e9
Enable now-passing tests for Android precompilation
...
Remove other obsolete entries.
Fixes #26373 .
Fixes #27378 .
R=rmacnak@google.com , whesse@google.com
Review URL: https://codereview.chromium.org/2431163007 .
2016-10-21 12:16:47 -07:00
Jennifer Messerly
ce76fc1fe5
fix #27644 , allow "dart" and "dartx" to be renamed if needed
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/2435223002 .
2016-10-21 11:48:19 -07:00
Jennifer Messerly
982f9f46ed
fix #27642 , static members should now work
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/2440863002 .
2016-10-21 11:25:47 -07:00
Paul Berry
396d7862b4
More improvements to DeclarationResolver.
...
This CL makes the following improvements:
- When visiting an executable element, local variables and labels are
rebuilt rather than matching them up to the old element model. This
ensures that if the element model was resynthesized from an API
summary (which doesn't contain local variables or labels), these
elements are not lost.
- When matching up existing elements, if the elements did not
previously contain offsets, offsets are recorded. If they did
previously contain offsets, the offsets are compared to verify that
they match. This ensures that if the element model was
resynthesized from an API summary (which doesn't contain offsets),
the offsets will be correct.
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/2435313002 .
2016-10-21 11:13:55 -07:00
Paul Berry
f1aee7cf68
Fix static modifier for synthetic fields coming from summaries.
...
R=jmesserly@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/2439023002 .
2016-10-21 11:09:11 -07:00
Sigmund Cherem
02a14cd937
Add kernel generation to the compiler/perf script
...
R=het@google.com
Review URL: https://codereview.chromium.org/2436333002 .
2016-10-21 10:02:13 -07:00
Sigmund Cherem
2bcd189f2d
add kernel generation to the front_end/tool/perf script
...
BUG=
R=paulberry@google.com
Review URL: https://codereview.chromium.org/2439053003 .
2016-10-21 09:10:19 -07:00
Sigmund Cherem
5964bdfa0b
Copy perf.dart into front_end/tool.
...
This keeps analyzer_cli/perf.dart for now: I need to make the change in two
parts so I can update the benchmark runners after I submit this.
BUG=
R=paulberry@google.com
Review URL: https://codereview.chromium.org/2432043008 .
2016-10-21 09:07:48 -07:00
William Hesse
edc7ca7517
Don't run pkg tests on GN builders
...
BUG=
R=sortie@google.com
Review URL: https://codereview.chromium.org/2442703002 .
2016-10-21 12:53:35 +02:00
Jennifer Messerly
95ef8bb59a
fix #27643 , failed to virtualize fields if an abstract one is mixed in
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/2441693003 .
2016-10-20 16:31:06 -07:00
Sigmund Cherem
3c44a09882
make kerneltask an actual task
...
R=het@google.com
Review URL: https://codereview.chromium.org/2442503004 .
2016-10-20 16:27:33 -07:00
Vijay Menon
ce963596f0
Emit API-only summaries
...
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/2435203002 .
2016-10-20 16:21:53 -07:00
Jennifer Messerly
cc1ad8cdde
fix #27532 , implementing a native type with fields
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/2430953006 .
2016-10-20 15:59:18 -07:00
Jennifer Messerly
5111675810
fix #27631 , get/set methods no longer shadow index operator
...
R=rnystrom@google.com
Review URL: https://codereview.chromium.org/2435163002 .
2016-10-20 15:45:29 -07:00
Brian Wilkerson
36d89f0c38
Prepare to publish
...
R=keertip@google.com
Review URL: https://codereview.chromium.org/2438653004 .
2016-10-20 14:31:08 -07:00
Sigmund Cherem
61bf1c2dc0
Re-add null check for closure-data (Originally removed in 177dee8f16
)
...
Review URL: https://codereview.chromium.org/2438823002 .
2016-10-20 14:21:00 -07:00
Ryan Macnak
d274e8adf8
Skip http_server_response_test on AOT and app snapshots.
...
Issue #27633
R=fschneider@google.com
Review URL: https://codereview.chromium.org/2432923005 .
2016-10-20 13:55:55 -07:00
Siva Annamalai
9c737d6055
Adjust help message.
...
R=fschneider@google.com
Review URL: https://codereview.chromium.org/2441553002 .
2016-10-20 13:54:35 -07:00
Zachary Anderson
8200955ed0
Fuchsia: Add native symbol resolver. Small fixes.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org/2438843002 .
2016-10-20 13:39:35 -07:00
Bob Nystrom
8e37e083fd
Fix dart_style version.
...
I accidentally tagged the code review commit for "0.2.11+1", not the
commit created and landed by Rietveld. The "v0.2.11+1" tag points to the
right commit.
R=paulberry@google.com
Review URL: https://codereview.chromium.org/2438793003 .
2016-10-20 13:26:18 -07:00
Florian Schneider
c3fb2b5d89
Fix two io tests for precompilation, update status
...
BUG=#26376
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/2441743002 .
2016-10-20 13:14:12 -07:00
Paul Berry
74d8298777
Fix handling of default formal parameters in DeclarationResolver.
...
When visiting a DefaultFormalParameter, we can't call
super.visitDefaultFormalParameter, because that would cause the
default value to be visited twice.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2438113002 .
2016-10-20 12:34:16 -07:00