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
Peter von der Ahé
b05dacd6f6
Add missing test from previous CL.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2728123002 .
2017-03-07 14:57:47 +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
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
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
Peter von der Ahé
bb72d5e8a0
Let parser handle factory modifiers.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2721623002 .
2017-03-01 11:38:01 +01:00
Paul Berry
f55f111d7a
Update kompile.status to reflect e260980624
...
Commit e260980624 changed some Fasta
tests from "crash" to "fail".
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2725683003 .
2017-02-28 15:04:03 -08:00
Peter von der Ahé
2e0e3b918f
Always provide a field for context.
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2723513002 .
2017-02-28 16:49:19 +01:00
Peter von der Ahé
86cad48993
Create Fasta bootstrap test.
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2719863003 .
2017-02-28 15:49:03 +01:00
Peter von der Ahé
5ed2a5bc8b
Compute correct parent and fileUri for top-level fields.
...
Fixes https://github.com/dart-lang/sdk/issues/28884 .
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2722503003 .
2017-02-27 13:11:03 +01:00
Peter von der Ahé
f4c6699816
Store redirecting constructors.
...
Fixes https://github.com/dart-lang/sdk/issues/28859
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2707263009 .
2017-02-24 09:04:15 +01:00
Karl Klose
5c2187bdd1
Canonicalize mixin applications by their name
...
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2709943005 .
2017-02-23 15:50:20 +01:00
Florian Loitsch
a26b21fd52
Fix build by adjusting status files and renaming test files.
...
Review-Url: https://codereview.chromium.org/2711033003 .
2017-02-23 14:13:55 +01:00
Asger Feldthaus
8bfc4b47c0
Implement canonical name scheme in kernel.
...
This adds a class CanonicalName that can represent a library, class,
or member. All references now go through a Reference object, which is
linked to both the AST node and its CanonicalName, so either can be
created first.
dartk now accepts multiple input files:
- If multiple dart files are given, they are all compiled.
- If multiple binaries are given, they are linked together.
Mixed dart and binary input is not supported by dartk.
dartk now has a flag --include-sdk which includes the entire SDK in
the output. This is so the SDK can be compiled alone and then linked.
Example of compiling separately and then linking:
dartk foo.dart -o foo.dill
dartk main.dart -o main.dill
dartk --include-sdk -o sdk.dill
dartk main.dill foo.dill sdk.dill --target=vm --link -o program.dill
dartk still has incredibly slow cold start due to the analyzer loading
the dart sdk, so this does not actually speed things up at the moment.
BUG=
R=ahe@google.com , kmillikin@google.com , kustermann@google.com , sigmund@google.com
Review-Url: https://codereview.chromium.org/2665723002 .
2017-02-23 14:12:10 +01:00
Florian Loitsch
979183decf
Add support for the new function-type syntax.
...
Fixes #27967
BUG= http://dartbug.com/27967
R=ahe@google.com , johnniwinther@google.com , paulberry@google.com , sigmund@google.com
Committed: https://github.com/dart-lang/sdk/commit/85227ba8a60332a18ae92cb1b87bf15d52a909bd
Reverted: https://github.com/dart-lang/sdk/commit/f5fc210f4f79f7e6b7ccefc24e7565e810e9dc7d
Committed: https://github.com/dart-lang/sdk/commit/e4999a631093690febb2eb90cbdbe1f9d5183455
Reverted: https://github.com/dart-lang/sdk/commit/c64c35153905fc2bf8a74c02297220385cfcbc87
Committed: https://github.com/dart-lang/sdk/commit/c289af39c36d9a5f7130a3e69b7891052652a64e
Reverted: https://github.com/dart-lang/sdk/commit/c66479f40767744d0bdd027c004583d6e32fe50f
Review-Url: https://codereview.chromium.org/2567133002 .
2017-02-23 13:36:28 +01:00
Florian Loitsch
c66479f407
Revert "Add support for the new function-type syntax."
...
This reverts commit c289af39c3 .
BUG=
Review-Url: https://codereview.chromium.org/2710973002 .
2017-02-22 17:19:35 +01:00
Florian Loitsch
c289af39c3
Add support for the new function-type syntax.
...
Fixes #27967
BUG= http://dartbug.com/27967
R=ahe@google.com , johnniwinther@google.com , sigmund@google.com
Committed: https://github.com/dart-lang/sdk/commit/85227ba8a60332a18ae92cb1b87bf15d52a909bd
Reverted: https://github.com/dart-lang/sdk/commit/f5fc210f4f79f7e6b7ccefc24e7565e810e9dc7d
Committed: https://github.com/dart-lang/sdk/commit/e4999a631093690febb2eb90cbdbe1f9d5183455
Reverted: https://github.com/dart-lang/sdk/commit/c64c35153905fc2bf8a74c02297220385cfcbc87
Review-Url: https://codereview.chromium.org/2567133002 .
2017-02-22 16:53:49 +01:00
Martin Kustermann
3ceb5103cd
fasta: Let "lib/src/fasta/builder" depend on "lib/src/fasta/util"
...
Review-Url: https://codereview.chromium.org/2709123003 .
2017-02-22 16:36:16 +01:00
Peter von der Ahé
585933825e
Handle redirecting constructors to DillMemberBuilder.
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2705263002 .
2017-02-22 12:29:39 +01:00
Dan Rubel
dbe5e64c8f
fix token type of first token in converted token stream
...
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2701723002 .
2017-02-21 12:18:42 -05:00
Peter von der Ahé
dd0b61bc76
Run Ctrl-t on weirdly formatted test.
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2710503002 .
2017-02-20 15:04:07 +01:00
Peter von der Ahé
2d9831ae21
Implement super operators.
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2704143003 .
2017-02-20 14:27:45 +01:00
Peter von der Ahé
d32f47b293
Implement line and column numbers.
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2704753002 .
2017-02-20 10:04:12 +01:00
Sigmund Cherem
884f0acf8d
Allow to specify analysis-options to the analyzer step in package:testing, and
...
use it in pkg/front_end
BUG=
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2697603009 .
2017-02-16 10:38:51 -08:00
Paul Berry
af9e2fb791
Change toAnalyzerTokenStream into a class.
...
This will allow it to be subclassed in parser tests, which will need
to record the relationship between analyzer and fasta tokens.
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2693403002 .
2017-02-15 18:09:35 -08:00
Paul Berry
c239c221eb
Comment improvements
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2701493002 .
2017-02-15 10:37:01 -08:00
Peter von der Ahé
b62a37a36b
Implement type variables in mixin applications.
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2689303003 .
2017-02-15 10:38:47 +01:00
Paul Berry
ac6f458c1d
Match "<", ">", and ">>" when translating analyzer tokens to Fasta tokens.
...
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2693793004 .
2017-02-14 09:36:09 -08:00
Peter von der Ahé
4b4b219b59
Handle top-level getters and setters in parts.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2695633004 .
2017-02-14 17:16:49 +01:00
Paul Berry
cf6a01be19
When translating analyzer/fasta token streams, match up begin/end tokens.
...
This required adding some scanner tests in order to validate the translation.
Note that the Fasta scanner considers "<", ">", and ">>" to be
grouping tokens (with special rules to avoid problems when "<" is used
to mean "less than"); analyzer does not. The translation does not
handle this correctly yet.
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2690073003 .
2017-02-14 04:46:36 -08:00
Peter von der Ahé
490c5ff331
Handle mandatory arguments correctly in function type aliases.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2692273003 .
2017-02-14 12:32:55 +01:00
Peter von der Ahé
cb10fc984b
Add a new kind of suite to ease test.dart integration.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2693893002 .
2017-02-14 10:45:44 +01:00
Paul Berry
8704e7a09d
Fix unused imports.
...
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2695803002 .
2017-02-13 14:33:23 -08:00
Paul Berry
02ff6326d7
Remove unused TokenType.IS.
...
TokenType is used for symbols, not keywords.
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2691043003 .
2017-02-13 11:17:02 -08:00
Paul Berry
f0e657015d
Add the ability to convert an analyzer token stream to a Fasta one.
...
This will be needed in order to integrate Fasta into the existing
analyzer codebase, because the analyzer task model considers the
parser and scanner to be separate black boxes with an analyzer token
stream in between. In order for Fasta to be able to drop into those
black boxes, we will need to be able to convert Fasta tokens to
analyzer tokens after scanning, and then back to Fasta tokens prior to
parsing.
Tested via a "round trip" test that converts the analyzer token stream
into a Fasta token stream and then back.
Note that the transformation is not perfect; it currently fails to
recreate error tokens and it fails to hook up the connection between a
BeginGroup token and the corresponding end token. But it is enough to
be able to pass tests for now. It will be improved (and tests will be
expanded) in future CLs.
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2689733003 .
2017-02-13 10:24:49 -08: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é
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é
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
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
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é
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