danrubel
516646735d
cleanup and improve A/B fasta test harness
...
* Update harness to show 99.9% best and worst case
* Moved compile summary functionality
from pkg/front_end/tool/fasta/compile.dart
into pkg/front_end/lib/src/fasta/outline.dart
* Modified outline.dart to output a JSON summary
containing elapse execution times if -Dsummary=true
* Moved all statistical calculations into abcompile.dart
* Adjusted pkg/front_end/tool/fasta/abcompile.dart so that
--verbose is not needed to capture numbers and progress
* Updated the A/B summary section to paste more easily
into Google Sheets
* Address comments in
https://codereview.chromium.org/2734863003/
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2739963002 .
2017-03-09 14:07:43 -05:00
Peter von der Ahé
00898fcade
Don't crash on generic methods.
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2738613005 .
2017-03-09 14:49:05 +01:00
Peter von der Ahé
c7b3f9ba98
Report a parse error when recovery fails.
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2739853003 .
2017-03-09 14:36:27 +01:00
Peter von der Ahé
95715d66ac
Compile-time errors instead of internal errors.
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2735393002 .
2017-03-09 14:07:33 +01:00
Peter von der Ahé
7584921253
Fix crash when reporting error involving constructor.
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2738713004 .
2017-03-09 13:50:31 +01:00
Peter von der Ahé
471c0852ce
Report compile-time error instead of crashing when encountering bad parts.
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2736263002 .
2017-03-09 13:42:30 +01:00
Peter von der Ahé
d1a2839a50
Recover correctly from positional argument after named argument.
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2733413002 .
2017-03-09 13:33:58 +01:00
Peter von der Ahé
3ed36f5c46
Install default constructors on broken mixin applications.
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2732293004 .
2017-03-09 13:12:34 +01:00
Peter von der Ahé
8608d1b436
Use correct types on cloned constructors in mixin applications.
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2736103004 .
2017-03-09 12:52:00 +01:00
Jens Johansen
e553775b9c
[fasta] Add and correct offsets on nodes
...
BUG=
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2736093003 .
2017-03-09 10:31:52 +01:00
Paul Berry
b505603f5f
Create a TokenStreamRewriter class.
...
This class will allow parser error recovery to insert synthetic tokens
into the token stream. It makes use of Token.previousToken when it's
available, but does not depend on it; when it's not available, it
falls back on heuristics which should still be fast, and which don't
impose any performance burden until the first synthetic token is
inserted.
R=danrubel@google.com
Review-Url: https://codereview.chromium.org/2732193007 .
2017-03-08 13:40:31 -08:00
Jens Johansen
15dc449cea
[Fasta] Offset and end offset on procedures
...
BUG=
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2731553004 .
2017-03-08 09:23:41 +01:00
Paul Berry
a6ee0dfd3f
Add support for documentation comments to most of AstBuilder.
...
This CL addresses all use cases except for documentation comments on
type parameter formals.
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2732363002 .
2017-03-07 14:19:53 -08:00
Konstantin Shcheglov
dc2c7df603
Add 'withKeyword' to mixin application with Fasta.
...
R=paulberry@google.com , ahe@google.com
BUG=
Review-Url: https://codereview.chromium.org/2735973004 .
2017-03-07 13:27:50 -08:00
Paul Berry
2db4230533
Fix a few instances of TypeName in AstBuilder (should be TypeAnnotation).
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2734113004 .
2017-03-07 13:16:42 -08:00
Konstantin Shcheglov
ed289f64cd
Fix for parsing default parameters.
...
In analyzer we decide whether to create DefaultFormalParameter by the
fact of being in [] or {}, not by the fact of presence of a default
value.
R=paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2740573002 .
2017-03-07 12:20:36 -08:00
Konstantin Shcheglov
fe4378d2c8
Fix for parsing generic function types with Fasta.
...
R=paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2732213003 .
2017-03-07 12:03:55 -08:00
Konstantin Shcheglov
271ea5a551
Parse script tags with Fasta.
...
R=paulberry@google.com , ahe@google.com
BUG=
Review-Url: https://codereview.chromium.org/2738693004 .
2017-03-07 11:59:14 -08:00
danrubel
dd3ab83eee
add previous token field
...
This adds fasta Token.previous and sets that field to point
to the previous token in the fasta token stream.
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2739583002 .
2017-03-07 13:03:52 -05:00
danrubel
69ad5c37a1
move comment tokens into preceedingComments field
...
Fix https://github.com/dart-lang/sdk/issues/28850
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2731863002 .
2017-03-07 12:50:33 -05:00
Konstantin Shcheglov
91cf66ed5d
Fix for parsing empty compilation units with Fasta.
...
R=paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2738693003 .
2017-03-07 09:48:29 -08:00
Peter von der Ahé
2934dfaf16
Avoid crashing on function syntax.
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2730093002 .
2017-03-07 16:54:09 +01:00
Jens Johansen
a58fe4898d
[Fasta] include source code in dill
...
At least for now, only when passing --include-source
BUG=
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2729913005 .
2017-03-07 15:48:25 +01:00
Peter von der Ahé
ac9d87b707
Keep track of references to guide.
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2739593004 .
2017-03-07 14:50:57 +01:00
Peter von der Ahé
3835ccf907
One shared guide for diagnostics.
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2718023003 .
2017-03-07 13:44:39 +01:00
Konstantin Shcheglov
bf4dd380ea
Fix for parsing 'rethrow' statement with Fasta.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2730293003 .
2017-03-06 16:50:28 -08:00
Konstantin Shcheglov
262cee7864
Add support for parsing #void with Fasta.
...
For the reason why we need this, see the following documents.
https://codereview.chromium.org//427603002
https://github.com/dart-lang/sdk/issues/20191
https://github.com/dart-lang/sdk/issues/19972
R=paulberry@google.com , ahe@google.com
BUG=
Review-Url: https://codereview.chromium.org/2737593002 .
2017-03-06 11:24:54 -08:00
Konstantin Shcheglov
2a60cbf9de
Fix for parsing 'const X()' with Fasta.
...
R=paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2733913002 .
2017-03-06 11:00:32 -08:00
Konstantin Shcheglov
be521515fe
Parse #operator symbol literals with Fasta.
...
R=paulberry@google.com , ahe@google.com
BUG=
Review-Url: https://codereview.chromium.org/2735623002 .
2017-03-06 07:47:46 -08:00
Dmitry Olshansky
8dda473a55
Improve fasta scanner performance
...
Reorder cases in bigSwitch according
to frequency, reduce the number of
comparisons.
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2711403002 .
2017-03-06 11:35:28 +01:00
Peter von der Ahé
3873b0fc83
Recover from bad supertypes.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2729943003 .
2017-03-03 15:06:09 +01:00
Vyacheslav Egorov
c0c87b0afd
GN: change the way we specify dependencies for the patched_sdk target.
...
Instead of listing all files as inputs in GN script using Python helper we make
patch_sdk.dart generate a depfile that Ninja can use:
https://ninja-build.org/manual.html#_depfile
This prevents breakages when some dependencies are deleted and GN is not rerun.
R=ahe@google.com , kustermann@google.com
BUG=
Review-Url: https://codereview.chromium.org/2729503006 .
2017-03-03 14:52:51 +01:00
Peter von der Ahé
ff89087641
Recover correctly from this-parameter on non-constructors.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2727313004 .
2017-03-03 12:40:30 +01:00
Peter von der Ahé
2af498fc84
Recover from missing arguments in new expression.
...
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2730763002 .
2017-03-03 10:31:19 +01:00
Jens Johansen
f979537725
[Fasta] Include line starts
...
BUG=
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2731633003 .
2017-03-03 10:29:56 +01:00
Peter von der Ahé
790df00dc6
Recover correctly from empty optional parameters.
...
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2725093003 .
2017-03-03 10:26:13 +01:00
Peter von der Ahé
6f550ef4ea
Correctly recover from incorrect imports, etc.
...
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2725973004 .
2017-03-03 10:10:00 +01:00
Peter von der Ahé
bffd9e28ac
Implement deps files in compile_platform.dart.
...
R=vegorov@google.com
Review-Url: https://codereview.chromium.org/2730743002 .
2017-03-02 16:15:42 +01:00
Peter von der Ahé
88a92f805a
Move all main methods to tool/.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2722223006 .
2017-03-02 14:41:06 +01:00
Peter von der Ahé
628be2b36a
Apply transformers and other work arounds to get boostrapping to work.
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2723173002 .
2017-03-02 14:31:58 +01:00
Peter von der Ahé
6176847e36
Consolidate analyzer dependencies.
...
This allows us to create a smaller .dill file for Fasta.
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2723113002 .
2017-03-02 12:59:47 +01:00
Peter von der Ahé
369c94815d
Rename FeContext to FastaContext.
...
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2726843003 .
2017-03-02 12:38:32 +01:00
Peter von der Ahé
c59ecd801c
Remove package imports from itself.
...
Without this, we risk creating two different libraries at runtime. One
named file:///something/ and one named package:front_end/something.
These libraries are different and if enums from one gets mixed with
the other, you get very confusing errors (to apparently identical enums
aren't equal).
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2726793003 .
2017-03-02 12:34:46 +01:00
Konstantin Shcheglov
ce58e89d3c
Fix parsing [a]sync[*] function body modifiers with Fasta.
...
The Fasta'a parser is crazy as it is now. It says that something is a
return statement, but it is actually an expression function body. That
seems too much dart2js specific.
R=paulberry@google.com , ahe@google.com
BUG=
Review-Url: https://codereview.chromium.org/2728773002 .
2017-03-01 16:20:20 -08:00
Paul Berry
c6d1a0d381
Re-remove AstBuilder.accumulateIdentifierComponents.
...
This was removed in 3fbeb5d064 and
accidentally re-introduced in 4500bb0920
(presumably due to merge conflict resolution).
Review-Url: https://codereview.chromium.org/2724143002 .
2017-03-01 15:30:34 -08:00
Paul Berry
70408f7549
Add a data structure to keep track of modifiers in AstBuilder.
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2725983002 .
2017-03-01 14:43:11 -08:00
Paul Berry
8decc11ac0
Add AstBuilder support for fields.
...
R=ahe@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2723883002 .
2017-03-01 13:24:17 -08:00
Konstantin Shcheglov
9fa139215b
Parse 'x.y' as PrefixedIdentifier, not PropertyAccess with Fasta.
...
OTOH, 'x?.y' or '(x).y' should be parsed as PropertyAccess.
R=paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2722283002 .
2017-03-01 13:12:51 -08:00
Konstantin Shcheglov
86b5a088ad
Parse InstanceCreationExpression with Fasta.
...
R=paulberry@google.com , ahe@google.com
BUG=
Review-Url: https://codereview.chromium.org/2727753002 .
2017-03-01 13:04:46 -08:00
Konstantin Shcheglov
93bf98045c
Fix parseAssignableSelector() tests and parse '?.' with Fasta.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2727663005 .
2017-03-01 11:33:22 -08:00