Commit graph

31881 commits

Author SHA1 Message Date
Karl Klose
683743c9c5 Change more JS foreign methods to JS_GET_NAME.
R=herhut@google.com

Review URL: https://codereview.chromium.org//1154073004
2015-06-03 11:41:46 +02:00
Anders Johnsen
114c37738d Fix signature of UnmodifiableListMixin.insert to match List.insert.
BUG=
R=lrn@google.com

Review URL: https://codereview.chromium.org//1160423002
2015-06-03 09:32:49 +02:00
Rico Wind
fc6b3e8a99 Remove pkg_tested from the default selector
We now pull in pub from github into pkg_tested and we don't want to run those tests by default

Also, the pub tests relies on the sdk being build, so the tests will fail if you don't explicitly specify --use-sdk to the tools/test.py invocation.

R=whesse@google.com, fschneider@google.com, rnystrom@google.com
BUG=

Review URL: https://codereview.chromium.org//1169433002

Review URL: https://codereview.chromium.org//1161003005
2015-06-03 07:37:06 +02:00
Srdjan Mitrovic
defec9c960 --check_function_fingerprints is available only in dart_no_snapshot, i.e., it was not tested. Make it default true, catch failure at build time then
BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org//1166813002
2015-06-02 16:36:54 -07:00
Konstantin Shcheglov
b35d54a8b7 Decide if unit without directives is a part or a library.
1. When there is a library containing it while we are parsing a part.

2. When a part was parsed, but then we found a library containing it.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1167733004
2015-06-02 16:01:01 -07:00
Natalie Weizenbaum
c8fb46306c Update pub.
R=rnystrom@google.com

Review URL: https://codereview.chromium.org//1163023003
2015-06-02 14:47:21 -07:00
Ivan Posva
63558e911e - Make sure to properly check for errors from sysctlbyname.
BUG=

Review URL: https://codereview.chromium.org//1150173004
2015-06-02 23:22:24 +02:00
Konstantin Shcheglov
a567814119 Replace 'Element.node' with 'Element.computeNode()'.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1164823003
2015-06-02 13:25:04 -07:00
Konstantin Shcheglov
958638ca20 Record SourceKind.UNKNOWN for not existing sources.
So, they are not returned as library sources.
This fixes one of the Quick Fix tests.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1167773002
2015-06-02 13:18:56 -07:00
Konstantin Shcheglov
2888728de0 Remove an unused local variable in the test.
R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org//1155613010
2015-06-02 13:16:52 -07:00
Ryan Macnak
a754930be6 Remove unused field map_ from LinkedHashMap::Iterator.
TBR=koda@google.com

Review URL: https://codereview.chromium.org//1162363003
2015-06-02 12:33:28 -07:00
Ryan Macnak
eca0d72abe Provide a logical view of VM-internal maps in Observatory.
BUG=http://dartbug.com/20551
BUG=http://dartbug.com/21185
R=koda@google.com

Review URL: https://codereview.chromium.org//1150103005
2015-06-02 11:38:39 -07:00
Konstantin Shcheglov
250992aad8 Ignore not existing parts.
We decided to produce an empty token streams, so empty units for them.
So, we need to have a separate check for not existing Source later.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1160543003
2015-06-02 11:09:27 -07:00
Konstantin Shcheglov
b9dbeedb54 Prepare CompilationUnitElementDelta in IncrementalCompilationUnitElementBuilder.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1155543005
2015-06-02 11:03:03 -07:00
Brian Wilkerson
d614533a9e Fix NPE in building element model when part URI could not be resolved
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1155693004
2015-06-02 10:40:03 -07:00
Kevin Moore
856248f135 update_homebrew: support version-formatted revisions
fix for running in checked mode

R=whesse@google.com

Review URL: https://codereview.chromium.org//1160383002
2015-06-02 10:02:10 -07:00
Brian Wilkerson
a82c880bb1 Fix NPE when computing dependencies of enum constants
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1156893006
2015-06-02 09:46:21 -07:00
Konstantin Shcheglov
8e439849b3 Issue 23573. Catch exception during indexing.
R=paulberry@google.com
BUG=https://code.google.com/p/dart/issues/detail?id=23573

Review URL: https://codereview.chromium.org//1168473003
2015-06-02 09:40:20 -07:00
Brian Wilkerson
06a3fd1984 Fix more tests for the new task model
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1159623013
2015-06-02 09:06:53 -07:00
Daniel Andersson
6090af8f0b Serialize maps without hashes.
Re-generate the indices after deserialization.

This is a more compact representation, and also fixes the issue with identity hash codes not being portable between isolates.

BUG=21675
R=asiva@google.com

Review URL: https://codereview.chromium.org//1151013005
2015-06-02 09:04:37 -07:00
Johnni Winther
4f969bbc3b Remove ConstantExpression.value
BUG=
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1148343004
2015-06-02 15:23:16 +02:00
Asger Feldthaus
c442bf5697 dart2js cps: Do not propagate impure expressions across null receiver.
If the receiver is null, the arguments are not evaluated.

