Commit Graph

31707 Commits

Author SHA1 Message Date
rmcilroy
13670e5073 [Interpreter] Add ValueOf intrinsic.
BUG=v8:4822

Review-Url: https://codereview.chromium.org/2097473002
Cr-Commit-Position: refs/heads/master@{#37215}
2016-06-23 12:36:28 +00:00
verwaest
059f2fa101 Cache Object.create maps on the passed prototype's PrototypeInfo
BUG=chromium:603144

Review-Url: https://codereview.chromium.org/2083353002
Cr-Commit-Position: refs/heads/master@{#37214}
2016-06-23 12:18:48 +00:00
ivica.bogosavljevic
42ac51c82e Fix int64 lowering on big-endian architectures.
Lowering of Int64Load, Int64Store, BitcastInt64ToFloat64 and
BitcastFloat64ToInt64 was using LE word ordering in memory,
causing failures on some tests.

BUG=mjsunit/regress/regress-599719,mjsunit/regress/regress-599717

Review-Url: https://codereview.chromium.org/2080213004
Cr-Commit-Position: refs/heads/master@{#37213}
2016-06-23 11:41:07 +00:00
georgia.kouveli
f5d90fc9f2 [arm64] Fix handling of CMN and ADD/SUB with overflow in VisitBinop.
CMN is a flag-setting add operation, and therefore is commutative.
{Add,Sub}WithOverflow generate ADD/SUB instructions that cannot
support a ROR shift.

BUG=

Review-Url: https://codereview.chromium.org/2087233005
Cr-Commit-Position: refs/heads/master@{#37212}
2016-06-23 11:29:20 +00:00
yangguo
2a5a8fde1c Simplify source position calculation.
R=jgruber@chromium.org
BUG=v8:5117

Review-Url: https://codereview.chromium.org/2093613002
Cr-Commit-Position: refs/heads/master@{#37211}
2016-06-23 11:17:40 +00:00
mlippautz
4244b989ca [heap] Modernize all *Page iterators to be proper C++ iterators
As part of the page type unification also unify page iterators. Iterating
over a space works the same for all spaces now (new, old, lo).

Iterating over pages of a space follows now the regular C++ iterator pattern:
- for (auto it = space->begin(); it != space->end(); ++it) {}
- for (Page* p : *space) {}

GC only: Loop supporting unlinking/freeing of a Page on the fly:
  for (auto it = space->begin(); != space->end();) {
    Page* p = *(it++);
    p->Unlink();
  }

For iteration of a range of new space pages use NewSpacePageRange which
also verifies that the range is actually a proper new space page range.

BUG=chromium:581412
LOG=N

Review-Url: https://codereview.chromium.org/2088223002
Cr-Commit-Position: refs/heads/master@{#37210}
2016-06-23 09:57:06 +00:00
mlippautz
2658eb2af5 [heap] Fix bad-cast in Sweeper
BUG=chromium:622351
LOG=N
R=jochen@chromium.org

Review-Url: https://codereview.chromium.org/2097453002
Cr-Commit-Position: refs/heads/master@{#37209}
2016-06-23 09:11:08 +00:00
bmeurer
5250da6861 [turbofan] Initial version of RedundancyElimination.
The redundancy elimination is currently a graph reducer that tries to
combine redundant checks in the effect chain. It does this by
propagating the checks that happened along effect paths, which is pretty
similar to what the BranchElimination does on the control chain. We run
this reducer together with the other optimizations right after the
representation selection.

An upcoming CL will extend the redundancy elimination to also eliminate
redundant loads (and eventually map checks).

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

Review-Url: https://codereview.chromium.org/2091503003
Cr-Commit-Position: refs/heads/master@{#37208}
2016-06-23 08:59:34 +00:00
ishell
a81c66546e [mips] Fix using signaling NaN for holes in fixed double arrays.
BUG=chromium:620650

Review-Url: https://codereview.chromium.org/2086343002
Cr-Commit-Position: refs/heads/master@{#37207}
2016-06-23 08:27:54 +00:00
jochen
284f50c53f Enable check for non-gender neutral pronouns
R=danno@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2088393002
Cr-Commit-Position: refs/heads/master@{#37206}
2016-06-23 07:15:18 +00:00
v8-autoroll
766e7a569c Update V8 DEPS.
Rolling v8/build to 7194daf8360db4618456185d29db524cdc153bb4

Rolling v8/tools/mb to a7c3a793cc06ce1703347c2d2eeac6a94ac16b4d

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

Review-Url: https://codereview.chromium.org/2094603002
Cr-Commit-Position: refs/heads/master@{#37205}
2016-06-23 03:26:33 +00:00
mattloring
97c2bc362f Revert of Include file names in trace_turbo output (patchset #3 id:40001 of https://codereview.chromium.org/2083863004/ )
Reason for revert:
Many build bots are failing with a message of the form:

Missing or invalid v8 JSON file: /tmp/tmp2qcEUy_swarming/0/output.json

Can be relanded once we understand why these failures are occuring.

Original issue's description:
> Include file names in trace_turbo output
>
> The trace turbo output will overwrite itself when functions in different
> files share the same name. Output files now have the form
> `turbo-<function_name>:<opt_file_name>-<opt_phase>.suffix`.
>
> R=ofrobots@google.com
> BUG=
>
> Committed: https://crrev.com/a53b9bf02f31e5647c37e0392afa19f74df1a3ba
> Cr-Commit-Position: refs/heads/master@{#37199}

TBR=ofrobots@google.com,bmeurer@chromium.org,danno@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review-Url: https://codereview.chromium.org/2083153004
Cr-Commit-Position: refs/heads/master@{#37204}
2016-06-22 22:23:42 +00:00
mtrofin
0b98dbcc1e [wasm] Consolidate CompileAndRunWasmModule
Remove second wasm module compilation and instantiation path that
we had in CompileAndRunWasmModule and reuse the same path used
by user code.

BUG=

Review-Url: https://codereview.chromium.org/2091533002
Cr-Commit-Position: refs/heads/master@{#37203}
2016-06-22 21:39:14 +00:00
littledan
2601900dda Reland of write scopes of non-simple default arguments (patchset #1 id:1 of https://codereview.chromium.org/2081323006/ )
Reason for revert:
Infra issue appears to be over

TBR=adamk@chromium.org

Original issue's description:
> Revert of Rewrite scopes of non-simple default arguments (patchset #5 id:80001 of https://codereview.chromium.org/2077283004/ )
>
> Reason for revert:
> Seems to close tree (but it could be an infra issue)
>
> Original issue's description:
> > Rewrite scopes of non-simple default arguments
> >
> > Default parameters have additional declaration block scopes inserted
> > around them when something in the function scope calls eval. This
> > patch sets the parent scope of the expressions introduced due to
> > those defaults to the new block scope.
> >
> > R=adamk
> > BUG=chromium:616386
> >
> > Committed: https://crrev.com/0e14baf712955a1993f742647bb2adc293702b80
> > Cr-Commit-Position: refs/heads/master@{#37198}
>
> TBR=adamk@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=chromium:616386
>
> Committed: https://crrev.com/dd50262933d2ac087da32be887a7c18385fd998e
> Cr-Commit-Position: refs/heads/master@{#37201}

TBR=adamk@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:616386

Review-Url: https://codereview.chromium.org/2086353003
Cr-Commit-Position: refs/heads/master@{#37202}
2016-06-22 21:09:57 +00:00
littledan
dd50262933 Revert of Rewrite scopes of non-simple default arguments (patchset #5 id:80001 of https://codereview.chromium.org/2077283004/ )
Reason for revert:
Seems to close tree (but it could be an infra issue)

Original issue's description:
> Rewrite scopes of non-simple default arguments
>
> Default parameters have additional declaration block scopes inserted
> around them when something in the function scope calls eval. This
> patch sets the parent scope of the expressions introduced due to
> those defaults to the new block scope.
>
> R=adamk
> BUG=chromium:616386
>
> Committed: https://crrev.com/0e14baf712955a1993f742647bb2adc293702b80
> Cr-Commit-Position: refs/heads/master@{#37198}

TBR=adamk@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:616386

Review-Url: https://codereview.chromium.org/2081323006
Cr-Commit-Position: refs/heads/master@{#37201}
2016-06-22 19:58:10 +00:00
michaelbai
8d830a5aab Remove natives_blob.bin's arch dependence in Android.
BUG=620855

Review-Url: https://codereview.chromium.org/2074283002
Cr-Commit-Position: refs/heads/master@{#37200}
2016-06-22 18:48:52 +00:00
mattloring
a53b9bf02f Include file names in trace_turbo output
The trace turbo output will overwrite itself when functions in different
files share the same name. Output files now have the form
`turbo-<function_name>:<opt_file_name>-<opt_phase>.suffix`.

R=ofrobots@google.com
BUG=

Review-Url: https://codereview.chromium.org/2083863004
Cr-Commit-Position: refs/heads/master@{#37199}
2016-06-22 18:37:01 +00:00
littledan
0e14baf712 Rewrite scopes of non-simple default arguments
Default parameters have additional declaration block scopes inserted
around them when something in the function scope calls eval. This
patch sets the parent scope of the expressions introduced due to
those defaults to the new block scope.

R=adamk
BUG=chromium:616386

Review-Url: https://codereview.chromium.org/2077283004
Cr-Commit-Position: refs/heads/master@{#37198}
2016-06-22 18:22:18 +00:00
yangguo
8b67a00223 Only count legacy parser usage if legacy parser had effect.
We would otherwise also count if its just trimming whitespaces.

R=adamk@chromium.org
BUG=chromium:618595

Review-Url: https://codereview.chromium.org/2080183003
Cr-Commit-Position: refs/heads/master@{#37197}
2016-06-22 18:07:47 +00:00
nikolaos
b9f682baaf Fix bug with illegal spread as single arrow parameter
R=adamk@chromium.org
BUG=chromium:621496
LOG=N

Review-Url: https://codereview.chromium.org/2084703005
Cr-Commit-Position: refs/heads/master@{#37196}
2016-06-22 18:07:46 +00:00
lpy
04f710ac20 [Reland] Refactor CpuProfiler.
Currently CpuProfiler is a subclass of CodeEventListener, it listens code events
from Logger, constructs and stores CodeEventsContainer. This patch is part of
the effort to split the logic of CodeEventListener as ProfilerListener out of
the profiling functionality logic in CpuProfiler. A ProfilerListener will listen
to code events, construct code event to CodeEventsContainer and pass it to code
event handler.

The reason we refactor CpuProfiler is that eventually we want to move
CpuProfiler as part of sampler library and code event listener should stay
inside V8.

Main changes:
1. Refactored CpuProfiler into two parts, the CpuProfiler with profling
functionality and the ProfilerListener listening to code events from Logger.
2. Created CodeEventObserver and made CpuProfiler inherit from it.
ProfilerListener will have a list of observers and call CodeEventHandler once a
code event is created.
3. Moved code entry list from CodeEntry to ProfilerListener.

Minor changes:
1. Moved static code entry as part of CodeEntry.
2. Added ProfilerListener to Logger.

BUG=v8:4789

Committed: https://crrev.com/cb59fc1facc9b390e2c7544b4da56a4e0a9b3222
Review-Url: https://codereview.chromium.org/2053523003
Cr-Original-Commit-Position: refs/heads/master@{#37112}
Cr-Commit-Position: refs/heads/master@{#37195}
2016-06-22 16:45:51 +00:00
littledan
c444b2b7af Stage async/await
BUG=v8:4483

Review-Url: https://codereview.chromium.org/2083653003
Cr-Commit-Position: refs/heads/master@{#37194}
2016-06-22 16:10:19 +00:00
bgeron
21fdde3c76 Make syntax for boolean flags more discoverable.
Because --help does not show how to use boolean flags.

R=jkummerow@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2087223002
Cr-Commit-Position: refs/heads/master@{#37193}
2016-06-22 16:07:11 +00:00
hlopko
815da79694 Use gender neutral terms
BUG=
LOG=no

Review-Url: https://codereview.chromium.org/2085043005
Cr-Commit-Position: refs/heads/master@{#37192}
2016-06-22 15:05:18 +00:00
mvstanton
b52f71d57d Gender neutral comments.
BUG=

Review-Url: https://codereview.chromium.org/2085273002
Cr-Commit-Position: refs/heads/master@{#37191}
2016-06-22 14:54:03 +00:00
hlopko
be8d603464 Use gender neutral terms in heap.cc
BUG=
LOG=no

Review-Url: https://codereview.chromium.org/2084823004
Cr-Commit-Position: refs/heads/master@{#37190}
2016-06-22 14:45:03 +00:00
mythria
dc4faa623c [Interpreter] Switch functions from ignition to full-codegen early.
Updates kProfilerTicksBeforeBaseline in runtime-profiler to allow
functions to switch from ignition to full-codgen earlier. This helps
on many benchmarks and does not impact the code size significantly.

BUG=v8:4280
LOG=N

Review-Url: https://codereview.chromium.org/2085153003
Cr-Commit-Position: refs/heads/master@{#37189}
2016-06-22 14:41:53 +00:00
machenbach
046c1f24bd [mb] Switch windows bots to mb
BUG=chromium:616035
NOTRY=true

Review-Url: https://codereview.chromium.org/2088963003
Cr-Commit-Position: refs/heads/master@{#37188}
2016-06-22 13:53:05 +00:00
jochen
344b945601 Add GN targets for samples
BUG=chromium:609107
R=machenbach@chromium.org

Review-Url: https://codereview.chromium.org/2081323004
Cr-Commit-Position: refs/heads/master@{#37187}
2016-06-22 13:37:27 +00:00
bmeurer
1ee71aa29c [turbofan] Fix bug in CheckTaggedSigned lowering.
TBR=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2087803005
Cr-Commit-Position: refs/heads/master@{#37186}
2016-06-22 12:25:45 +00:00
rmcilroy
485e77519f [Interpreter] Add intrinsics called as stubs.
Adds support for intrinsics which can be called as stubs. Namely:
 - HasProperty
 - MathPow
 - NewObject
 - NumberToString
 - RegExpConstructResult
 - RegExpExec
 - Substring
 - ToString
 - ToName
 - ToLength
 - ToNumber
 - ToObject

Also adds interface descriptors for stub calls which have arguments
passed on the stack.

BUG=v8:4280
LOG=N

Review-Url: https://codereview.chromium.org/2051573002
Cr-Commit-Position: refs/heads/master@{#37185}
2016-06-22 12:22:47 +00:00
mlippautz
7a88ff3cc0 [heap] Filter out stale left-trimmed handles for scavenges
The missing part from
  https://codereview.chromium.org/2078403002/

R=jochen@chromium.org
BUG=chromium:621869
LOG=N

Review-Url: https://codereview.chromium.org/2077353004
Cr-Commit-Position: refs/heads/master@{#37184}
2016-06-22 12:22:46 +00:00
ahaas
d4d4703266 [wasm] Move the semaphore for parallel compilation to the wasm module.
If the semaphore is stored as a local variable in {CompileInParallel},
then the semaphore was sometimes deallocated too early and caused
the compilation tasks to crash. This only happens with libc-2.19,
libc-2.21 fixes the problem.

R=mlippautz@chromium.org, rossberg@chromium.org

Review-Url: https://codereview.chromium.org/2080223006
Cr-Commit-Position: refs/heads/master@{#37183}
2016-06-22 11:31:03 +00:00
ishell
bbbf21c240 Don't crash when trying to print a call stack of an OOM.
Receiver is the hole when we construct a builtin object.

BUG=chromium:611684

Review-Url: https://codereview.chromium.org/2083163003
Cr-Commit-Position: refs/heads/master@{#37182}
2016-06-22 11:24:17 +00:00
rmcilroy
1b4e0130fa Reland: [Crankshaft] Always check for stubs marked to not require an eager frame.
Previously only stubs built in the snapshot were checked for having an
eager frame. This caused a regression to creap in on ia32 for
RegExpConstructResultStub. Change test to always check.

CQ_EXTRA_TRYBOTS=tryserver.v8:v8_linux_nosnap_dbg

Review-Url: https://codereview.chromium.org/2089673002
Cr-Commit-Position: refs/heads/master@{#37181}
2016-06-22 11:09:40 +00:00
verwaest
813f231896 Further streamline HandleApiCall
The CL avoids superfluous conversions / reboxing and handlescopes.

BUG=

Review-Url: https://codereview.chromium.org/2089703004
Cr-Commit-Position: refs/heads/master@{#37180}
2016-06-22 10:23:45 +00:00
jochen
c7715c2fbe Add HasOwnProperty with array indexes
This way embedders don't have to manually convert them to strings

BUG=chromium:619166
R=verwaest@chromium.org

Review-Url: https://codereview.chromium.org/2085223002
Cr-Commit-Position: refs/heads/master@{#37179}
2016-06-22 10:20:45 +00:00
yangguo
03996851f4 [serializer] reorder some bytecodes to free up large blocks.
R=vogelheim@chromium.org

Review-Url: https://codereview.chromium.org/2083303002
Cr-Commit-Position: refs/heads/master@{#37178}
2016-06-22 10:14:45 +00:00
danno
9dc2c31d64 [turbolizer] Performance improvements for selection in graph & schedule
Review-Url: https://codereview.chromium.org/2066313002
Cr-Commit-Position: refs/heads/master@{#37177}
2016-06-22 10:11:39 +00:00
yangguo
55b2124968 [heap] reorder root list items.
- Moves the most often used 32 items to the top. This shaves off 10kB
  from the startup snapshot size.
- Sorts the rest by usage and type.

R=mlippautz@chromium.org

Review-Url: https://codereview.chromium.org/2088023003
Cr-Commit-Position: refs/heads/master@{#37176}
2016-06-22 09:30:57 +00:00
ahaas
c5be8d2af5 [wasm] Store the semaphore for parallel compilation in exactly one smart pointer.
R=mlippautz@chromium.org

Review-Url: https://codereview.chromium.org/2080223005
Cr-Commit-Position: refs/heads/master@{#37175}
2016-06-22 09:22:11 +00:00
verwaest
bedcc31b83 Remove element handling from named path
This was necessary since certain named handlers didn't check the name beforehand, and could miss to LoadIC_Miss with a name convertible to an index. This is currently not supported anymore, so we can drop this path. We should make sure we miss to the right label instead.

BUG=

Review-Url: https://codereview.chromium.org/2083283002
Cr-Commit-Position: refs/heads/master@{#37174}
2016-06-22 09:22:10 +00:00
jgruber
6bd37e3f20 [builtins] Fix clobbered reg in Math.{Max,Min}
edi is expected to contain the JS function. Ensure that it is not
overwritten.

BUG=chromium:621431,chromium:621550,chromium:621217
R=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2085043004
Cr-Commit-Position: refs/heads/master@{#37173}
2016-06-22 09:18:55 +00:00
yangguo
2618eb0a7b [heap] compact more weak fixed arrays before serializing.
R=mlippautz@chromium.org

Review-Url: https://codereview.chromium.org/2087163002
Cr-Commit-Position: refs/heads/master@{#37172}
2016-06-22 09:13:09 +00:00
mlippautz
21b55c4aa5 [heap] Fix check in AdvancePage
Failing to do the right check in AdvancePage results in a crash in a CHECK later
in EnsureCurrentCapacity.

BUG=chromium:620750,chromium:622115
LOG=N
R=jochen@chromium.org

Review-Url: https://codereview.chromium.org/2090013002
Cr-Commit-Position: refs/heads/master@{#37171}
2016-06-22 09:10:09 +00:00
yangguo
6793728528 Use zig-zag encoding in the source position table.
R=vogelheim@chromium.org

Review-Url: https://codereview.chromium.org/2081703002
Cr-Commit-Position: refs/heads/master@{#37170}
2016-06-22 09:06:53 +00:00
yangguo
5eaf4ac48f [debugger] add test case for scope materialization and rest params.
R=jgruber@chromium.org
BUG=v8:4703

Review-Url: https://codereview.chromium.org/2088703002
Cr-Commit-Position: refs/heads/master@{#37169}
2016-06-22 08:35:28 +00:00
bmeurer
a334354288 [turbofan] Add dedicated test for check constant folding.
This adds a dedicated test to make sure we don't try constant folding on
checks (in this case CheckTaggedPointer), which would generate invalid
code as we removing checks that guard the constant without knowing
whether it's safe to do so.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2087153002
Cr-Commit-Position: refs/heads/master@{#37168}
2016-06-22 08:20:50 +00:00
bmeurer
c30b854aa3 [turbofan] Some strength reduction on Smi/HeapObject checks.
Let the SimplifiedOperatorReducer perform some strength reduction for
certain CheckTaggedSigned and CheckTaggedPointer inputs (reusing the
existing logic for ObjectIsSmi).

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

Review-Url: https://codereview.chromium.org/2080703006
Cr-Commit-Position: refs/heads/master@{#37167}
2016-06-22 07:52:19 +00:00
jarin
ef925a2739 [turbofan] Reuse the operation typer's logic in the typer.
Review-Url: https://codereview.chromium.org/2084943002
Cr-Commit-Position: refs/heads/master@{#37166}
2016-06-22 06:55:43 +00:00