Commit graph

13242 commits

Author SHA1 Message Date
Ian McKellar 477a773cdb [fidl] Port Dart runtime to FIDL2.
Change-Id: I0423c17514027b282856f5796a550ceaa3b66baf
Reviewed-on: https://dart-review.googlesource.com/48840
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Adam Barth <abarth@google.com>
2018-03-30 05:23:36 +00:00
Régis Crelier b05ba71b0c [VM runtime] Minor clean up of type test with non-function type object.
Change-Id: I2d15c43d12f143d6566615c7b95fff678408beb5
Reviewed-on: https://dart-review.googlesource.com/48500
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-03-29 21:52:32 +00:00
Régis Crelier 7d90df42f1 [Kernel, VM runtime] Hook up bool checks in strong mode (fixes #32336).
Update kernel status file.

Change-Id: I08b153d431c15870e0251e7dd760213c795579c9
Reviewed-on: https://dart-review.googlesource.com/48707
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-03-29 16:10:52 +00:00
Ryan Macnak d9c3190e44 [vm] Remove some bin -> vm includes.
Change-Id: Id304de9618a299a201b946a901a54352772f56fb
Reviewed-on: https://dart-review.googlesource.com/48704
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-03-28 23:16:09 +00:00
Ryan Macnak 3dcdaf9e57 [vm] Check for OOM when allocating a new handle block.
Bug: https://github.com/dart-lang/sdk/issues/32706
Change-Id: I0159d794e11c18f24204d11d9ba3bbfe8a5a4140
Reviewed-on: https://dart-review.googlesource.com/48706
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-03-28 23:08:39 +00:00
Zach Anderson 865f52737a [dart:io] Adds IOOverrides.socketConnect
fixes #32535

Change-Id: I335e3698ec3505114d480ae6179254fa0ade3f7a
Reviewed-on: https://dart-review.googlesource.com/48702
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Todd Volkert <tvolkert@google.com>
2018-03-28 23:07:49 +00:00
Ben Konyi 4b682341d9 [ VM / Dart 2 ] Marked tests that exercise functionality not supported in Dart 2 as SkipByDesign.
Change-Id: I9e02b2663a00861c4e11dd21cc74bd32bbef33cb
Reviewed-on: https://dart-review.googlesource.com/47420
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-03-28 20:45:48 +00:00
Zach Anderson 0482cf4da1 [fuchsia] Add rules to build gen_snapshot targeting Fuchsia
This change enables building a gen_snapshot that targets Fuchsia during
an SDK build that targets the host (Mac, Linux).

Change-Id: I4cfbcbe4e26e4be7108fc40c96122fe9a2fb4c19
Reviewed-on: https://dart-review.googlesource.com/48683
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-03-28 19:39:49 +00:00
Ben Konyi 42581e4fa6 [VM] Added '--enable-asserts' to the top-level help message.
Change-Id: I91b22cc1563b7c5217f21032109d948a5bb78b57
Reviewed-on: https://dart-review.googlesource.com/48456
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-03-28 18:54:00 +00:00
Régis Crelier 85b4c604c5 [VM runtime] Improve type error messages in Dart 2 (fixes #32564).
Hide private class _Future and map it to core lib class Future.
In Dart 2, show dynamic as type argument(s) of raw generic types.

Change-Id: I70b0e1707bc767d04838ac12d16b3ad15623f51f
Reviewed-on: https://dart-review.googlesource.com/48502
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-03-28 17:12:04 +00:00
Alexander Markov c60199cf86 [vm/kernel/aot] Tree shaking based on results of TFA, take 2.
This is a re-landing of

06ebf884db

after the fix was submitted separately at

e3b9c2860e

Original review: https://dart-review.googlesource.com/c/sdk/+/46942

Issue: https://github.com/dart-lang/sdk/issues/30480
Change-Id: I2d3a10acb9b5af0184b3d1504acb2f4ebebfff8a
Reviewed-on: https://dart-review.googlesource.com/48440
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-03-27 23:39:24 +00:00
Samir Jindel 70f455351d [kernel] Add field for instantiate-to-bounds algorithm in TypeParameter.
Change-Id: Idd1859b378080f01dc5d5078ee0960021c1689b6
Reviewed-on: https://dart-review.googlesource.com/48424
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-03-27 22:26:07 +00:00
Ben Konyi e305117519 [ VM / Flutter ] Replaced NO_RETRY_EXPECTED with VOID_TEMP_FAILURE_RETRY in console_posix.cc:69.
Change-Id: Iaa5772476bfc81b01a646b16a9d8280ef0edf788
Reviewed-on: https://dart-review.googlesource.com/48465
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-03-27 19:15:22 +00:00
Samir Jindel eeba621943 [kernel/vm] Build NSM forwarders for getters and setters.
They are necessary for performing type-checks.

Change-Id: Ie30f0617488730d920c00229fb2ec358cc8d6c4b
Reviewed-on: https://dart-review.googlesource.com/48421
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-03-27 14:40:04 +00:00
Ben Konyi 6e0f2f4e47 [ VM / Dart 2 ] Fixed StackOverflow tests.
Made modifications to the original VM flow graph builder so the token
position for the top frame of the overflow stack is the same as the
token position of the method (before we pointed to the opening '{' or
'=>').

Change-Id: I5c878fc238898e2fea197ea80ed4e320adca9439
Reviewed-on: https://dart-review.googlesource.com/48448
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-03-26 23:47:11 +00:00
Ben Konyi a7e3c2e365 [ VM / Dart 2 ] Fixed strong-mode issue in Native SendPort tests.
Change-Id: I37a437d338d67095038130981b5fa947e0425b9d
Reviewed-on: https://dart-review.googlesource.com/48452
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-03-26 22:42:02 +00:00
Samir Jindel 83c5778345 [kernel/vm] Cleanup NSM forwarding.
Change-Id: Ia2077d2752fbeb45da7d1051cdab0c16d67377d0
Reviewed-on: https://dart-review.googlesource.com/48420
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-03-26 22:34:02 +00:00
Alexander Markov 7386d7b5ec Revert "[vm/kernel/aot] Tree shaking based on results of TFA"
This reverts commit 06ebf884db.

Reason for revert: buildbot failures.

Change-Id: Ie6b33061cad80ae3b20b773cc435d64a755620fc
Reviewed-on: https://dart-review.googlesource.com/48263
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-03-23 22:57:19 +00:00
Alexander Markov 06ebf884db [vm/kernel/aot] Tree shaking based on results of TFA
This CL adds tree shaking transformation into TFA transformer, replacing
simple DropMethodBodiesVisitor. In addition to removing bodies of
unreachable members, tree shaker is able to remove unused classes, typedefs
and member declarations, and replace unreachable calls with 'throw'.

Total(CodeSize) of flutter_gallery in --release mode
before: 11,671,369
after:  11,499,694

https://github.com/dart-lang/sdk/issues/30480

Change-Id: I966cf222eb9725b7a75dd193ac479436b9b9b4c3
Reviewed-on: https://dart-review.googlesource.com/46942
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-03-23 22:21:39 +00:00
Ben Konyi 2187286251 [ VM / Dart 2 ] Fixed Mixin_PrivateSuperResolutionCrossLibraryShould fail which was expecting a NoSuchMethod error instead of a compilation error in strong-mode.
Fixes part of issue 32190.

Change-Id: Iab0d304b4c77deb57c449788797300d38087466b
Reviewed-on: https://dart-review.googlesource.com/47946
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-03-23 15:43:09 +00:00
Ben Konyi e11fcdc266 [ VM ] Added issue number to FunctionSourceFingerprint failure status entry.
Context: https://github.com/dart-lang/sdk/issues/30756

Change-Id: I4fc914cfecb2656a87f68170a79e85a0055c903e
Reviewed-on: https://dart-review.googlesource.com/47920
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-03-23 15:27:52 +00:00
Ben Konyi edf039d510 [ VM / Dart 2 ] Made StackMapGC test strong-mode clean. Fixes part of 32190.
Change-Id: I09d519a950c1e3c825c89a1f5e22292cedc6c14a
Reviewed-on: https://dart-review.googlesource.com/47941
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-03-22 19:36:04 +00:00
Ryan Macnak 77239ee1db [fuchsia] Replace use of deprecated fdio_get_vmo with fdio_get_vmo_clone.
Change-Id: I8961ed49c6e9269c3cb8699037717d7007e630a8
Reviewed-on: https://dart-review.googlesource.com/47905
Reviewed-by: Zach Anderson <zra@google.com>
2018-03-22 19:26:08 +00:00
Samir Jindel 95e9e890a9 [kernel/vm] Implement NSM-forwarding in the VM.
Change-Id: I43ce98235a7fdb43f99f433ef8dd10a6ed08fbbb
Reviewed-on: https://dart-review.googlesource.com/47621
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-03-22 19:14:04 +00:00
Vyacheslav Egorov 691bb9b299 [vm/compiler] Add a comment about MakeTemporary limitation.
You can't use it in a way that would require Phi in the SSA form
because SSA construction does not support generating phi-functions
for the expression stack.

Change-Id: I57a029412cbdd796ecfd3cdbd0ec68e0dbca2356
Reviewed-on: https://dart-review.googlesource.com/47740
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-03-22 10:04:33 +00:00
Ben Konyi 3a81263fee [ VM / Dart 2] Split DartAPI_PropagateError into DartAPI_PropagateError and DartAPI_PropagateCompileError since the compile time error from the missing semicolon prevented the code from being executed in Dart 2.
Change-Id: Iee9344e9246ce07a04cc99b57df31aff14f30458
Reviewed-on: https://dart-review.googlesource.com/47301
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-03-22 05:17:56 +00:00
Ben Konyi 068be3b656 [ VM / Dart 2 ] Fixed issue where TokenPosition::kNoSource was being registered as the position of native methods. Fixes DartAPI_CurrentStackTraceInfo
Change-Id: Ieae720357d1830c277f3e182f07afdfaa7a94e91
Reviewed-on: https://dart-review.googlesource.com/47665
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-03-22 00:05:56 +00:00
Régis Crelier f2806ab624 [Corelib, VM runtime] Fix handling of zero operand in Bigint operations (fixes #32465).
Fix VM, dart2js, and dcc Bigint implementations.
Add shift tests.
Re-enable Bigint intrinsics on VM.

Change-Id: Iec19eac8069cf17783a5346289ea2745ffcc7c26
Reviewed-on: https://dart-review.googlesource.com/46570
Reviewed-by: Florian Loitsch <floitsch@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-03-21 21:44:10 +00:00
Ben Konyi a81f4babcc Revert "[ VM / Dart 2 ] Fixed StackTraceFormat test to expect file URIs in stacks generated by the Dart frontend."
This reverts commit ae130bc187.

Reason for revert: snprintf doesn't like positional format strings on Windows.

Original change's description:
> [ VM / Dart 2 ] Fixed StackTraceFormat test to expect file URIs in stacks generated by the Dart frontend.
> 
> Change-Id: I26f09e094e934485575e55a6a60a8fccfbd94aa7
> Reviewed-on: https://dart-review.googlesource.com/47520
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

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

Change-Id: Idbc15d59bcc7ff3534010f6c93cebdcc89c935fc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/47640
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-03-21 20:20:45 +00:00
Ben Konyi ae130bc187 [ VM / Dart 2 ] Fixed StackTraceFormat test to expect file URIs in stacks generated by the Dart frontend.
Change-Id: I26f09e094e934485575e55a6a60a8fccfbd94aa7
Reviewed-on: https://dart-review.googlesource.com/47520
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-03-21 20:03:46 +00:00
Ben Konyi fe5e2444ad [ VM / Dart 2 ] Fixed DartAPI_InvokeCrossLibrary test.
Change-Id: I4346fd8aa43c375bb3ff0b96d8aad850303df9c0
Reviewed-on: https://dart-review.googlesource.com/47501
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-03-21 17:33:20 +00:00
Martin Kustermann 521846c832 [VM] When generating the token position list for each line (for a [Script]), only scan relevant classes/functions/fields
The source-based pipeline was simply iterating the token script of a
[Script] to generate a list of (line, [token positions]) tuples.

The kernel-based pipeline is not based on the source (and therefore also
not based on the token stream).  Instead it's based on information from
two places:

  a) The .dill file constains a delta-encoded list of line start file
     offsets.  This line starts array is attached to [Script] objects via
     [RawScript.line_starts_].

  b) It scans the *entire* isolate's program structure (i.e. libraries,
     classes, functions and fields) and does abstract interpretation
     of the kernel blob (ast) and saves the encountered token positions
     on the side.  Afterwards the token positions are merged together
     with the line-starts from a) which then produces the list of (line,
     token positions) tuples.

