This reverts commit 2aed87a133.
Reverting for failures on precompiled bots.
Change-Id: I758bfc72d8f5e67b0e5e12a7367a47f1df9364e2
Reviewed-on: https://dart-review.googlesource.com/28900
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
* CompileStaticInitializer() should check result of Compile()
and should not leave sticky error. If left, this sticky error
could be picked up by compilation of some unrelated static
initializer. Also, assertions are added to make sure that code
which explicitly or implicitly relies on sticky errors is not
getting an error on entry.
* CompileStaticInitializerIgnoreErrors() clears sticky errors to
ignore them.
* Added inline bailout reason for cyclic static fields.
This guards against inlining of code which uses a field into static
initializer. This code might not be called so it should not trigger
compilation error eagerly.
Change-Id: I52da6f4cd05556125fd1a628b665dcc11621a4f7
Reviewed-on: https://dart-review.googlesource.com/28523
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Adds a top-level call waitForEventSync to dart:io that blocks the
thread an Isolate is running on until messages are available.
Before the thread blocks, the microtask queue is drained.
Before waitForEventSync returns, all messages are handled.
Lifting this up from a comment:
This is apropos of the request that nweiz@ sent to the mailing list a
couple weeks back. I'm not sure we should land this. We certainly
shouldn't land it without some annotations that will make the analyzer
complain a lot in most configurations, but I don't know what those
annotations are.
Change-Id: If8286f4525994a162dd4f4563fefccb9d0984f7c
Reviewed-on: https://dart-review.googlesource.com/25281
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Without strong mode, a "good enough" implementation is to simply call
the generic method with "dynamic" for the type arguments, which is what
this does. That should be enough to unblock our internal users.
We also need to not report a compile error when
dart_internal/extract_type_arguments.dart imports the hidden
"dart:_internal" library.
This patch does both of those for the VM and dart2js (using its old
front end).
Note that the test still fails because the test is more particular than
most actual user code would be -- it validates that the instantiated
type arguments are *exactly* correct, and not that the returned object
is merely subtype compatible.
Bug:
Change-Id: I0343beace4991861b29712b3fd7067ec8dc8f8ba
Reviewed-on: https://dart-review.googlesource.com/28020
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
VMService.routeRequest of type Future Function(Message) overrides
MessageRouter.routeRequest of type Future<String> Function(Message).
It not enough to just fix VMService.routeRequest's return type because
Message.sendToVM() violates its type signature: it declares to
return Future<String> but in reality it returns Future<dynamic>
which can complete with either String or List. This CL addresses
this issue as well.
Bug:
Change-Id: I8240113d3e13d67c4e9a59db4250132a2077a4ec
Reviewed-on: https://dart-review.googlesource.com/26701
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
The batch runner uses an exitCode of 1 to signal compile-time errors,
which we need to support in the VMKernelCompilationCommandOutput.
Furthermore allow running the output of a dart -> kernel compilation on
the VM even though we expect an compile-time error (sometimes the
frontend has bugs and doesn't emit the compile-time errors and we need
to run the VM to get them)
Issue https://github.com/dart-lang/sdk/issues/31585
Change-Id: I8b4c34557dbf3de487247d75b02777bacbd452c1
Reviewed-on: https://dart-review.googlesource.com/28642
Reviewed-by: Martin Kustermann <kustermann@google.com>
is specified as we will only support Dart 2.0 in kernel mode.
Change-Id: I712fa6e0f733738e4b722aeb10b5eba6a64316c5
Reviewed-on: https://dart-review.googlesource.com/28520
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Change-Id: I6c500f977498b5e54e581273bf3a3b171fc2e61b
Reviewed-on: https://dart-review.googlesource.com/28720
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
This makes isolate tests fail, since we no longer run from "source" (or
rather use the kernel-isolate to to "source -> dill" for us).
The special vm/cc suite will continue to be run via the kerne-isolate, so we
have the coverage for these (which probably include reload tests).
Issue https://github.com/dart-lang/sdk/issues/31585
Change-Id: I51bd2f9345d650b4ff2a98aa1c8365c765e0d013
Reviewed-on: https://dart-review.googlesource.com/28722
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Change-Id: Ib7db1a7e48b48f2137edacd921b35d5c86313419
Reviewed-on: https://dart-review.googlesource.com/28521
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Apart from removing almost 1000 lines of very repetitive code, the idea here is
to change the assembler from a huge pile of arbitrary code into something that
can be used to generate tables of opcodes and their structure. Later, I'd like to
use this to make the disassembler more table driven and less arbitrary, and
perhaps build an x86 simulator in the same vein as the ARM simulator, which
would help me debug (I find the ARM simulator very useful when making low level
changes to the VM and miss its functionality on x86).
R=vegorov@google.com
Bug:
Change-Id: I1ae2c1696f88b67862843c9ac05c827a7c9b9a6e
Reviewed-on: https://dart-review.googlesource.com/25241
Commit-Queue: Erik Corry <erikcorry@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
The named import makes it into the kernel class name (meaning it has a
dot in it). That is currently not cleaned up when creating js code,
but it is catched as a non-legal js identifier.
```
Unhandled exception:
Invalid argument (name): not a valid identifier: "_Object$collection.ListMixin"
#0 new Identifier (package:dev_compiler/src/js_ast/nodes.dart:1148)
#1 ProgramCompiler._emitClassStatement (package:dev_compiler/src/kernel/compiler.dart:573)
#2 ProgramCompiler._defineClass (package:dev_compiler/src/kernel/compiler.dart:679)
#3 ProgramCompiler._emitClassDeclaration (package:dev_compiler/src/kernel/compiler.dart:501)
#4 ProgramCompiler._emitClass (package:dev_compiler/src/kernel/compiler.dart:450)
#5 List.forEach (dart:core-patch/dart:core/growable_array.dart:274)
#6 ProgramCompiler._emitLibrary (package:dev_compiler/src/kernel/compiler.dart:393)
#7 Iterable.forEach (dart:core/iterable.dart:226)
#8 ProgramCompiler.emitProgram (package:dev_compiler/src/kernel/compiler.dart:282)
#9 compileToJSModule (package:dev_compiler/src/kernel/command.dart:166)
#10 _compile (package:dev_compiler/src/kernel/command.dart:145)
```
Bug:
Change-Id: Ibb5a1c908c2ddba63600446f6062ced1b5dd34c2
Reviewed-on: https://dart-review.googlesource.com/28662
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
DDK, when visiting a let, wants to add a temporary into a list that has
not always been initialized.
```
Unhandled exception:
NoSuchMethodError: The method 'add' was called on null.
Receiver: null
Tried calling: add(Instance of 'TemporaryId')
#0 Object.noSuchMethod (dart:core-patch/dart:core/object_patch.dart:46)
#1 ProgramCompiler.visitLet (package:dev_compiler/src/kernel/compiler.dart:4762:21)
#2 Let.accept (package:kernel/ast.dart:3425:36)
#3 ProgramCompiler._visitAndMarkExpression (package:dev_compiler/src/kernel/compiler.dart:2996:31)
#4 ProgramCompiler._visitInitializer (package:dev_compiler/src/kernel/compiler.dart:1481:11)
#5 ProgramCompiler._emitLazyFields (package:dev_compiler/src/kernel/compiler.dart:2058:19)
#6 ProgramCompiler._emitLibrary (package:dev_compiler/src/kernel/compiler.dart:402:47)
#7 Iterable.forEach (dart:core/iterable.dart:226)
#8 ProgramCompiler.emitProgram (package:dev_compiler/src/kernel/compiler.dart:282:15)
#9 compileToJSModule (package:dev_compiler/src/kernel/command.dart:169:19)
#10 _compile (package:dev_compiler/src/kernel/command.dart:148:18)
```
Bug:
Change-Id: I337e05a7494e87e3e6ae047ceae8ca8f954b6226
Reviewed-on: https://dart-review.googlesource.com/28660
Reviewed-by: Karl Klose <karlklose@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Currently I get this when trying to compile with DDK:
```
Unhandled exception:
Concurrent modification during iteration: Instance(length:2) of '_GrowableList'.
<asynchronous suspension>
<asynchronous suspension>
<asynchronous suspension>
```
Bug:
Change-Id: I4d0cc88aeab4c9cab54a0d1f67ec5302110b2fe7
Reviewed-on: https://dart-review.googlesource.com/28580
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@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.
Reland of https://dart-review.googlesource.com/27820
Change-Id: I49400fae716f75425e70bf1e561b3375ba39157e
Reviewed-on: https://dart-review.googlesource.com/28565
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Change-Id: I2fbb6daaa8fe6ca5b136c639194ec49ae31c385f
Reviewed-on: https://dart-review.googlesource.com/27721
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
9f966d5b80
introduced treating RuntimeError as Pass when there is no runtime.
This change additionally treats MissingRuntimeError and Timeout as
Pass, as these results also don't make sense when the code is not run.
Change-Id: Icebc5f4ffa8fe189aa822f2ce063a44e517380f5
Reviewed-on: https://dart-review.googlesource.com/28200
Reviewed-by: Bob Nystrom <rnystrom@google.com>
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.
Issue https://github.com/dart-lang/sdk/issues/31585
Change-Id: I2d3448783fc118611baf4671187a897227a65a6c
Reviewed-on: https://dart-review.googlesource.com/28400
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
This makes it easier to add other runtimes later.
Change-Id: I90dfd9c404167eff880eed00933ffea212ccdef2
Reviewed-on: https://dart-review.googlesource.com/27942
Reviewed-by: William Hesse <whesse@google.com>