Commit Graph

7628 Commits

Author SHA1 Message Date
brianwilkerson@google.com 2f937685fc Code clean-up
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41348 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 00:25:22 +00:00
scheglov@google.com 63523cf050 Inline JUnitTestCase 'assert' methods.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41347 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 00:00:13 +00:00
scheglov@google.com fbf42c6a0d Port enum getter types fix to Dart.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41342 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 21:58:37 +00:00
scheglov@google.com 555b551ee5 Fix for AnalysisContext.getElement() for enums.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41337 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 20:54:43 +00:00
scheglov@google.com 0f5bc31b0d Remove any unnecessary parens around expressions in interpolations.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41336 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 20:19:18 +00:00
scheglov@google.com 71a54f980b Replace ${name} with $name where possible.
...i.e. when the next character is not a part of an identifier.

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41333 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 19:43:44 +00:00
brianwilkerson@google.com 2c08b51c9b Remove unnecessary List creation
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41327 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 17:41:45 +00:00
scheglov@google.com c15304f516 Remove EngineTestCase.createSource().
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41324 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 16:14:37 +00:00
brianwilkerson@google.com a22aa71cab Remove JavaIterator and MapEntry
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41321 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 15:37:24 +00:00
brianwilkerson@google.com 9d0ad88805 Remove Math and most uses of PrintStringWriter
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41318 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 14:49:20 +00:00
scheglov@google.com 78c7e8fc06 Convert most of the EngineTestCase.createSource invocations into multi-line String literals.
There are sill invocations in Angular tests, but these call it with List<String>,
I will clean them up in the following CL.

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41308 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-26 22:03:21 +00:00
scheglov@google.com 7d3a0e4cb2 Port enums AST changes to Dart.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41306 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-26 21:59:39 +00:00
brianwilkerson@google.com 66f7c97acf Remove JavaStringBuilder
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41305 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-26 21:49:04 +00:00
brianwilkerson@google.com 282b2963a3 Clone tokens when cloning ASTs for constants
R=paulberry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41304 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-26 19:21:58 +00:00
brianwilkerson@google.com 877291fb07 Remove ArrayUtils
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41303 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-26 18:38:26 +00:00
scheglov@google.com f13b775902 Translate Engine utilities tests.
This adds 442 more tests.

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41301 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-25 18:12:37 +00:00
paulberry@google.com 0251bcdcf6 Add package root support to analysis server.
Not yet hooked up in Dart editor.

R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41292 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-24 20:29:24 +00:00
scheglov@google.com a666399a06 Drop unnecessary toString() in interpolations.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41286 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-24 16:17:57 +00:00
brianwilkerson@google.com f04d5d01ea Add timing of serialization
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41270 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-23 19:38:17 +00:00
paulberry@google.com b35aef796c Fix type of String.fromEnvironment() when the name is undefined.
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41269 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-23 19:35:53 +00:00
scheglov@google.com d070599c9d Record types of invoked variables.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41252 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-22 21:52:26 +00:00
brianwilkerson@google.com 16d58cb0b6 Better recovery for getters in functions
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41238 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-21 21:17:28 +00:00
scheglov@google.com 8f337c37d1 Issue 21373. Fix for removing line info in case of exception (causes NPE in outline computer).
I will update analysis_server/pubspec.yaml before commit.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41235 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-21 20:34:31 +00:00
brianwilkerson@google.com acbf532add Disable tests to fix the build
Review URL: https://codereview.chromium.org//664773002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41180 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-17 18:35:21 +00:00
danrubel@google.com efd813f9b3 update protocol server getter test
BUG=
R=paulberry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41176 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-17 17:34:27 +00:00
brianwilkerson@google.com 82c1b3550b Add (as yet unused) task
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41172 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-17 16:57:33 +00:00
paulberry@google.com 271aee1d83 Handle non-factory redirects in constant evaluation.
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41169 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-17 15:54:44 +00:00
brianwilkerson@google.com dd794e0d02 Minor cleanup
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41158 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-16 18:08:25 +00:00
brianwilkerson@google.com 77613046a5 Generalize source entry
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41151 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-16 15:12:45 +00:00
paulberry@google.com cd171c8d3d Allow analyzer to distinguish unresolved types from dynamic.
This makes it possible to correctly report checked mode compile time
errors in the event of unresolved typenames.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41098 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-14 13:47:37 +00:00
paulberry@google.com febb8f2e22 Split up large resolver_test.dart file.
This splits the four largest classes out of resolver_test.dart
and into their own files.  Hopefully this should help prevent
resolver_test.dart from timing out on the buildbots.

