Commit Graph

13561 Commits

Author SHA1 Message Date
Samir Jindel b74af78ddd [kernel] Avoid unnecessary argument type-checks on static methods in strong mode.
Change-Id: I224c292cf843b6903d695048d023c7365ba9cf53
Reviewed-on: https://dart-review.googlesource.com/33360
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-01-11 12:44:18 +00:00
Aske Simon Christensen 4553cdeeb6 Support data URIs in StandardFileSystem.
Closes https://github.com/dart-lang/sdk/issues/31594

Change-Id: I8dad1429d91cc5934b37cb0be60d1e4039293b71
Reviewed-on: https://dart-review.googlesource.com/33461
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-01-11 11:23:36 +00:00
Erik Corry 95d9ca4776 Revert "Add a new boolean field "load_vmservice_library" to Dart_IsolateFlags."
This reverts commit d858aea231.

Reason for revert: This causes assertion failures on the Windows debug build.

Original change's description:
> Add a new boolean field "load_vmservice_library" to Dart_IsolateFlags.
> 
> If this field is set, then the vmservice library will be loaded into the
> isolate by the kernel loader.
> 
> Change-Id: I194bc186ce5b67f1009c7d7ca996a8b687d5f912
> Reviewed-on: https://dart-review.googlesource.com/32500
> Commit-Queue: Siva Chandra <sivachandra@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=sivachandra@google.com,asiva@google.com

Change-Id: I6ea8b543940d6e08d02a81e67f67248e9164b1e9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/33861
Reviewed-by: Erik Corry <erikcorry@google.com>
Commit-Queue: Erik Corry <erikcorry@google.com>
2018-01-11 09:33:38 +00:00
Siva Chandra d858aea231 Add a new boolean field "load_vmservice_library" to Dart_IsolateFlags.
If this field is set, then the vmservice library will be loaded into the
isolate by the kernel loader.

Change-Id: I194bc186ce5b67f1009c7d7ca996a8b687d5f912
Reviewed-on: https://dart-review.googlesource.com/32500
Commit-Queue: Siva Chandra <sivachandra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-01-11 05:42:17 +00:00
Ryan Macnak a4f3b53fe8 Reapply "Partial static mode changes for vm-service and tests (part 3)."
Remove use of castTo, which is not yet available in the prebuilt SDK used to build Observatory.

Bug: https://github.com/dart-lang/sdk/issues/31587
Change-Id: Ia118710a2c4dca1851935d284e1a78a9c6517256
Reviewed-on: https://dart-review.googlesource.com/34022
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-01-11 01:31:17 +00:00
Martin Kustermann caaddd7161 Revert "[VM] Allow the inlining code to inline implicit getters even if a StaticCallInstr is used"
This reverts commit 195bd1b36c.

Reason for revert: Crashes in release-precomp.

Change-Id: Iee7206fee27c2434a4e5355ca6101e9595ad102d
Reviewed-on: https://dart-review.googlesource.com/34060
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-01-10 23:19:46 +00:00
Martin Kustermann 7050b79755 [VM] Use ZoneHandle instead of normal Handle when used by IR instructions
Change-Id: Ib41fa91dff0de54f96c39d98320e722c3bad0441
Reviewed-on: https://dart-review.googlesource.com/34040
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-01-10 23:08:13 +00:00
Martin Kustermann 195bd1b36c [VM] Allow the inlining code to inline implicit getters even if a StaticCallInstr is used
We have devirtualization logic which turns [InstanceCallInst]s to
[StaticCallInstr]s (which are subject to different optimizations).

This makes the inlining decisions done in dart-aot-v2 a little
bit closer to dart-aot.

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

