Commit Graph

15405 Commits

Author SHA1 Message Date
Ben Konyi f701e11756 [ VM / Debugger ] Fix issue where a 'Step' command issued when there's no stack caused a crash.
For example, running this sample, pausing the isolate, and stepping
would crash, whereas we would expect to pause in the ServerSocket.listen
callback.

```
import 'dart:io';

main() {
  ServerSocket.bind('127.0.0.1', 22000).then((s) {
    s.listen((m) { // Should pause here on socket connection after step.
      print(m);
    });
  });
}
```

Fixes #35601.

Change-Id: I2155de1cface159f92734d3112b6e17c35ab7550
Reviewed-on: https://dart-review.googlesource.com/c/89780
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-01-16 17:28:02 +00:00
William Hesse a533753bec Remove --fast-startup flag support from testing scripts and status files
Change-Id: Icfb4aa228c0f13bf9fce25aeb7bacbf1e38497ee
Reviewed-on: https://dart-review.googlesource.com/c/89582
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-01-16 11:32:44 +00:00
Zach Anderson 56f87f409e [dart:io,fuchsia] Pass Isolate namespace to child process. Fix double free.
Before this change, the child process inherits the namespace of the
process. After this change the child process inherits the namespace of
the calling isolate.

Related: DX-710

Change-Id: Idbc72e30f5796f8034cedae776d4572ad0b0360f
Reviewed-on: https://dart-review.googlesource.com/c/89460
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2019-01-15 22:07:51 +00:00
Aart Bik 43a96d49af Revert "[vm/compiler] AOT inline heuristics improvements"
This reverts commit 2908e61f2a.

Reason for revert: regress_32322_test crashes

Original change's description:
> [vm/compiler] AOT inline heuristics improvements
> 
> Rationale:
> Yields substantial improvements on various benchmarks
> (1.8x on HMAC stand-alone, around 5x on TypedData settters and getters),
> with only moderate increase in code size (3.2% on Flutter gallery).
> 
> https://github.com/dart-lang/sdk/issues/34473
> https://github.com/dart-lang/sdk/issues/32167
> 
> Change-Id: I0909efd7afc72229524ff8edb7322ce025a14af4
> Reviewed-on: https://dart-review.googlesource.com/c/89162
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
> Reviewed-by: Alexander Markov <alexmarkov@google.com>
> Commit-Queue: Aart Bik <ajcbik@google.com>

TBR=vegorov@google.com,alexmarkov@google.com,ajcbik@google.com

Change-Id: I9c7dadb18935ad32f4d4cd72872838e8ac9cc288
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/89740
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-01-15 21:08:00 +00:00
Aart Bik 2908e61f2a [vm/compiler] AOT inline heuristics improvements
Rationale:
Yields substantial improvements on various benchmarks
(1.8x on HMAC stand-alone, around 5x on TypedData settters and getters),
with only moderate increase in code size (3.2% on Flutter gallery).

https://github.com/dart-lang/sdk/issues/34473
https://github.com/dart-lang/sdk/issues/32167

Change-Id: I0909efd7afc72229524ff8edb7322ce025a14af4
Reviewed-on: https://dart-review.googlesource.com/c/89162
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-01-15 19:03:00 +00:00
Stevie Strickland 23f427b1a7 Reland [VM/Compiler] Removing definition status from Store{Indexed,InstanceField}.
Also do the same for the unsafe version of StoreIndexed.

Similar to the inliner, we may replace calls in the specializers with
these non-definition instructions, so we make variants that allow an
unrelated value to be used for the old users of the call site value. (In
all cases, this ends up being null, since the original calls wouldn't
have returned a useable value anyway.)

Change-Id: I0befd54920c4c0e63e086b804860ee4c9a7d3767
Reviewed-on: https://dart-review.googlesource.com/c/89585
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Stevie Strickland <sstrickl@google.com>
2019-01-15 17:23:21 +00:00
Liam Appelbe df0671d664 [VM] Experimental flags in the dart CLI
Blocked on https://dart-review.googlesource.com/c/sdk/+/88840

