Commit graph

13447 commits

Author SHA1 Message Date
Martin Kustermann 1be81b4a96 [VM] Skip vm/dart/appjit_test on opt-counter builder
It is quite slow on those builders and causes timeouts.

Change-Id: I876bba2c8e0d4e06dd9dff94e421d35e3f0236d1
Reviewed-on: https://dart-review.googlesource.com/55684
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-05-17 11:53:33 +00:00
P.Y. Laligand 499c25d886 [fuchsia] Update FIDL include paths.
Change-Id: I42b0f0acc8385d567971c044bb31f9348e982c44
Reviewed-on: https://dart-review.googlesource.com/55503
Reviewed-by: Zach Anderson <zra@google.com>
2018-05-16 20:41:04 +00:00
Régis Crelier c60ea740cb [VM runtime] The 'checked' parameter of Isolate.spanwUri should control asserts
only, but not type checks in Dart2 strong mode (fixes #33120).

Change-Id: Ib8ca63aa3113b80243b6f8eb4015cb5c24140a88
Reviewed-on: https://dart-review.googlesource.com/55442
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-05-16 18:13:22 +00:00
Martin Kustermann b3affa6721 Revert "[VM] Use IR for code in [CatchEntryInstr]s to populate captured exception/stacktrace variables"
This reverts commit 3531af383e.

Reason for revert: Caused many buildbot failures.

Original change's description:
> [VM] Use IR for code in [CatchEntryInstr]s to populate captured exception/stacktrace variables
> 
> This fixes an issue when a program got loaded via dill, a function
> with a try-catch got optimized.
> 
> Change-Id: I98b2a4aaa7e5472f3e37fd71c1276079102b0142
> Reviewed-on: https://dart-review.googlesource.com/54021
> Commit-Queue: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>

TBR=vegorov@google.com,kustermann@google.com

Change-Id: If4b80128525754d30cec680ad5ff6bc4035296bd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/55422
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-05-16 17:27:13 +00:00
Martin Kustermann 3531af383e [VM] Use IR for code in [CatchEntryInstr]s to populate captured exception/stacktrace variables
This fixes an issue when a program got loaded via dill, a function
with a try-catch got optimized.

Change-Id: I98b2a4aaa7e5472f3e37fd71c1276079102b0142
Reviewed-on: https://dart-review.googlesource.com/54021
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-05-16 16:46:42 +00:00
Ryan Macnak 069febad9c [vm] Ensure remainder bits in StackMaps are zero-initialized.
Bug: https://github.com/dart-lang/sdk/issues/31427
Change-Id: I3d956ceae1c7b60ea74dda4b4b727772e540dfe1
Reviewed-on: https://dart-review.googlesource.com/55300
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-05-16 16:28:21 +00:00
Zach Anderson 42bcdcd332 [dart:io] Revert recent non-utf8 path handling
Reason for revert: Breaking API change blocks Flutter rolls. Reverting
to reconsider, work around, etc..

Revert "[ VM ] Fixed issue where backing array was deleted from an ExternalTypedData before the ExternalTypedData was used."

This reverts commit 916b9da48d.

Revert "[ VM ] Fixed tests for non-UTF8 paths on Windows / Macos."

This reverts commit 6327fe91c2.

Revert "[ VM ] Fix failing tests on Windows bots after non-UTF-8 paths change."

This reverts commit b51f4b7956.

Revert "[ VM ] Updated non-UTF-8 tests to expect exceptions on OSX/iOS."

This reverts commit bcb36247d2.

Revert "Revert "[ VM ] Updated non-UTF-8 tests to expect exceptions on OSX/iOS.""

This reverts commit 24450c79a5.

Change-Id: I756f74f4acdde168d0984fe130f05f9252366334
Reviewed-on: https://dart-review.googlesource.com/55441
Reviewed-by: Todd Volkert <tvolkert@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-05-16 15:47:10 +00:00
Martin Kustermann aafc2a6d43 Reland "[vm/kernel] Enable kernel2kernel "constants" transformation in AOT mode (after running TFA)"
The CL was originally committed in 039e8a175 (and reverted in
46ab040e5). The fix for the issue has landed in 9d9ce8d69 .

This time the CL will land in "disabled" form and will be enabled in a separate CL.

Change-Id: I3d5eb952230aee99875e3c58a6595691c5145e25
Reviewed-on: https://dart-review.googlesource.com/55361
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-05-16 12:48:38 +00:00
Lasse R.H. Nielsen bf77f064c1 Mark NoSuchMethodError constructor as deprecated.
Move implementation details into patch files, it does not belong in the interface.
Actually implement NoSuchMethod.withInvocation in dart2js.

Change-Id: I37049c258067b962d18eff42196e37aa127f0dea
Reviewed-on: https://dart-review.googlesource.com/55166
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-05-16 09:09:08 +00:00
Ben Konyi 63242ca459 [ VM ] Fix issue where IsServiceIsolate may fail in the isolate shutdown callback when the service isolate is shutting down
Change-Id: I6dc9786394450ff587ceb45bfa60fd9d40224af6
Reviewed-on: https://dart-review.googlesource.com/55322
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-05-16 00:28:48 +00:00
Ben Konyi 7cea07e4bc [ VM / Dart 2 ] Fixed DartAPI_IsolateShutdownRunDartCode for Dart 2.
Change-Id: Ieb39c988fad925c8c4cd6250ea3cda3283b1b2fc
Reviewed-on: https://dart-review.googlesource.com/55023
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-05-15 23:21:08 +00:00
Ben Konyi 916b9da48d [ VM ] Fixed issue where backing array was deleted from an ExternalTypedData before the ExternalTypedData was used.
Reland "Fix issues with FileSystemEntities which have non-UTF8 paths causing exceptions to be thrown when converting to/from a Dart VM String."

This reverts commit 4f549e2900.

Change-Id: Ia27c8c300beb178fa7b08ffe0bfcb2d61f65bbb5
Reviewed-on: https://dart-review.googlesource.com/55271
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-05-15 21:54:46 +00:00
Vyacheslav Egorov d96e1de0bf [vm] Snapshot class'es dependent code array when generating app-jit snapshot
If this array is not snapshotted then optimized code is not invalidated
when new subclasses are finalized leading to execution of incorrect code.

Change-Id: Ib28609a5e6499aedb1b2c19de40ab00fd5a786bc
Reviewed-on: https://dart-review.googlesource.com/55240
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-05-15 17:33:37 +00:00
Ryan Macnak 6e3f15c109 [vm] Don't serialize the uninitialized alignment gaps in ExceptionHandlers.
Bug: https://github.com/dart-lang/sdk/issues/31427
Change-Id: Ia2c2b30a2b3e5dd9140851f274a85c0883637ef2
Reviewed-on: https://dart-review.googlesource.com/55041
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-05-15 17:24:36 +00:00
Vyacheslav Egorov 7348aa5b6a [vm] Reimplement perf-inject JITDUMP support.
This enables the following profiling workflow on Linux:

  $ perf record -k mono dart --generate-perf-jitdump benchmark.dart
  $ perf inject -j -i perf.data -o perf.data.jitted
  $ perf report -i perf.data.jitted

and allows perf-annotate to recognize and annotate JIT generated code.

Change-Id: Ifd0cb2c9111ef766cc8c3a7634ccf0aefab60bd8
Reviewed-on: https://dart-review.googlesource.com/54912
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-05-15 16:31:46 +00:00
Samir Jindel 12c65eaeb4 [vm/kernel] Add flag to disable Kernel-based expression compilation.
Change-Id: Ibaa2ccd282b467e2b5ecda09fb86620409d7214b
Reviewed-on: https://dart-review.googlesource.com/55220
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2018-05-15 14:55:37 +00:00
Samir Jindel 39c93a2b19 Revert "Revert "[vm/kernel] Expression execution through Kernel."
This reverts commit b5154dd01e.

Original revision is in patchset 1.

Change-Id: Ic0776011c6fdbd64c025086535351474a9a88b6e
Reviewed-on: https://dart-review.googlesource.com/54407
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2018-05-15 12:03:22 +00:00
Samir Jindel 1a23ff68a5 Fix incorrect handling of NSM forwarders and pull all logic into CFE. (Take 2)
The behavioral difference is that named and optional arguments are filled in
with their default values in the `Invocation` object passed to `noSuchMethod`.

On the implementation side we make NSM forwarders concrete and fill in their
bodies in the CFE. The custom (and somewhat hacky) VM support is no longer
needed, and Dart2JS can benefit from this implementation as well.

According to discussion on #33031 we will be able to re-land this soon without
breaking Mockito.

Prior failures on precompiler bots are fixed in Patchset 2.

Change-Id: If1b7fe4cf6da5ef38f330e1ad226121bcfc958a1
Reviewed-on: https://dart-review.googlesource.com/54401
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-05-15 11:23:32 +00:00
Martin Kustermann 45c524e106 [VM] Mark functions on BG compiler bailouts specially, allow them to be re-optimized on main thread
In some cases, bailouts in the bg compiler, e.g. caused by class
finalization, mark functions as unoptimizable, which can significantly
slow down an application.

Instead of doing this, we mark these functions as non-optimizable on the
BG compiler and trigger re-compilations on the main thread.

Change-Id: Ifbb6aa7972818be8fa1313427e38d8b5576053e3
Reviewed-on: https://dart-review.googlesource.com/54886
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-05-15 09:34:22 +00:00
Alexander Markov 344c68e54c [kernel, vm] Revise how metadata is written in kernel binaries
Metadata is no longer written ahead of all nodes. Instead, metadata for
each node is written in the same context as the node itself (into a separate
buffer). This allows metadata to contain (serialize) arbitrary nodes
(for example, arbitrary DartTypes) and use serialization context of parent
nodes (such as declared type parameters).

However, with this change metadata looses the ability to reference
arbitrary AST nodes. This ability was overly restricted and had no
practical uses. (It was not possible to reference nodes which are not
reachable from root Component. As a consequence, it was not possible to
write references to arbitrary DartTypes.)

This change aligns the serialization capabilities of metadata with
how kernel AST nodes are serialized.

Change-Id: I027299a33b599b62572eccd4aa7083ad1dd2b3b3
Reviewed-on: https://dart-review.googlesource.com/54481
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-05-15 00:41:08 +00:00
Ben Konyi 4f549e2900 Revert "Fix issues with FileSystemEntities which have non-UTF8 paths causing exceptions to be thrown when converting to/from a Dart VM String."
This reverts commit ba342a94ec.

Reason for revert: Bots are red.

Original change's description:
> Fix issues with FileSystemEntities which have non-UTF8 paths causing exceptions to be thrown when converting to/from a Dart VM String.
> 
> Continuation of PR #32583 by powdercloud
> 
> Fixes #29451
> 
> Change-Id: I4bdf24f9c8ead425a4f0cad33b642908f1ec203d
> Reviewed-on: https://dart-review.googlesource.com/51580
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Zach Anderson <zra@google.com>

TBR=bkonyi@google.com,rmacnak@google.com,zra@google.com,tvolkert@google.com

Change-Id: I12850f178a13a75289d18af4e565bd73c59b14ad
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/55060
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-05-14 23:40:29 +00:00
Ben Konyi ba342a94ec Fix issues with FileSystemEntities which have non-UTF8 paths causing exceptions to be thrown when converting to/from a Dart VM String.
Continuation of PR #32583 by powdercloud

Fixes #29451

Change-Id: I4bdf24f9c8ead425a4f0cad33b642908f1ec203d
Reviewed-on: https://dart-review.googlesource.com/51580
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-05-14 23:06:57 +00:00
Zach Anderson fe9f22aa83 [windows] Fix 'all' target
Change-Id: I5f6b4b56115f353deed2a332a6b27835bb559e8f
Reviewed-on: https://dart-review.googlesource.com/55020
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-05-14 22:17:38 +00:00
Zach Anderson 72921342c8 [Fuchsia] Small buildfile fix for scudo malloc
Change-Id: I92e9a3193d25b6032eae95bbd193190a09bf052b
Reviewed-on: https://dart-review.googlesource.com/54624
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-05-14 21:49:08 +00:00
Ryan Macnak a5c11d7d03 [vm] Remove Dart_ReadKernelBinary, take 2.
Update status for simulators, which the test harness invokes with DIL files instead of source files.

Change-Id: I8444ad7e17a0a71a1ce3c0021487397baa1c3e65
Reviewed-on: https://dart-review.googlesource.com/54622
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2018-05-14 20:58:08 +00:00
Ryan Macnak dd3ec65af8 [vm] Hash canonical objects by content instead of address.
Bug: https://github.com/dart-lang/sdk/issues/31427
Change-Id: Iad02b152887576f8fbdcbed6892464a0c2ffa09c
Reviewed-on: https://dart-review.googlesource.com/54662
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-05-14 20:11:27 +00:00
Paul Berry 98d7796662 Fix some minor typos in the service protocol documentation.
Change-Id: I05481d6bf167fee57f27d769906ec1f8f5b3b6c4
Reviewed-on: https://dart-review.googlesource.com/54711
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-14 17:58:59 +00:00
Zach Anderson 85ec96c7a6 [vm/interpreter] Fix PRODUCT build
This fixes the 'all' target.

Change-Id: I442ca639a80738f1282c3c1e4cbd66146fc12efd
Reviewed-on: https://dart-review.googlesource.com/54961
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-05-14 17:58:58 +00:00
Zach Anderson 70cf29cc59 [GN] Add interpreter config. Refactor configs.
Change-Id: Ic7f7c437464fe8c27850e1dc5c958d699143b87c
Reviewed-on: https://dart-review.googlesource.com/54712
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-05-14 15:26:37 +00:00
asiva 44b1ba1ef4 [VM] Make sync-async the default in the VM (see issue 32870).
Leave some observatory tests to run in --no-sync-async modes as
changing these tests now would make them fail if somebody tries to run
them with the --no-sync-async flag. We can modify these tests once we do
not have a way to revert this flag.

Change-Id: I4a888448c3ed7a89ebc1d187f2ca11f1d620d7df
Reviewed-on: https://dart-review.googlesource.com/54632
Reviewed-by: Zach Anderson <zra@google.com>
2018-05-14 15:00:27 +00:00
Samir Jindel 184e2a8b4c [vm] Support partial instantiation of noSuchMethod forwarders in VM.
This is complicated by the fact that the normal factory method for creating
Invocation objects references the arguments descriptor to determine how many
type arguments are passed. This doesn't work for partially instantiated
closures, because the arguments descriptor will say "0" type arguments even when
there may be delayed type arguments attached to the closure from partial
instantiation. The arguments descriptor can't be modified, so we have a new
factory method which takes the number of delayed type arguments directly.

Change-Id: Ic9a35a482b3b7ef80564e674cc6207873e255111
Reviewed-on: https://dart-review.googlesource.com/54245
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-05-14 14:34:58 +00:00
Peter von der Ahé a26951cef9 Skip tests we don't care about in legacy mode
We're running dartk legacy tests to preserve test coverage of
language and co19 test suites on Fasta. We don't care about
service and standalone suites, as these are tested in strong mode.

Change-Id: I0784d2f434926f0e50373c506e559e16a3c26486
Reviewed-on: https://dart-review.googlesource.com/54902
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-05-14 13:13:17 +00:00
asiva c2860dec50 Ensure app-jit snapshots generated with --preview-dart-2 work.
Change-Id: I437573479c0044cf8e4af481650de92eec052c36
Reviewed-on: https://dart-review.googlesource.com/54630
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-05-12 00:17:22 +00:00
Régis Crelier 6d7d6fdf01 [VM interpreter] Recover EntryOptional bytecode, improve interpreter tracing.
Change-Id: I51a4bd6ac5b55ff0250965386199057c723d7fdb
Reviewed-on: https://dart-review.googlesource.com/54742
Reviewed-by: Zach Anderson <zra@google.com>
2018-05-11 22:39:49 +00:00
Ryan Macnak 1ecad6e743 [vm] Remove ObjectMirror.getField/setField optimization from mirrors.
This optimization depends on an always-present Dart compiler, which is broken by the architecture of the CFE.

Change-Id: I2e3dfd514d6a4c19a09638719f09371bfb158106
Reviewed-on: https://dart-review.googlesource.com/54706
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-05-11 19:43:50 +00:00
Ryan Macnak 1e28b8987d [vm] Reify even more generics in the mirrors implementation to appease Dart 2.
Bug: https://github.com/dart-lang/sdk/issues/33091
Bug: https://github.com/dart-lang/sdk/issues/33098
Change-Id: Ibecce1274b9bda47e387d109a29a5af4d53adb7f
Reviewed-on: https://dart-review.googlesource.com/54704
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2018-05-11 19:18:49 +00:00
Zach Anderson 46ab040e58 Revert "[vm/kernel] Enable kernel2kernel "constants" transformation in AOT mode (after running TFA)"
This reverts commit 039e8a1755.

Reason for revert:
Blocks the roll into Flutter.
See https://github.com/dart-lang/sdk/issues/33095

Original change's description:
> [vm/kernel] Enable kernel2kernel "constants" transformation in AOT mode (after running TFA)
> 
> This CL also uses the newer `onProblem` error reporting mechanism, which supports contexts.
> 
> The errors by the constant evaluator are formatted e.g. like this:
> 
>     .../language_2/compile_time_constant_o_test_01.dart:14:8: Error: Duplicate keys are not allowed in constant maps (found duplicate key "StringConstant(foo)").
>       "foo": 499
>        ^
>     .../language_2/compile_time_constant_o_test_01.dart:32:24: Context: While analyzing:
>       Expect.identical(m1, m3);
> 
> Change-Id: I463416e14686e218b0f08903bd6aa0bca7392260
> Reviewed-on: https://dart-review.googlesource.com/53021
> Commit-Queue: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Aske Simon Christensen <askesc@google.com>
> Reviewed-by: Alexander Markov <alexmarkov@google.com>

TBR=vegorov@google.com,kustermann@google.com,alexmarkov@google.com,askesc@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I1af0200dcb0aef03c7bd9ba3b5aead1565f05708
Reviewed-on: https://dart-review.googlesource.com/54720
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Todd Volkert <tvolkert@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-05-11 17:50:46 +00:00
Ryan Macnak d58dd533f2 [vm] Add --verbose, --help and --version to gen_snapshot to match dart.
Change-Id: Icc9ecd5a51017904591db707b14b026ad45e0aef
Reviewed-on: https://dart-review.googlesource.com/54633
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2018-05-10 23:20:45 +00:00
Régis Crelier 842e26a098 [VM runtime] Only print ambiguous class names in type errors (fixes #33006).
Change-Id: I6e5e0564d438c267f0ca2733dd7a63b09b54a1b1
Reviewed-on: https://dart-review.googlesource.com/54628
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-05-10 21:53:02 +00:00
Samir Jindel 0cafdc4fdb [vm] Fix handling of all-dynamic type arguments in noSuchMethod.
This fixes #33073 for all code which is relevant to Dart 2.

Change-Id: I3956bf9f2bb06f0e67c8b643e8a7765f28464f5f
Reviewed-on: https://dart-review.googlesource.com/54260
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-05-10 17:06:42 +00:00
Ryan Macnak c1b873bb91 [vm, arm] Fix unaligned access to external TypedData in natives.
Bug: b/78784236
Change-Id: I8235135e9f438c51d0f7e6297498e5ade2eb9659
Reviewed-on: https://dart-review.googlesource.com/54530
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-05-10 16:48:18 +00:00
Ryan Macnak 407872b9e5 Revert "[vm] Remove Dart_ReadKernelBinary."
This reverts commit 2998c32951.

Reason for revert: Failures with kernel + simulators

Original change's description:
> [vm] Remove Dart_ReadKernelBinary.
> 
>  - Fix const-ness of Dart_FileReadCallback and callers.
>  - Fix leak on read error in DartUtils::FileRead.
> 
> This is progress towards sharing kernel memory on Fuchsia.
> 
> Bug: https://github.com/dart-lang/sdk/issues/32618
> Change-Id: I47f8b224905d6a105a5ca0ab2ee4ab6a42b5e342
> Reviewed-on: https://dart-review.googlesource.com/47102
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=aam@google.com,rmacnak@google.com,asiva@google.com

Change-Id: Ibb636b817de1629a062fe0a6ef9462a2fef669ef
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/32618
Reviewed-on: https://dart-review.googlesource.com/54560
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-05-10 01:36:39 +00:00
Ryan Macnak 2998c32951 [vm] Remove Dart_ReadKernelBinary.
- Fix const-ness of Dart_FileReadCallback and callers.
 - Fix leak on read error in DartUtils::FileRead.

This is progress towards sharing kernel memory on Fuchsia.

Bug: https://github.com/dart-lang/sdk/issues/32618
Change-Id: I47f8b224905d6a105a5ca0ab2ee4ab6a42b5e342
Reviewed-on: https://dart-review.googlesource.com/47102
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-05-10 00:35:37 +00:00
Régis Crelier 41fcbd097c [VM runtime] Initial version of Kernel Bytecode interpreter in VM runtime.
Not fully working yet, only x64, no gc, no frame walking, etc...

Change-Id: I4d8357f6d46371bf21c3d54266cfe26163e3c8dc
Reviewed-on: https://dart-review.googlesource.com/50021
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-05-09 20:29:27 +00:00
Vyacheslav Egorov e67222a92b [vm/compiler] Do not use call->ArgumentAt(0) to access receiver.
If call can have type arguments we can't use call->ArgumentAt(0) to
access receiver, instead we need to use call->ArgumentAt(call->FirstArgIndex()).

This lead to a bug in polymorphic inlining of functions with type
arguments - instead of loading class id from the receiver we would be
loading it from the first argument which contains type arguments.

This CL also cleans up other parts of the compiler that used ArgumentAt(0)
when they needed receiver.

Fixes https://github.com/dart-lang/protobuf/issues/95

Change-Id: I5504f7aff714894ff9fe580710c376f1d1933bfa
Reviewed-on: https://dart-review.googlesource.com/54411
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-05-09 18:01:57 +00:00
Alexander Aprelev 2ad715e706 [vm/hr] Directly compare type arguments count when validate hot reload.
There might be better fix with using canonical types for comparison, we
just need to make sure we canonicalize class's type when finalizing it.

Bug:https://github.com/dart-lang/sdk/issues/32942
Change-Id: I2301a7cb91146d587893f91f2d6ee7b731ea3c62
Reviewed-on: https://dart-review.googlesource.com/54314
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-05-09 16:34:17 +00:00
Kevin Millikin 8dbe716085 Remove the unused GenericCovariantInterface bit
None of the back ends are using it and it imposes a cost to have to
compute it and try to preserve it.

Change-Id: I217e1191b535829021fa11f2698cadd8d4baf1c8
Reviewed-on: https://dart-review.googlesource.com/54383
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-05-09 15:04:43 +00:00
Samir Jindel b5154dd01e Revert "[vm/kernel] Expression execution through Kernel.
This reverts commit afd0a52a5a.

Reason for revert: Breaks kernel-a32 and kernel-rbc bots

Original change's description:
> [vm/kernel] Expression execution through Kernel.
> 
> Change-Id: Id90c91cb3b71f9ce703e21fe48147b86a7764d34
> Reviewed-on: https://dart-review.googlesource.com/42562
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Alexander Aprelev <aam@google.com>
> Commit-Queue: Samir Jindel <sjindel@google.com>

TBR=aam@google.com,rmacnak@google.com,sjindel@google.com

Change-Id: If1ecad6145aeab81d5d3581798a628ead0265c38
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/54420
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2018-05-09 12:41:00 +00:00
Samir Jindel afd0a52a5a [vm/kernel] Expression execution through Kernel.
Change-Id: Id90c91cb3b71f9ce703e21fe48147b86a7764d34
Reviewed-on: https://dart-review.googlesource.com/42562
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2018-05-09 10:27:52 +00:00
Martin Kustermann 039e8a1755 [vm/kernel] Enable kernel2kernel "constants" transformation in AOT mode (after running TFA)
This CL also uses the newer `onProblem` error reporting mechanism, which supports contexts.

The errors by the constant evaluator are formatted e.g. like this:

    .../language_2/compile_time_constant_o_test_01.dart:14:8: Error: Duplicate keys are not allowed in constant maps (found duplicate key "StringConstant(foo)").
      "foo": 499
       ^
    .../language_2/compile_time_constant_o_test_01.dart:32:24: Context: While analyzing:
      Expect.identical(m1, m3);

Change-Id: I463416e14686e218b0f08903bd6aa0bca7392260
Reviewed-on: https://dart-review.googlesource.com/53021
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-05-09 09:00:02 +00:00