This message is ignored by default and Fasta uses this internally
to help migrate to Dart 2 and type errors in analyzer integration
at compile-time.
Change-Id: Ie0def14f09eb387fdae0486cd7a4bbed2536c64d
Reviewed-on: https://dart-review.googlesource.com/60427
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
- make Dart2 the default option for the command line VM
- add option --no-preview-dart-2 as a fallback option to run dart1
- change test scripts to use the executable dart for testing dart2 mode instead of
pkg/vm/tool/dart2
- adjust numerous build and test configurations
Change-Id: Id813fa5b71a89c7ec9335d3f6e83cfc9f35f86e7
Reviewed-on: https://dart-review.googlesource.com/58240
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
This CL makes the following changes:
- Adds a Factory interface (currently empty), and threads that through
type inference logic. In later CLs, this will be used by the infer
methods to create ASTs as a side effect of type inference. The
interface is parameterized so that it can create either analyzer or
kernel ASTs.
- Adds a KernelFactory implementation, to be used when creating kernel
ASTs (also currently empty).
- Adds a ToplevelInferenceFactory implementation, to be used during
top level type inference (when no ASTs need to be created).
- Renames ShadowExpression, ShadowInitializer, and ShadowStatement to
ExpressionJudgment, InitializerJudgment, and StatementJudgment,
respectively. This reflects the fact that once we decouple the
"shadow" hierarchy from the kernel AST, each shadow node will
represent a type inference judgment. The derived classes will be
renamed in later CLs.
- Renames the methods _inferExpression, _inferInitializer, and
_inferStatement to infer.
- Adds an inferredType field to each class derived from
ExpressionJudgment. In later CLs, this will allow us to change the
infer methods so that they store the inferred type and return the
AST (currently they return the inferred type). For the moment, the
inferredType field is set by the common method
ShadowTypeInferrer.inferExpression.
Change-Id: Ibf7b7df2cc9754080c84b9ec5d1e2e2721569fa4
Reviewed-on: https://dart-review.googlesource.com/60620
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This is to make it more transparent to use the same compile_platform template in
flutter/fushia builds.
Change-Id: I2a94c77bd2887cbc86f4547f7c8a0d54520a259b
Reviewed-on: https://dart-review.googlesource.com/60326
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
This CL adds an option to the dill loader (i.e. BinaryBuilder) to
enable performing a check of all canonical names. The theory is,
that if a dill is self-contained "every" (1) canonical name should
contain a reference to a node.
This check is (currently) disabled by default, but enabled
excplicitly in the incremental compiler when initializing from dill.
If the check fails a warning will be issued (and the dill wont be
used).
On my machine the check seems to take ~15 ms in all tested cases
(sdk, flutter test).
(1): Except for extra layer of URI of a library if the qualified
name is private.
Closes#32449.
Change-Id: I65c8fba647be3d5ba47f7ee16caef78cb2cfae07
Reviewed-on: https://dart-review.googlesource.com/51462
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
The previous implementation assumed that initializing formals without
type annotations could be inferred after the rest of top-level type
inference was completely done. This is not necessarily the case
because inferred types for initializing formals depend on inferred
types for fields which in turn depend on inferred types for
constructors used in their initializers.
Fixes https://github.com/dart-lang/sdk/issues/32866
Change-Id: I9de0b865c740d7542e5f5ad3d62c4c47c4532266
Reviewed-on: https://dart-review.googlesource.com/60140
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
the dart2js platform files.
The main use-case right now is in compile-platform, but the way it is implemented
makes this available to any fasta tool.
This also adds resolveInputUri so we don't incorrectly treat supported URIs as file:* Uris.
Fixes https://github.com/dart-lang/sdk/issues/32633
Change-Id: I0ea3b1128352e72957b35823c6a1749ee418768b
Reviewed-on: https://dart-review.googlesource.com/56282
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
This simplifies including doubles in messages.
The new syntax is #num1%N.M where N is the minimum length of the
formatted number, and M is the fraction digits.
Change-Id: Ifcc12ab994363055e94ba90f7b8e6151923028fe
Reviewed-on: https://dart-review.googlesource.com/59041
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Sometimes when printing stack states in the outline builder,
a formal in a function type is a FormalParameterBuilder,
and sometimes a formal or the return type is null.
Change-Id: I2bed0baae2a80e894e170a85744e382e763c8944
Reviewed-on: https://dart-review.googlesource.com/58207
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>