Bug: https://github.com/dart-lang/sdk/issues/35602
Change-Id: I72b1cf574c9cb3d1dac2fbd8dfeb0f3fd80e330e
Reviewed-on: https://dart-review.googlesource.com/c/89042
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-01-15 01:02:07 +00:00
Alexander Aprelev 7e1aa67855 Restore TLABs.
This reverts https://github.com/dart-lang/sdk/commit/e9d358921dddbee84c39c951220d5a844b097bb5 and on top of original change it:
 - switches from FreeList used as a filler to ForwardingCorpse because it is not as strict as to be expected only in old space;
 - gets Verifier to accept ForwardingCorpse(as well as FreeList) in new space;
 - asserts that thread is at safepoint(or is busy with one of GC tasks);
 - has slow-path TryAllocateNewTLAB in scavenger.cc, rather than in .h;
 - uses "inline" space_lock Mutex instead of allocating one on the heap;
 - reverts back to less precise used space calculation to avoid requiring threads to be at a safepoint for calculation;
 - adds HeapIterationScope in two places(heap_test.cc and service.cc) to accommodate newly introduced ASSERTs.

Change-Id: I42df716cff6da9651ce7737fa66d7ec2a55905b0
Reviewed-on: https://dart-review.googlesource.com/c/89041
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2019-01-14 22:19:32 +00:00
Samir Jindel 4d77c7b3a6 [vm] Remove redundant type-checks from core libraries.
In conjunction with previous revisions, this improves several Flutter microbenchmarks by 2-4%.

Change-Id: Ic864fd586dc57d87b80cebd6ceace0a8165fa82b
Reviewed-on: https://dart-review.googlesource.com/c/88702
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-01-14 19:56:37 +00:00
Vyacheslav Egorov 02b1658f59 Revert "[VM/Compiler] Revoke definition status of certain instructions."
This reverts commit a8777149a7.

Reason for revert: benchmarking infrastructure reports broken benchmarks on ARM.

Original change's description:
> [VM/Compiler] Revoke definition status of certain instructions.
> 
> Change StoreIndexed, StoreIndexedUnsafe, and StoreInstanceField
> to be non-definition instructions. Fix up the flow graph builders
> so they no longer treat StoreIndexed and StoreIndexedUnsafe as
> pushing values on the stack that need to be dropped.
> 
> We recently changed FlowGraphInliner::TryInlineRecognizedMethod
> to create a distinction between the last instruction to be inlined
> and the definition that should be used as the new result. Perform
> the same separation of replacement code and result in the call
> specializers.
> 
> Change-Id: I66c7ab60a662dcca05092e47156d1d4ba809d51f
> Reviewed-on: https://dart-review.googlesource.com/c/88326
> Commit-Queue: Stevie Strickland <sstrickl@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

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

Change-Id: I9c666d80a69ba6a5c37b421aae1ed83502694f19
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/89366
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2019-01-14 18:50:29 +00:00
Stevie Strickland a8777149a7 [VM/Compiler] Revoke definition status of certain instructions.
Change StoreIndexed, StoreIndexedUnsafe, and StoreInstanceField
to be non-definition instructions. Fix up the flow graph builders
so they no longer treat StoreIndexed and StoreIndexedUnsafe as
pushing values on the stack that need to be dropped.

We recently changed FlowGraphInliner::TryInlineRecognizedMethod
to create a distinction between the last instruction to be inlined
and the definition that should be used as the new result. Perform
the same separation of replacement code and result in the call
specializers.

Change-Id: I66c7ab60a662dcca05092e47156d1d4ba809d51f
Reviewed-on: https://dart-review.googlesource.com/c/88326
Commit-Queue: Stevie Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-01-14 15:45:03 +00:00
Vyacheslav Egorov a9ce969e53 [vm] Decouple growable_array.h and zone.h from thread.h
- Introduce a slimmed down version of thread.h, which just depends on the
Zone and StackResource.
- Introduce a layering check that would prevent the coupling in the future.

This is the first step towards decoupling compiler from runtime.

There are multiple reasons to introduce the decoupling but the main
reason currently is to introduce a controlled surface through which
compiler reaches into runtime to catch any places where runtime word size
might influence the compiler and then enable building compiler that
targets 32-bit runtime but is embedded into a 64-bit runtime.

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

