Commit Graph

15405 Commits

Author SHA1 Message Date
Ben Konyi 435a52eafa [ VM / Service ] Fixed inconsistencies in service protocol spec.
Change-Id: Ifdb3f37883db215f6a7edcde14b08cba653b8f08
Reviewed-on: https://dart-review.googlesource.com/c/93860
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-02-20 23:15:47 +00:00
Zichang Guo 5ddd157809 fix uris for libraries to allow the breakpoint to lookup scripts.
Change-Id: I1a46bb3153db00dfdabaf4537b7d62f0cb3e35ba
Reviewed-on: https://dart-review.googlesource.com/c/93373
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-02-20 20:27:55 +00:00
Ryan Macnak 3068192450 [vm] Remove deferred canonicalization from isolate message serialization.
This fixes sending more commonly used types at the expense of less common recursive types.

Bug: https://github.com/dart-lang/sdk/issues/35778
Change-Id: I55f1105d1a8a48b6c4c241c2ce4d2f36863d7b5a
Reviewed-on: https://dart-review.googlesource.com/c/93372
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-02-20 20:11:05 +00:00
Samir Jindel 8db489cb10 [vm/aot] Remove unnecessary closurization of some entry-points.
Change-Id: Ie84529ef3d41d55c29c9a4bf2c84a69e3dbcaa0f
Reviewed-on: https://dart-review.googlesource.com/c/93429
Auto-Submit: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2019-02-20 10:44:21 +00:00
Chinmay Garde b83bcf59f2 Call dart::StubCode::Cleanup in AOT mode as well.
The absense of this call would result in a crash on the second Dart_Initialize
in AOT mode.

Change-Id: I79fc8be72f8eb7f5c2e652d7ebe1251625e421d4
Reviewed-on: https://dart-review.googlesource.com/c/93374
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-02-20 00:43:31 +00:00
Martin Kustermann d3fde891bf [VM] Fix deadlock between mutator and BG compiler
Here's how the deadlock can happen:

  * The vm-service background compiler asks all threads to go to a
    safepoint before it finalizes the code. Then it finalizes the
    code and notifies code observers. A code observer posts a
    message to the vm-service. Posting this message requires holding the
    monitor of the receiving isolate's message handler (see
    MessageHandler::PostMessage).

  * The vm-service mutator holds it's message handlers monitor and
    enters the isolate (see MessageHandler::HandleMessages). The
    StartIsolateScope schedules the mutator thread, which will in return
    see that BG compiler wants to safepoint, so it waits for BG compiler
    to finish.

At this point the mutator holds the MessageHandler's monitor and waits
for BG compiler to finish safepoint. The BG compiler tries to post a
message to the message handler (and the monitor is locked).

-> This CL ensures the BG compiler only arranges a safepoint before it
   starts creating the instructions object. It fills it in and exits the
   safepoint again.  Only then do we notify code observers.

Furthermore this CL ensures we transition out of VM to native state
before calling the Dart_PostCMessage() function.

Change-Id: I5320440d54ca303a1ccc7556600a42d37cd6e1de
Reviewed-on: https://dart-review.googlesource.com/c/93421
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-02-19 14:00:04 +00:00
Daco Harkes a85ae4e919 [vm/ffi] fix sizeOf on subtypes of Pointer
Change-Id: I9f1f0c6fc618039e0c50d0a70460e1d66d568bca
Reviewed-on: https://dart-review.googlesource.com/c/93502
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2019-02-19 12:57:04 +00:00
Daco Harkes 620743fb6b [vm/ffi] void functions
Change-Id: I1544e0985d934dfa354143764dee61feb08b2592
Reviewed-on: https://dart-review.googlesource.com/c/93422
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2019-02-18 13:15:21 +00:00
Liam Appelbe ec599a5977 [VM] Remove retry logic from close(fd) calls
This covers Linux, Mac, Android, and Fuchsia.

