This allows frontend-server users(flutter) to do quick check whether frontend compilation reported errors as it produced output kernel file.
Change-Id: I6e4da8fac33104968eb7720200a1b7153ec8f3de
Reviewed-on: https://dart-review.googlesource.com/51000
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
This changes wrapInCompileTimeError so we are certain that
compile-time errors are reported before the erroneous nodes.
We want to preserve erroneous nodes as, long term, this should help
with code completion.
Also introduce a located version as my next CL I'll have slightly
more accurate locations.
Change-Id: Id83d4b7a7d4fe260916816d72fac331251bad948
Reviewed-on: https://dart-review.googlesource.com/50422
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
During gardening, noted that this test has timed out several times
recently. Marking it as Slow.
Change-Id: I9a01d9519d4d6801617bfd04089c227fd6867ef7
Reviewed-on: https://dart-review.googlesource.com/50947
Reviewed-by: Erik Ernst <eernst@google.com>
* when building IL from Kernel use canonical double representation
instead of allocating new double objects;
* in constant propagation canonicalize immutable primitive constants
(strings, mints and doubles) before replacing instruction with its
constant value;
Change-Id: I18a99c1ec5cddf4de4ea0571352408bd34faeb38
Reviewed-on: https://dart-review.googlesource.com/50728
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
In a86b864fa9 the incremental compiler was
updated to always bypass the cache when getting a UrlTranslator to be
able to handle the case where .packages had been updated.
This was driven by Flutter not invalidating .packages.
This has now been introduced in flutter with
https://github.com/flutter/flutter/pull/16467
and we can now limit when we bypass the cache to when the .packages file
has been invalidated.
This CL does just that, and further more adds tests where .packages either
appears or disappears.
Change-Id: I3e2d001a993a59c115bc00fcf714f97094357d35
Reviewed-on: https://dart-review.googlesource.com/50940
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Prior to this CL a builder loaded from a dill file - but where the
file has now been deleted (and we've previously been told about it) -
was kept around, meaning that it could get resurrected in a later
call to computeDelta.
This CL introduces a test and fixes the problem.
Change-Id: Ia18639a1387b37f8d641f803f202288dd185af5c
Reviewed-on: https://dart-review.googlesource.com/50722
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
After the Smi size reduction we are more dependent on good quality
code when using the uint32 truncating unboxed data type in the
optimizing compiler. This change lets us emit instructions with
embedded immediates for that code, instead of always loading the
immediates into a register and doing 3-register operations.
R=vegorov@google.com
Change-Id: I64e3013445d165c322bf0c3d9ee23cc3314d778d
Reviewed-on: https://dart-review.googlesource.com/50401
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
We now use the usual ConnectToEnvironmentService instead of going
through the subtle variant. Also, we don't leak the timezone string
anymore (at the cost of not dealing with timezone changes properly).
Change-Id: I997f6b74fc4d9186d5ffbbc8bbd3248712d3e8f6
Reviewed-on: https://dart-review.googlesource.com/50843
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Adam Barth <abarth@google.com>
- changes top-level/static method tearoffs to work similar to instance
method tearoffs (attach typeinfo at the tearoff location).
- changes getters/setter signatures to a more compact representation.
- fixes incorrect reification of tearoffs in DDC Kernel backend,
causing a couple of tests to pass after the changes.
- module startup should also be faster, because we avoid using
`defineLazyProperty` for signatures.
Change-Id: I9d1705adcd5101a99f0599120cb927396eae778a
Reviewed-on: https://dart-review.googlesource.com/48455
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
isAssignableTo should check for subtype first, and it should only check
for a call method if the other side accepts a function type.
Also improves performance of the recursive guard checking: function
types should not need it (pruning takes care of that), so we can simplify
the code for interface types. Also adds TODO comments for some bugs I
found while reading the _matchSubtype code.
Change-Id: I7b3318e3cc1f89c09960efe82d3cfdbf48ab9746
Reviewed-on: https://dart-review.googlesource.com/49962
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Replace
var element = JS('', '#[#]', this, i);
with
var element = JS<E>('', '#[#]', this, i);
to ensure 'element' has the static type E.
I would prefer
E element = JS('', '#[#]', this, i);
but that makes legacy checked mode insert unneeded type assertions.
Change-Id: I74446ca7bfa748490347100093a94b9191ca6821
Reviewed-on: https://dart-review.googlesource.com/50860
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Type arguments that require a subsitution need the interceptor to
access the substitution function.
- Add an interceptor input to HTypeInfoReadVariable
- Add an entry point getRuntimeTypeArgumentIntercepted that takes the interceptor.
- Optimize uses that do not need the interceptor.
The interceptor is cheap to get from the context in the common case
that the type variable access is directly in an instance method.
A typical use (broken)
var t1 = H.getRuntimeTypeArgument(receiver, "ListMixin", 0);
becomes
var t1 = H.getRuntimeTypeArgumentIntercepted(this, receiver, "ListMixin", 0);
Change-Id: I2abe6a2b6e8d2cdb0ede1b7248dd8337830f8a0c
Reviewed-on: https://dart-review.googlesource.com/50640
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
If either of print-flow-graph/print-flow-graph-optimized is passed then
print the flow-graph after the register allocation.
Change-Id: If1ad9117ee2c1d5bf7d3608110f9f72eee7393e2
Reviewed-on: https://dart-review.googlesource.com/50726
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
We add two things:
* --print_instruction_stats makes compiler dump per IL instruction size
breakdown (how many bytes of code were produced from specific instruction
kinds). This was largely implemented by kustermann@ in
https://codereview.chromium.org/2584613002/ and this CL does only few changes
to the original implementation, namely more uniform handling of slow-path code
and puts statistics object into RawInstructions (which has free space due to
alignment) instead of RawCode.
* --print_instructions_sizes_to=symbols.json makes compiler dump per Instruction
object size breakdown into a JSON file. This JSON file can later be processed
with pkg/vm/tool/run_binary_size_analysis.dart script to produce interactive
binary size diagram similar to runtime/third_party/binary_size tool.
Change-Id: Ied4965b9a0a91b3025eefbe981ecd47cdcf782d6
Reviewed-on: https://dart-review.googlesource.com/50501
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
e6962790a1 introduced a speed-regression
e.g. by increasing the time it takes to run `flutter test` in
flutter/packages/flutter from ~2:30 to ~3:10.
This regression was caused by making the functionaliy that removes
unused builders work for packages too.
Before that commit landed we tried to remove unused "package:*" builders,
but failed because we tried to remove them by their fileUri and not the
importUri (which they are actually saved under). The commit (among other
things) fixed that (i.e. they are now removed by their importUri).
This CL "re-introduces" the "don't remove unused 'package:*' builders"
functionality - though this time by design.
This reduces the time it takes to run `flutter test` in
flutter/packages/flutter and gets it back down to ~2:30.
Change-Id: I335ae3d473b0a0eda955741e5e3ce4c946916452
Reviewed-on: https://dart-review.googlesource.com/50662
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
It complicates the intermediate language, none of the back ends are
using it, and it's not something that we want transformation writers
and code generators to deal with.
Change-Id: Ic79f7935dd8619bd233346bb25947e864f38a104
Reviewed-on: https://dart-review.googlesource.com/50440
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
- Add a type argument count to JSInvocationMirror.
- Change stubs to pass the argument count.
Change-Id: I448dbee9a2aa0be17c24ae79eae0c89e7574fa7c
Reviewed-on: https://dart-review.googlesource.com/49820
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>