Commit graph

46013 commits

Author SHA1 Message Date
pq 2bc70e6a26 Bump Linter to latest (0.1.30).
R=brianwilkerson@google.com

Fixes: https://github.com/dart-lang/linter/issues/491
Review-Url: https://codereview.chromium.org/2807633002 .
2017-04-07 12:37:14 -07:00
Konstantin Shcheglov ee89054fe9 Issue 29288. When infer new FunctionType, makes its FunctionElement own its ParameterElement(s).
Never share.

R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/29288

Review-Url: https://codereview.chromium.org/2799093007 .
2017-04-07 12:21:53 -07:00
Brian Wilkerson 1910147425 Partial fix for generic function types - non-driver case
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2802203003 .
2017-04-07 11:17:37 -07:00
Ryan Macnak 170bf10904 Do not create method extractors during JitOptimizer::TryExpandClassesInICData.
Closes #29230
Issue #29292
Issue #29293

R=erikcorry@google.com, vegorov@google.com

Review-Url: https://codereview.chromium.org/2796283006 .
2017-04-07 09:45:09 -07:00
Johnni Winther d0e450d501 Use Set<ClassEntity> instead of Set<MixinApplicationElement>
To make benefit glorious type system of Dart.

Review-Url: https://codereview.chromium.org/2804233002 .
2017-04-07 14:26:00 +02:00
Dmitry Stefantsov cd501b2db3 Switch to Fasta in "golden" tests of closure conversion
R=ahe@google.com

Review-Url: https://codereview.chromium.org/2808443002 .
2017-04-07 14:21:04 +02:00
Peter von der Ahé 6b150cb01f Verify rethrow and parents of variables.
R=asgerf@google.com

Review-Url: https://codereview.chromium.org/2800853005 .
2017-04-07 12:59:03 +02:00
Peter von der Ahé 20aefd34f5 Document file names in deps files.
R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2805663002 .
2017-04-07 12:37:29 +02:00
Peter von der Ahé b8d63c3890 Use identical to compare strings.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2801963003 .
2017-04-07 12:35:34 +02:00
Peter von der Ahé 1e70fef1a2 Small steps towards deferred loading.
R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2803833003 .
2017-04-07 12:23:35 +02:00
Johnni Winther 97b19651a5 Extract ResolutionWorldBuilderBase from ElementResolutionWorldBuilder
This is a step towards reusing parts of ElementResolutionWorldBuilder
for kernel-based elements.

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2804993002 .
2017-04-07 09:59:49 +02:00
Johnni Winther 7108d7b7a4 Remove use of Element in ResolutionEnqueuerListener.
This makes ResolutionEnqueuerListener reusable for kernel-based elements.

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2797173004 .
2017-04-07 09:41:57 +02:00
Johnni Winther 12615de38f Support dartk on Windows.
This adds tools/dartk_wrappers/dartk.bat. The --package argument is
deliberately relative because of issue 29284.

R=asgerf@google.com

Review-Url: https://codereview.chromium.org/2803973002 .
2017-04-07 09:31:10 +02:00
Johnni Winther 76737bb8ea Register deferred load impact through ResolutionEnqueuerListener
This is a part of the work to decouple the backend from the used element model.

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2800643002 .
2017-04-07 09:26:25 +02:00
Stephen Adams 9f10c4898c Revert "Redo "dart2js: Insert HTypeKnown refinement nodes on dominated edges of HPhi nodes.""
There is one case where compilation is much slower (corelib/regexp/pcre_test).
Reverting while investigating.

The test has a 6.6K-line main() with straight-line code.

Before:

    SSA optimizer took 78552msec
    SSA optimizer > SsaInstructionSimplifier took 21434msec
    SSA optimizer > SsaTypeconversionInserter took 12msec
    SSA optimizer > SsaRedundantPhiEliminator took 1msec
    SSA optimizer > SsaDeadPhiEliminator took 0msec
    SSA optimizer > type propagator took 15639msec
    SSA optimizer > SsaCheckInserter took 18msec
    SSA optimizer > SsaDeadCodeEliminator took 35806msec
    SSA optimizer > SsaGlobalValueNumberer took 564msec
    SSA optimizer > SsaCodeMotion took 1msec
    SSA optimizer > SsaLoadElimination took 360msec
    SSA optimizer > SSA value range builder took 4700msec
    SSA optimizer > SsaSimplifyInterceptors took 2msec

After:
    SSA optimizer took 156299msec
    SSA optimizer > SsaInstructionSimplifier took 18700msec
    SSA optimizer > SsaTypeconversionInserter took 7msec
    SSA optimizer > SsaRedundantPhiEliminator took 1msec
    SSA optimizer > SsaDeadPhiEliminator took 0msec
    SSA optimizer > type propagator took 52763msec
    SSA optimizer > SsaCheckInserter took 26msec
    SSA optimizer > SsaDeadCodeEliminator took 31066msec
    SSA optimizer > SsaGlobalValueNumberer took 596msec
    SSA optimizer > SsaCodeMotion took 2msec
    SSA optimizer > SsaLoadElimination took 368msec
    SSA optimizer > SSA value range builder took 52752msec
    SSA optimizer > SsaSimplifyInterceptors took 2msec