Bug: https://github.com/dart-lang/sdk/issues/35954
Fixes: https://github.com/dart-lang/sdk/issues/35954
Change-Id: I8142332c530be8ad3ce46312a4a5ac750953c288
Reviewed-on: https://dart-review.googlesource.com/c/93320
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-02-15 23:28:17 +00:00
asiva 763589472e [VM / vmservice] - Change setting of silentObservatory to a non const expression
Change-Id: I89d72c05fd897fcf1396585132d4056c4e91195d
Reviewed-on: https://dart-review.googlesource.com/c/93361
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2019-02-15 02:46:41 +00:00
Dan Field eb73f132c1 [vm] Add macro for fallthrough annotations
Internal builds in Google are catching this as an error.

I'm guarding it because I assume we might support building using other
compilers.

Change-Id: I665099cace9c6a40d737c471dd1b0fdb326fea39
Reviewed-on: https://dart-review.googlesource.com/c/91162
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-02-15 01:12:01 +00:00
Régis Crelier b66dc30334 [VM/interpreter] Skip tests enabling interpreter when not supported (fixes #35943).
Emit FATAL in interpreter constructor when on sim* architecture.

Change-Id: Ifd429638423e1e83d0f3520896409929018e14f1
Reviewed-on: https://dart-review.googlesource.com/c/93343
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-02-15 00:51:52 +00:00
Ryan Macnak 794e1e3a09 [gen_snapshot] Allow for multiple kernel inputs.
Change-Id: I82daacade90c9fe56ca78027740839cf09189c3a
Reviewed-on: https://dart-review.googlesource.com/c/93302
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-02-15 00:12:51 +00:00
Alexander Aprelev 79b4b558ec [vm/tlab] Abandon tlab when thread gets descheduled. Allow all threads to allocate from tlab. Add tlab test.
Change-Id: I7b48ad26c74c9a7017cf0427d4be78674e5ffa49
Reviewed-on: https://dart-review.googlesource.com/c/92880
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-02-14 21:45:00 +00:00
Samir Jindel 3b2144fa93 [vm] Respect entry-point annotation on constructors during obfuscation.
Change-Id: Ia61d582fb6dd647b8fcab051b57ff08682076d9d
Cq-Include-Trybots: luci.dart.try:vm-kernel-optcounter-threshold-linux-release-x64-try, vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-mac-release-simarm64-try, vm-kernel-precomp-win-release-x64-try, vm-kernel-precomp-obfuscate-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/93225
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-02-14 20:18:19 +00:00
Liam Appelbe 223eaa6fbb Report noSuchMethod forwarders as synthetic in the mirror api
Fixes http://dartbug.com/34982

Bug: http://dartbug.com/34982
Change-Id: I0302586c5f0e58dd66e238bd32088ebe1c150c0e
Reviewed-on: https://dart-review.googlesource.com/c/93124
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-02-14 18:42:19 +00:00
Samir Jindel ae7bf9e999 [vm] Support closurization of methods through @pragma entry-points.
Fixes dartbug.com/35720.

Also enable native extensions in AOT.
Increases Flutter Gallery snapshot size by 0.19%.

Change-Id: I1b24c3b9a49a13fd48452e9a89595516a7f01780
Cq-Include-Trybots: luci.dart.try:vm-kernel-optcounter-threshold-linux-release-x64-try, vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-mac-release-simarm64-try, vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/92283
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-02-14 17:47:28 +00:00
Samir Jindel a5d396cd25 [vm/extensions] Fix native extensions in hot-reload and running from snapshot.
This is a re-land of "[vm/extensions] Fix Loader::ReloadNativeExtensions(...)."

The native extension test was failing in hot-reload: this has been fixed.

Change-Id: Ic18da8cfbc6a3dba8aac09d654dce616487a67d7
Reviewed-on: https://dart-review.googlesource.com/c/92800
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Samir Jindel <sjindel@google.com>
2019-02-14 17:47:28 +00:00
Daco Harkes 3abc7d34d7 [vm/ffi] Remove platform specific logic from DynamicLibrary.open
Change-Id: Id69e17563c4d64f6ead5e143077a7364520f65a0
Reviewed-on: https://dart-review.googlesource.com/c/93173
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2019-02-14 16:08:28 +00:00
Aart Bik fa092aa77b [vm/compiler] actual string constant propagation
Rationale:
A bit more constant propagation for strings, this time
using actual values (rather than just testing identity).
Note that the worklist iteration broke down a bit for
this added case since push arguments do not have a
use-link to the call. Also note that the added cases
have some overlap with the inliner, but are able to
propagate values for different cases.

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

Change-Id: I380fca6ab90933e6342cd0572101cb94ed8c78ab
Reviewed-on: https://dart-review.googlesource.com/c/92861
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-02-13 21:42:38 +00:00
asiva 44eb626186 [VM} Fix script URLs for dart:* libraries
The script URLs for core libraries were being recorded as follows
- dart:core for org-dartlang-sdk:///sdk/lib/core/core.dart
- dart:core/runtime/libcore_patch.dart for org-dartlang-sdk:///runtime/lib/core_patch.dart
- dart:io/runtime/binfilter_patch.dart for org-dartlang-sdk:///runtime/bin/filter_patch.dart

Now we record them as
- dart:core/core.dart for org-dartlang-sdk:///sdk/lib/core/core.dart
- dart:core/runtime/lib/core_patch.dart for org-dartlang-sdk:///runtime/lib/core_patch.dart
- dart:io/runtime/bin/filter_patch.dart for org-dartlang-sdk:///runtime/bin/filter_patch.dart

Change-Id: I645939e7ba937034471044fb492a5ecdb9a50bf5
Reviewed-on: https://dart-review.googlesource.com/c/92922
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2019-02-13 21:27:47 +00:00
Ryan Macnak 0f24b9e7ae [standalone] Name dart:io threads, take 2.
Mac's pthread_setname_np assumes the current thread.

Bug: US-588
Change-Id: Ibbddd1f7bffeab10fd470a6176f68b1c0440aa99
Reviewed-on: https://dart-review.googlesource.com/c/93120
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-02-13 20:29:46 +00:00
Ryan Macnak 7329247892 [vm/tools] Add Graph Explorer to visualize output of --write_v8_snapshot_profile_to.
In particular, this tool can produce treemap visualizations of the dominator tree.

Change-Id: If582c80213b4bdec9ff8ee4d5d61a1e15bf342e5
Reviewed-on: https://dart-review.googlesource.com/c/92900
Reviewed-by: Aart Bik <ajcbik@google.com>
2019-02-13 19:30:37 +00:00
Ryan Macnak d566a674d0 Revert "[standalone] Name dart:io threads."
This reverts commit cc3218b771.

Reason for revert: Mac build

Original change's description:
> [standalone] Name dart:io threads.
> 
> Change-Id: I5f5248366b39afab96a8b70b4f107ec5134b84f4
> Reviewed-on: https://dart-review.googlesource.com/c/92960
> Reviewed-by: Zach Anderson <zra@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

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

Change-Id: I9071c955d4710f8146a661d15fa980f237b6eb81
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/93064
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-02-13 18:04:49 +00:00
Ryan Macnak cc3218b771 [standalone] Name dart:io threads.
Change-Id: I5f5248366b39afab96a8b70b4f107ec5134b84f4
Reviewed-on: https://dart-review.googlesource.com/c/92960
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-02-13 17:23:56 +00:00
Martin Kustermann 525b43d747 [vm] Decouple intrinsifier code from runtime
This is the next step towards preventing compiler from directly peeking
into runtime and instead interact with runtime through a well defined
surface.

This CL decouples the hand-written intrinsifier code from the runtime:

  * the intrinsifier is split up into a GraphIntrinsifier and AsmIntrinsifier
  * the recognized methods list is moved to a separate .h file
  * all intrinsifier code is moved into dart::compiler namespace
  * the AsmIntrinsifier is only interacting with RT through runtime_api.h

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

Change-Id: I0a73ad620e051dd49c9db7da3241212b3b74ccdd
Reviewed-on: https://dart-review.googlesource.com/c/92740
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
2019-02-13 17:22:56 +00:00
Samir Jindel 010a12330e [vm] Fix ThrowErrorSlowPath-derived instructions (e.g. CheckNull) in JIT mode.
Previously these instructions were not safe to use on JIT, because they
crated catch-entry moves which are not used in JIT.

Now we assign deopt-infos to these slow paths so they can handle exceptions
correctly in JIT.

I considered removing uses of CheckNull in JIT mode, but I did not find a simple
replacement for all the existing uses.

Fixes #35887.

Change-Id: I05dfb46200679934d0ff6114cae8723f4908af8e
Reviewed-on: https://dart-review.googlesource.com/c/92783
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
Auto-Submit: Samir Jindel <sjindel@google.com>
2019-02-13 16:39:55 +00:00
Daco Harkes d6a763ebd1 [vm / library] dart:ffi fix android build
Change-Id: I56f45b13f7c8d92e75f8c596290c2666276f65a1
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-android-release-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/93026
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
2019-02-13 14:55:58 +00:00
Daco Harkes 7d46d4b5cb [vm / library] Foreign function interface prototype
Prototype for `dart:ffi` on Linux/MacOS x64 in JIT mode.
`dart:ffi` is experimental and its API is likely to change in the future.
Progress and design decisions are tracked in https://github.com/dart-lang/sdk/projects/13


issue: https://github.com/dart-lang/sdk/issues/34452
Change-Id: Ifa4566388e42c8757f154741d11e303465ef305d
Cq-Include-Trybots: luci.dart.try:vm-kernel-optcounter-threshold-linux-release-x64-try, vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-mac-release-simarm64-try, vm-kernel-precomp-win-release-x64-try, vm-kernel-mac-debug-x64-try, vm-kernel-asan-linux-release-x64
Reviewed-on: https://dart-review.googlesource.com/c/80124
Reviewed-by: Samir Jindel <sjindel@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
2019-02-13 12:42:47 +00:00
Lasse R.H. Nielsen 671865cd1a Fix JSON parser.
JSON parser was not rewritten when integers became fixed-size, so
some large integers could overflow silently and give the wrong
result, as could some doubles where the pre-decimal point digits
overflowed an `int`. Also added overflow protection for exponent.

Change-Id: I02941272c36fba4b9226e324936aebd4a5c5aa3b
Reviewed-on: https://dart-review.googlesource.com/c/91521
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2019-02-13 11:06:35 +00:00
Aart Bik c8b28c4cf9 [vm/compiler] graph checker addition
Rationale:
Loop part was not checking anything (no ASSERT).
Also, made test more strict (block should be
in all enveloping loops).
Change-Id: Ib918afa9c130dc8aa26cd8e8104e735075ff1176
Reviewed-on: https://dart-review.googlesource.com/c/92863
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-02-13 00:38:13 +00:00
Ryan Macnak 78509055b6 [vm] Add names for more types to the V8 snapshot profile output.
Fix some types of base objects in the V8 snapshot profile output.

Rename ICData::ic_data_ to entries_ as it does not point to an ICData.

Change-Id: Ie80974e2eb741810a5f540dd40e5d60a519d8e4e
Reviewed-on: https://dart-review.googlesource.com/c/92665
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-02-12 17:54:58 +00:00
Martin Kustermann 660cf26dbb Reland "[vm] Decouple stub code from runtime"
This is the next step towards preventing compiler from directly peeking
into runtime and instead interact with runtime through a well defined
surface.

This CL decouples the hand-written stub codes from the runtime. The
target architecture dependent stubs are moved to
dart::compiler::StubCodeCompiler which use dart::compiler::target:*
for accessing any runtime related code.

The generation of type testing stubs is moved to separate files for the
time being.

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

Change-Id: Icd0995b18a7bac496b1e12231cf437943f5c94f1
Reviewed-on: https://dart-review.googlesource.com/c/92720
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Auto-Submit: Martin Kustermann <kustermann@google.com>
2019-02-12 13:52:28 +00:00
Chinmay Garde 0a7dcf17eb Attempt tracing to /sys/kernel/tracing/trace_marker on Linux.
Change-Id: I845e74a7b15da73b8e4d1d60dbe0b8a5df28b9c9
Reviewed-on: https://dart-review.googlesource.com/c/92628
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-02-12 01:59:15 +00:00
Ben Konyi 30f9143831 Revert "[vm] Decouple stub code from runtime." and "[VM/Decoupling] Follow-up change to decoupling of stub_code: Fix missing "!""
This reverts commits a8e2dfdb9b and 473c424fe2.

Change-Id: Id5f67541adcdcb4fa0900a34fa389149f556929f
Reviewed-on: https://dart-review.googlesource.com/c/92667
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-02-12 00:59:23 +00:00
Ryan Macnak ecd7a88606 [vm, gc] Don't enqueue pre-marked Instructions.
Change-Id: Ic9a3b5f83fc45e363162c0531d474a663d243c6c
Reviewed-on: https://dart-review.googlesource.com/c/92666
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-02-12 00:53:44 +00:00
Ryan Macnak 553e20863c [vm] Remove some dead code from the old front end.
Change-Id: I9c26cbc617b25dbd04e4dfd46a68307e88eec60e
Reviewed-on: https://dart-review.googlesource.com/c/92481
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-02-11 21:56:47 +00:00
Samir Jindel 754e5f404c Revert "[vm/extensions] Fix Loader::ReloadNativeExtensions(...)."
This reverts commit 4118d3c793.

Crashes on hot reload/rollback bots.

Original change's description:
> [vm/extensions] Fix Loader::ReloadNativeExtensions(...).
> 
> This method was not doing anything since the switch to Dart 2
> because extensions no longer were added as imports to the libraries
> which loaded them.
> 
> This is a commandeer of https://dart-review.googlesource.com/c/sdk/+/90240 with a bug fix.
> 
> Change-Id: Idfe2ec16ae714b5a31ed53332da6704248949915
> Reviewed-on: https://dart-review.googlesource.com/c/92180
> Commit-Queue: Samir Jindel <sjindel@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

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

Change-Id: If8c8d6cf8ee2cb0a354601f94c609d3d7b5ddf03
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/92640
Reviewed-by: Samir Jindel <sjindel@google.com>
2019-02-11 18:16:21 +00:00
Samir Jindel 4118d3c793 [vm/extensions] Fix Loader::ReloadNativeExtensions(...).
This method was not doing anything since the switch to Dart 2
because extensions no longer were added as imports to the libraries
which loaded them.

This is a commandeer of https://dart-review.googlesource.com/c/sdk/+/90240 with a bug fix.

Change-Id: Idfe2ec16ae714b5a31ed53332da6704248949915
Reviewed-on: https://dart-review.googlesource.com/c/92180
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-02-11 16:52:20 +00:00
Martin Kustermann 473c424fe2 [VM/Decoupling] Follow-up change to decoupling of stub_code: Fix missing "!"
Change-Id: I5eddd8c1484a70c85851e9a94a61fbbdbed731d5
Reviewed-on: https://dart-review.googlesource.com/c/92565
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Auto-Submit: Martin Kustermann <kustermann@google.com>
2019-02-11 13:41:44 +00:00
Martin Kustermann a8e2dfdb9b [vm] Decouple stub code from runtime.
This is the next step towards preventing compiler from directly peeking
into runtime and instead interact with runtime through a well defined
surface.

This CL decouples the hand-written stub codes from the runtime. The
target architecture dependent stubs are moved to
dart::compiler::StubCodeCompiler which use dart::compiler::target:*
for accessing any runtime related code.

The generation of type testing stubs is moved to separate files for the
time being.

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

Change-Id: I1b4f1cca0acb704b30b80eca7f634734772389b5
Reviewed-on: https://dart-review.googlesource.com/c/92138
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-02-11 11:24:00 +00:00
Aart Bik 32603d5626 [vm/compiler] improve equality constant folding
Rationale:
Static calls were formerly unexplored in our constant
folding. This is a first step towards making the
constant folder aware of semantics of recognized methods.

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

Change-Id: Id6e366f4d25f08a618931fc3c8a8c065f6358feb
Reviewed-on: https://dart-review.googlesource.com/c/92410
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-02-09 01:09:39 +00:00
Ryan Macnak 174d6fec3d [vm] Increase the size of the irregexp interpreter's backtracing stack.
The new size more closely matches the size available on the call stack to the compiled implementation of irregexp.

Bug: https://github.com/flutter/flutter/issues/27273
Change-Id: I131b4ddd5ab462a65c2033fb509ff9f7c2d3e1ea
Reviewed-on: https://dart-review.googlesource.com/c/92403
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2019-02-08 18:52:05 +00:00
Ryan Macnak 128139be71 [vm] Rename RawObject::Size to RawObject::HeapSize.
To avoid confusion between the heap size (includes header and rounding up) and number-of-elements size or payload size.

Change-Id: I714c4e8cec92d7ef963de39474d2a1bb23e5b4a3
Reviewed-on: https://dart-review.googlesource.com/c/92400
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
2019-02-08 18:48:46 +00:00
Aart Bik d136a35244 [dart/fuzzer] Add O3 as random command line switch
Also further refactors switch selection from naming.
The JIT stress execution modes don't really need
their own visible name (you cannot really control
which stress test to use anyway with --mode), so it's
cleaner to remove the idea of controlling switches
altogether.

Change-Id: I98aa71ce8653013fb45a4c482d7b4c5a02143a55
Reviewed-on: https://dart-review.googlesource.com/c/92386
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-02-08 18:04:05 +00:00
Alexander Markov eab295e521 [vm/bytecode] Split bytecode reading from kernel metadata
Change-Id: I8852379f6c01f3993cddb36f5211b637fd927ba1
Reviewed-on: https://dart-review.googlesource.com/c/92388
Commit-Queue: Régis Crelier <regis@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2019-02-08 17:41:25 +00:00
Ryan Macnak 3afac84840 [vm, aot] Remove KernelProgramInfo etc before Symbols::Compact.
Eliminates some symbols that were memory-reachable but not snapshot-reachable.

Compact the canonical type and type arguments tables along with the symbol table.


flutter_gallery, Android release
Total(CodeSize): 11158045 -> 11055480 (-0.92%)

Change-Id: I63bd1353906ea66c6f82a932cff57f7c25331200
Reviewed-on: https://dart-review.googlesource.com/c/92221
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-02-08 17:16:26 +00:00
Aart Bik b05b8777d4 [dart/fuzzer] Refactor switch setup, add VFP to ARM
Rationale:
The fuzz test constructors were getting a bit convoluted
with mode specific setup. This CL refactors the flag
and mode name setup into the factory method, making
all constructors small again.
Change-Id: I5fd34e089315c89e674c7b28a4f298143fbeaeea
Reviewed-on: https://dart-review.googlesource.com/c/92380
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-02-07 22:41:18 +00:00
Adam Barth 2710834272 [fuchsia] Update path to fuchsia.timezone
The path to this target has changed.

Change-Id: I35344e2aed75c7bce01acb85b8219fa660165338
Reviewed-on: https://dart-review.googlesource.com/c/92301
Auto-Submit: Adam Barth <abarth@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2019-02-07 22:01:08 +00:00
Aart Bik dbf4900c99 [vm/tools] Fix issues with snapshot size reporting
Rationale:
This fixes the following three issues to get byte-exact
snapshot size difference reporting, which makes optimizing
for code size a lot easier.

Issues:
(1) reports the slightly more accurate raw size
(2) accumulates dups in the json
    (before we only did bookkeeping for one)
(3) avoid non-deterministic parts in names
    (this resulted in reporting baffling method size
     differences against the same layout, even though
     the aggregate difference added up to 0).

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

Change-Id: Ia6abe50ab8694fe54906e28a3b3375ed99ace9df
Reviewed-on: https://dart-review.googlesource.com/c/92320
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-02-07 19:42:26 +00:00