R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41085 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-13 21:43:33 +00:00
paulberry@google.com d18a4fb151 Fix spelling: existant -> existent
R=brianwilkerson@google.com, scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41083 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-13 21:11:52 +00:00
paulberry@google.com 77d74fa766 Fix constant evaluation in the presence of nonexistent fields.
R=brianwilkerson@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41082 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-13 21:07:00 +00:00
paulberry@google.com ae894fe21a Verify correctness of classes derived from Enum.
Now that the analyzer code is no longer being translated from
Javascript, we have to maintain the enum classes manually.  These
tests will help avoid mistakes.

R=brianwilkerson@google.com, scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41080 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-13 20:02:28 +00:00
scheglov@google.com 11f7d4027e Fix for missing LineInfo to SDK entries.
I will update analyzer reference in pubspec before commit.

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41064 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-12 21:27:08 +00:00
brianwilkerson@google.com c8d866aa4d Remove unused time stamps
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41063 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-12 20:15:29 +00:00
paulberry@google.com 99a616e041 Type check field assignments during constant evaluation.
BUG=dartbug.com/16391
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41062 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-11 21:25:07 +00:00
paulberry@google.com 465c48479c Type check constant variable declarations.
BUG=dartbug.com/16391
R=brianwilkerson@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41054 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-10 21:57:17 +00:00
brianwilkerson@google.com bf0f247cea Remove more multi-thread support. Sorry about how hard it is to review this; diff doesn't handle this kind of change very well.
The assumption is that tasks cannot be interrupted in the single-threaded world of Dart so we no longer need to guard against the case where the state of analysis has changed while executing a task. Please think carefully about the assumption and also check carefully that I have not made any mistakes while making this change (the tests all run, but I'm not sure how well tested this portion of the code base is).

R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41051 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-10 20:25:11 +00:00
paulberry@google.com 2b14985502 Check field type when evaluating initializing formals.
This performs proper type checking when the type of a field differs
from the type of a field formal parameter, e.g.:

  class A {
    final T1 x;
    const A(T2 this.x);
  }

  // only works if <expr> is a subtype of both T1 and T2.
  var a = const A(<expr>);

Previously we only checked the parameter type (T2 in the above example).

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41048 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-10 18:50:18 +00:00
paulberry@google.com f6f8765328 Substitute type parameters when evaluating const literal maps/lists.
R=brianwilkerson@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41046 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-10 18:12:44 +00:00
paulberry@google.com 71552797de Update analyzer version to 0.23.0-dev.10
TBR=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41044 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-10 16:13:40 +00:00
paulberry@google.com bce2559a59 Make "error" the default severity for checked mode compile time errors.
R=brianwilkerson@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41030 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-09 21:57:32 +00:00
paulberry@google.com c94860fb6b Remove PUB_SUGGESTION error type from analyzer.
This error type is not currently used (the code to generate it is
still under development), and there is no corresponding error type in
the analysis server API.  It seems like it should be adequate to
classify these as hints.

R=brianwilkerson@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41014 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-09 14:06:57 +00:00
brianwilkerson@google.com b481c8788d Fix for issue 21266
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40981 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-07 22:04:11 +00:00
scheglov@google.com 5d8114e136 Enable mirrors for all the classes in the analyzer tests.
Othewise dart2js cannot find these classes.

I've tried to annotate *Test classes only with ReflectiveTestCase, but
practically, because almost all the methods are test_*, we end up
having reflection information for almost all methods. So, for simplicity
let's just enable it for everything.

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40980 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-07 21:18:45 +00:00
paulberry@google.com fe9ee8cd74 Fix test breakage from r40978
TBR=brianwilkerson@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40979 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-07 21:12:20 +00:00
paulberry@google.com 492d5bee03 Check parameter types when evaluating constants.
R=brianwilkerson@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40978 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-07 20:51:24 +00:00
scheglov@google.com 3118afae58 Restore AnalysisDeltaTest in Dart.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40976 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-07 20:13:40 +00:00
scheglov@google.com ebf761a5af Convert all the generated tests to reflective.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40974 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-07 19:48:40 +00:00