Commit graph

55882 commits

Author SHA1 Message Date
Peter von der Ahé a738567968 Convert ContextAccessor to ContextAwareGenerator
Change-Id: Id9afaa968616d48c0dbe088d19a7dcb0f94ef369
Reviewed-on: https://dart-review.googlesource.com/55964
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-05-22 09:23:21 +00:00
Peter von der Ahé bbdf560ee7 Convert UnresolvedAccessor to UnresolvedNameGenerator
Change-Id: Ie28b5d963ab575383b36551657c0f0109b5de53d
Reviewed-on: https://dart-review.googlesource.com/55963
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-05-22 09:23:21 +00:00
Peter von der Ahé b5c6143d74 Convert IncompleteSend to IncompleteSendGenerator
Change-Id: Ief33fe9277ec9a297f0dc9274820e1f1ab13ca75
Reviewed-on: https://dart-review.googlesource.com/55962
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-05-22 09:23:21 +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
Stephen Adams e1cabfd1d4 [dart2js] 'Fix' error in registrations
Restore 'overregisration' removed by
https://dart.googlesource.com/sdk/+/929b79e86533b6c409437fbc4a08cf5dfde8be75

Change-Id: I607d2bfbbaa4ea9d320b37aebba06acd1da1af19
Reviewed-on: https://dart-review.googlesource.com/56038
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-05-22 01:56:11 +00:00
Emily Fortuna 49d5ca3bb4 Switch to BigInt for ConstantValue.
Change-Id: I17eec094d794b1c4791d491ea523d284f9eae4ed
Reviewed-on: https://dart-review.googlesource.com/55500
Commit-Queue: Emily Fortuna <efortuna@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-05-22 01:04:41 +00:00
Konstantin Shcheglov 9696c9dcd0 Change analysis_server tests to use /project/test.dart as the test file.
Correspondingly all files that were referenced using relative URI(s)
also put into /project, which is the contextRoot for the test
AnalysisDriver.

This will let us (in a following CL) start checking that the element
being renamed is defined inside the current workspace (the set of
analysis roots). Currently the context root is hardcoded as /project.

R=brianwilkerson@google.com

Change-Id: I9dca3509af1be13c9016bf03d4a4b95d71bc9374
Reviewed-on: https://dart-review.googlesource.com/56031
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-05-22 00:31:22 +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
Alexander Markov 714697efbb [vm/kernel/bytecode] Write constant pool before bytecode and exceptions table
This simplifies reading, as exceptions table refers to constant pool.

Change-Id: Id20d2a315ad87aa4e5247fcd98d7e5996c188eec
Reviewed-on: https://dart-review.googlesource.com/56032
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-05-21 23:51:41 +00:00
Alexander Aprelev 80b48195b1 [frontend-server] Serialize compiled expression procedure into the file.
Improve comments and test, report errors.

Follow-up to https://dart-review.googlesource.com/c/sdk/+/49040.

Change-Id: Ie02dae1c0edfcb54e3cd7333641e2c5eface1412
Reviewed-on: https://dart-review.googlesource.com/56030
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-05-21 23:50:22 +00:00
Alexander Markov 68b19b4ff4 [vm/kernel/bytecode] Add invocation kind to StaticICData constant
VM will use the invocation kind to distinguish between getters,
setters and calls via field/getter.

Change-Id: I97cf36bc8778533e53f8251c25b373fddec3c2e8
Reviewed-on: https://dart-review.googlesource.com/55581
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-05-21 23:03:01 +00:00
Stephen Adams 929b79e865 [dart2js] Don't insert redundant checks
This is in preparation for detecting if a generator header has checks.

By not registering the redundant checks (which should really done in codegen) we remove a few $isXXX flags.

Change-Id: I30deb2bc498858540cd326243798248c51ce9375
Reviewed-on: https://dart-review.googlesource.com/56006
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-21 22:23:18 +00:00
Konstantin Shcheglov 4cf51e6c1a Give (the old) ContextRoot path.Context to work with paths.
R=brianwilkerson@google.com

Change-Id: I7699bb50ea4b6239c61c69de5e8e2ceeed64ea64
Reviewed-on: https://dart-review.googlesource.com/56024
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-05-21 22:04:24 +00:00
Vijay Menon bea580c3a4 Disallow ignore on any explicit cast failures
See #27223

