Commit Graph

31692 Commits

Author SHA1 Message Date
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
bmeurer
f54fa4d426 [ieee754] Slightly improve unittests for exp/log.
BUG=v8:3266, v8:3468, v8:3493, v8:5086, v8:5108
R=rtoy@chromium.org

Review-Url: https://codereview.chromium.org/2086663004
Cr-Commit-Position: refs/heads/master@{#37165}
2016-06-22 05:56:06 +00:00
bmeurer
488d6e5f84 [turbofan] x - y < 0 is not equivalent to x < y.
We cannot change x - y < 0 to x < y, because it would only be safe if
x - y cannot overflow, which we don't know in general.

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

Review-Url: https://codereview.chromium.org/2090493002
Cr-Commit-Position: refs/heads/master@{#37164}
2016-06-22 05:38:36 +00:00
bmeurer
1006f3cd23 Revert of [Crankshaft] Always check for stubs marked to not require an eager frame. (patchset #2 id:20001 of https://codereview.chromium.org/2089673002/ )
Reason for revert:
Breaks with nosnap: https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap%20-%20debug/builds/7474/steps/Check/logs/regress-2612

Original issue's description:
> [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.
>
> Committed: https://crrev.com/f6facbb2106ffc2918dd249166233a7fa95dc449
> Cr-Commit-Position: refs/heads/master@{#37162}

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

Review-Url: https://codereview.chromium.org/2087963004
Cr-Commit-Position: refs/heads/master@{#37163}
2016-06-22 05:35:34 +00:00
rmcilroy
f6facbb210 [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.

Review-Url: https://codereview.chromium.org/2089673002
Cr-Commit-Position: refs/heads/master@{#37162}
2016-06-22 03:53:01 +00:00
v8-autoroll
f45c65cae0 Update V8 DEPS.
Rolling v8/build to f56976d676dfd5597229b21a83a53a58704582bf

Rolling v8/buildtools to 56eaae134648135663c4aa1ed82278572b5f35ef

Rolling v8/tools/mb to 5268873c8c1eebbf1a3aaed7e63f99b600fab65e

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

Review-Url: https://codereview.chromium.org/2087933004
Cr-Commit-Position: refs/heads/master@{#37161}
2016-06-22 03:24:26 +00:00
bjaideep
97c2154869 PPC/s390: [builtins] NonNumberToNumber and StringToNumber now use CallRuntime instead of TailCallRuntime
Port b5c69cbf39

Original commit message:

    With the tail call, pointers to the JS heap could be pushed on a
    js-to-wasm frame. On the js-to-wasm frame, however, this pointer would
    not be updated by the GC.

R=ahaas@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=617084
LOG=N

Review-Url: https://codereview.chromium.org/2085183002
Cr-Commit-Position: refs/heads/master@{#37160}
2016-06-22 02:38:12 +00:00
ritesht
d0b8e7fb54 [wasm] Support undefined indirect table entries, behind a flag.
Add a flag to gate experimental support for dynamic code loading and JITing (at runtime in a wasm module).

Enhancing functionality of the indirect function table to support JITing and dynamic linking by allowing additional space to be filled with an "undefined" function signature.

BUG=v8:5044
LOG=N
TEST=None
R=mtrofin@chromium.org,bradnelson@chromium.org

Review-Url: https://codereview.chromium.org/2049513003
Cr-Commit-Position: refs/heads/master@{#37159}
2016-06-22 00:53:31 +00:00
dpranke
365e32b130 Use the new "optimize_speed" GN config.
The GN configs for different optimization levels are confusing and
should probably be reworked, but for now we add a special config
specifically so that we can compile with -O3 when appropriate.

R=brettw@chromium.org, machenbach@chromium.org
BUG=616031, 618678, 621335

Review-Url: https://codereview.chromium.org/2076403002
Cr-Commit-Position: refs/heads/master@{#37158}
2016-06-21 23:37:14 +00:00
bjaideep
2b8f55456a PPC/s390: [builtins] Introduce a proper BUILTIN frame type.
Port f47b9e9810

Original commit message:

    This adds a new BUILTIN frame type, which supports variable number of
    arguments for builtins implemented in hand-written native code (we will
    extend this mechanism to TurboFan builtins at some point). Convert the
    Math.max and Math.min builtins to construct a BUILTIN frame if required.

    This does not yet work for C++ builtins, but that'll be the next step.

R=jgruber@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=v8:4815
LOG=N

Review-Url: https://codereview.chromium.org/2087433003
Cr-Commit-Position: refs/heads/master@{#37157}
2016-06-21 21:43:33 +00:00
jwolfe
d8147eb98c Reland: change most cases of variable redeclaration from TypeError to SyntaxError.
Reland of https://codereview.chromium.org/2048703002/

Code like `let a; eval("var a;");` should throw a SyntaxError, not a TypeError
(this caused a test262 failure.). However, the code `eval("function NaN() {}");`
should actually throw a TypeError. This patch changes most cases of
redeclaration errors from TypeError to SyntaxError. See the test
mjsunit/regress/redeclaration-error-types for a thorough analysis with spec
references.

The relevant sections of the spec are ES#sec-globaldeclarationinstantiation and
ES#sec-evaldeclarationinstantiation

BUG=v8:4955
LOG=y
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
R=adamk

Review-Url: https://codereview.chromium.org/2086063002
Cr-Commit-Position: refs/heads/master@{#37156}
2016-06-21 20:19:59 +00:00
rossberg
271a7f55cd Refactor module builder
- Use ES6 classes and other goodies.
- Make some names match design/spec.
- Remove obsolete generation of END section.

R=bradnelson@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2081973003
Cr-Commit-Position: refs/heads/master@{#37155}
2016-06-21 19:48:16 +00:00
caitpotter88
e45fba811f [parser] only parse async arrow function when necessary
Previously, an async arrow function would be parsed if any valid
ConditionalExpression began with the identifier "async", and its following token
was on the same line.

So for example, `async.bar foo => 1` was parsed as a valid async arrow function.
This patch corrects this behaviour by asserting that the following token is a
valid arrow parameters start.

BUG=v8:4483
R=littledan@chromium.org, henrique.ferreiro@gmail.com

Review-Url: https://codereview.chromium.org/2089733002
Cr-Commit-Position: refs/heads/master@{#37154}
2016-06-21 19:48:15 +00:00
verwaest
9bfd7b9d17 Optimize HandleApiCallHelper and friends
BUG=chromium:595492

Review-Url: https://codereview.chromium.org/2084923003
Cr-Commit-Position: refs/heads/master@{#37153}
2016-06-21 19:23:01 +00:00
jochen
2c8ca9ad09 Make sure api interceptors don't change the store target w/o storing
BUG=chromium:619166
R=verwaest@chromium.org

Review-Url: https://codereview.chromium.org/2082633002
Cr-Commit-Position: refs/heads/master@{#37152}
2016-06-21 18:09:52 +00:00
balazs.kilvady
8c4e388e50 MIPS: Fix 'MIPS: Followup [turbofan] Introduce new operators Float32SubPreserveNan and Float64SubPreserveNan.'
Port eff959bb55

Original commit message:
Float32SubMinusZero and Float64SubMinusZero tests are failing because MIPS does not preserve NaN payload according to Wasm spec. Implemented macro-assembler methods that check for NaN operands, and return the qNaN value with preserved payload and sign bits.

TEST=cctest/test-run-wasm/Run_WasmFloat32SubMinusZero, cctest/test-run-wasm/Run_WasmFloat64SubMinusZero
BUG=

Review-Url: https://codereview.chromium.org/2081993002
Cr-Commit-Position: refs/heads/master@{#37151}
2016-06-21 17:04:52 +00:00