This CL changes b) to only do the abstract interpretation of
functions/fields which are relevant for the [Script] we are generating
the list of (line, [token position]) tuples for.

Nonetheless, b) will still iterate over the entire isolate's program
structure to find all possible elements belonging to a specific
[Script].  This is a separate issue which should be handled.


On one example it reduces time to get the coverage from ~ 35 seconds to 9.5
seconds (baseline from dart-v1 is around 6.5 seconds).

Issue https://github.com/dart-lang/sdk/issues/32562

Change-Id: I64cda28666c732938379cdf4b2ac62a2371cb3b7
Reviewed-on: https://dart-review.googlesource.com/47080
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-03-21 14:59:55 +00:00
Martin Kustermann 31dd6683f8 [VM] Optimize performance of dart_boostrap in debug-kernel-strong mode.
Since the kernel reading helpers have been extended to not only work
with a kernel blob in C heap, but also work based on a [TypedData]
buffer in the VM heap, access to the [TypedData] buffer is on the hot
path now.

This hot path is slowing things down considerably, in particular due
to NoSafepoingScope's.

This CL removes a critical NoSafepoingScope when accessing the
[TypedData] in read-only mode.  It also allows passing in the [Thread]
directly, to avoid TLS lookups.

Issue https://github.com/dart-lang/sdk/issues/32603