Change-Id: Id63ebbaddca55dd097298e51c90d957a73fa476e
Reviewed-on: https://dart-review.googlesource.com/c/87182
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-01-11 20:47:10 +00:00
Aart Bik 602aa203b2 [vm/compiler] AOT bounds check elimination
Rationale:
With the new induction variable bounds in place, this
is the first very low hanging fruit. When a loop bound
matches the array bounds check, it is redundant. This
removes AOT non-speculative bounds checks for the first
time. More improvements to follow!
Change-Id: I5dac885a1ef6fdb64b5844a0617d2fe9d800d9d6
Reviewed-on: https://dart-review.googlesource.com/c/87940
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2019-01-11 20:16:28 +00:00
Stevie Strickland bbc6e2dd6f [VM/Compiler] Add some missing results for inlines.
Change-Id: I5a7459bec78487eda351086e06a3f712193d373c
Reviewed-on: https://dart-review.googlesource.com/c/89149
Auto-Submit: Stevie Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-01-11 16:57:16 +00:00
Martin Kustermann e329a830da [VM/AOT] Fix shared spilling stubs on arm/arm64 and enable it
This reduces flutter_gallery_total_size slightly less than 1%

Change-Id: I44f670f693ccc97d1140673ad8559f70e460c6d2
Reviewed-on: https://dart-review.googlesource.com/c/89146
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2019-01-11 16:57:08 +00:00
Stevie Strickland 3ef595bb56 [VM/Compiler] Separate out inlined code from replacement result.
The inliner assumes that the last instruction replacing the original
call is a definition so it can replace all the uses of the call.
Unfortunately, we have a couple of instructions (StoreIndexed and
StoreInstanceField) that are not _really_ definitions.

Change FlowGraphInliner::TryInlineRecognizedMethod to create a
distinction between the last instruction to be inlined and the
definition that should be used as the new result. For inlines that end
in a StoreIndexed or StoreInstanceField, use the null constant as the
new result.

Further work towards a better fix for https://github.com/dart-lang/sdk/issues/35481

Change-Id: I5a9effe44388de9f03681565b1de2cf2c46e91c6
Reviewed-on: https://dart-review.googlesource.com/c/88960
Commit-Queue: Stevie Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-01-11 15:47:02 +00:00
Kevin Millikin 944984f015 [Kernel] Add syntax for unevaluated constants
Add Kernel syntactic support for constants constructed by
bool.fromEnvironment, int.fromEnvironment, and String.fromEnvironment.
These values are not necessarily available at compile time.  Because
constants can depend on these values, there is also an unevaluated constant
that represents an expression depending on environment values.

This syntax is not yet produced by the Fasta compiler.

Change-Id: Ie96ea7f60a7efcd35ac802b320a00f398d41232e
Reviewed-on: https://dart-review.googlesource.com/c/88827
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-01-11 08:35:20 +00:00
Ryan Macnak 03be1858e7 [vm, gc] Use the correct trap instruction when zapping ARM/ARM64 code space.
Change-Id: I1681c49522f55648dceb59fe9a56a3f9000b4545
Reviewed-on: https://dart-review.googlesource.com/c/89081
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-01-11 00:51:28 +00:00
Ryan Macnak bb4da7890b [gen_snapshot] Fixes for x86 Flutter code push.
- Don't set lazily native linking on IA32 as it produces calls to NULL.
 - Add --snapshot_kind=app to produce a new isolate snapshot without code and without rewriting the VM isolate.

Change-Id: I641dff10d9e89d16b84340b60b1133332a48977b
Reviewed-on: https://dart-review.googlesource.com/c/89043
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-01-11 00:41:18 +00:00
Ryan Macnak c34f1b4890 [vm] Bind static calls before saving JIT snapshots.
Change-Id: I11bbd7168513d2edf5b3ef4c77236e647bc9941c
Reviewed-on: https://dart-review.googlesource.com/c/88902
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2019-01-10 22:33:22 +00:00
Samir Jindel 457a7355f5 [vm] Use Util::Abs instead of std::abs.
Change-Id: I2872038ac21e5fb3a0dbe539ebe45b11ad233486
Reviewed-on: https://dart-review.googlesource.com/c/88944
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
Auto-Submit: Samir Jindel <sjindel@google.com>
2019-01-10 09:23:05 +00:00
Ryan Macnak 8da53e3120 [vm] Add Dart_SaveTypeFeedback and Dart_LoadTypeFeedback.
Change-Id: I8c20271b20638972b28299f0488e7f3dd37f8797
Reviewed-on: https://dart-review.googlesource.com/c/88604
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2019-01-10 01:04:11 +00:00
Matthew Dempsky 9f2e614e98 [fuchsia] Just use dlopen like on other OSes
SEC-42