Example:

Dart:
    var x = null;
    var y = bar();
    x.foo(y);

JS before:
    null.foo$1(bar());

JS after:
    var y = bar();
    null.foo$1(y);

If the receiver is known not be null, we still propagate into the
arguments, and "pure" expressions can always propagate even if the
receiver might be null.

InvokeMethod now has a field isReceiverNotNull, which carries a bit of
static type information. Another field like this is InvokeStatic.isPure.

I intentionally chose to pass along the *least* amount of information
that is sufficient for what we need in the tree optimizations.

That CPS type propagation was not very good at proving when things are
not null, so a couple of things missing from it have been filled in.

BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//1159643005
2015-06-02 15:06:29 +02:00
Daniel Andersson
bf8ccee760 Use kSmiBits rather than #ifdef to define hash map constant.
R=asiva@google.com

Review URL: https://codereview.chromium.org//1160963002
2015-06-02 06:00:28 -07:00
Rico Wind
6a054d5cc7 Revert "Remove pkg_tested from the default selector"
This reverts commit 9db675f734.

Need to discuss this with other people

R=fschneider@google.com,whesse@google.com,rnystrom@google.com
BUG=

Review URL: https://codereview.chromium.org//1167533005
2015-06-02 14:40:25 +02:00
Rico Wind
9db675f734 Remove pkg_tested from the default selector
We now pull in pub from github into pkg_tested and we don't want to run those tests by default

Also, the pub tests relies on the sdk being build, so the tests will fail if you don't explicitly specify --use-sdk to the tools/test.py invocation.

R=fschneider@google.com, rnystrom@google.com, whesse@google.com
BUG=

Review URL: https://codereview.chromium.org//1169433002
2015-06-02 14:31:27 +02:00
Karl Klose
add53e33e7 Optimize identical based on types.
R=asgerf@google.com

Review URL: https://codereview.chromium.org//1080003004
2015-06-02 13:01:42 +02:00
Johnni Winther
11eab3a917 Fix crash in deferred_constraint_constants_test.
BUG=

Review URL: https://codereview.chromium.org//1167713002
2015-06-02 12:05:54 +02:00
Lasse R.H. Nielsen
6f2dd2552c Fix typo in ListMixin.insertAll.
Also add test for input iterable being linked to receiver list.

R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1146163004
2015-06-02 11:58:35 +02:00
Rico Wind
77321a7586 Always clobber sdk builds on dev/stable.
We should build from scratch to eliminate any consistency issues and guarantee that versions we ship can always build.

R=whesse@google.com
BUG=

Review URL: https://codereview.chromium.org//1161413002
2015-06-02 11:36:19 +02:00
Rico Wind
415bbb9a07 Remove clear_safari_cache flag in tools/test.py
Bots have been transitioned a long time ago

R=whesse@google.com
BUG=

Review URL: https://codereview.chromium.org//1143393006
2015-06-02 11:35:12 +02:00
Karl Klose
95a46fb177 Adjust cps_ir test expectations.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//1167673009
2015-06-02 11:26:26 +02:00
Johnni Winther
3250c8fd91 Add StringLengthConstantExpression
... and make .fromEnvironment name a ConstantExpression.

BUG=
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1166723002
2015-06-02 10:52:50 +02:00
Johnni Winther
411246ccc7 Handle .fromEnvironment and incompatible constructor invocations
BUG=
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1161823004
2015-06-02 10:44:19 +02:00
Brian Wilkerson
40e925078f Bug fixes for the new task model
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1144393006
2015-06-01 16:42:36 -07:00
Konstantin Shcheglov
34ce430b9e Reformat ast.dart with the current formatter.
Otherwise there are more changes than I'd like in the other CL.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1154923005
2015-06-01 15:19:23 -07:00
Konstantin Shcheglov
aad76fdcbf Issue 23568. Fix for NPE in index when unresolved field formal parameter.
R=brianwilkerson@google.com
BUG=https://code.google.com/p/dart/issues/detail?id=23568

Review URL: https://codereview.chromium.org//1162853004
2015-06-01 15:08:33 -07:00
Ryan Macnak
98999e6a02 Misc Observatory patches:
- Address some editor hints.
 - Place eval box above fields and be much more generous in expanding fields.
 - Treat maps as plain instances so their refs aren't blank.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1159783004
2015-06-01 14:59:54 -07:00
Konstantin Shcheglov
b9cdbace93 Issue 23545. Replace unaccessible type parameters with 'dynamic'.
R=brianwilkerson@google.com
BUG=https://code.google.com/p/dart/issues/detail?id=23545

