Commit Graph

36560 Commits

Author SHA1 Message Date
jochen
e426fdd52b Implement async AbortAll for the compiler dispatcher
BUG=v8:5215
R=marja@chromium.org,vogelheim@chromium.org

Review-Url: https://codereview.chromium.org/2615603002
Cr-Commit-Position: refs/heads/master@{#42068}
2017-01-04 13:45:56 +00:00
clemensh
20defd29e0 [asm.js] [inspector-test] Avoid breakpoint on "use asm" statement
Ignition does not emit any byte code for some literal expression
statements, so avoid testing for it.

R=rmcilroy@chromium.org
BUG=v8:5757

Review-Url: https://codereview.chromium.org/2612013002
Cr-Commit-Position: refs/heads/master@{#42067}
2017-01-04 13:29:35 +00:00
tebbi
5662f99b99 [turbofan] Teach escape analysis about StringCharAt
R=bmeurer@chromium.org
BUG=chromium:677757

Review-Url: https://codereview.chromium.org/2606383005
Cr-Commit-Position: refs/heads/master@{#42066}
2017-01-04 12:01:38 +00:00
marja
11d13027e8 PreParsing inner funcs: Do fewer variable name lookups.
It's unnecessarily to first lookup and then insert.

BUG=v8:5501

Review-Url: https://codereview.chromium.org/2608333003
Cr-Commit-Position: refs/heads/master@{#42065}
2017-01-04 11:58:20 +00:00
danno
fcffcba725 Fix empty push bug in Array.push
BUG=chromium:670981
LOG=N
R=ishell@chromium.org

Review-Url: https://codereview.chromium.org/2609973002
Cr-Commit-Position: refs/heads/master@{#42064}
2017-01-04 10:57:26 +00:00
bmeurer
2a60fd49db [turbofan] Recognize and optimize flooring integer division.
Recognize the special

  NumberFloor(NumberDivide(lhs, rhs))

subgraph in TypedOptimization, where both lhs and rhs are in the
Unsigned32 range, and the result is a PlainNumber, and replace the
NumberFloor with a NumberToUint32 truncation.

This could be done in a cleaner way if we have a dedicated type for all
double values in the Unsigned32 range, but that would complicate the
type system quite a bit.

R=jarin@chromium.org
BUG=v8:5267

Review-Url: https://codereview.chromium.org/2614663002
Cr-Commit-Position: refs/heads/master@{#42063}
2017-01-04 10:24:48 +00:00
jochen
a8b16f4424 Add more tests for compiler-dispatcher
BUG=v8:5215
R=marja@chromium.org,vogelheim@chromium.org

Review-Url: https://codereview.chromium.org/2612753002
Cr-Commit-Position: refs/heads/master@{#42062}
2017-01-04 10:07:59 +00:00
vogelheim
ffa4010cc8 Skip mjsunit/big-object-literal for debug builds.
mjsunit/big-object-literal will exhaust the stack in debug builds,
due to different compiler settings. It will work in optdebug.
This disables for both. Adding an 'optdebug' test to .status files
is easy, but I don't want to contribute to the 'mode x variant explosion'.

R=jochen@chromium.org
CC=franzih@chromium.org, machenbach@chromium.org

Review-Url: https://codereview.chromium.org/2609193002
Cr-Commit-Position: refs/heads/master@{#42061}
2017-01-04 10:00:42 +00:00
bmeurer
7aa3931fa4 [turbofan] Add constant-folding for CheckedFloat64ToInt32.
BUG=v8:5267
R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2612763002
Cr-Commit-Position: refs/heads/master@{#42060}
2017-01-04 09:43:23 +00:00
bmeurer
95db8643e1 [turbofan] Improve typing rules for NumberFloor and NumberDivide.
Also rule out -0 for NumberDivide if possible, and rule out NaN and -0
for NumberFloor if possible.

R=jarin@chromium.org
BUG=v8:5267

Review-Url: https://codereview.chromium.org/2609373002
Cr-Commit-Position: refs/heads/master@{#42059}
2017-01-04 09:25:00 +00:00
bmeurer
c1a0e8567a [turbofan] Add constant-folding for Float64RoundDown.
R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2616613002
Cr-Commit-Position: refs/heads/master@{#42058}
2017-01-04 08:29:49 +00:00
neis
d946a27e03 [modules] Make @@toStringTag on namespace objects non-configurable.
See https://github.com/tc39/ecma262/pull/747.

R=adamk@chromium.org
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2603193002
Cr-Commit-Position: refs/heads/master@{#42057}
2017-01-04 06:33:10 +00:00
mtrofin
da70d7aa9f Steps towards removing the dependency on ModuleEnv from the compiler.
This CL simplifies the relation between the wasm graph builder, the
wasm decoder, and the wasm module they work on.

BUG=

Review-Url: https://codereview.chromium.org/2612643002
Cr-Commit-Position: refs/heads/master@{#42056}
2017-01-04 05:14:04 +00:00
v8-autoroll
9a4f899dd9 Update V8 DEPS.
Rolling v8/build: bdc04ca..dd74acb

Rolling v8/third_party/catapult: 9ddf248..a067dd2

TBR=machenbach@chromium.org,vogelheim@chromium.org,hablich@chromium.org

Review-Url: https://codereview.chromium.org/2609853005
Cr-Commit-Position: refs/heads/master@{#42055}
2017-01-04 04:25:59 +00:00
binji
534ddf645b Disallow passing a SharedArrayBuffer in the transfer list.
This behavior changed recently. SharedArrayBuffers should not be put in the
transfer list, because they are not detached, and that is the meaning of being
in the transfer list.

This is the V8 side of the change, the Blink side will come next.

Reland of https://codereview.chromium.org/2570433005, it was reverted because
of a Blink-side test failure which has been temporarily disabled; see
https://codereview.chromium.org/2590003002.

BUG=https://bugs.chromium.org/p/chromium/issues/detail?id=676063

Review-Url: https://codereview.chromium.org/2594793005
Cr-Commit-Position: refs/heads/master@{#42054}
2017-01-03 22:52:17 +00:00
gsathya
bdffad82ce Remove unused var in objects-debug.cc
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2608183003
Cr-Commit-Position: refs/heads/master@{#42053}
2017-01-03 22:35:27 +00:00
gsathya
a2c15ba376 [promises] Refactor debug code
-- Removes remaning debug from promise.js and moves it to c++
-- Changes debug_id to be a smi in PromiseReactionJobInfo and
   PromiseResolveThenableJobInfo.
-- Changes debug_name to be a smi in PromiseReactionJobInfo and
   PromiseResolveThenableJobInfo.
-- Adds PromiseDebugActionName and PromiseDebugActionType enums
-- Adds PromiseDebugActionNameToString and
   PromiseDebugActionTypeToString helper methods
-- Changes variable `status` to be int in runtime functions.
-- Changes debug_id to start from 1, not 0 for easier bookkeeping.

BUG=v8:5343

Review-Url: https://codereview.chromium.org/2606093002
Cr-Commit-Position: refs/heads/master@{#42052}
2017-01-03 21:43:38 +00:00
caitp
c523474713 [cleanup] remove sloppy generator/async function maps
These maps contain exactly the same information as the strict maps, so
this frees up a few pointers of native context space, gets rid of some
branches in FastNewClosure, and adds missing poisoned properties tests
for async functions.

BUG=v8:2355, v8:4483
R=adamk@chromium.org, bmeurer@chromium.org, littledan@chromium.org

Review-Url: https://codereview.chromium.org/2608333002
Cr-Commit-Position: refs/heads/master@{#42051}
2017-01-03 21:38:22 +00:00
jyan
410606a09d s390: Optimize LoadDoubleLiteral
R=joransiu@ca.ibm.com, bjaideep@ca.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/2611773003
Cr-Commit-Position: refs/heads/master@{#42050}
2017-01-03 21:14:15 +00:00
marja
e87e82b8e7 Force ctxt allocation in eval scopes.
This is another attempt at solving v8:5736; the previous one (r 41723)
regressed code load.

BUG=v8:5736
R=adamk@chromium.org

Review-Url: https://codereview.chromium.org/2583163002
Cr-Commit-Position: refs/heads/master@{#42049}
2017-01-03 20:27:20 +00:00
caitp
5c6e79e184 [builtins] throw if TypedArray buffer is detached during iteration
Per spec change in https://github.com/tc39/ecma262/pull/724, this adds
the exception thrown when a TypedArray's array buffer is detached at
some point during iteration, after the iterator has already been
created.

BUG=v8:5388
R=littledan@chromium.org, bmeurer@chromium.org, petermarshall@chromium.org

Review-Url: https://codereview.chromium.org/2609913002
Cr-Commit-Position: refs/heads/master@{#42048}
2017-01-03 20:12:19 +00:00
adamk
db7f0169f5 Use "derived" instead of "subclass" in FunctionKind to match the spec
TBR=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2609663002
Cr-Commit-Position: refs/heads/master@{#42047}
2017-01-03 19:37:23 +00:00
bjaideep
7d52258b1d PPC/s390: [Ignition] Teach CompileLazy about interpreted functions.
Port 72c3707672

Original Commit Message:

    Currently the CompileLazy builtin checks the SFI expliciltly for FCG code. This means
    if the SFI has bytecode we have to go through to the runtime to install the
    interpreter entry trampoline into the JSFunction object.

    Modify the builtin to always put the SFI code object into the JSFunction unless it's
    the lazy compile stub on the SFI as well.

R=rmcilroy@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:4380
LOG=N

Review-Url: https://codereview.chromium.org/2602383003
Cr-Commit-Position: refs/heads/master@{#42046}
2017-01-03 19:27:35 +00:00
tebbi
199af0abb2 [turbofan] second attempt to fix second divergence in escape analysis
The previous patch for this bug (https://codereview.chromium.org/2599793002/) was wrong because it changed the behavior of isCreatedPhi() in an incompatible way. The actual source of the bug is that escape analysis propagates information along cycles without considering the previous analysis value. This fix makes sure that if a previous merge cleared a field, then it stays cleared.

R=bmeurer@chromium.org

BUG=chromium:670202

Review-Url: https://codereview.chromium.org/2610703002
Cr-Commit-Position: refs/heads/master@{#42045}
2017-01-03 19:21:54 +00:00
mlippautz
d75023f3a1 [heap] Enter final pause for embedder tracer in MarkLiveObjects
MarkCompactCollector::Prepare is too early in the rare case that we don't have a
marking deque yet. EnterFinalPause could then trigger
Heap::RegisterExternallyReferencedObject which rightfully fails because MC is
not properly set up.

Note that the DCHECK also triggers, without actual consequences, for aborting
incremental marking.

BUG=468240
TBR=jochen@chromium.org

Review-Url: https://codereview.chromium.org/2611753002
Cr-Commit-Position: refs/heads/master@{#42044}
2017-01-03 19:20:34 +00:00
adamk
a0eb5ab5fc [ignition] Make a DCHECK in ConstantArrayBuilder more useful
This triggered on a CL I was working on today, figured I'd share
my work.

R=mythria@chromium.org, rmcilroy@chromium.org

Review-Url: https://codereview.chromium.org/2601213002
Cr-Commit-Position: refs/heads/master@{#42043}
2017-01-03 19:05:04 +00:00
rmcilroy
c899212587 [Compiler] Track Ignition background compilation separately in RuntimeStats.
Tracks background compilation of Ignition in a separate bucket from main thread
compilation. Also add some more compilation buckets for functions which can take a
significant proportion of compilation.

BUG=v8:5203,v8:5215

Review-Url: https://codereview.chromium.org/2577263002
Cr-Original-Commit-Position: refs/heads/master@{#42026}
Committed: b0e9116d59
Review-Url: https://codereview.chromium.org/2577263002
Cr-Commit-Position: refs/heads/master@{#42042}
2017-01-03 18:11:58 +00:00
jarin
db13377fe8 [turbofan] Use graph assembler for memory optimizer.
Review-Url: https://codereview.chromium.org/2602413002
Cr-Commit-Position: refs/heads/master@{#42041}
2017-01-03 17:29:32 +00:00
jochen
efb329a8ab Reland "Use background tasks for the compiler dispatcher
Original issue's description:
> Use background tasks for the compiler dispatcher
>
> BUG=v8:5215
> R=marja@chromium.org,vogelheim@chromium.org
>
> Review-Url: https://codereview.chromium.org/2606263002
> Cr-Commit-Position: refs/heads/master@{#42035}
> Committed: 7a1b3a7beb

BUG=v8:5215
TBR=marja@chromium.org,vogelheim@chromium.org,rmcilroy@chromium.org

Review-Url: https://codereview.chromium.org/2613483002
Cr-Commit-Position: refs/heads/master@{#42040}
2017-01-03 17:00:56 +00:00
bjaideep
dc4586ce0c PPC/s390: [ic] Use StrictEqual/Equal builtins for CompareIC slow path.
Port d3ed71ed87

Original Commit Message:

    Don't fallback to the %StrictEqual / %Equal runtime functions for the
    generic CompareIC slow path, but use the (new) StrictEqual and Equal
    builtins instead. This avoids a performance cliff when mixing input
    types for strict equality sites.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:4773
LOG=N

Review-Url: https://codereview.chromium.org/2608283002
Cr-Commit-Position: refs/heads/master@{#42039}
2017-01-03 16:59:45 +00:00
mvstanton
db5cf84a1c [Turbofan] Run loop peeling concurrently.
BUG=v8:5428

Review-Url: https://codereview.chromium.org/2613463002
Cr-Commit-Position: refs/heads/master@{#42038}
2017-01-03 15:52:51 +00:00
rmcilroy
d4b5bfe306 Revert of Use background tasks for the compiler dispatcher (patchset #5 id:80001 of https://codereview.chromium.org/2606263002/ )
Reason for revert:
Causes IgnitionCompilerDispatcherTest.FinishNowWithBackgroundTask to fail.

https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20noi18n%20-%20debug/builds/11209

Original issue's description:
> Use background tasks for the compiler dispatcher
>
> BUG=v8:5215
> R=marja@chromium.org,vogelheim@chromium.org
>
> Review-Url: https://codereview.chromium.org/2606263002
> Cr-Commit-Position: refs/heads/master@{#42035}
> Committed: 7a1b3a7beb

TBR=marja@chromium.org,vogelheim@chromium.org,jochen@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5215

Review-Url: https://codereview.chromium.org/2614433002
Cr-Commit-Position: refs/heads/master@{#42037}
2017-01-03 15:51:44 +00:00
mvstanton
37de62c991 [Turbofan] run load elimination concurrently.
BUG=v8:5428
R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2602403002
Cr-Commit-Position: refs/heads/master@{#42036}
2017-01-03 15:25:09 +00:00
jochen
7a1b3a7beb Use background tasks for the compiler dispatcher
BUG=v8:5215
R=marja@chromium.org,vogelheim@chromium.org

Review-Url: https://codereview.chromium.org/2606263002
Cr-Commit-Position: refs/heads/master@{#42035}
2017-01-03 15:24:00 +00:00
rmcilroy
72c3707672 [Ignition] Teach CompileLazy about interpreted functions.
Currently the CompileLazy builtin checks the SFI expliciltly for FCG code. This means
if the SFI has bytecode we have to go through to the runtime to install the
interpreter entry trampoline into the JSFunction object.

Modify the builtin to always put the SFI code object into the JSFunction unless it's
the lazy compile stub on the SFI as well.

BUG=v8:4380

Review-Url: https://codereview.chromium.org/2583693003
Cr-Commit-Position: refs/heads/master@{#42034}
2017-01-03 15:18:21 +00:00
mythria
d338b94e86 [Interpreter] Ensure that a function is compiled before tiering up to baseline.
When baselining a function using the BaselineFunctionOnNextCall intrinsic, it is
not always ensured that a function is already compiled. Update the
Runtime_BaselineFunctionOnNextCall function to trigger a compile if it is not already
compiled.

BUG=v8:5768

Review-Url: https://codereview.chromium.org/2594543003
Cr-Commit-Position: refs/heads/master@{#42033}
2017-01-03 15:11:32 +00:00
jochen
a11a9c7dd7 Remove runtime-call-stats from compiler dispatcher
RCS can't be used on background threads out of the box, but ignition
already has RCS itself, so just do trace events

BUG=v8:5215
R=rmcilroy@chromium.org

Review-Url: https://codereview.chromium.org/2602383002
Cr-Commit-Position: refs/heads/master@{#42032}
2017-01-03 14:39:47 +00:00
machenbach
8ad1e681e3 Revert of [Compiler] Track Ignition background compilation separately in RuntimeStats. (patchset #3 id:80001 of https://codereview.chromium.org/2577263002/ )
Reason for revert:
https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20TSAN/builds/13358

Original issue's description:
> [Compiler] Track Ignition background compilation separately in RuntimeStats.
>
> Tracks background compilation of Ignition in a separate bucket from main thread
> compilation. Also add some more compilation buckets for functions which can take a
> significant proportion of compilation.
>
> BUG=v8:5203,v8:5215
>
> Review-Url: https://codereview.chromium.org/2577263002
> Cr-Commit-Position: refs/heads/master@{#42026}
> Committed: b0e9116d59

TBR=jochen@chromium.org,cbruni@chromium.org,rmcilroy@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5203,v8:5215

Review-Url: https://codereview.chromium.org/2609773003
Cr-Commit-Position: refs/heads/master@{#42031}
2017-01-03 14:05:43 +00:00
bmeurer
3a81236f4a [builtins] Migrate more Date builtins to TurboFan builtins.
Migrate Date.prototype.valueOf and Date.prototype[ @@toPrimitive ]
to use the CodeStubAssembler, to avoid going through C++ always
when comparing or subtracting two dates.

R=epertoso@chromium.org

Review-Url: https://codereview.chromium.org/2608143003
Cr-Commit-Position: refs/heads/master@{#42030}
2017-01-03 13:35:05 +00:00
marja
a8a45d875f Various IWYU fixes.
(Missing includes discovered during the objects.h splitting work.)

BUG=v8:5402

Review-Url: https://codereview.chromium.org/2610643002
Cr-Commit-Position: refs/heads/master@{#42029}
2017-01-03 13:16:59 +00:00
bmeurer
f1473c9bb3 [turbofan] Inline calls to Date.now builtin.
Call the %DateCurrentTime runtime function directly instead, which is
cheaper than calling the C++ builtin.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2612513003
Cr-Commit-Position: refs/heads/master@{#42028}
2017-01-03 13:12:29 +00:00
mvstanton
35a393f87a [Turbofan] Run escape analysis concurrently.
BUG=v8:5428

Review-Url: https://codereview.chromium.org/2606273002
Cr-Commit-Position: refs/heads/master@{#42027}
2017-01-03 13:01:36 +00:00
rmcilroy
b0e9116d59 [Compiler] Track Ignition background compilation separately in RuntimeStats.
Tracks background compilation of Ignition in a separate bucket from main thread
compilation. Also add some more compilation buckets for functions which can take a
significant proportion of compilation.

BUG=v8:5203,v8:5215

Review-Url: https://codereview.chromium.org/2577263002
Cr-Commit-Position: refs/heads/master@{#42026}
2017-01-03 12:49:17 +00:00
leszeks
b8f93dfe9d [profiler] Log both code and bytecode in heap SFI traversal
The heap traversal for SFI code objects when logging compiled functions
was previously accessing the abstract code of an SFI, logging its
bytecode if it exists or code object otherwise. However, there are some
(rare) cases where an SFI has both bytecode and a non-interpreter code
object -- for example, after baseline tier-up -- in which case we want
to log both, as both could be executing (at different points on the
stack).

BUG=v8:5758

Review-Url: https://codereview.chromium.org/2603333002
Cr-Commit-Position: refs/heads/master@{#42025}
2017-01-03 12:48:05 +00:00
leszeks
0b10c04473 [turbofan] Use Node input iterators where possible
Changes some for loops to use node->inputs() instead of iterating over
InputCount and accessing InputAt(i). This saves some checks for
"has_inline_inputs" and so some branches.

Review-Url: https://codereview.chromium.org/2585713002
Cr-Commit-Position: refs/heads/master@{#42024}
2017-01-03 11:29:23 +00:00
tebbi
e3ac5a31cb Revert of [turbofan] fix another divergence in escape analysis (patchset #1 id:1 of https://codereview.chromium.org/2599793002/ )
Reason for revert:
Caused memory corruption.

BUG=chromium:676767

Original issue's description:
> [turbofan] fix another divergence in escape analysis
>
> This divergence bug is very similar to the one fixed in https://codereview.chromium.org/2522253002/, this time it is an oscillation between a cleared field and a new phi node. The page http://www.sears.com/clothing-shoes-jewelry-clothing-men-s-clothing-men-s-jeans/b-1325287370?Brand=LEE&filterList=Brand&sortOption=UNITS_HIGH_TO_LOW allows for a reliable reproduction.
>
> This fix makes sure that once a field that generated a phi gets cleared, it always stays cleared.
>
> BUG=chromium:670202
>
> R=bmeurer@chromium.org
>
> Review-Url: https://codereview.chromium.org/2599793002
> Cr-Commit-Position: refs/heads/master@{#41922}
> Committed: 8435cc8526

TBR=bmeurer@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=chromium:670202

Review-Url: https://codereview.chromium.org/2611623002
Cr-Commit-Position: refs/heads/master@{#42023}
2017-01-03 11:12:05 +00:00
jochen
1795343f3c Add support for idle tasks to the default platform
BUG=

Review-Url: https://codereview.chromium.org/2609833003
Cr-Commit-Position: refs/heads/master@{#42022}
2017-01-03 08:41:40 +00:00
bmeurer
d3ed71ed87 [ic] Use StrictEqual/Equal builtins for CompareIC slow path.
Don't fallback to the %StrictEqual / %Equal runtime functions for the
generic CompareIC slow path, but use the (new) StrictEqual and Equal
builtins instead. This avoids a performance cliff when mixing input
types for strict equality sites.

R=jochen@chromium.org
BUG=v8:4773

Review-Url: https://codereview.chromium.org/2609153002
Cr-Commit-Position: refs/heads/master@{#42021}
2017-01-03 08:30:26 +00:00
zhengxing.li
08f00a15ae X87: [builtins] More stubs to the builtin-o-sphere.
port 05873add85 (r41989)

  original commit message:
  The following ported to builtins:
  FastCloneRegExp
  FastCloneShallowArray
  FastCloneShallowObject

BUG=

Review-Url: https://codereview.chromium.org/2607383002
Cr-Commit-Position: refs/heads/master@{#42020}
2017-01-03 06:26:05 +00:00
zhengxing.li
6ef22472c1 X87: [builtins] FastNewFunctionContextStub becomes a builtin.
port f2e8c9786f (r41988)

  original commit message:

BUG=

Review-Url: https://codereview.chromium.org/2603313002
Cr-Commit-Position: refs/heads/master@{#42019}
2017-01-03 06:03:55 +00:00