Change-Id: I8c0781614e6cd711424df7a3f69f2efacc9bf31b
Reviewed-on: https://dart-review.googlesource.com/c/87162
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
2019-01-10 00:10:10 +00:00
Samir Jindel 0b0704c7c4 [vm] Use std::abs instead of regular abs().
This fixes the 3H build.

Change-Id: Iea5256cfb40b58c81967e676414c52e004a08847
Reviewed-on: https://dart-review.googlesource.com/c/88842
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
Auto-Submit: Samir Jindel <sjindel@google.com>
2019-01-09 17:44:34 +00:00
Samir Jindel 927b0cb9ed [vm/aot] Support optimization of modulo against a power-of-two.
Improves MD5 performance on ARM32 by 15%, from 1.25s to 1.05s.

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
Change-Id: Ia7a0614da662a80db051362fff7a4acacbc2455f
Reviewed-on: https://dart-review.googlesource.com/c/88723
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2019-01-09 16:26:35 +00:00
Mouad Debbar 6bb1dcdfa4 Fix wording
The current wording seems to be saying the opposite of what it's supposed to.

Closes #35507
https://github.com/dart-lang/sdk/pull/35507

GitOrigin-RevId: cd1493d8bebf468459b3bd44544a24e18cda24cf
Change-Id: I200327ff152e23b56b11d0d503212926da3fe084
Reviewed-on: https://dart-review.googlesource.com/c/88123
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2019-01-09 15:41:31 +00:00
Martin Kustermann e749576caa [VM/Compiler/AOT] Do not populate unused arguments descriptor in bare instructions mode
This saves around 1.5% RX on gallery in dart-aot (profile) mode when using bare instructions.

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

Change-Id: I6b72e5d9ee9e3785d9adb46a7fc542f80a07f8ba
Reviewed-on: https://dart-review.googlesource.com/c/88449
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2019-01-09 14:28:42 +00:00
Martin Kustermann 3c662736d9 [VM] Ensure PP is restored when returning from runtime calls in bare instructions mode.
Now that we have a moving GC it's no longer sufficient to rely on callee-saving
behavior of PP.

This change also ensures that all calls go through RuntimeEntry::Call() .

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

Change-Id: I159986dc18a9b201175fd4a7064a24a1533790ef
Reviewed-on: https://dart-review.googlesource.com/c/88711
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2019-01-09 08:34:55 +00:00
Zach Anderson 03ba8c16aa [vm,fuchsia] Disable safe-stack
When running with safe-stack, the interpreter's C++ stack gets
clobbered, but does not get clobbered when running without safe-stack.
Disabling while investigating further to avoid crashes in Fuchsia.

Change-Id: I8ea03ee0e243e878a6f01ce499ad2ff109501d8b
Reviewed-on: https://dart-review.googlesource.com/c/88747
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2019-01-09 02:56:22 +00:00
Alexander Markov 13a689f0fd [vm] Remove unnecessary class finalization
Change-Id: I4c51328af5f32fdb3c3065293e82993220b57b9d
Reviewed-on: https://dart-review.googlesource.com/c/88745
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-01-08 23:56:23 +00:00
Ryan Macnak efdbeb8059 [vm] Repair JIT snapshots generated from gen_snapshot.
Bare-metal relocation processing was removing the static call table, which is needed at runtime for JIT code.