Change-Id: I9689ce9a72597b3e5c945f9787f2de6c5e8c2074
Reviewed-on: https://dart-review.googlesource.com/54701
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2018-05-21 22:01:39 +00:00
danrubel 1cf871a4d2 Improve import/export combinator identifier recovery
Change-Id: I9f0a418d3b1fae001199c27850b1a85daf2d07a6
Reviewed-on: https://dart-review.googlesource.com/56040
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-05-21 21:12:19 +00:00
Konstantin Shcheglov 79a0ef60e0 Fix for 'Convert to final field' quick assist when no return type.
R=brianwilkerson@google.com

Change-Id: I9927c8f44fcab8ad812939680a1a082f85cc9b66
Reviewed-on: https://dart-review.googlesource.com/56020
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-05-21 20:51:10 +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
Alexander Aprelev d5b99860e4 [frontend-server] Introduce compile-expression command.
Change-Id: I5b200ab00076710b08527ec4b35322a6a5fcc4b9
Reviewed-on: https://dart-review.googlesource.com/49040
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
2018-05-21 18:11:09 +00:00
Mike Fairhurst ac8971a98a New package:build workspace before we support it at the language level.
Does not work with dartanalyzer, only dart analysis server.

Change-Id: I1d7c3fbbbda512d799ac44a6fa5a188d1a3bb8c3
Reviewed-on: https://dart-review.googlesource.com/55586
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2018-05-21 17:45:28 +00:00
Brian Wilkerson 99eb2195c8 Add Forest support for break and continue statements
Change-Id: Id7b109ca9acaa6d68cdc0682109bb65bd7cda62f
Reviewed-on: https://dart-review.googlesource.com/55991
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-05-21 16:45:40 +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
Brian Wilkerson 0ff6c20c66 Add Forest support for return statements
Change-Id: I84df2c0e392de16130e6933544a7aa41bb7d9a7f
Reviewed-on: https://dart-review.googlesource.com/55993
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-05-21 13:08:28 +00:00
Brian Wilkerson 85fbc71f22 More test framework cleanup
Change-Id: I9090c4f07154fb86621e8870158876053bad5336
Reviewed-on: https://dart-review.googlesource.com/55992
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-05-21 02:44:28 +00:00
Alexander Markov 6202749429 [vm/kernel/bytecode] Support try-catch-finally in bytecode generator
Change-Id: I2882546741b1dd8f6e03a21d85b5487fb754b742
Reviewed-on: https://dart-review.googlesource.com/55324
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-05-20 19:52:07 +00:00
Dan Rubel 78cc8a13a2 Improve type parameter recovery
This CL replaces several calls to parseTypeVariablesOpt with calls
to computeTypeParam with improved recovery for missing '>'.

In addition, this CL
* moves isOneOfOrEof to util.dart
* moves insertSyntheticIdentifierAfter into TokenStreamRewriter

Change-Id: I48080809d156dd98ccfed7aa2f67be254f4da201
Reviewed-on: https://dart-review.googlesource.com/55940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-05-20 12:02:56 +00:00
Dan Rubel 3e7eef12d4 Remove reference to token.previous
Change-Id: Ia1ae04e03b868dfb482d4853fac1c288331a6085
Reviewed-on: https://dart-review.googlesource.com/55942
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-05-20 02:33:00 +00:00
Konstantin Shcheglov 5b4d67b22e Compute runtime completions in the context file itsef.
So, we support all elements - class fields, top-level functions and
variables, etc. And it is just simpler too.

R=brianwilkerson@google.com