Change-Id: If7961ad8f05ac2544f04044d05541a86a8074984
Reviewed-on: https://dart-review.googlesource.com/34000
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-01-10 22:11:49 +00:00
Ryan Macnak 7855487b80 [fuchsia] Don't attempt to free an empty region.
Bug: https://github.com/dart-lang/sdk/issues/31841
Change-Id: I4344372316db09a891764423077e651259a49362
Reviewed-on: https://dart-review.googlesource.com/34020
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-01-10 21:30:48 +00:00
Martin Kustermann 7ab210e308 [VM] Allow EqualityCompare/RelationalOp/BinaryInt64OpInstr to take constants as inputs
Issue https://github.com/dart-lang/sdk/issues/31798

Change-Id: I3a64fc9e6a038ae28e3a98149b0494ebe254fd73
Reviewed-on: https://dart-review.googlesource.com/33780
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-01-10 19:29:28 +00:00
Alexander Thomas 2da64efb81 [infra] Update status files for new VM Kernel opt counter builder
Bug: https://github.com/dart-lang/sdk/issues/31838
Change-Id: I703319aebc135a7b219dc576c50f26f5feaabedf
Reviewed-on: https://dart-review.googlesource.com/33881
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2018-01-10 18:49:19 +00:00
Zachary Anderson 05684f6f54 [Fuchsia] Update test status file
related #31841

Change-Id: I462a5af9e4dccea119353fb1370558b72c624f7d
Reviewed-on: https://dart-review.googlesource.com/33920
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-01-10 17:15:38 +00:00
Martin Kustermann 0ea33d4283 Revert "[kernel] Support for the partial type application operator in the VM."
This reverts commit 4f265395e0.

Reason for revert: A lot of failing precompilation builders.

Original change's description:
> [kernel] Support for the partial type application operator in the VM.
> 
> Change-Id: Ieaf5d936676a6e755dab69d70105dcce0bcbfdb6
> Reviewed-on: https://dart-review.googlesource.com/32540
> Commit-Queue: Samir Jindel <sjindel@google.com>
> Reviewed-by: Régis Crelier <regis@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

TBR=kustermann@google.com,sjindel@google.com,regis@google.com

Change-Id: Iac6a9fe7fb7467cab3818da99043d310d1981c67
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/33940
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-01-10 17:05:39 +00:00
Martin Kustermann c06dd2e6a0 [VM] Implement UnboxInt64Instr::Canonicalize()
This allows us to convert UnboxInt64Instr's to UnboxedConstantIntrs if
the input is a constant.

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

Change-Id: Ieefd28503059302817baa6f1a463a6e6a9a61398
Reviewed-on: https://dart-review.googlesource.com/33462
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-01-10 16:26:58 +00:00
Samir Jindel 4f265395e0 [kernel] Support for the partial type application operator in the VM.
Change-Id: Ieaf5d936676a6e755dab69d70105dcce0bcbfdb6
Reviewed-on: https://dart-review.googlesource.com/32540
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-01-10 13:57:28 +00:00
Jens Johansen 37c28f8661 Revert "Reapply "Partial static mode changes for vm-service and tests (part 3).""
This reverts commit c9f6e8695d.

Reason for revert: Change brakes Observatory:

```
$ out/ReleaseX64/dart --observe hello.dart
Observatory listening on http://127.0.0.1:8181/
Hello, world!
vm-service: isolate(348927110)  'hello.dart:main()' has no debugger attached and is paused at exit.  Connect to Observatory at http://127.0.0.1:8181/ to debug.
```

Going to the website I get
```
Unexpected exception:

NoSuchMethodError: method not found: 'castTo'
Receiver: ""
Arguments: [Instance of 'it']

StackTrace:

main.dart.js 2017:3     Object.f
main.dart.js 2203:30    Object.qn
main.dart.js 21316:11   b3.aQ
main.dart.js 20634:6    b3.c2
main.dart.js 20643:8    TZ.$1
main.dart.js 36992:29   UB.$0
main.dart.js 36982:9    Ux.nq
main.dart.js 36990:30   UC.$1
main.dart.js 36992:29   UB.$0
main.dart.js 36982:9    Ux.nq
===== asynchronous gap ===========================
main.dart.js 4840:12    Zh.e4
main.dart.js 3930:17    L.lK
main.dart.js 3932:28    L.ad
main.dart.js 20621:12   b3.dart.ba.lE
main.dart.js 20621:112  b3.dart.ba.lE
main.dart.js 20603:22   b3.cD
===== asynchronous gap ===========================
main.dart.js 4840:12    Zh.e4
main.dart.js 3930:17    L.lK
main.dart.js 3932:28    L.ad
main.dart.js 20621:12   ms.dart.ba.lE
main.dart.js 20621:112  ms.dart.ba.lE
main.dart.js 15829:10   Y4.bs
```