Change-Id: Iab9a5a9256afd5f3985e8311a0131471cd04932d
Reviewed-on: https://dart-review.googlesource.com/c/88762
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-01-08 22:52:13 +00:00
Keerti Parthasarathy 8f33211f25 Fix typo in import, was using path
Change-Id: I01764f35c169f0854f5b6f187a06b22bc02820ed
Reviewed-on: https://dart-review.googlesource.com/c/88746
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2019-01-08 22:34:22 +00:00
Samir Jindel ac4809a1de [vm/aot] Support optimization of bitwise not.
Improves performance of MD5 by 3X on ARM32.

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
Change-Id: I235fece1d6adfb15ce8c3beed6ffb6ee3e753de7
Reviewed-on: https://dart-review.googlesource.com/c/88709
Commit-Queue: Samir Jindel <sjindel@google.com>
Auto-Submit: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2019-01-08 14:04:00 +00:00
Martin Kustermann 48f99e98d8 [VM] Fix calculation of unchecked entrypoint offset
On arm64 Code.UncheckedEntryPoint() returned the wrong value because it
is based on the offset of the Label of FunctionEntryInstr.

That works on X64/ARM, but not on ARM64, because there the monomorphic
entry and frame setup is emitted in FlowGraphCompiler::CompileGraph().

Change-Id: I9c1b1be71997b83d76b385d5b811a665015c32b5
Reviewed-on: https://dart-review.googlesource.com/c/88708
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2019-01-08 12:39:13 +00:00
Vyacheslav Egorov 3a37ebba9f [vm/tools] Update python scripts to avoid quadratic string concat.
Change-Id: Id675c6b804be6c4df5849ea9c0c2c1d6d3377868
Reviewed-on: https://dart-review.googlesource.com/c/88707
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-01-08 12:32:13 +00:00
Samir Jindel b58e8d7307 [vm] Use TFA to remove explicit type-checks (including keyword-covariant parameters).
- Also allow using the unchecked entry-point for invocations of generic functions where
  there are no bounds or the bounds don't require dynamic checks.

Change-Id: I6ca1ebec777ecf2989c4fb77425d65d542d5adf2
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/87181
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-01-08 08:36:58 +00:00
asiva a69e73e42a [VM / Runtime] Remove more dead code
Remove ValidatePostFinalizePatch and SetRefinalizeAfterPatch which are
not used anymore

Remove RawClass::kRefinalizeAfterPatch bit

Change-Id: I289df7ffe3e3017335510b5c14331254ca73c503
Reviewed-on: https://dart-review.googlesource.com/c/88621
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2019-01-08 01:26:18 +00:00
Ben Konyi b0900cf494 [ VM / Service ] Fixed issue where VMOptions were not being passed to app_jitk tests.
Fixes #35512.

Change-Id: I34abbf0f73215b6695a0aa4ec6af6cb1c219d5e9
Reviewed-on: https://dart-review.googlesource.com/c/88429
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-01-08 00:44:38 +00:00
Ryan Macnak e639c0df28 [vm, profiler] Place idle GC into a separate VM tag.
Bug: https://github.com/dart-lang/sdk/issues/35394
Change-Id: If95ac1cf140f0a37a161cd9d0bd846c62ce29eb2
Reviewed-on: https://dart-review.googlesource.com/c/88382
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-01-08 00:28:59 +00:00
Alexander Markov f6ce65b9b1 [vm] Fix handling of unwind errors in RegExp_ExecuteMatch* native methods
Fixes https://github.com/dart-lang/sdk/issues/35588

Change-Id: I59b4bd82033108e206572b27fda737a675c0da62
Reviewed-on: https://dart-review.googlesource.com/c/88620
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-01-07 22:47:33 +00:00
asiva 2427a69e14 [VM/Runtime] Refactoring sources to enable interpreter only builds.
The interpreter only build of the Dart VM should not be including any
sources from the 'compiler' directory.
First part of restructuring sources to enable an interpreter only build
of the VM
- Move CompileClass from compiler.cc file to class_finalizer.cc

Change-Id: I8743c6537ed2d63e6991d78949f858a1ae506121
Reviewed-on: https://dart-review.googlesource.com/c/87987
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2019-01-07 18:49:17 +00:00
Vyacheslav Egorov a62e924859 [vm/compiler] Ensure that field is added to guarded fields when Slot::Get uses its guarded properties.
There might be a race between background compiler and mutator where
mutator changes guarded state of the field after Slot was created from
it.

A situation is possible where we have a clone of a field with its
guarded state set to unknown, however Slot::Get for this field returns
a Slot created from the previous clone of the same field with a known
guarded state. In this case we must add *old* clone from which the Slot
was created to guarded fields and not the new clone, because new clone
has no guarded state to begin with and thus
ParsedFunction::AddToGuardedFields(...) would simply ignore it.