Change-Id: I91955bea5cd4eddbbd21c5d3bc6813504c2cece9
Reviewed-on: https://dart-review.googlesource.com/47222
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-03-21 10:24:29 +00:00
Ryan Macnak 00ec3b0867 [vm] Fix several kernel-specific memory leaks.
Bug: https://github.com/dart-lang/sdk/issues/32615
Change-Id: Ic969915c6084b9deef0d86c8f8a0e9aa4f4640e5
Reviewed-on: https://dart-review.googlesource.com/47321
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2018-03-20 23:23:49 +00:00
Alexander Markov b7c3c32f63 [vm] Do not assign type to phi if it was loaded from a different local
During SSA construction in strong mode, types of local variables are
propagated (assigned) to phis which are 'loaded' from slots corresponding
to those local variables.

It is incorrect if phi was stored in a different local variable with a more
specific type and then reloaded.

After this change, type is propagated from local variable to phis only if
phi was created for this local.

Fixes https://github.com/dart-lang/sdk/issues/32597

Change-Id: I7d86c2ef79d14895c9b4c3651d0234b3f9c66173
Reviewed-on: https://dart-review.googlesource.com/47200
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-03-20 23:08:49 +00:00
Ben Konyi 06638dd17f [ VM / Dart 2 ] Removed DartAPI_NativeFieldAccess and DartAPI_InjectNativeFields1 as they were using Dart_CreateNativeWrapper which doesn't make sense in the context of Dart 2. Also did some status file cleanup and reorganization.
Change-Id: I8e8b309ba7aa453e85f6e68d96bb8b4702ff7bb4
Reviewed-on: https://dart-review.googlesource.com/47322
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-03-20 22:43:09 +00:00
Ben Konyi ec65830504 [ VM / Dart 2 ] Fixed DartAPI_LookupLibrary test which was treating the script in Dart_LoadScript as kernel instead of source.
Change-Id: I979ddd774904d4a3058ff92d93ddf9c2efe14673
Reviewed-on: https://dart-review.googlesource.com/47320
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-03-20 21:50:19 +00:00
Ryan Macnak 3989d09c95 [vm] Move writing snapshot magic value from embedder to VM.
Add Dart_IsSnapshot and Dart_IsKernel to the embedding API.

