Clarify in the pubspec that it's not published
Cleaned up hints/lints in source files
Change-Id: Ifbf59ab0fb219dcdf5de99eced0a0129e6e191cb
Reviewed-on: https://dart-review.googlesource.com/61909
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reference pkg:testing by path
Remove dependency on pkg:ansicolor - not used
Also removed outdated reference to fasta in .packages
Change-Id: Iaeaa4a868e376e6cfdd5dad35d87521a18b213f2
Reviewed-on: https://dart-review.googlesource.com/61908
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Don't use $e$ for two different things, and specify static type.
Fixes#19517.
Bug: http://dartbug.com/19517
Change-Id: Ieb30fc05dc305f25526b05b2005a1a81a88e2009
Reviewed-on: https://dart-review.googlesource.com/61881
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
This will allow us later switch from applying resolution to parsed
AST to directly generating resolved AST, when we get to this.
New failing tests are because of absence of annotations, constant
values (initializers, default values), and constructor initializers
in outlines.
We also don't get errors for constant value computing, hence some
tests are now passing, but not by the reason we intended to test.
R=brianwilkerson@google.com, paulberry@google.com
Change-Id: I5b45da592563af02c45e8cda160ccd24487c3591
Reviewed-on: https://dart-review.googlesource.com/61743
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
This extends the groundwork laid by
1b681a75c3 to the local variables
declared by catch clauses and for-in statements, as well as the
synthetic local variable that Fasta uses to represent a local
function.
Change-Id: I7f6bf9dfb8ad0e06c3332d47287bb7dc7e620a5a
Reviewed-on: https://dart-review.googlesource.com/61780
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Modify existing calls to vmar routines in preparation for changing
the parameter order.
ZX-2264
Test: CQ
Change-Id: Iaed6ca55b890e0d8ab557b5b96d6760020a645d9
Reviewed-on: https://dart-review.googlesource.com/61480
Reviewed-by: Adam Barth <abarth@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Type canonicalization is deferred between in may involve cycles. Instances are canonicalized eagerly, but their type arguments are not necessarily canonical yet, which can lead to incorrect canonicalization of the instance.
The work around is to include the most popular type arguments in the serializer's set of base objects, bypassing deferred canonicalization. Other type arguments will continue to fail.
Bug: https://github.com/dart-lang/sdk/issues/33430
Change-Id: Ia992b3ebc2974b54acb5c88b3e1d836f6ec1f1b8
Reviewed-on: https://dart-review.googlesource.com/61721
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
New version avoids literals that are not exact in JavaScript.
Change-Id: I38fa0d6132b9006f361b01e3e691b5a672584e98
Reviewed-on: https://dart-review.googlesource.com/61741
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
The flaky errors
[215/296] ACTION //utils/dartdevc:stack_trace_mapper(//build/toolchain/linux:clang_x86)
FAILED: dev_compiler/build/web/dart_stack_trace_mapper.js
python ../../build/gn_run_binary.py compiled_action dart --packages=/b/s/w/ir/cache/builder/sdk/.packages /b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/dart2js.dart /b/s/w/ir/cache/builder/sdk/pkg/dev_compiler/web/stack_trace_mapper.dart -m -o/b/s/w/ir/cache/builder/sdk/out/ReleaseIA32/dev_compiler/build/web/dart_stack_trace_mapper.js
Command failed: ./dart --packages=/b/s/w/ir/cache/builder/sdk/.packages /b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/dart2js.dart /b/s/w/ir/cache/builder/sdk/pkg/dev_compiler/web/stack_trace_mapper.dart -m -o/b/s/w/ir/cache/builder/sdk/out/ReleaseIA32/dev_compiler/build/web/dart_stack_trace_mapper.js
output: Error while initializing Kernel isolate
[216/296] ACTION //utils/compiler:dart2js_create_snapshot_entry(//build/toolchain/linux:clang_x86)
FAILED: gen/utils/compiler/dart2js.dart
python ../../build/gn_run_binary.py compiled_action dart --packages=/b/s/w/ir/cache/builder/sdk/.packages /b/s/w/ir/cache/builder/sdk/utils/compiler/create_snapshot_entry.dart --output_dir=/b/s/w/ir/cache/builder/sdk/out/ReleaseIA32/gen/utils/compiler --dart2js_main=pkg/compiler/lib/src/dart2js.dart
Command failed: ./dart --packages=/b/s/w/ir/cache/builder/sdk/.packages /b/s/w/ir/cache/builder/sdk/utils/compiler/create_snapshot_entry.dart --output_dir=/b/s/w/ir/cache/builder/sdk/out/ReleaseIA32/gen/utils/compiler --dart2js_main=pkg/compiler/lib/src/dart2js.dart
output: Error while initializing Kernel isolate
[217/296] ACTION //utils/dartdevc:dartdevc_web(//build/toolchain/linux:clang_x86)
FAILED: dev_compiler/build/web/ddc_web_compiler.js
python ../../build/gn_run_binary.py compiled_action dart --packages=/b/s/w/ir/cache/builder/sdk/.packages /b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/dart2js.dart /b/s/w/ir/cache/builder/sdk/pkg/dev_compiler/web/main.dart -m -o/b/s/w/ir/cache/builder/sdk/out/ReleaseIA32/dev_compiler/build/web/ddc_web_compiler.js
Command failed: ./dart --packages=/b/s/w/ir/cache/builder/sdk/.packages /b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/dart2js.dart /b/s/w/ir/cache/builder/sdk/pkg/dev_compiler/web/main.dart -m -o/b/s/w/ir/cache/builder/sdk/out/ReleaseIA32/dev_compiler/build/web/ddc_web_compiler.js
output: Error while initializing Kernel isolate
could appear due to stale kernel service snapshot.
The problem is that dart_action() used when building snapshots for dart2js and DDC
uses kernel service snapshot in Dart 2 mode, but it can't depend on kernel service
as it will create a circular dependency.
The short-term solution is to add dependency on kernel service snapshot to the rules
which use dart_action().
Change-Id: Icfe9148e24342f199370a09293e93806027b2a39
Reviewed-on: https://dart-review.googlesource.com/61742
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
To allow for local functions that call themselves recursively, as well
as variable declarations that are (erroneously) referred to prior to
their first use, the Factory API needs to be adjusted so that it's
possible for a local function (or local variable) to be referred to
prior to its body (or initializer) being built.
The analyzer and the kernel have different ways of referring to local
functions and variables; in the kernel the reference
(e.g. VariableGet) points directly to the declaration
(VariableDeclaration). In the analyzer both the reference and the
declaration point to a FunctionElement (or LocalVariableElement). So
we want the Factory API to support both approaches.
This CL introduces the idea of a "lemma" (borrowed from linguistics).
In linguistics, a lemma is the mental binding site to which words and
meanings are attached. In the Factory API, a lemma is an object that
can be created before the function's body (or the variable's
initializer) is available. Thereafter, the declaration and the
references can be bound to the lemma in any order.
In the analyzer implementation, the lemma will be represented by a
FunctionElement or LocalVariableElement. (Note however that for the
moment we use a temporary object because the ResolutionStorer is not
yet creating elements and AST nodes). In the kernel implementation,
the VariableDeclaration node itself is used as the lemma, so the act
of "binding" the lemma to a declaration will do nothing more than
storing the body or initializer, and returning the same object.
Note that there are other syntactic constructs that can declare local
variables (closure parameters, for loops, and catch clauses). I'll
hook them up to the lemma mechanism in a future CL.
Also a future CL will introduce the same mechanism for labeled
statements (which have a similar need for references to be built
before the labeled statement is completed).
Change-Id: Ifa3b04dda7ce25d115ad58a471d164b4c24d539c
Reviewed-on: https://dart-review.googlesource.com/61720
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
These weren't working for me. Updated to use local sdk artifacts in debug mode.
Change-Id: I4e5d2d66d9237fde5d77f9683ed7d96e1dc0141d
Reviewed-on: https://dart-review.googlesource.com/61580
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
Fixes https://github.com/dart-lang/pub/issues/1931
Pub color output depends on the name of the entrypoint it is running
from, when the entrypoint went from "pub" to "pub2" it confused this
check and we stopped getting colors.
Since the Dart 1 version of the snapshot has a short remaining lifespan
we can switch it to the other name and let "pub" mean Dart 2 and
continue to behave like it used to.
Change-Id: I1851a4c908ffe2222ab5fe6802f4b81a63d7f9f1
Reviewed-on: https://dart-review.googlesource.com/61641
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
* Don't use the word "sets" on a final (no setter) member.
* Use "its" not "it's"
* Use modern dartdoc syntax
* Use markdown unordered list for `compressionDefault`.
* Use one-sentence first paragraphs.
Bug: https://github.com/dart-lang/sdk/issues/29438
Change-Id: I008c1bd0f32c7760dd64fc45fe4dd99e44498d10
Reviewed-on: https://dart-review.googlesource.com/61482
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Different apporach here - give catches to TryFinallyJudgment and let
it rewrite its body to be TryCatch is there are catches.
R=brianwilkerson@google.com, paulberry@google.com
Change-Id: Ib793b691bcb019088fc67213f98c5202d034b25b
Reviewed-on: https://dart-review.googlesource.com/61481
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
We are pivoting our implementation of FE/Analyzer integration a little
bit, and so the BodyBuilder will not be parameterized in exactly the
same way. Remove the existing parameterization from it and all the
supporting classes. This requires specializing the BodyBuilder to the
front end's instantiation of it and deleting the corresponding code in
the Analyzer.
Fixes https://github.com/dart-lang/sdk/issues/33503
Change-Id: I3ddcd2c5f5ebd8f2ff95f2ec8d4c7b98b70a0b0a
Reviewed-on: https://dart-review.googlesource.com/61502
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Prior to this change we only had fileOffset which points to the name.
This CL adds a field - startFileOffset - that points to the start
(e.g. 'static', 'factory', the return type or any presiding annotation
(including '@')), as well as fixing `Function::GetSource` in the VM to
fix a crash when using mirrors to ask for the source of a function or
constructor.
The field is added to procedures, constructors and classes.
The latter changes the location of classes with annotations to be
the position of the annotation. This is on-par with --no-preview-dart-2.
The change in regards to procedures and constructors mean, that both
the location and the source (from .location and .source on a
MethodMirror) will change to include any annotations. This is a
different behavior than --no-preview-dart-2.
Closes#33271.
Change-Id: I90f1232c5ec2d01e60e0bab070d44c37232b2730
Reviewed-on: https://dart-review.googlesource.com/60560
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>