Commit Graph

6018 Commits

Author SHA1 Message Date
Peter von der Ahé 40fbcac6ed Annotate native methods.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2695633002 .
2017-02-13 16:33:47 +01:00
Peter von der Ahé bd9a0a674a Add accessor for getting target-specific constructor.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2697523002 .
2017-02-13 16:28:07 +01:00
Peter von der Ahé be36f83e5c Fix crash in DillClassBuilder.isAbstract.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2691953002 .
2017-02-13 16:24:53 +01:00
Peter von der Ahé 5a9caa2396 Compute bounds of type variables.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2691653003 .
2017-02-13 16:22:04 +01:00
Peter von der Ahé 261ecfab5c Remove convertConstructors.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2682333004 .
2017-02-13 16:14:28 +01:00
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
Devon Carew 7f24210946 Add some analysis excludes for pkg/front_end.
BUG=
R=paulberry@google.com, sigmund@google.com

Review-Url: https://codereview.chromium.org/2693673002 .
2017-02-13 06:30:06 -08: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 fbcce6192c Stop testing scanner error lengths.
The scanner has always reported all errors as having a length of 1;
trying to test that each error has the expected length just creates
confusion.

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2694433002 .
2017-02-10 11:09:32 -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
Paul Berry 9a82ada085 Remove hardcoded paths from perf.dart.
This lets perf.dart find the SDK and the .packages file regardless of
the architecture that's being tested and the working directory in
which the script is started.

Fixes #28676.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2687723002 .
2017-02-08 16:48:20 -08: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
Paul Berry 5a714dd192 Update fasta scanner tests to refer to #28665.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2682753003 .
2017-02-08 05:14:56 -08:00
Paul Berry 6c86822bf5 Separate fasta and analyzer scanner tests.
This makes it easier to run one set of tests or the other.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2680903002 .
2017-02-07 17:36:52 -08: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 e29f83feeb Modify fasta scanner testing logic to use ErrorToken.errorCode.
Fixes 6 failing tests.

R=ahe@google.com

Review-Url: https://codereview.chromium.org/2674353002 .
2017-02-07 06:36:00 -08:00
Paul Berry a4f8db2c0b Use token.value to distinguish comment types.
R=ahe@google.com

Review-Url: https://codereview.chromium.org/2674383002 .
2017-02-07 05:57:21 -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
Paul Berry 04f19f6bfb Connect fasta's scanner to the analyzer-derived scanner tests in front_end.
Failing tests are currently marked with "@failingTest" to prevent
breaking buildbots.

I've marked the issues I'm aware of with "TODO(paulberry,ahe)".  Peter
and I need to triage these issues--some of them may not be necessary
to fix due to the fact that fasta replaces the parser as well.  We
will follow up with CLs that either fix the issues or remove the TODO
comments as appropriate.

R=ahe@google.com

Review-Url: https://codereview.chromium.org/2676083002 .
2017-02-06 05:54:15 -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
Paul Berry ee78e6c3b3 Add fasta subdirectories to subpackage_relationships_test.
I populated subpackageRules with the set of dependencies that are
needed in order to make the tests pass.  Hopefully we can eliminate
some of these dependencies in the future.

R=ahe@google.com

Review-Url: https://codereview.chromium.org/2674463002 .
2017-02-02 03:01:48 -08: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