Devon Carew
a231501692
Format generated files.
...
BUG=
R=brianwilkerson@google.com , jacobr@google.com
Review-Url: https://codereview.chromium.org/2765953002 .
2017-03-21 15:54:16 -07:00
Dan Rubel
99336edc79
fasta.BeginGroupToken implement analyzer.BeginToken
...
* fasta.BeginGroupToken implement analyzer.BeginToken
* update token translator initialization of head and tail EOF
* update fasta.Token value() and type accessor to match analyzer
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2762103003 .
2017-03-21 11:46:45 -04:00
Dan Rubel
80c8479587
fasta.CommentToken implement analyzer.CommentToken
...
* update the fasta scanner to generate comment and dartdoc tokens
* replace fasta.preceedingComments field
with preceedingCommentTokens field and preceedingComments getter/setter
* update token translator
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2763833002 .
2017-03-21 11:40:47 -04:00
Jens Johansen
a6ea038643
[kernel] offsets on direct property get/set
...
BUG=
R=ahe@google.com , kmillikin@google.com
Committed: https://github.com/dart-lang/sdk/commit/7577f6aaa052c9a1c309f13bf338b92bf4fb9fd0
Review-Url: https://codereview.chromium.org/2748333002 .
2017-03-21 14:43:45 +01:00
Jens Johansen
a1a34a1c84
[kernel] Debugging of switch statement
...
BUG=
R=ahe@google.com , kmillikin@google.com
Review-Url: https://codereview.chromium.org/2750013002 .
2017-03-21 11:36:48 +01:00
Jens Johansen
4d208e2ffb
[fasta] Add and correct even more offsets
...
E.g. kernel debugging of async functions should now work.
BUG=
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2746013003 .
2017-03-21 10:57:30 +01:00
danrubel
3e78da649e
fix scriptTag scanner_round_trip test
...
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2761683002 .
2017-03-20 15:18:18 -04:00
danrubel
08402f5789
update fasta scanner to generate two types of comments
...
* replace fasta.COMMENT_INFO
with fasta.SINGLE_LINE_COMMENT_INFO and fasta.MULTI_LINE_COMMENT_INFO
so that it matches analyzer scanner output
* added test for fasta.isUserDefinableOperator
R=ahe@google.com , paulberry@google.com
Review-Url: https://codereview.chromium.org/2757153002 .
2017-03-20 15:12:28 -04:00
danrubel
e93ad0d4fc
fasta.Token implement analyzer.Token
...
* fasta.Token implements analyzer.Token
* cleanup and improve PrecedenceInfo tests
R=ahe@google.com , paulberry@google.com
Review-Url: https://codereview.chromium.org/2757113002 .
2017-03-20 14:06:06 -04:00
danrubel
8bef633d3f
fasta.PrecedenceInfo implement analyzer.TokenType
...
This updates PrecedenceInfo to implement TokenType
so that fasta.Token.type can return info for the token type.
In addition, the TokenType consts are now reference the corresponding
PrecedenceInfo consts so that parsing using either scanner will result
in token types that are identical.
R=ahe@google.com , paulberry@google.com
Review-Url: https://codereview.chromium.org/2758113002 .
2017-03-20 13:40:59 -04:00
Peter von der Ahé
0526f5b150
Add testing subcommand to fasta tool.
...
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2757303002 .
2017-03-20 17:55:00 +01:00
danrubel
d7c4cad542
align fasta.PrecedenceInfo.precedence with analyzer.TokenType.precedence
...
This updates fasta precedence to match analyzer:
* '!' 0 --> 15
* '~' 0 --> 15
* '--' 15 --> 16
* '++' 15 --> 16
* '.' 15 --> 16
* '?.' 15 --> 16
* '(' 15 --> 16
* '[' 15 --> 16
And updates analyzer precedence to match fasta:
* '--' 15 --> 16
* '++' 15 --> 16
* '[]' 16 --> 0
* '[]=' 16 --> 0
R=ahe@google.com , brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2755433004 .
2017-03-20 12:47:33 -04:00
Jens Johansen
ee7fe44941
[fasta] Flip source flag and include source by default
...
BUG=
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2751093004 .
2017-03-20 08:21:15 +01:00
Paul Berry
bad0577857
Suppress undefined_getter error when analyzing colors.dart with an older SDK.
...
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2757983002 .
2017-03-17 13:46:44 -07:00
Dmitry Olshansky
2eec4275a5
Reland: [Fasta] Do not emit default arguments at callsite
...
This actually fixes a few performance regressions.
BUG= https://github.com/dart-lang/sdk/issues/29089
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2750503015 .
2017-03-17 18:58:47 +01:00
Peter von der Ahé
8979b040ec
Improve parsing of async and generator methods.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2759663002 .
2017-03-17 18:03:42 +01:00
Peter von der Ahé
d1a12f9852
Use identical or optional for keywords.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2759643002 .
2017-03-17 14:56:01 +01:00
Peter von der Ahé
323d5b0b7f
Track async state in parser.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2759623003 .
2017-03-17 14:43:07 +01:00
Peter von der Ahé
1a47ef1a77
Implement override checks for methods.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2755983002 .
2017-03-17 14:31:08 +01:00
Paul Berry
685045d619
Start unraveling circularities between analyzer and front_end/kernel.
...
This CL moves many of the files from
pkg/front_end/lib/src/fasta/analyzer/ to pkg/analyzer/lib/src/fasta/.
It also moves two files from pkg/kernel/lib/analyzer/ to
pkg/analyzer/lib/src/kernel/.
This reduces the amount of circularity between analyzer and
front_end/kernel so that there are no files in front_end or kernel
which are both dependend upon by analyzer and depend upon analyzer. I
will clean up the remaining circularities in future CLs.
There should be no functional change.
R=ahe@google.com , asgerf@google.com , kmillikin@google.com , scheglov@google.com , sigmund@google.com
Review-Url: https://codereview.chromium.org/2756593004 .
2017-03-17 05:56:06 -07:00
Peter von der Ahé
edcb82cfb7
Remove strong_mode_down_cast_composite from .analysis_options.
...
R=kasperl@google.com
Review-Url: https://codereview.chromium.org/2749513012 .
2017-03-17 13:01:11 +01:00
Konstantin Shcheglov
fcfe68f057
Allow AstBuilder to report parse errors.
...
R=ahe@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2752093002 .
2017-03-16 13:52:16 -07:00
Paul Berry
ecb5abbd36
Tighten up subpackage_relationships_test.dart
...
This CL adds checks to ensure that the assertions in
subpackage_relationships_test.dart aren't too generous. For example,
if a subpackage is allowed to import analyzer, we now check that it
actually does import analyzer.
R=danrubel@google.com
Review-Url: https://codereview.chromium.org/2748073007 .
2017-03-16 11:34:07 -07:00
Paul Berry
0a1b7dffd3
Change Fasta testing docs to use 32-bit when possible.
...
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2745053006 .
2017-03-16 11:20:25 -07:00
Dmitry Olshansky
bcd106e64b
Revert "[Fasta] Do not emit default arguments at callsite"
...
This reverts commit 451882daf7 .
TBR=ahe@google.com
Review-Url: https://codereview.chromium.org/2755953002 .
2017-03-16 17:44:59 +01:00
Dmitry Olshansky
451882daf7
[Fasta] Do not emit default arguments at callsite
...
Fixes a couple of performance regressions (RegExp, ParticleSystem).
BUG= https://github.com/dart-lang/sdk/issues/29089
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2752943003 .
2017-03-16 16:19:33 +01:00
Peter von der Ahé
21c7e6dd6b
Work around Platform.ansiSupported missing from checked-in dart binary.
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2757593003 .
2017-03-16 14:14:06 +01:00
Dmitry Olshansky
12bbefdbed
VM: [KERNEL] handle single-argument string interpolation in VM
...
Also ignore zero-width string pieces when creating
StringConcatenation objects.
Mostly fixes the regressions on CssLib.prettyPrint.
R=ahe@google.com , vegorov@google.com
Review-Url: https://codereview.chromium.org/2753523002 .
2017-03-16 13:33:28 +01:00
Peter von der Ahé
b018d8cfae
Support terminal colors on Windows 10.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2753033002 .
2017-03-16 11:31:13 +01:00
Peter von der Ahé
c3330b1407
Complain about built-in identifiers.
...
R=johnniwinther@google.com , sigmund@google.com
Review-Url: https://codereview.chromium.org/2750863002 .
2017-03-16 11:01:27 +01:00
Peter von der Ahé
87d932147d
Fix a few hints.
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2754793002 .
2017-03-16 10:48:13 +01:00
Paul Berry
ef79634132
Re-land "Add support for metadata on type variables to Fasta parser." (with fixes).
...
Last time I landed this I left a crucial `pop()` out of BodyBuilder,
resulting in test failures.
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2750503012 .
2017-03-15 12:42:23 -07:00
Konstantin Shcheglov
ae85bcf954
Parse for-loop statements with Fasta.
...
R=ahe@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2746333005 .
2017-03-15 11:40:32 -07:00
Konstantin Shcheglov
39dbb75c76
Parse constructor field initializers with Fasta.
...
R=paulberry@google.com , ahe@google.com
BUG=
Review-Url: https://codereview.chromium.org/2751913002 .
2017-03-15 11:32:53 -07:00
Peter von der Ahé
a228e0b2d7
Move deps file generation to fasta.
...
R=vegorov@google.com
Review-Url: https://codereview.chromium.org/2742333006 .
2017-03-15 15:42:22 +01:00
Peter von der Ahé
06a6ba14a3
Swap two methods.
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2748093005 .
2017-03-15 15:28:11 +01:00
Peter von der Ahé
11018241fe
Add here-be-dragons comments.
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2749253003 .
2017-03-15 15:19:05 +01:00
Peter von der Ahé
99fa028982
Handle 'part of' declarations with URI correctly in Fasta.
...
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2747173002 .
2017-03-15 15:11:36 +01:00
Peter von der Ahé
626987ef5c
Add default type arguments on Supertype as well.
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2746763003 .
2017-03-15 14:05:08 +01:00
Jens Johansen
9fa510ea38
Revert "[kernel] offsets on direct property get/set"
...
This commit wanted stuff from anther CL that haven't landed yet.
This reverts commit 7577f6aaa0 .
BUG=
Review-Url: https://codereview.chromium.org/2751083002 .
2017-03-15 13:54:03 +01:00
Jens Johansen
7577f6aaa0
[kernel] offsets on direct property get/set
...
BUG=
R=ahe@google.com , kmillikin@google.com
Review-Url: https://codereview.chromium.org/2748333002 .
2017-03-15 13:26:45 +01:00
Jens Johansen
5e1ba94af4
[kernel] debugging for in statement
...
BUG=
R=ahe@google.com , kmillikin@google.com
Review-Url: https://codereview.chromium.org/2747813003 .
2017-03-15 13:22:58 +01:00
Dan Rubel
32f492b54b
fasta.Token implement analyzer.Token.isOperator
...
One more step closer to fasta.Token implements analyzer.Token
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2749033003 .
2017-03-14 18:06:57 -04:00
Konstantin Shcheglov
341034718b
Parse for-in statements with Fasta.
...
R=paulberry@google.com , ahe@google.com
BUG=
Review-Url: https://codereview.chromium.org/2747083005 .
2017-03-14 14:19:46 -07:00
Konstantin Shcheglov
9ed77d848e
Parse assert statements with Fasta.
...
R=paulberry@google.com , ahe@google.com
BUG=
Review-Url: https://codereview.chromium.org/2747803004 .
2017-03-14 14:09:23 -07:00
Konstantin Shcheglov
9e3f269d46
Parse break and continue statements with Fasta.
...
R=paulberry@google.com , ahe@google.com
BUG=
Review-Url: https://codereview.chromium.org/2748093004 .
2017-03-14 14:03:55 -07:00
Konstantin Shcheglov
f873c5657b
Parse try-catch statements with Fasta.
...
There are still failing tests because we cannot access the comma between
the exception and the stack trace parameters. I will make a change
to Analyzer AST to remember commas in parameters, and send another CL
to use it in AST builder.
R=paulberry@google.com , ahe@google.com
BUG=
Review-Url: https://codereview.chromium.org/2752543005 .
2017-03-14 13:03:35 -07:00
Konstantin Shcheglov
d21cc7750f
Parse 'while' and 'do-while' statements with Fasta.
...
R=paulberry@google.com , ahe@google.com
BUG=
Review-Url: https://codereview.chromium.org/2748183002 .
2017-03-14 12:57:24 -07:00
Paul Berry
c78b4d66bb
Move some of analyzer's code generation utilities into front_end.
...
These utilities are needed for generating the code that supports
summaries; in order to move summary logic into front_end, we will need
these code generation tools in front_end as well.
Also make a minor change to summary code generation logic so that it
talks to the file system directly rather than depending on analyzer's
file system abstraction.
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2742333005 .
2017-03-14 12:30:18 -07:00
Konstantin Shcheglov
9cf7535e03
Parse empty statements with Fasta.
...
R=paulberry@google.com , ahe@google.com
BUG=
Review-Url: https://codereview.chromium.org/2753553002 .
2017-03-14 11:35:23 -07:00