Commit graph

10787 commits

Author SHA1 Message Date
Adam Barth 0ea1c155ae Fix the Fuchsia build
Python scripts need to be marked executable to run in the Fuchsia build.

TBR=zra@google.com
2016-10-27 09:59:58 -07:00
John McCutchan 8007a98b5b Produce the correct assertion failure expression in the face of inlining
Fixes #27671

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/2453263002 .
2016-10-27 07:29:22 -07: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 c1b08a0b97 GN: Try to fix Linux build on bots
Review URL: https://codereview.chromium.org/2449213003 .
2016-10-26 10:48:14 -07:00
Zachary Anderson 55094eadd7 Fuchsia: fix build
Review URL: https://codereview.chromium.org/2448323005 .
2016-10-26 09:50:05 -07: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
Zachary Anderson e3f1794ba3 GN: Fix dart_bootstrap build
Makes sure we are using the no_snapshot variants of the libraries,
that we get builtin.cc instead of builtin_nolib.cc, and that all of
the right library sources get built in.

fixes=27668

R=vegorov@google.com

Review URL: https://codereview.chromium.org/2449223004 .
2016-10-26 08:24:23 -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
Zachary Anderson 624675349a Stub out Socket::LookAddress on Fuchsia
BUG=
R=zra@google.com

Review URL: https://codereview.chromium.org/2446343002 .
2016-10-25 13:07:23 -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
Ryan Macnak 7c14d5e7d7 Exit gen_snapshot and log an error if an output file path is invalid
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2440113003 .
2016-10-21 16:04:32 -07:00
Zach Anderson b6ea87c444 [windows] Make most file_win.cc functions use malloc for string conversions.
They have been using Dart_ScopeAllocate(), which makes them impossible
to use outside of a scope.

Also turn on inlining in the GN Debug windows build to match the gyp build
and speed things up a bit.

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

Review URL: https://codereview.chromium.org/2439173002 .
2016-10-21 14:55:37 -07:00
Zachary Anderson 2312ff7cf4 Fuchsia: Use mx_handle_wait_many in the eventhandler
This is to set up for more handles coming in from sockets, etc.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2438903002 .
2016-10-21 13:38:06 -07:00
Siva Annamalai 9c737d6055 Adjust help message.
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2441553002 .
2016-10-20 13:54:35 -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
Zachary Anderson 1baa650388 Fuchsia: Fix eventhandler for changed syscall return
Review URL: https://codereview.chromium.org/2433833005 .
2016-10-20 07:47:26 -07:00
Siva Annamalai 941b0c8c39 Fix build.
BUG=

Review URL: https://codereview.chromium.org/2426383003 .
2016-10-19 18:01:41 -07:00
Siva Annamalai 36a237c88d Fix build.
Review URL: https://codereview.chromium.org/2431253004 .
2016-10-19 17:48:01 -07:00
Siva Annamalai af4d246ef1 Cleanup options for use of application snapshots
- unified kAppAfterRun and kAppJITAfterRun to kAppJIT
 - adjusted the test configuration to make dart2app and dart2appjit to mean
   the same
 - delete GenerateFullSnapshot function as it is not used anymore

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2429023002 .
2016-10-19 17:42:01 -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 c9c33d9db3 Implement File::Map on Windows.
R=zra@google.com

Review URL: https://codereview.chromium.org/2430473002 .
2016-10-19 16:36:01 -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 16db33b7a2 Propagate errors correctly in Socket.connect
socket.port can throw an exception. The error from the
exception, if there is one, has to go to the completer,
not be thrown up the stack, otherwise it may go to the
enclosing Zone rather than e.g. a try ... catch around
await Socket.connetc().

This is a possible fix for the issue below, but it is
tough to say because I don't have a reliable repro.

related #27440

R=asiva@google.com

Review URL: https://codereview.chromium.org/2426413006 .
2016-10-19 15:12:59 -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
Ryan Macnak 5ee94eb837 Generate an app snapshot even if the training run does a hard exit.
(As the analyzer and pub do.)

R=asiva@google.com

Review URL: https://codereview.chromium.org/2426843002 .
2016-10-19 09:37:47 -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 df260e5fe7 Fix crashes on debug windows
Review URL: https://codereview.chromium.org/2426053002 .
2016-10-18 09:37:04 -07:00
Siva Annamalai bcea09162a Land https://codereview.chromium.org/2423893003/ for viettrungluu
TBR=zra

Review URL: https://codereview.chromium.org/2426833002 .
2016-10-17 16:57:02 -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