Change-Id: I7d4e1d145557e8f11dbc3c143767ad38b3615a4a
Reviewed-on: https://dart-review.googlesource.com/46360
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-03-19 17:47:55 +00:00
Lasse Reichstein Holst Nielsen a81bc639b5 Fix bug in BigInt.from with certain double values.
Add test.

Change-Id: I385f7237e1b3d004b4401e18a82919b15d097181
Reviewed-on: https://dart-review.googlesource.com/46460
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2018-03-19 17:46:35 +00:00
Vyacheslav Egorov d41794ee11 [vm/compiler] Fix UB in ToIntegerConstant helper
Change-Id: I5ffbebb12bd84eacca33fb81b3df51ba4ca291a8
Reviewed-on: https://dart-review.googlesource.com/46722
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-03-19 14:12:15 +00:00
Ryan Macnak 29749cd0d0 [vm] Remove dead DFE::ReadKernelBinary.
Change-Id: I167849cc1134925819e2c51d0234d80e7bed34e3
Reviewed-on: https://dart-review.googlesource.com/46701
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-03-17 00:40:57 +00:00
Ryan Macnak d1f8f8b259 [vm] Clean up any remaining API scopes in Dart_ShutdownIsolate.
Some embedders, i.e. tonic, sometimes call Dart_ShutdownIsolate after encountering a fatal error without calling Dart_ExitScope.