and Observatory is completely broken.

From https://github.com/dart-lang/sdk/issues/31397 it seems that Observatory uses an "old" sdk, i.e. we cannot use new stuff as castTo.

Original change's description:
> Reapply "Partial static mode changes for vm-service and tests (part 3)."
>
> Fix dynamic mode static warnings.
>
> Bug: https://github.com/dart-lang/sdk/issues/31587
> Change-Id: I966349f5409f911efacd11f08ffd469373bcd434
> Reviewed-on: https://dart-review.googlesource.com/33540
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

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

Change-Id: I775544cb5ab212cc836bc63181bdce31d19380b8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/31587
Reviewed-on: https://dart-review.googlesource.com/33800
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-01-10 12:21:53 +00:00
Jens Johansen c04d873078 Mark new service test as RuntimeError in strong mode
Bug:
Change-Id: I4161c937375231a501901f5dcae15b3d7ee84992
Reviewed-on: https://dart-review.googlesource.com/33722
Reviewed-by: Jens Johansen <jensj@google.com>
2018-01-10 11:29:02 +00:00
Samir Jindel 28a0706e91 [kernel] Implement correct semantics of forwarding stubs in VM
This revision has been factored out of Revision 29300.

Change-Id: Idf579f0e5ffeea5764e2a9654c6812d69f6977c7
Reviewed-on: https://dart-review.googlesource.com/31921
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-01-10 07:39:31 +00:00
Jens Johansen b38f5930a4 [gardening] Update status file for app_jit service test
Bug:
Change-Id: I8b10adaf83643bc187b03521278d993aef11a9df
Reviewed-on: https://dart-review.googlesource.com/33720
Reviewed-by: Jens Johansen <jensj@google.com>
2018-01-10 07:37:49 +00:00
Jens Johansen 11358378be [kernel] Change offset for IndexAccessor invocations
Add Observatory test to check debug positions for e.g. a[0]().
Non-kernel pipeline points to '(', whereas the (old) kernel behaviour
was to point to 'a'. This fixes the kernel behaviour to also point to '('.

Bug:
Change-Id: I9cd0a2f0cdd4428cd491d02ccc63c72caf285292
Reviewed-on: https://dart-review.googlesource.com/31982
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-01-10 07:07:39 +00:00
Ryan Macnak e14b3a86f0 Report errno on mprotect failure.
Bug: b/70275153
Change-Id: I81b868b25428b39835935846ba2c9f9f67b3e84d
Reviewed-on: https://dart-review.googlesource.com/33665
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-01-10 01:37:49 +00:00
Ryan Macnak 340995ec5d Remove unused Dart_SaveJITFeedback.
Change-Id: I6b4ce6b8f18ff2788b22873044572b2a81b7b7ef
Reviewed-on: https://dart-review.googlesource.com/30624
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-01-10 01:29:39 +00:00
Ryan Macnak c9f6e8695d Reapply "Partial static mode changes for vm-service and tests (part 3)."
Fix dynamic mode static warnings.

Bug: https://github.com/dart-lang/sdk/issues/31587
Change-Id: I966349f5409f911efacd11f08ffd469373bcd434
Reviewed-on: https://dart-review.googlesource.com/33540
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-01-10 01:28:39 +00:00
Alexander Thomas 89bd41d19a [infra] Simplify vm-kernel configurations in test matrix
This also adds the missing vm-kernel opt-counter builder.

