Commit Graph

7128 Commits

Author SHA1 Message Date
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
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
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
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
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 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
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
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 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
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
scheglov@google.com e2a3d42150 A tentative step into converting analyzer tests into reflective.
We don't generate / translate tests anymore, so managing dartSuite()
manually is quite labor-consuming.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40964 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-07 17:27:41 +00:00
brianwilkerson@google.com 0a439dfc90 Add support for cross-session storage
R=paulberry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40962 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-07 16:58:18 +00:00
scheglov@google.com 9b0697baac More string literals getters.
To use in the inline local refactoring.

1. We can unwrap a literal only if its `isSingleQuoted` is the same as of the target literal.

2. We can unwrap a single-line literal into a multi-line one, but not vice versa.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40957 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-07 15:51:02 +00:00
scheglov@google.com 6d0260be31 Add SingleStringLiteral with accessors.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40949 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-07 00:51:12 +00:00
brianwilkerson@google.com 9f194c3548 Unify Entry and EntryImpl classes
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40944 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-06 19:43:38 +00:00
brianwilkerson@google.com d23930956a Remove cache entry copying. This also removes the extractContext/mergeContext methods, but I don't believe that anyone is depending on them.
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40936 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-06 16:06:03 +00:00
brianwilkerson@google.com 9c1093ffb0 Make it easier to run engine tests
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40915 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-05 22:22:41 +00:00
scheglov@google.com 3fab2628f4 Uncomment and clean up engine_test.dart
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40913 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-05 19:55:07 +00:00
scheglov@google.com d682c178b4 Write end-of-block comments.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40912 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-05 17:53:52 +00:00
scheglov@google.com 8debcea519 Uncomment and clean up all_the_rest.dart tests.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40906 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-03 22:09:29 +00:00
scheglov@google.com bc287b5a3e New analyzer snapshot.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40867 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-02 04:13:16 +00:00
paulberry@google.com 5b45f8e762 Move PubPackageMapProvider to its own file.
This will allow clients of the AnalysisServer package to provide their
own PackageMapProvider without bringing in a dependency on dart:io.

R=brianwilkerson@google.com, rpaquay@chromium.org

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40638 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-24 18:09:08 +00:00
scheglov@google.com bbbcddfac6 New analyzer snaphot.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40394 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-17 20:07:57 +00:00
scheglov@google.com 8ed8098a48 Issue 17389. Analyzer snapshot and server tweaks to use new ParameterElement.defaultValueCode.
This also makes Analysis Server to return hovers with parameter default values.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40298 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-16 01:46:27 +00:00
scheglov@google.com d2d8fb708e Issue 20894. Rename 'Class' when rename refactoring is activated on 'Class' in 'new Class.name()'.
To do this we need to tweak the Java version of ElementLocator and regenarate the Dart version.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40208 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-12 17:16:15 +00:00
scheglov@google.com 778536d97c Issue 19682. New analyzer snapshot that fixes an inline refactoring problem.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=19682

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40193 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-11 22:47:29 +00:00
jwren@google.com 944174f36a Move package_map_provider.dart from the server to the analyzer package to be used by the command line analyzer.
R=brianwilkerson@google.com, paulberry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40051 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 20:36:35 +00:00
scheglov@google.com b7189ea678 New analyzer snapshot.
We compute the parameter element for 'object.field = 42' now, so:
1. We can stop doing it in InlineMethodRefactoring.
2. We need to update the corresponding hover integration test.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39772 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-02 20:10:47 +00:00
scheglov@google.com a2cc52070c New analyzer snapshot.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39654 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-28 14:54:20 +00:00
scheglov@google.com 8647752153 New analyzer snapshot.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39599 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-27 15:51:56 +00:00
scheglov@google.com 711827d462 New analyzer snapshot.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39500 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-22 17:28:29 +00:00
scheglov@google.com c74b350b50 New analyzer snapshot.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39416 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-20 18:18:43 +00:00
brianwilkerson@google.com 90a5272601 Add flags for proposed features
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39372 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-19 16:02:46 +00:00