Review URL: https://codereview.chromium.org//1147213005
2015-06-01 14:50:39 -07:00
Konstantin Shcheglov
a3a40c9ef6 Issue 11200. Quick Fix for adding required/positional parameters.
R=brianwilkerson@google.com
BUG=https://code.google.com/p/dart/issues/detail?id=11200

Review URL: https://codereview.chromium.org//1159273004
2015-06-01 14:48:50 -07:00
Konstantin Shcheglov
be9cd1c165 Issue 23551. Fix for using type parameters of the enclosed classes in 'Create Missing Overrides' Quick Fix.
R=brianwilkerson@google.com
BUG=https://code.google.com/p/dart/issues/detail?id=23551

Review URL: https://codereview.chromium.org//1151183003
2015-06-01 14:19:33 -07:00
Paul Berry
717da6731b Eliminate Modifier.TYPEDEF and deprecate ClassElement.isTypedef.
Modifier.TYPEDEF was redundant with Modifier.MIXIN_APPLICATION and
ClassElement.isTypedef was redundant with
ClassElement.isMixinApplication.

Since Modifier.TYPEDEF was private to analyzer, it has been
eliminated.  Since ClassElement.isTypedef is part of the public API to
analyzer, it is retained, but with a "@deprecated" annotation.

R=scheglov@google.com

Review URL: https://codereview.chromium.org//1158193008
2015-06-01 14:17:40 -07:00
Natalie Weizenbaum
572f09bdf1 Update the pub dep.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1158843004
2015-06-01 14:00:14 -07:00
Paul Berry
62f7ac8c5d Fix handling of nested typedefs (for real this time).
This is a re-fix of dartbug.com/21912, which I previously fixed
incorrectly.  Previously, our approach to avoiding infinite loops when
comparing types was to maintain a set of typedefs being expanded on
the stack, and prune the comparison whenever an attempt was made to
expand a typedef that was already being expanded.  However, this was
too strict, since there are legal (non-circular) types which invole
expanding a given typedef in reentrant fashion; we can't prune these
types without producing incorrect semantics.  An example (from the bug
report) is the type of f in the code below:

    typedef T Function2<S, T>(S z);
    Function2<Function2<A, B>, Function2<B, A>> f;

The solution is to maintain the list of typedefs being expanded inside
each FunctionTypeImpl object (and InterfaceTypeImpl object) rather
than on the stack during the comparison; this allows us to distinguish
the situations where we need to prune (those having to do exclusively
with expansion of a typedef) from the situations where we shouldn't
prune (those having to do with substitution of a type parameter).

A beneficial side effect of this change is that code that interacts
with types no longer needs to worry about typedef circularities, since
the circularities will automatically be pruned while exploring the
type definitions.  This simplifies the implementation of
isAssignableTo, isSubtypeOf, operator==, and hashCode.  (Note,
however, that code still needs to cope with circularities in the
inheritance hierarchy).

BUG=dartbug.com/21912
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1143003007
2015-06-01 12:45:27 -07:00
Paul Berry
21f6f1aaca Bring in latest pub to fix analyzer buildbot.
R=nweiz@google.com

Review URL: https://codereview.chromium.org//1165533003
2015-06-01 12:44:20 -07:00
Konstantin Shcheglov
f1d4ef9164 Issue 23409. Don't set 'propagatedType' in (vs. after) 'name is Type'.
This fixes the corresponding 'Extract Method' issue.

R=brianwilkerson@google.com
BUG=https://code.google.com/p/dart/issues/detail?id=23409

Review URL: https://codereview.chromium.org//1161343002
2015-06-01 12:40:30 -07:00
Konstantin Shcheglov
c1c0354014 Issue 23239. Fix for 'Create Class' Quick Fix i case of prefixed names.
R=brianwilkerson@google.com
BUG=https://code.google.com/p/dart/issues/detail?id=23239

Review URL: https://codereview.chromium.org//1161333002
2015-06-01 12:26:39 -07:00
Srdjan Mitrovic
b611952ead Prevent excessive deoptimization when optimistically assuming Smi in typed data stores.
Moved ICData ahead of class Function, since class Function needs type ICData::DeoptReasonID.

BUG=
R=fschneider@google.com

Review URL: https://codereview.chromium.org//1149403005
2015-06-01 11:42:42 -07:00
Konstantin Shcheglov
f118546d06 Issue 23332. Don't compute overrides for static members.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=23332

Review URL: https://codereview.chromium.org//1151573011
2015-06-01 10:42:22 -07:00
Konstantin Shcheglov
5b44136f2a Issue 23389. Report error in the renamed element be invisible after rename.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=23389

Review URL: https://codereview.chromium.org//1153253004
2015-06-01 10:40:59 -07:00
Kevin Moore
ebb0d0100d update_homebrew: use async/await
R=whesse@google.com

Review URL: https://codereview.chromium.org//1156473004
2015-06-01 09:51:51 -07:00