Rather than during class finalization.
before:
$ ./out/ReleaseX64/run_vm_tests GenKernelKernelLoadKernel
GenKernelKernelLoadKernel(RunTime): 35558
after:
$ ./out/ReleaseX64/run_vm_tests GenKernelKernelLoadKernel
GenKernelKernelLoadKernel(RunTime): 27650
Change-Id: I2a89f75c3082d7e8fbe20f4e832a609cffae43d8
Reviewed-on: https://dart-review.googlesource.com/76420
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
Instances of type Smi are handled in generated code and not looked up in
type test cache. The interpreter does not implement this special handling and
relies on the cache for Smi instances as well.
Change-Id: I3a8501efcbadfcbe848871ad0f6ada444414be43
Reviewed-on: https://dart-review.googlesource.com/76305
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
In the future, newly created VMOs on Fuchsia will not be mappable as
executable by default. In preparation for that, start using
zx_vmo_replace_as_executable to mark Fuchsia's VMOs as executable as
needed.
SEC-42
TEST=CQ
Change-Id: I9df86bbb33b02042260727d64e74b7146eb1d1a6
Reviewed-on: https://dart-review.googlesource.com/76304
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
In VM, 'new List' is equivalent to either 'new _GrowableList' or
'new _List' depending on the number of arguments.
This change does the transformation early (on kernel AST), in order
to have specialized representation in TFA and in bytecode.
Change-Id: I46f0db8cc19efb3a53fdbe971ac26bdd2736fbda
Reviewed-on: https://dart-review.googlesource.com/76283
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
dsymutil is unable to merge line number programs will different values of default_is_stmt, and either it or the linker is implicitly adding one where this value is true.
Change-Id: I68d55ff46f97bfdeb83ca71fcc9a1069f460a107
Reviewed-on: https://dart-review.googlesource.com/76306
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
- option --no-preview-dart-2 will now result in an error
- change aot-assembly build rule to generate AOT snapshot using Dart 2
- generate coresnapshot using Dart 2 (this snapshot is not used yet, next CL which switch the isolate create code to use this snapshot)
- by pass all Dart1 test runs in the status file
- change the default compiler setting in test.py to use dartk
- have test.py not pick up any configuration for --no-preview-dart-2
Change-Id: Ia136943ebfd0fed0c52683b330745b3e2c7a7ce6
Reviewed-on: https://dart-review.googlesource.com/75820
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Rationale:
DART_TOP can now be provided through switch, as
an environment variable or, by default, using the
current directory from which script is started.
This simplifies set up in cluster runs.
Change-Id: Icb4f720b7a7bb7b349ce158d39574c271132c224
Reviewed-on: https://dart-review.googlesource.com/76201
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
If a field is initialized with null (either explicitly or implicitly),
field store can be omitted in bytecode. In such case, bytecode should
still convey the information about this initialization to VM for
field guards to work correctly.
Change-Id: I1fd45b858c3c521b97fa5dbffe0e15b1ea75d92f
Reviewed-on: https://dart-review.googlesource.com/76060
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
This allows building a core-jit snapshot that can support running with
--enable-interpreter even when the core-jit snapshot is not generated
with --enable-interpreter.
Change-Id: If6ce787baa9f11fef929ee496b54d68598cba520
Reviewed-on: https://dart-review.googlesource.com/75989
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
Rationale:
When building with "--precompile trace.txt", the current
version silently processes the file without any feedback
on misspelled names, errors, or the like. This flag adds
the ability to get some feedback.
Change-Id: Iccf4b53c7091aac8be5e207eaf00273ceeeda4f3
Reviewed-on: https://dart-review.googlesource.com/75790
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Rationale:
Remove last part of Python in favor of Dart. Note that
this is still under heavy development, with many new
features planned. But it is a runnable system now which
we be deployed from the comfort of your own desktop or
on a cluster if needed.
Change-Id: I96fc8973bcc00c69849434087c57ff897d01b79a
Reviewed-on: https://dart-review.googlesource.com/75621
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
This way requests to compile won't end prematurely after reading
bytecode if interpreter is enabled.
Change-Id: Ic06cae98ea65bc4656ef491fbd306d34b0e1ef4c
Reviewed-on: https://dart-review.googlesource.com/75628
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Get rid of stuff like this (that at least showed up in debug builds):
```
Unexpected exception:
TypeError: 604.0795288085938: type 'JSDouble' is not a subtype of type
'int'
StackTrace:
main.dart.js 3527:17 Object.wrapException
main.dart.js 4000:15 Object.intTypeCheck
main.dart.js 55623:39 HtmlElement._varsTop$1
main.dart.js 55631:23 HtmlElement.dart.DebuggerFrameElement._onScroll$1
main.dart.js 3941:14 Object.eval
[...]
```
(Note that I disabled minification in the example above).
Change-Id: Id79e726c3229ba96b1df5db7d4fb779e4be0913a
Reviewed-on: https://dart-review.googlesource.com/74623
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Before this CL, debugging code like this:
```
import "dart:developer";
main() {
Foo foo = new Foo();
foo.bar<dynamic, dynamic>(1, 2);
}
class Foo {
bar<A, B>(A a, B b) {
debugger();
print("a: $a; b: $b");
}
}
```
and trying to print for instance `a` or `b` when the debugger is stopped
in `bar` (e.g. `p a`) would yield a wrong result. I.e., this happends
when debugging methods taking type arguments, but where the type
arguments are all `dynamic`.
This also surfaces when hovering variables in e.g. VSCode with the
Dart Code plugin.
Fixes: #34353.
Change-Id: Iddf1ed119700fea61a0e29eb6ad763a8d2b657a0
Reviewed-on: https://dart-review.googlesource.com/74583
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
The extra call specialization pass after constant propagation is able to
replace more calls in AOT, as constant propagation removes unreachable
code and subsequent type propagation infers more accurate types.
Performance improvement (armv8):
DartMicroBench.IntPower3 196.4%
DartMicroBench.IntPower2 273.1%
Change-Id: I7076608f828484c4045e7a7b605ed8ff7981a868
Reviewed-on: https://dart-review.googlesource.com/75564
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Entry points JSON files are deprecated (replaced with pragmas).
So TFA should not require them. As a sanity check, it will complain
if an entry points JSON file is not empty.
Change-Id: Ie64121ab4cdd0c330f81a8cb71a671e1df82f136
Reviewed-on: https://dart-review.googlesource.com/75423
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
When we added support for sinking allocation of contexts
we forgot to update IsSafeUse method - meaning that non-escaping
objects stored into sinkable contexts would not be considered
sinkable.
This change rectifies the problem. With this change the method
test_vm_field() {
var obj;
inner() => obj.x = 42;
var a = new V();
obj = a;
var t1 = a.x;
var t2 = inner();
return a.x + t1 + t2;
}
Compiles down to
test_vm_field() => 84;
Before this change we would not sink allocation of V.
R=alexmarkov@google.com
Change-Id: If431e58fe1d958b31ea597e35cba3856558a0cca
Reviewed-on: https://dart-review.googlesource.com/75222
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Read events should only be re-enabled when all available bytes have
been read, or there is an error.
related: FL-109
Change-Id: Iefd4ff3d7f4b79c08ee3d2bca7cdfef70de66ce9
Reviewed-on: https://dart-review.googlesource.com/75200
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>