Commit Graph

21 Commits

Author SHA1 Message Date
Brian Wilkerson d0f105de1a Reland "Produce an error if there would be an exception thrown by an assert in an initializer list"
Change-Id: Id79a8cf949a08d56a59268b687f299f3482a1b88
Reviewed-on: https://dart-review.googlesource.com/37540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-01-30 14:40:19 +00:00
Brian Wilkerson 7a36d39962 Revert "Produce an error if there would be an exception thrown by an assert in an initializer list" (TBR)
Change-Id: Iece7d75e9245cdb9d0a72ac30f6b1031a76c0755
Reviewed-on: https://dart-review.googlesource.com/37080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-01-26 21:54:30 +00:00
Brian Wilkerson fb739fffe6 Produce an error if there would be an exception thrown by an assert in an initializer list (2)
Change-Id: I2f268a23c3d84dfbe4bba67730e226f5b5603570
Reviewed-on: https://dart-review.googlesource.com/32740
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-01-26 20:15:01 +00:00
Brian Wilkerson 439dfe0c29 Revert "Produce an error if there would be an exception thrown by an assert in an initializer list"
Change-Id: I21553a5a3bf12b7636d9ef507092d0e19f9c0d57
Reviewed-on: https://dart-review.googlesource.com/30041
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-16 01:44:13 +00:00
Brian Wilkerson 71dd8acda1 Produce an error if there would be an exception thrown by an assert in an initializer list
Change-Id: Ia95b2e09c64846d319d940e29c422355ab972da6
Reviewed-on: https://dart-review.googlesource.com/29700
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-12-15 23:03:15 +00:00
Konstantin Shcheglov 5455fd0118 Remove 'initializeTestEnvironment' from 'analyzer'.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2399913002 .
2016-10-06 10:18:54 -07:00
Konstantin Shcheglov 175dad4f15 Switch 'analyzer' to 'package:test' and test_reflective_loader ^0.1.0.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2391423003 .
2016-10-06 08:46:35 -07:00
Konstantin Shcheglov cc6beaf56d Pull in test_reflective_loader 0.0.4 and switch analyzer to it.
There are following changes:

1. DEPS to pull in test_reflective_loader 0.0.4
2. Rename runReflectiveTests() to defineReflectiveTests().
3. Remove analyzer's pkg/analyzer/test/reflective_tests.dart
4. Replace reflective_tests.dart imports with package:test_reflective_loader/test_reflective_loader.dart imports.
5. Sort/format and organize imports in the files with imports changes.
6. Fix for a couple of bugs in analysis_server exposed by the new loader.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2298913003 .
2016-08-31 13:46:39 -07:00
Brian Wilkerson 2797cf5367 Code clean-up
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2265793002 .
2016-08-21 15:48:44 -07:00
Brian Wilkerson 5a310a1684 Move constant implementation out of generated
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1816923002 .
2016-03-20 15:07:49 -07:00
Bob Nystrom 8defa5f77c Split resolver_test.dart into smaller files.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1782463002 .
2016-03-09 10:42:09 -08:00
Brian Wilkerson 71e7ed86c0 Move scanner out of generated and clean up imports
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1693083004 .
2016-02-14 07:48:44 -08:00
Bob Nystrom b0719aa402 Remove unused or unneeded stuff from java_core.dart.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1688113004 .
2016-02-12 11:10:48 -08:00
Konstantin Shcheglov c4602b0c8b Don't use Set when collecting constant targets in a unit.
This forces location / hashCode computation and caching, and the unit
is not linked to its library, so the cached values are not valid.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1691943002 .
2016-02-11 12:35:33 -08:00
Paul Berry c43622e897 Use ElementAnnotation as the ConstantEvaluationTarget for annotations.
Previously, we had a special class,
ConstantEvaluationTarget_Annotation, for this purpose.  It held on to
a the AST node for the annotation.  This was bad because it meant that
the presence of any ConstantEvaluationTarget_Annotation referring to a
given compilation unit would keep the entire compilation unit's AST in
memory.

Now we copy just the portions of the AST we need into
ElementAnnotation, just as we do for all other constant evaluation
targets.  In addition to saving memory, this paves the way for
supporting annotations in summaries, by making it possible to compute
the constant value of an annotation without having to consult the full
AST.

Fixes #25285.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1665353002 .
2016-02-04 15:22:40 -08:00
Konstantin Shcheglov 2546e179a9 Make constant map literal ordered.
Plus couple fixes for spelling problems.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1643253002 .
2016-01-29 09:31:03 -08:00
Konstantin Shcheglov df5d6bd6e1 Move more constant tests to constant_test.dart file.
I found out that we use HashMap for constant map literals.
But then I realized that I we could move more tests into the right
place.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1647183002 .
2016-01-29 08:58:41 -08:00
Brian Slesinsky ccf3870ffc final fields shouldn't be dependencies of const variables
(They are only dependencies of const constructors.)

This was causing bogus error messages to appear
when a const expression mistakenly references
a final field.

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

Review URL: https://codereview.chromium.org/1620963003 .
2016-01-25 15:53:41 -08:00
Brian Slesinsky 28ecd1bbef Oops, move ReferenceTest to constant_test.dart as well
BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1623673003 .
2016-01-25 13:28:05 -08:00
Brian Slesinsky 001f64b564 print nicer errors for a const dependency graph failure
BUG=
R=brianwilkerson@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org/1618103002 .
2016-01-22 14:47:18 -08:00
Brian Slesinsky 771fea4502 move constant tests to constant_test.dart
BUG=
R=brianwilkerson@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org/1616743006 .
2016-01-22 12:44:15 -08:00