Change-Id: Ifed8f9b8d8ef857750b28c48f851d8611a56ef22
Reviewed-on: https://dart-review.googlesource.com/55990
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-05-19 17:03:21 +00:00
Brian Wilkerson 720b6c963c Improve some tests and fix a Dart 2 error
Change-Id: Ia9581c5b27e7fc0540054b7acde9dd1a96dfe927
Reviewed-on: https://dart-review.googlesource.com/55981
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-05-19 15:06:51 +00:00
Stephen Adams ff76905aeb [dart2js] Don't try to generate stubs for generator bodies
Change-Id: I8e176d1ccb97d0c12d87427529f41e7db39d8723
Reviewed-on: https://dart-review.googlesource.com/55989
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-05-19 06:52:30 +00:00
Peter von der Ahé 4610daa1c1 Convert ThisAccessor to ThisAccessGenerator
Change-Id: I097c330712c789a65a1ce9c6a57ef0c81a3a32ed
Reviewed-on: https://dart-review.googlesource.com/55893
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-05-19 06:29:19 +00:00
Peter von der Ahé cb9bf910f9 Test that fasta_codes_generated.dart is up to date
Change-Id: If9fbbdaf495b32da7a5a288e2fe63bee6f29ee1e
Reviewed-on: https://dart-review.googlesource.com/55888
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-05-19 06:09:49 +00:00
Peter von der Ahé eec11ebe4a Convert ErrorAccessor to ErroneousExpressionGenerator
Change-Id: Ie62314781b264a56a77e466f334f6c9d8cec2cba
Reviewed-on: https://dart-review.googlesource.com/55887
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-05-19 06:09:49 +00:00
Kevin Moore a155d6c9e5 Update dependencies on async, collection, http_throttle packages
Helps with https://github.com/dart-lang/pub/issues/1899
...but there are still more issues with upload

Change-Id: I79fba90722631eb4a4685037478d25611a1d74c2
Reviewed-on: https://dart-review.googlesource.com/55988
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2018-05-19 01:46:09 +00:00
asiva ce1dc86620 Adjust status file.
Change-Id: Iad9b4c3aaeabf22767a1e99d7d2e1033268570ee
Reviewed-on: https://dart-review.googlesource.com/55987
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-05-19 01:11:40 +00:00
Jenny Messerly 21fbf7d767 fix #33103, switch dartdevk to use Kernel nSM stubs
Change-Id: I383b36809b1e8b43f9f7a36ca84d8db5da7cef67
Reviewed-on: https://dart-review.googlesource.com/55266
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-05-18 23:43:58 +00:00
asiva 5632b1cb47 Adjust status file for precompiled target (see issue 33168)
Change-Id: Ice333a0f1ed11dfebb1f113f53a9f80d64207ff8
Reviewed-on: https://dart-review.googlesource.com/55986
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-05-18 23:02:08 +00:00
asiva 41468e7c03 [VM] bypass some app_jit tests which have issues with mismatched VM options between the snapshot version and the invoked dart process.
Change-Id: I3f22f75a47255ebb99b8f884044fc186b83ebcfc
Reviewed-on: https://dart-review.googlesource.com/55985
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-05-18 22:31:16 +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
Johnni Winther b911f78ee2 Use AbstractValue/AbstractValueDomain in function_set.dart
Change-Id: I8c2e80d7d6722254eec2c8753c2f37a495a9026a
Reviewed-on: https://dart-review.googlesource.com/55899
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-05-18 22:12:48 +00:00
Konstantin Shcheglov c9ea44bd8f Use the static type from the identifier element is local completions.
We always have fully reoslved unit, so usually actual types are available.

For the case when the type annotation cannot be resolved, keep the
old code that returns unresolved type string in this case. Probably
can be simplified more, e.g. remember declared types on the side instead
of passing them around just in case. Later.

R=brianwilkerson@google.com

Change-Id: Ida0b6caa90fc1408e5e7d12b762b19651cb201f6
Reviewed-on: https://dart-review.googlesource.com/55980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-05-18 22:06:08 +00:00
Dan Rubel 715ba58048 Remove reference to token.previous
Change-Id: Ia25035e592637376e5c8a895516b9e6dc53f5d62
Reviewed-on: https://dart-review.googlesource.com/55941
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-05-18 21:47:28 +00:00
pq 4edb23cfc1 Bump to linter 0.1.51.
* `unrelated_type_equality_checks` now allows comparison between `Int64` or `Int32` and `int`
* `unnecessary_parenthesis` improved to handle cascades _in_ cascades

Change-Id: I588893132e04a706e9fc93a7a16a07005465eb1f
Reviewed-on: https://dart-review.googlesource.com/55914
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-05-18 21:03:16 +00:00
Nate Bosch 2ff2af7921 Allow running pub with --preview-dart-2
- Make a snapshot in Dart 2 mode
- Check for the VM argument `--preview-dart-2` and run the correct
  snapshot

Towards fixing https://github.com/dart-lang/sdk/issues/32188

Change-Id: I56d5e7f268ff40b80783fae571981705536280f2
Reviewed-on: https://dart-review.googlesource.com/54743
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2018-05-18 20:27:29 +00:00