BUG=

Review-Url: https://codereview.chromium.org/2804193002 .
2017-04-06 21:55:05 -07:00
Regis Crelier b87f7ece72 Mark 2 tests as crashing in dartk debug mode.
Review-Url: https://codereview.chromium.org/2800043002 .
2017-04-06 18:04:12 -07:00
Stephen Adams 427ccea1b2 Test can pass if minification accidentally picks same name
Ideally, we should make all tests that use x.runtimeType.toString() use classes with longer names.

BUG=

Review-Url: https://codereview.chromium.org/2798263004 .
2017-04-06 17:33:32 -07:00
Stephen Adams 85af0259cb Expect.equals and Expect.identical escape more strings
I found it difficult to understand messages with strings that look the
same, e.g. containing zero-width character or different encodings of a
character.

BUG=
R=lrn@google.com

Review-Url: https://codereview.chromium.org/2750763002 .
2017-04-06 15:38:50 -07:00
Zachary Anderson f1c7a22c43 [infra] Fixes for cross-toolchains
toolchain_prefix was not correctly propagated everywhere it needed to
go. This CL also adds an error to build.py if someone tries to use
--toolchain as it is not supported there.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2797303005 .
2017-04-06 15:03:26 -07:00
Vijay Menon 5c3bcff375 DDC fix for foreign futures
Fixes #29287

R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2804113002 .
2017-04-06 14:52:59 -07:00
Konstantin Shcheglov 80a935bd76 Fix for parsing named factory constructors with Fasta.
R=paulberry@google.com, ahe@google.com
BUG=

Review-Url: https://codereview.chromium.org/2803113002 .
2017-04-06 14:11:57 -07:00
Bob Nystrom 8bda93d58c Update dart_style.
This brings in an important fix for formatting generic function-typed
parameters. See:

https://github.com/dart-lang/dart_style/issues/613

R=kevmoo@google.com

Review-Url: https://codereview.chromium.org/2805103002 .
2017-04-06 14:03:25 -07:00
Konstantin Shcheglov 8c8a02ab4f Support for parsing native function bodies with Fasta.
R=paulberry@google.com, ahe@google.com
BUG=

Review-Url: https://codereview.chromium.org/2797343003 .
2017-04-06 14:00:44 -07:00
Dan Rubel 46b0c1da56 merge fasta.Keyword into analyzer.Keyword
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2797133008 .
2017-04-06 16:52:01 -04:00
Stephen Adams 6feb58bfb1 Redo "dart2js: Insert HTypeKnown refinement nodes on dominated edges of HPhi nodes."
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2798423003 .
2017-04-06 13:47:59 -07:00
Ryan Macnak 22eee804cd Do not rewrite the VM isolate's symbol table during AOT snapshots.
This has the effect of making every program generate the same VM isolate, allowing an embedder to load different programs into different isolates.

Verify the number of base objects in clustered snapshots.

Remove dead code leftover from core snapshots switching from saving scripts to saving token streams in the VM isolate.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2790243003 .
2017-04-06 13:22:25 -07:00
Regis Crelier 5f5a698100 Keep types in signatures of function types properly instantiated as the function
type itself gets instantiated.
Until now, the signature was kept unchanged and the instantiation was reflected
by the type arguments of the function type only. This delayed instantiation
would complicate the implementation of generic functions.
This cl actually removes type arguments for (non-typedef) function types. The
function type is now fully represented by the signature. When the function type
is instantiated, a new signature is allocated (instead of a new type argument
vector) to hold instantiated result type and formal parameter types.
The same applies in the case of typedef function types, however, the type
arguments of the typedef are kept as before. This allows for better printing
of typedef function types and for finalization of recursive type involving
typedefs as type arguments.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2793033005 .
2017-04-06 12:28:52 -07:00
Dan Rubel 4b8a2eb03b enhance analyzer to parse uppercase and built-in/pseudo keywords
Retrying https://codereview.chromium.org/2803563003

* update analyzer.Keyword list to include all of the fasta keywords

* enhance the analyzer scanner keyword table to handle uppercase
  keywords such as "Function"

* update analyzer's parser to process the new KeywordTokens

* fix analyzer error verification

* update translation of fasta <--> analyzer tokens

* update tests and cleanup analyzer warnings

R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2799133003 .
2017-04-06 15:24:53 -04:00
Stephen Adams 810f0b5538 Revert "dart2js: Insert HTypeKnown refinement nodes on dominated edges of HPhi nodes."
Need to fix a warning.

TBR=efortuna@google.com

Review-Url: https://codereview.chromium.org/2801043003 .
2017-04-06 12:07:41 -07:00
Konstantin Shcheglov 1b0b94c6e6 Fix for parsing annotations before variables in for-loop with Fasta.
R=paulberry@google.com, ahe@google.com
BUG=

