Konstantin Shcheglov
9a8621b60a
Add NamedNode.nameOffset, fill it for constructors, and use in Analyzer.
...
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
Bug:
Change-Id: If0f815e86049381e9db3386f243789e9b4f9f5ce
Reviewed-on: https://dart-review.googlesource.com/6780
Reviewed-by: Paul Berry <paulberry@google.com >
2017-09-20 17:54:30 +00:00
Brian Wilkerson
bd33fb43bd
Pass the left brace in an enum declaration to the listeners (rather than the right brace)
...
Change-Id: I3bec6cbde6beb1233c48e7ed8926f0e98fd8e3a5
Reviewed-on: https://dart-review.googlesource.com/6741
Reviewed-by: Dan Rubel <danrubel@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2017-09-19 15:35:33 +00:00
Konstantin Shcheglov
08c4cc6e61
Create (empty) initializers for variables resynthesized from Kernel.
...
R=brianwilkerson@google.com , paulberry@google.com
Bug:
Change-Id: I42df66c747b79639227f0c55f4ed67c959b15eb9
Reviewed-on: https://dart-review.googlesource.com/6769
Reviewed-by: Paul Berry <paulberry@google.com >
2017-09-19 01:48:04 +00:00
Konstantin Shcheglov
f2ff362c71
Fix for resynthesizing FutureOr in not strong mode.
...
R=brianwilkerson@google.com , paulberry@google.com
Bug:
Change-Id: I239bb013cb04c6e1ab07d644e3cca16119885321
Reviewed-on: https://dart-review.googlesource.com/6743
Reviewed-by: Paul Berry <paulberry@google.com >
2017-09-18 20:26:38 +00:00
Konstantin Shcheglov
feb02ba034
Resynthesize types of function typed formal parameters.
...
R=brianwilkerson@google.com , paulberry@google.com
Bug:
Change-Id: I1afb45879afc67806dfb3d6fe18b172fd2b3c01a
Reviewed-on: https://dart-review.googlesource.com/6645
Reviewed-by: Paul Berry <paulberry@google.com >
2017-09-18 19:36:30 +00:00
Konstantin Shcheglov
6d0452ff74
Resynthsize field in FieldFormalParameterElementImpl.
...
R=brianwilkerson@google.com , paulberry@google.com
Bug:
Change-Id: Ied85d9f774dcace3af995be8bf9b1d179cc7eee4
Reviewed-on: https://dart-review.googlesource.com/6700
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-09-18 18:15:36 +00:00
Konstantin Shcheglov
6148189e44
Fix for implicit setter enclosing element.
...
R=brianwilkerson@google.com , paulberry@google.com
Bug:
Change-Id: Ic75ea6bb2b396d4cfddc133f2e8f636fdfed9376
Reviewed-on: https://dart-review.googlesource.com/6642
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-09-18 17:55:58 +00:00
Konstantin Shcheglov
3b1d5b8432
Fix for resynthesizing ExecutableElement.type from Kernel.
...
R=brianwilkerson@google.com , paulberry@google.com
Bug:
Change-Id: I29542408fc4e7d5e7f43222f0fd5f19adaeb645a
Reviewed-on: https://dart-review.googlesource.com/6680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-09-18 17:52:21 +00:00
Konstantin Shcheglov
d6fff5126d
Fix for storing and resynthesizing import/export directive offsets.
...
R=brianwilkerson@google.com , paulberry@google.com
Bug:
Change-Id: Icc187e2b68a765b65455c05a2d25a816123a9e92
Reviewed-on: https://dart-review.googlesource.com/6641
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-09-18 17:46:13 +00:00
Brian Wilkerson
0995bbd6ef
Pass the left paren in to listeners
...
Change-Id: I7de73b11c001f56fd45f60f58623c905b5a29f31
Reviewed-on: https://dart-review.googlesource.com/5325
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
2017-09-18 16:34:26 +00:00
Konstantin Shcheglov
50c964b819
Add option for AnalysisDriver to use KernelDriver and KernelResynthesizer.
...
Run NonErrorResolverTest_Driver tests with this option enabled.
We fail 163 out of 478 tests, or 35%.
R=brianwilkerson@google.com , paulberry@google.com
Bug:
Change-Id: Iac6154a14a1357fe239b0140f9f66de792825693
Reviewed-on: https://dart-review.googlesource.com/6340
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-09-18 02:09:14 +00:00
Brian Wilkerson
b30fab9320
Pass the of keyword in part-of directives to listeners
...
Change-Id: I0774f6ee806aff52981bc2f049ef402f4f52c102
Reviewed-on: https://dart-review.googlesource.com/5340
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
2017-09-15 15:54:43 +00:00
Dan Rubel
db7129d8a4
cleanup endMetadataStar event
...
Change-Id: I9fcd69219858cdb063d3e37f2788750f72132d65
Reviewed-on: https://dart-review.googlesource.com/6140
Reviewed-by: Peter von der Ahé <ahe@google.com >
2017-09-15 12:37:37 +00:00
Dan Rubel
d69a0aa3d5
revise parser to use handleNativeClause
...
modify the fasta parser to use handleNativeClause
when parsing methods with a native clause.
Change-Id: Ia631c471f9f8ea7a9e261d112a8ccd96f9eafa46
Reviewed-on: https://dart-review.googlesource.com/3786
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-09-14 13:25:48 +00:00
Devon Carew
b12d010064
Remove the use of deprecated package:test API.
...
Bug:
Change-Id: I671678117f72efac5efd60d7b4e459dffcce47c6
Reviewed-on: https://dart-review.googlesource.com/5542
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2017-09-13 21:55:00 +00:00
Dan Rubel
d9a26967e0
move analyzer specific tests out of fasta parser tests
...
Change-Id: Ia24a1b94a24e5468c3fff26893c8b45da3187d6c
Reviewed-on: https://dart-review.googlesource.com/5291
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-09-13 12:05:11 +00:00
Brian Wilkerson
bb915a394c
Pass the comma in a catch clause to listeners
...
Change-Id: I33173614c22a9132f850750a441f443b539ed666
Reviewed-on: https://dart-review.googlesource.com/4980
Reviewed-by: Dan Rubel <danrubel@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
2017-09-12 18:46:20 +00:00
Brian Wilkerson
8eed0c5fa7
Fix a failing test to fix the bots (TBR)
...
Change-Id: I4b7b6c26995e7bad5a2bbe05d922be42e38e2ef3
Reviewed-on: https://dart-review.googlesource.com/5287
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-09-12 18:34:18 +00:00
Brian Wilkerson
af7bf48e7d
Use synthetic identifiers to recover from missing type name
...
Change-Id: Ic3c547a72a1742e0da40124cce024ae11c75f079
Reviewed-on: https://dart-review.googlesource.com/3762
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
2017-09-12 18:11:06 +00:00
Brian Wilkerson
f93da679a1
Support the optional comma in asserts in fasta
...
Change-Id: Iab3ad9403eba353f695c5eff352d332ed07a6a6f
Reviewed-on: https://dart-review.googlesource.com/3320
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
2017-09-12 17:21:42 +00:00
Brian Wilkerson
8f6f4d9d24
Pass the parens in conditional uris to listeners
...
Change-Id: I1cf41c32ae60ba1c0e8389a583d9188ad4f9ba89
Reviewed-on: https://dart-review.googlesource.com/5003
Reviewed-by: Dan Rubel <danrubel@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
2017-09-12 16:49:38 +00:00
Konstantin Shcheglov
73c93a3a13
Revert "Report compile time errors when assert initializers fail."
...
This reverts commit 556b0284b3 .
Until the specification wording about constants evaluation is clarified.
R=brianwilkerson@google.com , paulberry@google.com
Bug:
Change-Id: If5ff6dfbc5f8f724f657694a5e331b9fd07227fc
Reviewed-on: https://dart-review.googlesource.com/5280
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-09-12 16:05:17 +00:00
Konstantin Shcheglov
f7eba2359b
Create new style GenericFunctionTypeElementImpl for function typed parameters.
...
ParameterElement.parameters/typeParameters always return empty lists.
This was initially landed as https://dart-review.googlesource.com/c/sdk/+/3401 ,
but was rolled back because of dartdoc breakage.
R=brianwilkerson@google.com
Bug:
Change-Id: I328355fa4520536dfd0029966ad9f9af2e63a7d2
Reviewed-on: https://dart-review.googlesource.com/5000
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2017-09-11 19:15:11 +00:00
Paul Berry
16d505327b
Rename handleBinary{Operator,Expression} to {begin,end}BinaryExpression.
...
This makes the names more consistent with the other parser listener
methods.
Change-Id: Ic9f636a520bcc40e0ed281963ff079d4ce0202db
Reviewed-on: https://dart-review.googlesource.com/4120
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
2017-09-08 18:03:51 +00:00
Brian Wilkerson
c3792a435b
Fix more failing tests
...
Change-Id: I9fa99e507a35a63de725be4b6d7053d6771482dc
Reviewed-on: https://dart-review.googlesource.com/4260
Reviewed-by: Dan Rubel <danrubel@google.com >
2017-09-08 14:34:12 +00:00
Dan Rubel
d21d8ef0cb
report abstract class member as separate error code
...
Anytime a user adds `abstract` to a member of a class,
the fasta parser now reports an AbstractClassMember error
rather than the more general ExtraneousModifier error.
Change-Id: I41094ff71d38f1572c692b0a66fe8b68948fc23b
Reviewed-on: https://dart-review.googlesource.com/4143
Commit-Queue: Dan Rubel <danrubel@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-09-07 20:58:44 +00:00
Konstantin Shcheglov
1b4239d2e4
Export ByteStore and its implementations from front_end.
...
R=ahe@google.com , paulberry@google.com , sigmund@google.com
Bug:
Change-Id: Ie2e3413a7f143e270cec2bd3ae4564ad7cc315b1
Reviewed-on: https://dart-review.googlesource.com/3840
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2017-09-07 19:23:21 +00:00
Brian Wilkerson
65c61de919
Fix the failure mode of some tests
...
Change-Id: I58326d9a1ad94c977f526225df248121d9dfad57
Reviewed-on: https://dart-review.googlesource.com/3681
Reviewed-by: Dan Rubel <danrubel@google.com >
2017-09-07 16:09:55 +00:00
Dan Rubel
ec606a7874
report ExternalMethodWithBody error for native method with body
...
Change-Id: Ibca0cd1223ee61cafd2427d26448a1890a04aae8
Reviewed-on: https://dart-review.googlesource.com/3560
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2017-09-07 11:03:45 +00:00
Paul Berry
a1f4874a00
Implement type promotion for logical expressions.
...
This CL implements type promotion logic for both `&&` and `||`;
however, the logic for `||` has no effect, since `_factsWhenFalse`
always returns the current facts. This is consistent with the current
Dart specification (which only specifies type promotion for `&&`).
Change-Id: I79f608aa33ea0501bb4bba303949330af2da4dda
Reviewed-on: https://dart-review.googlesource.com/3345
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
2017-09-06 17:12:52 +00:00
Lasse Reichstein Holst Nielsen
76a3b431bb
Revert "Create new style GenericFunctionTypeElementImpl for function typed parameters."
...
This CL broke the SDK API-doc generation.
See https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Fclient.dart%2Fdart-sdk-linux-be%2F15242%2F%2B%2Frecipes%2Fsteps%2Fgenerate_API_docs%2F0%2Fstdout
Change-Id: I2b4acd766fb65e82a29b73412833e04112ba9dc4
Reviewed-on: https://dart-review.googlesource.com/3460
Reviewed-by: Jonas Termansen <sortie@google.com >
2017-09-06 10:43:11 +00:00
Konstantin Shcheglov
a3f8740bbd
Create new style GenericFunctionTypeElementImpl for function typed parameters.
...
ParameterElement.parameters/typeParameters always return empty lists.
R=brianwilkerson@google.com
Bug:
Change-Id: I5200df9e891031437d6e597f30fa54399b7d00e1
Reviewed-on: https://dart-review.googlesource.com/3401
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-09-06 02:31:11 +00:00
Jennifer Messerly
0d8d1af67f
fix #30601 , covariant checks for bounds were not working in some cases
...
This has a few related fixes:
fix #30461 , DDC now generates covariant checks for superclasses with the correct substitution.
fix #29483 , Analyzer can resolve the function type literal syntax correctly when used in type bounds and type arguments.
fix #30095 , replace use of DDC's StrongModeError private type with TypeError.
It also has some refactoring to simplify how DDC emits the initialization code at the start of function/method bodies. We no longer jump through AST parent pointers.
Change-Id: I7001f98cd0e00299d77bace49e19aca305abf224
Reviewed-on: https://dart-review.googlesource.com/3100
Reviewed-by: Leaf Petersen <leafp@google.com >
2017-09-05 22:44:19 +00:00
Dan Rubel
6ba1820b89
fix parseFunctionBody fasta tests
...
Change-Id: If79e02e43889219d4c1e3cd766f40426cd0dd375
Reviewed-on: https://dart-review.googlesource.com/3382
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-09-05 21:51:10 +00:00
Brian Wilkerson
8f188307c8
Triage and fix more tests
...
Change-Id: I23ebafeca762abe0ef3acd8e80bd0b2d4c407ad6
Reviewed-on: https://dart-review.googlesource.com/3306
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
2017-09-05 19:53:56 +00:00
Brian Wilkerson
8aa6a328e5
Enable asserts in initializer lists
...
Change-Id: I94e3797625dfb2ec5a49225dc1f0984f1ae3fbd8
Reviewed-on: https://dart-review.googlesource.com/3300
Reviewed-by: Dan Rubel <danrubel@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2017-09-05 17:14:06 +00:00
Brian Wilkerson
7cf0a22f43
Make covariant be a modifier in front_end
...
Change-Id: I66f8823207f6231b8318b8ac0530f1c51f9b702d
Reviewed-on: https://dart-review.googlesource.com/3282
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
2017-09-05 16:25:06 +00:00
Brian Wilkerson
981212aa45
Characterize more test failures
...
R=danrubel@google.com
Review-Url: https://codereview.chromium.org/3010043002 .
2017-09-03 14:27:09 -07:00
Dan Rubel
7733322d79
report const class as a more specific error code
...
This depends upon https://codereview.chromium.org/3007943002/ landing first.
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/3007033002 .
2017-09-02 08:46:35 -04:00
Dan Rubel
813d4eddf8
gracefully recover from extraneous top level modifiers
...
When the user includes extraneous modifiers preceeding top level
directives and declarations, the fasta parser now report an error
and skips the modifier.
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/3007943002 .
2017-09-01 18:55:02 -04:00
Brian Wilkerson
e8b0a7cbf9
Revert earlier changes to fix bots (TBR)
...
Review-Url: https://codereview.chromium.org/3010913002 .
2017-09-01 10:43:13 -07:00
Terry Lucas
0585e74b63
Fixed analyzer test to use dart2js not dartium
...
R=paulberry@google.com
Committed: https://github.com/dart-lang/sdk/commit/704de3bb3e27313c0eb6eb5ebc03173a5396dd1e
Review-Url: https://codereview.chromium.org/3004153002 .
2017-09-01 09:03:16 -07:00
Brian Wilkerson
47162b9174
Fix and triage more tests
...
R=danrubel@google.com
Review-Url: https://codereview.chromium.org/3005973002 .
2017-09-01 07:52:05 -07:00
William Hesse
e61f6e72ee
Revert "Fixed analyzer test to use dart2js not dartium"
...
This reverts commit 704de3bb3e .
This is needed because we reverted the commit that this was a follow-up to:
4a58918382
It was reverted in a8cab7a205
TBR=terry@google.com
BUG=
Review-Url: https://codereview.chromium.org/3004183002 .
2017-09-01 01:41:25 +02:00
Terry Lucas
704de3bb3e
Fixed analyzer test to use dart2js not dartium
...
TBR=paulberry@google.com
Review-Url: https://codereview.chromium.org/3004153002 .
2017-08-31 12:25:29 -07:00
Brian Wilkerson
e1e8f3b130
Fasta test cleanup
...
R=danrubel@google.com
Review-Url: https://codereview.chromium.org/3011693002 .
2017-08-31 10:10:37 -07:00
Brian Wilkerson
6c67db11cf
Fix more of the Fasta tests
...
R=danrubel@google.com
Review-Url: https://codereview.chromium.org/3004103002 .
2017-08-31 06:34:55 -07:00
Dan Rubel
5f5386b404
improve recovery of invalid top level abstract modifier usage
...
The fasta parser now gracefully degrades if the user puts 'abstract' before a top level declaration other than 'class'.
R=ahe@google.com
Review-Url: https://codereview.chromium.org/3010713002 .
2017-08-31 07:28:42 -04:00
pq
9efd55d531
Ensure mustCallSuper check visits children (flutter#11646).
...
R=brianwilkerson@google.com
Fixes: https://github.com/flutter/flutter/issues/11646
Review-Url: https://codereview.chromium.org/3007873002 .
2017-08-30 13:43:36 -07:00
Brian Wilkerson
6a48eff924
Fix several failing tests
...
R=danrubel@google.com
Review-Url: https://codereview.chromium.org/3011643002 .
2017-08-30 11:04:08 -07:00