Bug: https://github.com/dart-lang/sdk/issues/31753
Change-Id: I0199218f83d227cfc52505c213d7b689acd9c43e
Reviewed-on: https://dart-review.googlesource.com/31984
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-01-09 20:59:49 +00:00
Ryan Macnak 2d22b6ee6b Report errno on munmap failure.
Bug: b/70275153
Change-Id: I78724a72adb25dff38168436a5c1b34a1acff0c2
Reviewed-on: https://dart-review.googlesource.com/33220
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-01-09 20:03:49 +00:00
Samir Jindel b264dc6fc3 Fix implementation of StoreIndexedUnsafe instruction on ARM64.
Change-Id: I95780486bd092f297407fd96cc89f82eba6f2b84
Reviewed-on: https://dart-review.googlesource.com/33420
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2018-01-09 14:22:18 +00:00
Ryan Macnak e8d9d945f3 Revert "Partial static mode changes for vm-service and tests (part 3)."
This reverts commit 6ccd7b8ac2.

Reason for revert: analyzer failures

Original change's description:
> Partial static mode changes for vm-service and tests (part 3).
> 
> Bug: https://github.com/dart-lang/sdk/issues/31587
> Change-Id: I812fd4cd8e74875ce7ada9886035137af2fef73a
> Reviewed-on: https://dart-review.googlesource.com/33100
> Reviewed-by: Siva Annamalai <asiva@google.com>

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

Change-Id: Ic368fc23f58e02cafbaf6ae81dbcbffc3dcced13
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/31587
Reviewed-on: https://dart-review.googlesource.com/33240
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-01-09 02:37:56 +00:00
Ryan Macnak 6ccd7b8ac2 Partial static mode changes for vm-service and tests (part 3).
Bug: https://github.com/dart-lang/sdk/issues/31587
Change-Id: I812fd4cd8e74875ce7ada9886035137af2fef73a
Reviewed-on: https://dart-review.googlesource.com/33100
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-01-09 01:40:10 +00:00
Martin Kustermann 0fb2d0bfed Finish the kernel2kernel "constants" transformation by fixing a whole bunch of issues
Change-Id: I24e2ff06db1a7555f5091d0c27060ed79d6787ee
Reviewed-on: https://dart-review.googlesource.com/31980
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-01-08 19:56:24 +00:00
Zachary Anderson f4758727dc [infra] Add a GN flag to omit git information
After Clang 6.0, changing the value of a single string can change the
order of symbols in the .rodata section. This confuses Golem's
checks for the equivalence of two binaries.

This change adds a GN flag to omit the git hash and commit time from
the Dart VM's version string to avoid re-running Golem benchmarks on
commits where the only VM change is in the version string.

To use it, pass --gn-args="dart_version_git_info=false" to gn.py

Change-Id: I8134714d50e3c9b6dae750a515dc3c2228d76b53
Reviewed-on: https://dart-review.googlesource.com/33000
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-01-08 18:29:44 +00:00
Martin Kustermann 63231b8849 [Gardening] Mark service/get_cpu_profile_timeline_rpc_test flaky on simdbc64
Issue https://github.com/dart-lang/sdk/issues/31794

Change-Id: I8345ff0368451bb96a82f78d4f37b4d0b68870cb
Reviewed-on: https://dart-review.googlesource.com/32769
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-01-08 13:45:22 +00:00
Jens Johansen c48ddcb025 [kernel] Return null string as source if no source available
Fixes #31793.

Bug:
Change-Id: If3ecf67387087db6a36f736c0f259b49eb133391
Reviewed-on: https://dart-review.googlesource.com/32767
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-01-08 13:19:02 +00:00
Martin Kustermann 5b56dfb77a [VM] Make Object::RawCast() allow "null" objects - similar to Object::^=
Change-Id: I9a05f0c6d36ed3a59d2742c0c84398dd6acba31a
Reviewed-on: https://dart-review.googlesource.com/32280
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-01-05 11:58:13 +00:00
Siva Annamalai ff32e86938 Adjust status files for passing tests.
Bug:
Change-Id: I7bd76bc94a2275d90b852457ad6073559d42478f
Reviewed-on: https://dart-review.googlesource.com/32521
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-01-05 06:58:30 +00:00
Siva Annamalai 4ba69c4df5 Fixes for some strong mode issues in the isolate tests. Not able to turn
these tests on by default yet because of an issue in the stacktrace
package (see issue 31764)

