Commit graph

13470 commits

Author SHA1 Message Date
Aske Simon Christensen e191d4feb5 Simplify errors on invalid arguments
Change-Id: I1bd94725b4e4e44e706c6d22543bbea22649ec69
Reviewed-on: https://dart-review.googlesource.com/55680
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-05-22 11:14:22 +00:00
Régis Crelier 63ff7ee922 [vm/interpreter] Support closures in bytecode.
Support reordered bytecode metadata sections.
For now, read but ignore exceptions table in bytecode metadata.

Change-Id: I86202acc8ea22d746deaa894afd685d2f1daaaf8
Reviewed-on: https://dart-review.googlesource.com/56036
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-05-22 02:37:01 +00:00
Alexander Aprelev e71bd048e5 [vm, kernel] Fix async stack code traversal in dart2.
With this change debugger requests yield(await) positions from kernel builder so it can confirm which frame handles what exceptions.
This also renames ':completer' to ':async_completer' in constructed kernel, so it is compliant with what VM expects to see(and updates test expectations accordingly).
Further it fixes async stack navigation for sync-async that became default in dart vm since first version went for the review((uses `future` getter, rather than property).
It also makes `future` getter non-debuggable to allow stepping-out of async methods.

Make Handle zone-scoped. Clean up frame counter var name.

Bug: https://github.com/dart-lang/sdk/issues/29056

Change-Id: Ia71f3c851a6b313655b57dad28c296f5dd081eda
Reviewed-on: https://dart-review.googlesource.com/54640
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-05-22 00:27:01 +00:00
Paul Berry bbb8905075 Observatory strong mode fixes: specify type argument to .map when not inferable.
This ensures that the resulting Iterable will have the proper type
when run with strong mode semantics.

In Dart 1.0 semantics, the type argument to .map is ignored, so this
change should be safe.

Change-Id: I34924bc7e803b1520af7d174cfe80f5be6b7ac0f
Reviewed-on: https://dart-review.googlesource.com/55908
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-21 20:28:48 +00:00
Paul Berry 841a91b3a0 Observatory strong mode fixes: Add abstract Location.toUserString to Location.
This is necessary because many call sites invoke toUserString without
first casting to one of the derived classes.

This should be safe since both derived classes (SourceLocation and
UnresolvedSourceLocation) contain a definition of toUserString.

Change-Id: I69eeda326883d87fc4e8cedd732881d250cae8cb
Reviewed-on: https://dart-review.googlesource.com/55909
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-21 20:07:39 +00:00
Alexander Aprelev fc206a7589 Add Kill isolate service request.
This is useful when embedder needs to kill an isolate that might be paused on a breakpoint.

Change-Id: If54decda5d16c694b81a25ae43d37f8eb41e8105
Reviewed-on: https://dart-review.googlesource.com/55276
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-05-21 20:00:58 +00:00
Paul Berry aad3270ab8 Observatory strong mode fixes: fix C-style parameter declarations.
This CL fixes some cases where Observatory mistakenly tried to use a
C-style parameter declaration, e.g.

    void foo(String);

The intent is to declare the parameter to have type `String`, but Dart
interprets the parameter as having *name* `String` and type `dynamic`.

In most cases the fix applies to abstract method declarations, whose
types aren't semantically relevant in Dart 1.0, so these parts of the
CL should be safe.

In one case it applies to a typedef, IsConnectedVMTargetDelegate.  The
only use of this typedef is as the type of
TargetRepository._isConnectedVMTarget, whose value is always the
static function ObservatoryApplication.isConnectedVMTarget.  The type
of ObservatoryApplication.isConnectedVMTarget matches the typedef
(according to Dart 1.0 rules) both before and after the change, so
this should be safe as well.

Change-Id: Ia67f5f14d5a012ccb8a44cbd88a8233f8c9ad171
Reviewed-on: https://dart-review.googlesource.com/55901
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-21 19:58:38 +00:00
Paul Berry ea4d10915c Observatory strong mode fixes: make return types more specific.
This CL addresses a code pattern where a method has a more general
return type than it needs, causing a strong mode error at the site
where the method is called or torn off.  For example:

    Object f() => 'x';
    void g(String callback()) { ... }
    void h() {
      g(f); // Error: () -> Object is not a subtype of () -> String
    }

The solution is to tighen up the return type.  In all cases in this
CL, it is obvious from the method definition that the value returned
at runtime will satisfy the tighter return type, so this should be a
safe change.

Change-Id: Ifbd476d969274342653d2619c1c81e2e014817c4
Reviewed-on: https://dart-review.googlesource.com/55904
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-21 19:52:38 +00:00
Aart Bik 0f506ba3ae Added period to comment for consistency.
Rationale:
Getting familiar with the Dart workflow.

Bug: none
Change-Id: If145b28fd3d6868b2208fa0239fd3ea5a88e79b9
Reviewed-on: https://dart-review.googlesource.com/55584
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-05-21 19:04:38 +00:00
Ryan Macnak 5ab4294074 [vm] Allow for creating a CoreJIT snapshot from a kernel file.
Change-Id: Ibc0ea5c75393c88bf70520fca6ff218ada0cd928
Reviewed-on: https://dart-review.googlesource.com/55840
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-05-21 18:20:06 +00:00
Ryan Macnak 4d3ebab589 [vm] Fix error message when an API function is called without a current isolate.
Change-Id: Id29fe5d14a58d85984902952dc53cc56cda16ccc
Reviewed-on: https://dart-review.googlesource.com/55842
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-05-21 16:27:48 +00:00
Samir Jindel c31b9a461d [vm/kernel] Reference constants in Dill by offset into constants table.
Summary:

The constants table contains a concatenation of the variable-length encodings of
each constant used in the serialized component. Previously, we referenced the
constants in the code by index into the constants table, which requires reading
potentially the entire constants table to dereference. Now, we refer to the
constant by the binary offset into the constants table, which allows us to peek
into it in constant time.

Test Plan:

The constants table is used by all the precompiler modes, so the new encoding
will inherit the coverage of the existing encoding.

Results from debug and release precompiler bots are available under the
"cl-linux-try" button.

Change-Id: I4782bc0035d0b0cbd5bd6b9d086561ea601286c8
Reviewed-on: https://dart-review.googlesource.com/55470
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-05-21 15:54:08 +00:00
Zach Anderson c38bca632d [fuchsia] Fix bad state error on namespace cleanup
We have to close the fds we got from the namespace before destroying
the namespace.

Change-Id: I3298868a444d262b4ded147a1dc8eb1a99c92a1c
Reviewed-on: https://dart-review.googlesource.com/55983
Reviewed-by: Zach Anderson <zra@google.com>
2018-05-18 22:19:23 +00:00
Ben Konyi 7aacf7e188 [ VM / dart:io ] Fixed memory leak in SecurityContext on MacOS.
Fixes #33114.

Change-Id: I6e2272c6d63b11bbd82c3d5b7c3aedf75306ba05
Reviewed-on: https://dart-review.googlesource.com/55523
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-05-18 20:17:49 +00:00
asiva 02e47a9731 [VM] Fix for issue 32188 (cannot use pub with --preview-dart-2)
- Fix for 'unable to read .packages file' error when generating
  kernel file (script snapshot).
- Make sync-async an isolate specific flag and turn it off for
  the kernel isolate as it runs in Dart 1 mode
- Include 'reify-generic-functions' and 'sync-async' flags to the
  list of flags to check an app JIT snapshot against.

Change-Id: I2b16270f65705213660487f9c15fe0348fc84c8b
Reviewed-on: https://dart-review.googlesource.com/55589
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-05-18 18:12:08 +00:00
Samir Jindel 4bac17655d [kernel/vm] VM support for instantiate-to-bounds.
Dynamic invocations of generic functions might not pass type arguments.
The type arguments need to be filled in with the default type arguments
calculated by the CFE.

Change-Id: I5865e79b2975af97d1ca1680bd88ba8137208bb8
Reviewed-on: https://dart-review.googlesource.com/48423
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-05-18 11:07:17 +00:00
Zach Anderson c26435f18f [dart:io] Add length check assert to x509 code
Change-Id: I42c29e43f34cceea90caa5b99c4249ddaabe968c
Reviewed-on: https://dart-review.googlesource.com/55763
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-05-17 21:49:17 +00:00
Martin Kustermann 510669a0b4 [VM] Address uncovered issues, mark test as passing
Change-Id: Ie2c5eb055ce6138952af145ce6fdb972c057bd16
Reviewed-on: https://dart-review.googlesource.com/55780
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-05-17 19:21:35 +00:00
Martin Kustermann 11006c3bac Reland "[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 and the exception/stacktrace variables
got captured.

Change-Id: Icb8ea5f3557080f8274f7db2af09e33154820e5b
Reviewed-on: https://dart-review.googlesource.com/55721
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-05-17 16:48:56 +00:00
Zach Anderson e7495e427c [dart:io] Adds X509Certificate.der and X509Certificate.pem
fixes #33115

Change-Id: I7ccf5998b23e936040fe65792824f09d3f494cf7
Reviewed-on: https://dart-review.googlesource.com/55505
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2018-05-17 16:20:06 +00:00
Martin Kustermann e6fc78c87b Revert "Reland "[VM] Use IR for code in [CatchEntryInstr]s to populate captured exception/stacktrace variables""
This reverts commit 23b4a505ec.

Reason for revert: The language_2/custom_await_stack_trace_test started failing.

Original change's description:
> Reland "[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 and the exception/stacktrace variables
> got captured.
> 
> Change-Id: Icb626965019b248afe3b72a6679c5049ea7b7b00
> Reviewed-on: https://dart-review.googlesource.com/55681
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
> Commit-Queue: Martin Kustermann <kustermann@google.com>

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

Change-Id: Ic825c1e3ed14c731da1d43aa6f27d37ed5d36b4c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/55720
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-05-17 15:13:50 +00:00
Martin Kustermann 23b4a505ec Reland "[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 and the exception/stacktrace variables
got captured.

Change-Id: Icb626965019b248afe3b72a6679c5049ea7b7b00
Reviewed-on: https://dart-review.googlesource.com/55681
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-05-17 14:16:16 +00:00
Samir Jindel 23c8c4d101 [vm/kernel] Pass type variables through ActivationFrame for expression compilation.
Fixes https://github.com/dart-lang/sdk/issues/32376.

Change-Id: I37bbda2dbc6052925aa840865c62a170604c6cdd
Reviewed-on: https://dart-review.googlesource.com/44784
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2018-05-17 13:59:57 +00:00
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