Review-Url: https://codereview.chromium.org/2797303003 .
2017-04-06 10:59:53 -07:00
Konstantin Shcheglov 7cd782db6e Issue 29186. Make several top-level variables explicitly 'dynamic'.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/29186

Review-Url: https://codereview.chromium.org/2806543002 .
2017-04-06 10:57:39 -07:00
Stephen Adams 49e78d7e32 dart2js: Insert HTypeKnown refinement nodes on dominated edges of HPhi nodes.
Consider:

    value ??= "";

We fail to infer in SSA type progagation that value is non-null.

At CFG level this looks like

    if (value == null) {
      value = "";
    } else {
      // There is always an empty else-block.
    }
   value1 = phi("", value);

Previously we considered the phi use of 'value' to be outside the
region dominated by the condition 'value != null', leaving nowhere to
attach the type refinement. Now we consider it inside the region,
allowing:

    if (value == null) {
      value = "";
    } else {
      value1 = HTypeKnown(not-null, value);
    }
    value2 = phi("", value1);

Type propagation now determines value2 is non-null.

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2755353003 .
2017-04-06 10:44:05 -07:00
Konstantin Shcheglov b65cd81b45 Use modifiable top-level scope for Fasta parser in file_state.
R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2798183002 .
2017-04-06 10:26:26 -07:00
Stephen Adams fe7baee848 Fix for type analysis bug in constructor with early return
TEST_28 is isomorphic to the original report.

BUG=
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2799763003 .
2017-04-06 09:11:34 -07:00
Peter von der Ahé af73802a67 Document the parser's design.
R=johnniwinther@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2799043004 .
2017-04-06 17:53:01 +02:00
Dmitry Olshansky 19a352e0f5 Reland: VM [KERNEL] Avoid emitting :expr_temp and capturing :iterator
This allows us to bypass allocation of Context for some sync*
function such as in Iteration.tree.syncstar benchmark.

R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2803853004 .
2017-04-06 17:18:40 +02:00
William Hesse ac23816bb7 Fix an error where html_test (which is usually null) is used without checking for null, when reporting status back to the test controller.
BUG=
R=ahe@google.com

Review-Url: https://codereview.chromium.org/2804543004 .
2017-04-06 17:16:38 +02:00
William Hesse 87f38760e6 Add retry to test scripts' attempt to delete temporary Chrome config dirs.
BUG=https://github.com/dart-lang/sdk/issues/29282
R=sortie@google.com

Review-Url: https://codereview.chromium.org/2803613005 .
2017-04-06 16:05:59 +02:00
Johnni Winther dff229736b Skip most dart2js serialization tests.
These are very slow and are no longer a priority.

R=ahe@google.com

Review-Url: https://codereview.chromium.org/2801853004 .
2017-04-06 15:15:45 +02:00
Peter von der Ahé 32e2d2af84 Handle const list and map literals.
R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2802693004 .
2017-04-06 14:51:35 +02:00
Peter von der Ahé 588857cae3 Restore status line for non-dart2js compilers.
Review-Url: https://codereview.chromium.org/2802003002 .
2017-04-06 14:46:17 +02:00
Peter von der Ahé 4e65f5d759 Update status file with dart2js crash.
Review-Url: https://codereview.chromium.org/2798313002 .
2017-04-06 13:44:53 +02:00
Lasse R.H. Nielsen add2854671 Fix bug in doWhile where it completes an error synchronously with an error.
Review-Url: https://codereview.chromium.org/2796363005 .
2017-04-06 12:47:57 +02:00
Peter von der Ahé 7751bb7fe4 Missing file from CL 2804843003.
Review-Url: https://codereview.chromium.org/2804973002 .
2017-04-06 12:29:39 +02:00
Johnni Winther f4050f8739 Add find_timeouts and caching to tools/gardening
R=dmitryas@google.com

Review-Url: https://codereview.chromium.org/2797253006 .
2017-04-06 12:07:40 +02:00
Peter von der Ahé d515791312 Handle bad packages files and #void without crashing.
R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2804843003 .
2017-04-06 12:05:54 +02:00
Lasse R.H. Nielsen f380e61b57 Make Future.doWhile not delay when the return value is not a future.
Ditto for Future.forEach, which is based on Future.doWhile.

Update documentation.

Fixes issue #29239
BUG= http://dartbug.com/29239
R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2795193002 .
2017-04-06 12:00:16 +02:00
Peter von der Ahé 0df001cebf Implement various getters on DillMember.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2799783004 .
2017-04-06 10:54:48 +02:00
Peter von der Ahé af30042973 Remove Pass expectations from Kernel status.
R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2799733002 .
2017-04-06 10:06:03 +02:00
Erik Ernst 9af9943cf0 Refreshed tools/gardening/lib/src/shard_data.dart
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2801603006 .
2017-04-06 09:50:07 +02:00