Change-Id: Ifeb5dc4fc85e7d83b3011948133ce6d2a1998248
Reviewed-on: https://dart-review.googlesource.com/29480
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-01-05 06:19:33 +00:00
Alexander Markov c051a0b905 [VM, Tests] Turn Dart 2.0 fixed-size integers ON by default, v2
Dart 2.0 fixed-size integers are enabled in Dart VM in all modes.
Status of legacy tests is updated.

This CL includes ff9fc413a7 with fixes.

Change-Id: I632d8177e9d07cd82ecea75ab6c325681b3a25c9
Reviewed-on: https://dart-review.googlesource.com/32443
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-01-05 01:44:56 +00:00
Alexander Markov 618bff43ea [VM] Clean up bigints from assembler_dbc_test
In preparation for Dart 2.0 fixed-size integers, simdbc/simdbc64 C++
unit tests are cleaned up to avoid bigints.

Change-Id: I0c63d4cbd9d1903c92b3cb52dee0b38ed9085df4
Reviewed-on: https://dart-review.googlesource.com/32449
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-01-04 22:53:16 +00:00
Alexander Markov 90551f6aa5 Revert "[VM, Tests] Turn Dart 2.0 fixed-size integers ON by default"
This reverts commit ff9fc413a7.

Reason: buildbot failures.
Change-Id: I68ffde271c8ba3b212e3bf015e2e550c8c891441
Reviewed-on: https://dart-review.googlesource.com/32442
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-01-04 19:04:44 +00:00
Alexander Markov ff9fc413a7 [VM, Tests] Turn Dart 2.0 fixed-size integers ON by default
Dart 2.0 fixed-size integers are enabled in Dart VM in all modes.
Status of legacy tests is updated.

Change-Id: I967a413c0b81eb92cf6be78ad3ee324798288bd2
Reviewed-on: https://dart-review.googlesource.com/31406
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-01-04 18:02:57 +00:00
Dmitry Stefantsov 86a1735f75 Update status files to reflect dartbug.com/31765
Bug:
Change-Id: Ic3246d620de637c6e47b61cb5e6a0f5d7abe72fe
Reviewed-on: https://dart-review.googlesource.com/32281
Reviewed-by: Jens Johansen <jensj@google.com>
2018-01-04 12:40:07 +00:00
Kevin Millikin 6fa813d818 Change handling of Kernel static errors
Before: Kernel static errors were represented by throwing a distinguished
error or else by calling a distinguished library const constructor.

Now: Kernel static errors are represented by InvalidExpression.  To support
error reporting, InvalidExpression has an optional message and a file
offset.  A back end can choose to signal these errors at any time; for
example, when deserializing the binary, or when compiling the procedure
containing the static error, or when the erroneous expression is evaluated
at run time.

InvalidStatement is removed because it can be encoded as ExpressionStatement
of InvalidExpression.

Future work:

* supporting static errors where an expression cannot appear in the AST
* allowing InvalidExpression to contain an Expression for error recovery
* adding a top-level list of static errors and warnings to the binary

Bug: https://github.com/dart-lang/sdk/issues/29840
Change-Id: Ifdfe9a76cee6cefed28061bf245be70531d2f413
Reviewed-on: https://dart-review.googlesource.com/31320
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-01-04 11:00:25 +00:00
Martin Kustermann 0e6bfc66fd [VM] Use ^= (which allows "null") instead of RawCast
Change-Id: Ib22e6c38bb50128c6af83e044b42658aedbbe87d
Reviewed-on: https://dart-review.googlesource.com/31985
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-01-03 17:43:05 +00:00
Martin Kustermann c309dde6a9 [VM] Enable strengthening of AssertAssignableInstr's in strong mode
Currently we only enable the strengthening of AssertAssignableInstr's
when having asserts enabled (which happens in checked mode).  But in
strong mode we use these instructions as well, so we need to enable the
optimization as well.