Such slots with inconsistent guarded state that are not in the current
list of guarded fields arise due to unsuccessful inlining attempts.
If we built and discard the graph, then guarded fields associated with
that graph are also discarded. However the slot itself stays behind in
the compilation global cache.

TEST=vm/cc/SlotFromGuardedField

Bug: b/121271056
Change-Id: Ib6ee5ec4922c033c3a71bdc46da74ead47b1edd0
Reviewed-on: https://dart-review.googlesource.com/c/88575
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-01-07 16:25:02 +00:00
Alexander Markov 3b29f5ad81 [VM/AOT/TFA] Do not attribute calls via fields/getters with inference results
MethodInvocation nodes which have field or getter as interface target
actually correspond to 2 calls: 1) getter; 2) implicit call() on the result
of the getter.

While this was correctly modeled in summaries in TFA, it is not correct
to attribute such MethodInvocation nodes with results of the inference,
as results correspond to an each distinct call. To fix this, Call
statements in summaries are created without attaching them to a
corresponding kernel AST node.

Change-Id: I3ea28ed85550192f8b592a926cac0eae23810811
Reviewed-on: https://dart-review.googlesource.com/c/88424
Commit-Queue: Martin Kustermann <kustermann@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-01-07 10:22:40 +00:00
asiva d9ac2704f8 [VM / Runtime] Remove Class::ApplyPatch which is dead code now.
All application of patches is now done in the front end there
are no callers to Class::ApplyPatch, deleting it.

Change-Id: I84857ea49463faea8df6ce1ce88c0f704a893e65
Reviewed-on: https://dart-review.googlesource.com/c/88426
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2019-01-04 22:36:28 +00:00
Jens Johansen d53f02aa8a Remove writeOptionalReference
References can be null --- it's written as the byte [0].
Thus in the null case it would before be [0] and now be [0].
In the non-null case it would before be [1, xyz] (1 for Tag.Something
and xyz for the actual, now positive, uint30). Now it would be [xyz].

Change-Id: Ibc08d3afb7275b0429a4d6c5e667fbd381121489
Reviewed-on: https://dart-review.googlesource.com/c/85394
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-01-04 13:31:03 +00:00
Daco Harkes e8c60f7ba6 [gardening] Mark service/simple_reload_test as Timeout for issue 35506
Issue: https://github.com/dart-lang/sdk/issues/35506
Change-Id: I1d82426bf7f2af2253f6197abb47468f8c2b9fd4
Reviewed-on: https://dart-review.googlesource.com/c/88443
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2019-01-04 10:39:58 +00:00
Zichang Guo ec86471ccc Rephrase FormatException for int.parse
Change-Id: I9efc87ca83be6272005bf395b63495a8a99e4a1f
Reviewed-on: https://dart-review.googlesource.com/c/87985
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-01-03 22:43:43 +00:00
Alexander Markov 0e65e45e9e [vm/compiler] Do not use interface target for calls via getters
For calls via getters and fields front-end generates MethodInvocation
node with interface target pointing to a getter/field.
Such target doesn't fully represent what is being called - it should
be implicitly chained by call(), so it is incorrect to use such
interface target for type propagation.

Change-Id: I76198b443474fdcb383671fbc9946b4938a4e1df
Reviewed-on: https://dart-review.googlesource.com/c/88260
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2019-01-03 22:03:13 +00:00
Ryan Macnak fdee3a42e0 [vm, gc] Fix untracked pointer in DeoptContext.
Bug: https://github.com/dart-lang/sdk/issues/35547
Change-Id: I610b2ad863c973fe2c46787c07e4be39aea8eb89
Reviewed-on: https://dart-review.googlesource.com/c/88288
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-01-03 20:59:00 +00:00
Régis Crelier 0668014f30 [VM compiler] Take FutureOr into account when checking for Number type.
A field typed 'FutureOr<T>' may contain an instance of a Number type at runtime.
This fixes issue #35542 and adds a regression test.

Change-Id: Idd19dff3edc5e061da28ab2906c34b3133ea8bd8
Reviewed-on: https://dart-review.googlesource.com/c/88280
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-01-03 19:45:53 +00:00