Peter von der Ahé
76ad92e5ad
Generalize DeclarationBuilder.resolveTypes.
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2695453002 .
2017-02-13 16:02:18 +01:00
Peter von der Ahé
2ce3c546ea
Track names in DeclarationBuilder.
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2689793002 .
2017-02-13 15:56:03 +01:00
Peter von der Ahé
c0caf111a9
Include class names in parser events.
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2693453004 .
2017-02-13 15:50:30 +01:00
Peter von der Ahé
77ba539a72
Improve compile-time error handling.
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2691613002 .
2017-02-13 15:45:28 +01:00
Peter von der Ahé
b92ef72c8e
Don't return values that aren't used.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2685213003 .
2017-02-13 12:37:20 +01:00
Peter von der Ahé
ee7a3e1e24
Ensure locations are always provided, but don't store them yet.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2691523002 .
2017-02-13 12:30:21 +01:00
Paul Berry
2e435ec020
Move token stream translation logic into Fasta.
...
This logic was initially only used in scanner_fasta_test, however we
are going to need it for other tests (some of which are outside of the
Fasta package), and on a short term basis we may want to use it to
help integrate pieces of Fasta with pieces of the analyzer codebase.
So it needs to be somewhere that's accessible outside of
pkg/front_end/test.
I performed some trivial improvements during the move (such as using
Token.info.kind in preference to "is" checks, and identifying the end
of the input by looking for a nearby EOF token).
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2686363002 .
2017-02-10 13:48:08 -08:00
Sigmund Cherem
935ec2bb89
Reduce strong mode errors and warnings
...
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2675603002 .
2017-02-10 11:13:53 -08:00
Paul Berry
7e283248e1
Use Keyword.isPseudo to translate Fasta's "pseudo-keywords" properly.
...
With the exception of `deferred`, all of Fasta's "pseudo-keywords" are
considered by the analyzer (and the spec) to be identifiers.
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2686293002 .
2017-02-10 10:59:06 -08:00
Paul Berry
85028a844f
Unify fasta->analyzer token translation logic.
...
Previously, the scanner tests and the Fasta implementation had
duplicate logic for translating Fasta tokens to analyzer tokens. This
CL unifies the translation logic, and fills in some functionality that
was missing from the Fasta translation logic.
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2682423003 .
2017-02-10 09:01:55 -08:00
Vyacheslav Egorov
5e09ca8d97
Fasta: Change BodyBuilder.buildCompileTimeError to throw an instance of _CompileTimeError.
...
This is a VM specific class that is recognized by exception handling code in VM.
Using this class instead of string guarantees that VM terminates with the correct exit code: kCompilationErrorExitCode (254) and not kErrorExitCode (255).
BUG=
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2689543002 .
2017-02-09 17:13:47 +01:00
Peter von der Ahé
c13730e8ea
Pay some naming debt.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2682993002 .
2017-02-09 13:10:24 +01:00
Peter von der Ahé
616640d28b
Handle operators correctly.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2680323002 .
2017-02-09 13:04:31 +01:00
Peter von der Ahé
bc0fb7668c
Include stack in error about unhandled event.
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2685903002 .
2017-02-08 17:51:50 +01:00
Devon Carew
eb655b6d32
Fix a few typos in the front_end package.
...
BUG=
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2680013006 .
2017-02-08 08:35:05 -08:00
Peter von der Ahé
a881e826dc
Resolve type variables of generic methods.
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2672993003 .
2017-02-08 16:11:20 +01:00
Peter von der Ahé
98c93c3c92
Revert "Use ProcedureKind.Operator for operators."
...
This reverts commit 025ad56fcc .
Revert "Add enum for user-definable operators."
This reverts commit 91bea04dcb .
Review-Url: https://codereview.chromium.org/2682113003 .
2017-02-08 15:44:23 +01:00
Peter von der Ahé
025ad56fcc
Use ProcedureKind.Operator for operators.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2684763004 .
2017-02-08 15:38:01 +01:00
Peter von der Ahé
9a5f9aa9d7
Correctly resolve package parts.
...
R=vegorov@google.com
Review-Url: https://codereview.chromium.org/2682103002 .
2017-02-08 15:15:01 +01:00
Peter von der Ahé
91bea04dcb
Add enum for user-definable operators.
...
R=lrn@google.com
Review-Url: https://codereview.chromium.org/2684933002 .
2017-02-08 15:04:05 +01:00
Sigmund Cherem
25e94e2e0b
Small fix to perf.dart.
...
This also makes perf_test.dart do something useful. It now executes perf.dart on
a small file from pkg/front_end. This may help to detect early when the
peformance bots will see a failure. I've only tested this in linux, but given
that's the OS of the perf bots, I'm ok skipping this in other OSs.
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2677423002 .
2017-02-07 15:07:57 -08:00
Paul Berry
62604294a2
Begin hooking up Fasta to analyzer parser tests.
...
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2672403004 .
2017-02-07 05:45:58 -08:00
Peter von der Ahé
15b143e0e8
Set fileUri when creating library builders.
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2669363004 .
2017-02-06 11:22:32 +01:00
Peter von der Ahé
a7c75dd2a1
Add option --compile-sdk to fasta compile and run.
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2676823002 .
2017-02-06 11:20:36 +01:00
Peter von der Ahé
34a0d345f5
Add helper methods for skipping Dart VM native bodies.
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2676813002 .
2017-02-06 11:18:00 +01:00
Peter von der Ahé
6b3c110897
Add handleMemberName event to allow parsing Dart VM natives.
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2671013002 .
2017-02-06 11:11:13 +01:00
Peter von der Ahé
bf91a3f6e5
Pop named mixin type variables in correct order.
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2677483003 .
2017-02-03 21:05:19 +01:00
Paul Berry
33a7086f9b
Add a few doc comments.
...
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2671903003 .
2017-02-03 10:12:11 -08:00
Peter von der Ahé
7512ab5c79
Enable running of fasta tests on build bot.
...
Fixes https://github.com/dart-lang/sdk/issues/28594
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2675593003 .
2017-02-03 07:12:04 +01:00
Peter von der Ahé
2cd456fbb0
Improve handling of parser stack overflows.
...
Fixes https://github.com/dart-lang/sdk/issues/28597
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2671653005 .
2017-02-02 15:55:18 +01:00
Kevin Millikin
17d8de6063
Update fasta tests to use the new transformation API
...
Kernel transformations have been split into modular and global ones.
Update the fasta tests to use this new API.
BUG=
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2675683002 .
2017-02-02 14:52:45 +01:00
Peter von der Ahé
7be9cd0ded
Throw input error instead of parser error to avoid crashing.
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2664333003 .
2017-02-02 14:35:38 +01:00
Peter von der Ahé
c6f67f76fc
Include characterHex in all encoding errors.
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2666003005 .
2017-02-01 17:53:08 +01:00
Martin Kustermann
e2eef7bfce
Kernel: Do not try to use return value of []=
...
Fixes #28302
R=ahe@google.com , vegorov@google.com
Review-Url: https://codereview.chromium.org/2668893003 .
2017-02-01 17:47:16 +01:00
Peter von der Ahé
e037a21ec3
Update location of rasta tests.
...
Fixes https://github.com/dart-lang/sdk/issues/28594
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2663163005 .
2017-02-01 16:33:15 +01:00
Peter von der Ahé
92cfd09e42
Fix some problems with lexical error recovery.
...
* current.next was sometimes null.
* recoverUnmatched would create a cycle.
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2661153005 .
2017-02-01 16:24:22 +01:00
Peter von der Ahé
363a262b80
Update fasta readme file.
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2667103002 .
2017-02-01 14:07:21 +01:00
Peter von der Ahé
ce742a1697
Port parser and scanner fixes from rasta branch.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2664593002 .
2017-02-01 13:59:11 +01:00
Peter von der Ahé
ef8ec26cf3
Update status files and expectations of rasta tests.
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2653223002 .
2017-02-01 13:35:35 +01:00
Peter von der Ahé
0401b89795
Fix hints and warnings.
...
R=johnniwinther@google.com , paulberry@google.com
Review-Url: https://codereview.chromium.org/2659403002 .
2017-02-01 13:04:40 +01:00
Peter von der Ahé
1ebf7344df
Handle field initializers correctly.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2652663005 .
2017-02-01 12:27:36 +01:00
Peter von der Ahé
65f5faff13
Use a real program when compiling platform.dill.
...
R=asgerf@google.com
Review-Url: https://codereview.chromium.org/2650733003 .
2017-02-01 12:27:36 +01:00
Peter von der Ahé
7902f27c76
Restructure parser error handling and recovery.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2650813002 .
2017-02-01 12:27:36 +01:00
Peter von der Ahé
3d94a8ae10
Rename events.
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2650803002 .
2017-02-01 12:27:36 +01:00
Peter von der Ahé
d775d871c4
Update listener error handling.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2649923002 .
2017-02-01 12:27:36 +01:00
Peter von der Ahé
828d317145
Update parser and scanner.
...
Up-to-date with 919b5ac8d0 .
R=johnniwinther@google.com , sigmund@google.com
Review-Url: https://codereview.chromium.org/2642903003 .
2017-02-01 12:27:36 +01:00
Peter von der Ahé
8b237e4638
Updated to kernel changes in master.
...
Rebased on 919b5ac8d0 .
R=asgerf@google.com
Review-Url: https://codereview.chromium.org/2644633004 .
2017-02-01 12:27:36 +01:00
Peter von der Ahé
0da94cc888
Apply toValue conversion on assert messages.
...
R=asgerf@google.com
Review-Url: https://codereview.chromium.org/2639903005 .
2017-02-01 12:27:36 +01:00
Peter von der Ahé
0e9a8abf75
Document parser event names.
...
R=asgerf@google.com
Review-Url: https://codereview.chromium.org/2645513002 .
2017-02-01 12:27:36 +01:00
Peter von der Ahé
5d3ce72f46
Don't crash on missing dart: URI.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2641833004 .
2017-02-01 12:27:35 +01:00