Change-Id: If889d0e14b590e77377c9828e80a00e4852fed42
Reviewed-on: https://dart-review.googlesource.com/31944
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-01-03 16:55:35 +00:00
Régis Crelier 2e3a4f8723 [VM] Ignore flag --error-on-bad-override in strong mode (fixes #31646).
Change-Id: Idabd0108a69b37a9181c6bb260a25b3ebae2ba63
Reviewed-on: https://dart-review.googlesource.com/32003
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2018-01-03 15:40:36 +00:00
Martin Kustermann 2158398434 [VM] Implement missing AssertSubtypeInstr::Canonicalize()
Change-Id: I3372d179b201fd55a88ec296f00ecb3dabaff11e
Reviewed-on: https://dart-review.googlesource.com/32040
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-01-03 14:00:29 +00:00
Vyacheslav Egorov 226c715542 [vm] Optimize ARM simulator by forcing inlining of hot functions.
Also move InstructionDecode hot path into InstructionDecodeImpl.

This patch improves time to run SIMARM tests by 25-35% and improves
time spent in simulator when running gen_snapshot on Flutter by a
similar amount.

Functions to force inline were selected by looking at the VTune
profile of gen_snapshot generating script snapshot of the Flutter
Gallery on Windows.

Bug: https://github.com/dart-lang/sdk/issues/31684
Change-Id: Ifbfeaae252dfafb3b86b4f1eb7ca40f42bc3a252
Reviewed-on: https://dart-review.googlesource.com/31920
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-01-02 13:29:03 +00:00
Alexander Markov feff7f702a [VM/test] Update VM unit test for relaxed int64 hex literals
With fixed-size integers, Dart_NewIntegerFromHexCString() accepts
hexadecimal literals up to 0xFFFFFFFFFFFFFFFF, so the unit test is
updated accordingly.

Change-Id: I8e22163684fe3a84a6fa0d5173d886e6f65be108
Reviewed-on: https://dart-review.googlesource.com/31403
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2017-12-22 23:30:44 +00:00
Siva Chandra 914720524a [gen_snapshot] Do not add any dependency file in the kernel flow.
Adding a dependency file triggers resolving its file path using the
service isolate. However, in the kernel flow, gen_snapshot does not
initialize the service isolate. This does not seem to cause any problems
on Mac and Linux, but flutter crashes on Windows. On Linux and Mac,
the behaviour with this change matches the current behavior.

The correct dependency file to add to the dependencies file in the kernel
flow is the app dill file passed as input to gen_snapshot. But, this would
call for specifyint the application sources as the dependency for the app
dill file itself somewhere. We can revisit this and fix it up correctly if
needed. For now, this change unblocks the Windows builds.

Change-Id: Ic22a7ccc96548e005b85308c3baaeedb860f4dae
Reviewed-on: https://dart-review.googlesource.com/31280
Commit-Queue: Siva Chandra <sivachandra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-12-22 21:07:44 +00:00
Régis Crelier eb7454cb20 [VM runtime] Where possible, use constant cid instead of object store lookup to
recognize types.
Reorder checks for faster recognition of Future and FutureOr classes.

Change-Id: Id9e1c3a2e6c1fe274ac1d993f7a28271f207f48d
Reviewed-on: https://dart-review.googlesource.com/31282
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2017-12-22 20:34:45 +00:00
Régis Crelier b7b1054fda [VM runtime] Add comments and refactor code handling void as result type in
function subtype test.
No behavior change, only make code easier to read in strong vs non-strong modes.

Change-Id: I44b34ff5c9680270014db83633eb2ef1ed60491e
Reviewed-on: https://dart-review.googlesource.com/31284
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2017-12-22 17:11:14 +00:00