Change-Id: Iedba50b6d87acd277812ca6a476964c007b5416a
Reviewed-on: https://dart-review.googlesource.com/46840
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-03-17 00:01:48 +00:00
Ryan Macnak 8590919ca6 [vm] Add a timeline stream for recording the zone high watermark.
Change-Id: Ic7f899dbb29eb732b54d7164968a176d7b1025b9
Reviewed-on: https://dart-review.googlesource.com/45544
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-03-16 17:43:27 +00:00
Ryan Macnak f36358c370 [vm] Replace Dart_LoadKernel with Dart_LoadLibrary/ScriptFromKernel.
Dart_LoadKernel is only used in Flutter engine and dart_runner, where it is always used as Dart_LoadKernel(Dart_ReadKernelBinary). These uses should be replaced with Dart_LoadScriptFromKernel.

Dart_LoadLibraryFromKernel is needed for loading split kernel files and implementing IsolateMirror.loadUri.

Change-Id: Ib505350eff53ec889406747f8f99393ebbdb4c7d
Reviewed-on: https://dart-review.googlesource.com/46220
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-03-15 23:24:44 +00:00
Ryan Macnak 82ed3eb9ed [vm, kernel] Fix loading enum classes from kernel when the embedder does not use DFE.
Change-Id: I3a88d1d4bb3741bf9199acd62d4be54d60849146
Reviewed-on: https://dart-review.googlesource.com/46823
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-03-15 23:05:06 +00:00
Ben Konyi 769f082ff9 [ VM / Tests ] Status file fix for IsolateReload_LibraryLookup failures.
Change-Id: Ieb3225b5388e5d2f893769d6525e61cd82477b6a
Reviewed-on: https://dart-review.googlesource.com/46703
Reviewed-by: Ben Konyi <bkonyi@google.com>
2018-03-15 00:03:28 +00:00
Ben Konyi f52af63798 [VM] Fixed issue where console state on Windows was not restored correctly.
Change-Id: I3f4814af0095f20448298c9ba45116bd8f27c352
Reviewed-on: https://dart-review.googlesource.com/46680
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-03-14 23:52:12 +00:00
Ben Konyi 0ff7eb02cf [VM] Fix for crash when changing root script uri during reload.
Change-Id: I3eec560c94022e536f6cc3623cf47cb791a9a159
Reviewed-on: https://dart-review.googlesource.com/46401
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-03-14 23:25:32 +00:00
Ben Konyi 217e3e56fa [VM] Release SignalInfo objects on Isolate shutdown. Fixes #30042.
Change-Id: I611d6729e684e2b67acaa95ec304f5242c8ef946
Reviewed-on: https://dart-review.googlesource.com/46125
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-03-14 23:14:52 +00:00
Kevin Millikin 65b19ffa3c Translate asserts in the VM-specific async translation
Translate assert statements in async functions.  The translation of
the condition subexpression can produce a sequence of statements that
have been hoisted out of it.  These need to be guarded so they are
executed only when asserts are enabled.

For this purpose, we introduce an AssertBlock.  The semantics of the
assert block:

assert { s0; ...; sn; }

is the same as:

if (assertsEnabled) { s0; ...; sn; }

where assertsEnabled is a more primitive nullary expression that is
true iff. assertions are enabled.  We chose not to encode this using a
construct like assertsEnabled because (1) we would have to support it
appearing as an arbitrary expression which we don't currently need
and (2) it requires deeper pattern matching to detect and skip the
guarded code when desired.

The translation is more complicated because if there is a message
subexpression in an assert, it is conditionally evaluated only if the
assert's condition is false.

Fixes https://github.com/dart-lang/sdk/issues/28498

Change-Id: I0912a57104ede3160533e49f65b6fb79b76f1500
Reviewed-on: https://dart-review.googlesource.com/46442
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-03-14 19:41:09 +00:00