Preliminary testing shows, this increases performance by around 20%. The
main benefit is by re-using a warmed-up VM and not start one from
scratch for every compilation.
Going forward we can do more optimizations, e.g. reading the platform
dill file only once into memory (instead of repeatedly) ...
=> This requires us using the new state-full IKG compiler.
Change-Id: I74db7dbb1aa79289d1045ef41f960215cf5b3b35
Reviewed-on: https://dart-review.googlesource.com/28240
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
The informal spec for strong mode top level inference
(https://github.com/dart-lang/sdk/pull/28218) says "If there are
multiple overridden/implemented methods, and any two of them have
non-equal types (declared or inferred) for a parameter position which
is being inferred for the overriding method, it is an error."
This CL fixes several SDK errors that arise from this rule. For
example, the classes _Closure, Function, and Object contained members
declared as follows:
class _Closure implements Function {
bool operator ==(other) ...
}
class Function {
bool operator ==(Object other) ...
}
class Object {
bool operator ==(other) ...
}
The type of Object's operator == was (dynamic) -> bool; the type of
Function's operator == was (Object) -> bool; therefore the type of
_Closure's operator == (which overrides both, since _Closure extends
Object and implements Function) cannot be inferred and must be
specified.
A similar situation exists for _Double and _IntegerImplementation
(both implement num, which declares operator == to have type (Object)
-> bool), and _Uri (which implements Uri, which declares operator ==
to have type (Object) -> bool).
This CL fixes the error by specifying the type explicitly in the
classes _Closure, _Double, _IntegerImplementation, and _Uri.
Change-Id: I91f7ceef8549399d438ba4be8c408493b3f338db
Reviewed-on: https://dart-review.googlesource.com/28100
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Switch it to use pkg/vm/tool/dart2 which is the source of truth for what
Dart 2 VM configuration means. Don't pass any additional flags from
tools/test.py itself.
Align pkg/vm/tool/dart2 with what tools/test.py was passing to VM on _2 suites.
Make default invocation `tools/test.py -c dartk --strong -m release,debug`
green by updating status files and skipping suites that are not Dart 2.0
compliant. I have filed issues #31588 for isolate suite and #31587 for
service suite.
Change-Id: I882b28f6a011eabf69c349ff0792b275434e39ff
Reviewed-on: https://dart-review.googlesource.com/27820
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
* Fix possibly null-pointer at end of batch mode
* Fix changed fileUri type in source map printer
* Silence a few warnings in tests.
Bug:
Change-Id: Ief1b9b62205a7bc20924a9e5efc06b9c9c34896a
Reviewed-on: https://dart-review.googlesource.com/27945
Reviewed-by: Karl Klose <karlklose@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
When the body of a function node in a Procedure is lazy loaded the value
of the Procedures transformerFlags is not properly set before the body
has been read. That means that one can get the wrong result.
This CL makes sure to read the body (thereby setting the correct result)
before answering. The same thing is neccessary when setting the value to
avoid it being overwritten later.
Bug:
Change-Id: Id5e631e69885af0872b9644d02eb7b27dfb13391
Reviewed-on: https://dart-review.googlesource.com/21349
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
This avoids the need for a clumsy workaround in the analyzer.
Change-Id: I2ee2ec25a7d13ccaccc4f5b817cf2026f4547378
Reviewed-on: https://dart-review.googlesource.com/27962
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Calls to these methods could be devirtualized and converted from
InstanceCall to a StaticCall instructions. In such case, speculative
inliner should not crash.
Issue: https://github.com/dart-lang/sdk/issues/30480
Change-Id: I987017ed8e75f9275dccff892a82e13283d803d4
Reviewed-on: https://dart-review.googlesource.com/27926
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
We don't have a good place to pull this from on Android, but the
Flutter engine gets notifications when it is updated, etc., so don't
cache the value, and let the embedder supply a closure.
fixes#29211
Change-Id: I18e322fffb5212d9dbe154bc8628f817ba070237
Reviewed-on: https://dart-review.googlesource.com/27924
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
There is no actual implementation here yet (that's your job :) ), but there is:
- An external method in dart:_internal, extractTypeArguments().
- Empty patch methods for that for the VM, dart2js, and DDC. These need to have implementations
filled in.
- A "dart_internal" package to expose a subset of the API. It gives you:
extractListTypeArgument()
extractMapTypeArguments()
We'll bring this into Google, but not publish it externally unless we find we really need to.
- A test for the behavior. It probably has bugs since I can't run it.
See: https://github.com/dart-lang/sdk/issues/31371
Change-Id: I7d9f9a3a36f8e8be106440375c80d584898c83cb
Reviewed-on: https://dart-review.googlesource.com/26467
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
It might be an error, in which case Isolate is left in half initialized
state.
Change-Id: I011ce2b4bbbe5a84f6579eb6d4d22ea5c1afbd3a
Reviewed-on: https://dart-review.googlesource.com/27801
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
This CL extends RelationalOpInstr, BinaryInt64OpInstr, BinaryDoubleOpInstr,
UnaryDoubleOpInstr and unboxing instructions (UnboxInstr, UnboxIntegerInstr,
UnboxInteger32Instr, UnboxUint32Instr, UnboxInt32Instr and UnboxInt64Instr)
with non-speculative mode, when types of the inputs are not checked.
The non-speculative mode is used when generating double and int64 operations
in AOT using strong mode types.
Also, this CL disables couple of cases in --experimental-strong-mode which
do not work yet. This is a preparation for turning --experimental-strong-mode
on by default.
Issue: https://github.com/dart-lang/sdk/issues/30480
Change-Id: Ic1f89e7f6fd9592d5a92671963283c7181ce1504
Reviewed-on: https://dart-review.googlesource.com/27841
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
The info_array is needed to visit an ObjectPool's pointers, requiring the compactor to move the info_array's body before forwarding the ObjectPool's pointers. Moving the info_array inline remove this constraint on the compactor.
Also saves 3 words per ObjectPool modulo allocation size rounding.
Bug: https://github.com/dart-lang/sdk/issues/30978
Change-Id: I94de0e4b7356d46fb145efee7ab14abd7473eb4c
Reviewed-on: https://dart-review.googlesource.com/27480
Reviewed-by: Erik Corry <erikcorry@google.com>
Note: this may change again soon, this is a quick fix to address limitations in
golem. I thought the 64Kb limit only applied to stdout, but it also applies to
stderr, so redirecting the output doesn't help.
TBR=ahe@google.com
Change-Id: I861c6c809a20982f0865afd723db5b17d67e2041
Reviewed-on: https://dart-review.googlesource.com/27881
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Enable previewDart2 and annotate all @potentialAnalyzerProblems.
Also fix two of the @failingTests related to
https://github.com/dart-lang/sdk/issues/31073 which appear to be
passing now.
Bug:
Change-Id: Ic2fd534c8a9cf45eccf0f5d09dc47cd4e78aaf42
Reviewed-on: https://dart-review.googlesource.com/27468
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
So, on Analyzer side each MethodInvocation with a target has the
reference and the type for this target.
Bug:
Change-Id: I76f142da300910445b3a3fe016fed4d04219e9b6
Reviewed-on: https://dart-review.googlesource.com/26402
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This is a temporary measure to allow the analyzer team to make
progress until #31519 is fixed.
Change-Id: I056505ed0308c5b2ea3e3664a8943549c3c8548c
Reviewed-on: https://dart-review.googlesource.com/27460
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
- include reason for 'too difficult' in the expectations
- fix inlining of dynamic call with optional argument
Change-Id: I02e4885ff3eb4a991501bb3f5d8432d35165491e
Reviewed-on: https://dart-review.googlesource.com/27220
Reviewed-by: Stephen Adams <sra@google.com>
- currently for number of calls outside loops.
Change-Id: Iedafe54ab70f65969bf89db3bfd98d45be493893
Reviewed-on: https://dart-review.googlesource.com/26300
Reviewed-by: Johnni Winther <johnniwinther@google.com>
We must prevent unconditional new-space allocations during flow graph building.
Instead we need to direct it to a configurable allocation space, which will be
initialized depending on whether we run on the mutator thread or
somewhere else.
Change-Id: I9cbbf17f918fe2808fb37796943e9d056e292c81
Reviewed-on: https://dart-review.googlesource.com/27760
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Queries the user for input and performs updates to status files.
Bug:
Change-Id: Iac90d713fcff952b4f0d27044cbbcdc02456de4e
Reviewed-on: https://dart-review.googlesource.com/27540
Reviewed-by: William Hesse <whesse@google.com>
The configuration is directly copied from test.py
Bug:
Change-Id: I221de5b6047289044f30fcbe270eca83c8f660d3
Reviewed-on: https://dart-review.googlesource.com/27521
Reviewed-by: Alexander Thomas <athom@google.com>
This helps that status expectations are only loaded once. Ensure that we only
load a suite of status files once.
Finally, this also updates the regular expression for finding multitest
expectations without wildcard entries in the path.
Bug:
Change-Id: I9bee07cb0845cfe341fb731aa5772aba8b3060b1
Reviewed-on: https://dart-review.googlesource.com/27520
Reviewed-by: Jonas Termansen <sortie@google.com>
A path like
E:\b\build\slave\[...]\short27_al_args_concrete_subclass_test\E:\b\[...]
is not going to work on Windows, and while a path like
/whatnot/path/blah//whatnot/path
does work in Linux it doesn't look great.
This should fix it (somewhere else than before).
Bug:
Change-Id: I3e926ceb5a5e510b411328872ddc5da9efdf9f2e
Reviewed-on: https://dart-review.googlesource.com/27740
Reviewed-by: Kevin Millikin <kmillikin@google.com>
This updates the information in the README.md file regarding overlapping
sections, how it is invoke and the result from running it.
Bug:
Change-Id: I7c8c057ad73d5893c3ff69e4588e0f234f2d5832
Reviewed-on: https://dart-review.googlesource.com/27620
Reviewed-by: Jonas Termansen <sortie@google.com>
The rewrite removes the need to search for configurations from running tests by
using the disjunctive normal form.
Bug:
Change-Id: I66bbbbb9b0eb1e1ae9f8dc02e7ef6a8498850b26
Reviewed-on: https://dart-review.googlesource.com/24106
Reviewed-by: Johnni Winther <johnniwinther@google.com>