Commit Graph

7576 Commits

Author SHA1 Message Date
Martin Kustermann e984271b94 Add support for OSR in kernel-based FlowGraphBuilder
R=vegorov@google.com

Review URL: https://codereview.chromium.org/2464953002 .
2016-10-31 19:12:09 +01:00
Zachary Anderson be11752b14 Use 'mx_channel' instead of deprecated 'mx_msgpipe' naming
BUG=
R=zra@google.com

Review URL: https://codereview.chromium.org/2458703004 .
2016-10-31 11:10:06 -07:00
Vyacheslav Egorov 2cd737abab Fix Debian builder.
Do not rely on checked in Dart SDK for patch_sdk.py.

Use dart_boostrap instead just like observatory does.

R=kustermann@google.com, whesse@google.com
BUG=

Review URL: https://codereview.chromium.org/2464833002 .
2016-10-31 14:13:33 +01:00
Jan-Hendrik Dolling 89560c68a0 change "the the" to the 2016-10-28 21:47:50 +02:00
Zachary Anderson e29da6037b Small cleanups and linter fixes.
Review URL: https://codereview.chromium.org/2455983002 .
2016-10-27 05:02:20 -07:00
Vyacheslav Egorov eb8c24e133 Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork."
R=zra@google.com
BUG=

Review URL: https://codereview.chromium.org/2451623006 .
2016-10-27 10:09:22 +02:00
Zachary Anderson c1313a5ec7 Format GN files and add a presubmit check that GN is properly formatted
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2451613005 .
2016-10-26 08:50:54 -07:00
Vyacheslav Egorov 12968edb9c Revert "Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork.""
This reverts commit 4e7a31262e.

Windows bots are broken now.

R=zra@google.com
BUG=

Review URL: https://codereview.chromium.org/2451893004 .
2016-10-26 17:07:18 +02:00
Vyacheslav Egorov 16e4f2f1c2 Revert "Revert "Revert "Recognize and optimize a.runtimeType == b.runtimeType pattern."""
This reverts commit e495e100dd.

Commit breaks bots that are using Android devices (SIMARM is unaffected).

R=rmacnak@google.com
BUG=

Review URL: https://codereview.chromium.org/2449013004 .
2016-10-26 16:53:32 +02:00
Vyacheslav Egorov 4e7a31262e Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork."
This relands commit 2fed1c3905 with fixes to ensure that analyzer summaries are correctly created and XARM build does not try to use target binaries on the host.

R=zra@google.com
BUG=

Review URL: https://codereview.chromium.org/2453773002 .
2016-10-26 16:48:28 +02:00
Vyacheslav Egorov cf7ff42e60 Revert "Merge more Kernel infrastructure from kernel_sdk SDK fork."
This reverts commit 2fed1c3905.

SDK builds are failing

TBR=zra@google.com

Review URL: https://codereview.chromium.org/2455593002 .
2016-10-26 13:06:27 +02:00
Vyacheslav Egorov 2fed1c3905 Merge more Kernel infrastructure from kernel_sdk SDK fork.
- bring patched SDK generation scripts and VM patch tweaks that allow VM patch files to be parsed by analyzer front-end;
  Patched SDK is an SDK with all VM patches spliced into it. Kernel compiler is based on the analyzer front-end which does
  not have any patch files support/model so for it to produce Kernel files that match VM we need to generate a such patched SDKs.

- bring test script modifications that allow to test Kernel pipeline

BUG=
R=asiva@google.com, kmillikin@google.com, whesse@google.com, zra@google.com

Review URL: https://codereview.chromium.org/2434123003 .
2016-10-26 13:02:54 +02:00
Vyacheslav Egorov e495e100dd Revert "Revert "Recognize and optimize a.runtimeType == b.runtimeType pattern.""
This reverts commit 890f694de5.

Previous commit was passing field_type_map_ down in a place where it was not passed down before.

This caused some handles to be used across zones, which caused crashes.

BUG=

Review URL: https://codereview.chromium.org/2453463006 .
2016-10-26 12:25:48 +02:00
Zachary Anderson 103881d01c Make header include guards great again
i.e. #ifndef VM_WHATEVER -> #ifndef RUNTIME_VM_WHATEVER

This lets us remove a hack from the PRESUBMIT.py script that existed
for reasons that are no longer valid, and sets us up to add some
presubmit checks for the GN build.

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

Review URL: https://codereview.chromium.org/2450713004 .
2016-10-26 00:26:03 -07:00
Ryan Macnak 890f694de5 Revert "Recognize and optimize a.runtimeType == b.runtimeType pattern."
This reverts commit f4ec20abac.

Revert "Use ZoneHandle when creating ConstantInstr"

This reverts commit cb87f2d82f.

This change introduced crashes on AOT and runtime errors on the GN SDK build.

TBR=vegorov@google.com

Review URL: https://codereview.chromium.org/2451893002 .
2016-10-25 13:19:33 -07:00
Regis Crelier 3342380ff8 Avoid parsing formal type parameters a second time from inside an async body,
as default values may not be resolved correctly and may conflict with already
parsed formal parameters (fixes #27659).
Added regression test.

R=hausner@google.com

Review URL: https://codereview.chromium.org/2452623002 .
2016-10-25 08:11:37 -07:00
Regis Crelier 6418f8f36c Create runtime type in new space and canonicalize to old space (fixes #27663).
R=asiva@google.com, hausner@google.com

Review URL: https://codereview.chromium.org/2452563002 .
2016-10-25 04:56:49 -07:00
Vyacheslav Egorov cb87f2d82f Use ZoneHandle when creating ConstantInstr
BUG=
TBR=fschneider@google.com

Review URL: https://codereview.chromium.org/2446093002 .
2016-10-25 11:15:14 +02:00
Vyacheslav Egorov f4ec20abac Recognize and optimize a.runtimeType == b.runtimeType pattern.
Start by removing all get:runtimeType overrides in the patch files to have a single point computing the runtime type - Object.get:runtimeType. Handle string, double and integer types inside both intrinsic and runtime call to unify their handling and guarantee that code works even with intrinsifier disabled.

With overrides removed we can easily check that get:runtimeType is unique function name within the application that is being precompiled and use that to convert InstanceCall(get:runtimeType, ...) into StaticCall even nothing is known about the receiver.

This enables us to check if both left side and right side of comparison are StaticCall(Object.get:runtimeType, ...) when specializing InstanceCall(==, x, y). If they are we convert InstanceCall(==, StaticCall(get:runtimeType, a), StaticCall(get:runtimeType, b)) into StaticCall(Object._hasSameRuntimeType, a, b). A canonicalization rule will later delete unused get:runtimeType invocations.

Object._hasSameRuntimeType is implemented in C++ and intrinsified. It operates without creating new runtime types (except for Closures - where it does for simplicity). Cases of different class ids (i.e. a.[cid] != b.[cid]) and non-parameterized types are handled completely in the intrinsic. The rest is handled in the runtime code.

Microbenchmarking results:

Same parameterized classes: 15x improvement
Different parameterized classes: 300x improvement
Different/same non-parameterized classes: 2x improvement

BUG=
R=fschneider@google.com, regis@google.com

Review URL: https://codereview.chromium.org/2379733002 .
2016-10-25 10:03:06 +02:00
Zachary Anderson c9537f56e4 runtime: Use Linux timezone implementation on Fuchsia
BUG=
R=zra@google.com

Review URL: https://codereview.chromium.org/2435273003 .
2016-10-21 23:42:07 -07:00
Ryan Macnak af7bf4dab0 GN: Build the SDK with app snapshots instead of script snapshots.
R=zra@google.com

Review URL: https://codereview.chromium.org/2442513003 .
2016-10-21 17:40:21 -07:00
Ryan Macnak e56d8eef56 Complain if an embedder fails to provide a vm isolate or isolate snapshot to a VM built without DART_NO_SNAPSHOT.
Closes #27649

R=asiva@google.com

Review URL: https://codereview.chromium.org/2441193002 .
2016-10-21 16:51:59 -07:00
Zachary Anderson 8200955ed0 Fuchsia: Add native symbol resolver. Small fixes.
R=asiva@google.com

Review URL: https://codereview.chromium.org/2438843002 .
2016-10-20 13:39:35 -07:00
Ryan Macnak 61bf8abd75 Make fatal out of memory messages uniform.
Add checks in a few more places with large allocations.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2418323002 .
2016-10-19 16:37:59 -07:00
Ryan Macnak 21a6f50892 Tearing off a top-level variable introduces a synthetic field which is added to the top-level class not but the library.
R=hausner@google.com

Review URL: https://codereview.chromium.org/2428353004 .
2016-10-19 15:34:25 -07:00
Matthias Hausner f73ea62c99 Add check for constness in constructor redirection
Const constructor can only redirect to another const constructor.

BUG=#27617
R=regis@google.com

Review URL: https://codereview.chromium.org/2439593003 .
2016-10-19 15:15:02 -07:00
Zachary Anderson 9d29251368 Remove dependency on Fuchsia's runtime library.
This library is no longer publicly exposed. The only functionality used
by it is the utility function for printing mx errors, which has now
moved into the vDSO and is available in <magenta/status.h>.

R=zra@google.com, zra@chromium.org

Review URL: https://codereview.chromium.org/2428373005 .
2016-10-19 15:09:32 -07:00
Zachary Anderson 8a909671e6 Fix Double.pow() for arm and mips
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2433933003 .
2016-10-19 09:01:55 -07:00
Zachary Anderson 088347fd9d Reland "Add DoubleTestOp instruction"
Fixes DoubteTestOpInstr::AttributesEqual()

Review URL: https://codereview.chromium.org/2433813002 .
2016-10-18 22:46:36 -07:00
Zachary Anderson f6296cc91b Revert "Add DoubleTestOp instruction"
Review URL: https://codereview.chromium.org/2432903002 .
2016-10-18 21:57:05 -07:00
Zachary Anderson fa855cf1c2 Add DoubleTestOp instruction
This gives a ~5% bump to the Flutter layout benchmark
in checked mode.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2423843002 .
2016-10-18 21:24:12 -07:00
Florian Schneider 197d56d853 VM: Fix another dead-lock in background compiler.
Grabbing the lock must always take safepoints into account.

Observed as a flaky timeout on standalone/http_launch_test.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/2426213002 .
2016-10-18 16:53:10 -07:00
Florian Schneider 7e6d8f5b66 VM: Remove unnecesary load of isolate in some stubs.
The fast-path allocation can always load the current heap
from the thread object instead.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2427043002 .
2016-10-18 13:45:53 -07:00
Zachary Anderson aa79ee775e DBC: Fix intrinsics bug
Fall-through when allocation fails.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2429723003 .
2016-10-18 13:07:19 -07:00
Zach Anderson 71a84cfed6 GN: Fix Debug flags. Fix Windows build.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2425043002 .
2016-10-17 12:58:24 -07:00
John McCutchan 8061bd5a8a Add local variable declaration token position to service protocol
- [x] Add three public fields to the "BoundVariable" service type: declarationTokenPos, visibleStartTokenPos, and visibleEndTokenPos. (naming suggestions welcome!)
- [x] Extend LocalVarDescriptors to hold the declaration token position (it already had the scope visibility boundaries).
- [x] Extend ContextScope to hold the declaration token position.
- [x] Add a unit test which verifies this works for local variables, function parameters, and closure captured variables.

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

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2419013004 .
2016-10-17 11:18:24 -07:00
Zachary Anderson c8970d0524 DBC: Fix CheckClass bug. Add some intrinsics
Flutter layout benchmark 8.5k us -> 6k us.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2418073002 .
2016-10-17 10:20:56 -07:00
Vyacheslav Egorov caa0167457 Don't use in-class initialization of non-static data members. It's a C++11 extension.
TBR=asiva@google.com

Review URL: https://codereview.chromium.org/2420323002 .
2016-10-15 23:02:49 +02:00
Vyacheslav Egorov f67ce21068 VM support for running Kernel binaries.
BUG=
R=asiva@google.com, fschneider@google.com

Review URL: https://codereview.chromium.org/2411823003 .
2016-10-15 22:48:46 +02:00
Regis Crelier 0ac91fab5c Minor cleanup: use handle when setting instructions in code object.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2416963009 .
2016-10-14 16:06:59 -07:00
Florian Schneider a0380ffaf6 Fix assertion failure with deferred prefixes.
When running with --load-deferred-eagerly, we don't need to collect
functions for invalidation, but instead insert runtime checks  if
the prefix if loadLibrary was called loaded or not.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2415743004 .
2016-10-14 10:20:46 -07:00
Ryan Macnak 74e6376b5c Fix unoptimized code calling a disabled code when --verify-on-transition is enabled.
Unoptimized code has a static call to optimized code.
Optimized code prologue goes to the OptimizeInvokedFunction runtime.
Callee schedule for background compilation and current code set the return entries return value.
Verify-on-transition triggers a safepoint, wherein the background compiler disables the old optimized code.
The OptimizedInvokedFunction stub calls through the disabled code.
FixCallersTarget see an unoptimized caller. BOOM

Similar problem without --verify-on-transition, except the safepoint comes from BackgroundCompiler::CompileOptimized.

Fixes #26927.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2418673002 .
2016-10-14 10:01:42 -07:00
Ryan Macnak 3d00ecdc8f Reapply "Use a single file for app snapshots."
- Don't read script to check for an app snapshot if it is a pipe. Fixes loading source from a pipe.
 - Fix windows and fushsia builds.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2416973003 .
2016-10-14 09:57:54 -07:00
Lasse R.H. Nielsen efb9a12811 Add = as default-value separator for named parameters.
Fixes issue #27559.

BUG= http://dartbug.com/27559
R=asiva@google.com, eernst@google.com, floitsch@google.com, sigmund@google.com

Review URL: https://codereview.chromium.org/2411633002 .
2016-10-14 11:25:25 +02:00
Zachary Anderson 4118680345 [windows] Revert virtual memory changes
Revert changes to virtual_memory_win.cc in case they are the cause of
the OOM failures on the debug windows x64 bot.

Review URL: https://codereview.chromium.org/2420853002 .
2016-10-13 22:02:12 -07:00
Ryan Macnak 6839a23240 Revert "Use a single file for app snapshots."
This reverts commit 4f8b16df3b.

Review URL: https://codereview.chromium.org/2410303008 .
2016-10-13 15:29:23 -07:00
Ryan Macnak 4f8b16df3b Use a single file for app snapshots.
For blobs, put all four pieces into a single file with a header describing their offsets.
For dynamic libraries, move the vm isolate and isolate pieces into the dynamic library as additional read-only sections.

Automatically detect if the script argument is an app snapshot and initialize the VM appropriately, similar to automatic detection of script snapshots.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2405393002 .
2016-10-13 14:33:56 -07:00
Florian Schneider 2022348b11 Fix wrong initialization of is_loaded in LibraryPrefix.
My previous CL did not check if the prefix is deferred or not
when deserializing it from the snapshot.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2413113004 .
2016-10-13 13:51:02 -07:00
Florian Schneider 701b91eb31 VM: Save one bool when serializing library prefixes.
When loading a snapshot all library prefixes should be considered not
loaded. This makes code running from a JIT snapshot throw the correct
error when using a deferred prefix before it is loaded.

Also, update test status and avoid skipping tests.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2416963003 .
2016-10-13 13:36:19 -07:00
Ryan Macnak 1ee954029d Attempt to fix InitialRSS for Golem.
R=zra@google.com

Review URL: https://codereview.chromium.org/2421623002 .
2016-10-13 13:11:41 -07:00