Commit Graph

34979 Commits

Author SHA1 Message Date
yangguo
2f135d464c [debugger] basic test infrastructure for new debugger test api.
This introduces:
- a way in d8 to send messages to the inspector and receive responses.
- a new test suite where existing debugger tests should migrate to.

R=jgruber@chromium.org, kozyatinskiy@chromium.org, machenbach@chromium.org
BUG=v8:5530

Review-Url: https://chromiumcodereview.appspot.com/2425973002
Cr-Commit-Position: refs/heads/master@{#40487}
2016-10-21 06:38:05 +00:00
v8-autoroll
6e89606756 Update V8 DEPS.
Rolling v8/third_party/catapult: fb397f8..147f2cf

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

Review-Url: https://chromiumcodereview.appspot.com/2434373003
Cr-Commit-Position: refs/heads/master@{#40486}
2016-10-21 03:32:49 +00:00
bjaideep
c4c840d45c s390x: Implement kS390_RotLeftAndClear64
R=joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=
LOG=N

Review-Url: https://chromiumcodereview.appspot.com/2439673005
Cr-Commit-Position: refs/heads/master@{#40485}
2016-10-20 22:56:35 +00:00
kozyatinskiy
820811f582 [inspector] fix UAF in another part of console code
BUG=chromium:656823
R=dgozman@chromium.org

Review-Url: https://chromiumcodereview.appspot.com/2436783003
Cr-Commit-Position: refs/heads/master@{#40484}
2016-10-20 21:36:12 +00:00
kozyatinskiy
24e5dfb546 [inspector] migrate stepping related methods to debug-interface
* introduced DebugInterface::PrepareStep and DebugInterface::ClearStepping method.
Inspector calls these methods only on pause and not interseted in calling this for not current break_id so we don't need to expose debug interface with break_id argument and can only check that current break_id is valid.

BUG=chromium:652939,v8:5510
R=yangguo@chromium.org,dgozman@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel

Review-Url: https://chromiumcodereview.appspot.com/2423153002
Cr-Commit-Position: refs/heads/master@{#40483}
2016-10-20 18:51:46 +00:00
neis
209e57e98d [test] Fix typo in assertInstanceOf in mjsunit.js.
R=adamk@chromium.org, marja@chromium.org
BUG=

Review-Url: https://chromiumcodereview.appspot.com/2436073002
Cr-Commit-Position: refs/heads/master@{#40482}
2016-10-20 17:55:52 +00:00
vogelheim
9e6bfbd33c Revert of Speedup access to global_proxy.* attributes/accessors. (patchset #6 id:160001 of https://codereview.chromium.org/2403003002/ )
Reason for revert:
Revert, because of crbug.com/656959.

Original issue's description:
> Speedup access to global_proxy.* attributes/accessors.
>
> Using a global proxy (e.g. 'window.f', 'w.f' or 'this.f') is considerably slower than evaluating just 'f'. This CL aims to perform the necessary checks at compile time and inline the accesses.
>
> This is a follow-on CL to crrev.com/2369933005:
> - The initial upload is crrev.com/2369933005 + a rebase.
> - The remaining issues are the fixes requested by the reviewers on that CL.
>
> BUG=chromium:634276, chromium:654716
>
> Committed: https://crrev.com/8f43d748272536117008aa6a1b53ea52126261c1
> Committed: https://crrev.com/041314524952a3c1bc71bd3beafbbb37319f1d22
> Cr-Original-Commit-Position: refs/heads/master@{#40153}
> Cr-Commit-Position: refs/heads/master@{#40365}

TBR=jochen@chromium.org,verwaest@chromium.org
NOTRY=true
NOPRESUBMIT=true
BUG=chromium:634276, chromium:654716

Review-Url: https://chromiumcodereview.appspot.com/2434233002
Cr-Commit-Position: refs/heads/master@{#40481}
2016-10-20 17:48:30 +00:00
alph
fa0f953297 [profiler] Update cpu profile tracing format.
Encapsulate nodes and samples into cpuProfile object.

BUG=chromium:406277

Review-Url: https://chromiumcodereview.appspot.com/2425093002
Cr-Commit-Position: refs/heads/master@{#40480}
2016-10-20 17:47:09 +00:00
adamk
35a3ccbfac [ignition] Eliminate hole checks where statically possible for loads and stores
Move hole check logic from full-codegen into scope analysis, and store the
"needs hole check" bit on VariableProxy. This makes it easy to re-use in
any backend: it will be trivial to extend the use of this logic in, e.g.,
full-codegen variable stores.

While changing the signatures of the variable loading/storing methods in
Ignition, I took the liberty of replacing the verb "Visit" with "Build", since these
are not part of AST visiting.

BUG=v8:5460

Review-Url: https://chromiumcodereview.appspot.com/2411873004
Cr-Commit-Position: refs/heads/master@{#40479}
2016-10-20 17:32:08 +00:00
ulan
189794ddb2 Reland "[heap] Start sweeper tasks after evacuation. (patchset #2 id:20001 of https://chromiumcodereview.appspot.com/2428043002/ )"
The performance regression in crbug.com/657776 was not caused by this CL.

This reverts commit 4490a7601c.

BUG=

Review-Url: https://chromiumcodereview.appspot.com/2437873004
Cr-Commit-Position: refs/heads/master@{#40478}
2016-10-20 16:25:26 +00:00
jpp
5331e3b616 [V8][asm.js] Adds support to global const variables.
This CL adds support for:
https://discourse.wicg.io/t/allow-const-global-variables/684

It allows global const variables to be used as if they were numeric
literals. For example:

  const f0 = fround(0);
  ...
  function foo() {
    var v = f0;  // no type annotation.
    ...
    return f0;  // no return type annotation.
  }

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

Review-Url: https://chromiumcodereview.appspot.com/2435823002
Cr-Commit-Position: refs/heads/master@{#40477}
2016-10-20 15:48:41 +00:00
heimbuef
ef690ca387 Constrain the zone segment pool size
Added a size constraint to the configuration to limit the segment pool.
This will likely fix the memory alerts from small android devices.

BUG=chromium:655129

Review-Url: https://chromiumcodereview.appspot.com/2424393002
Cr-Commit-Position: refs/heads/master@{#40476}
2016-10-20 14:48:55 +00:00
bjaideep
83e66947cc PPC/s390: [wasm] Trim graph before scheduling.
Port 9902368259

Original commit message:

    The scheduler expects a trimmed graph, so we have to trim the graph
    before scheduling.

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

BUG=
LOG=N

Review-Url: https://chromiumcodereview.appspot.com/2431093004
Cr-Commit-Position: refs/heads/master@{#40475}
2016-10-20 14:32:44 +00:00
ahaas
57b14b0606 [wasm] Track in the interpreter if a NaN could have been produced.
The wasm specification does not fully specify the binary representation
of NaN: the sign bit can be non-deterministic. The wasm-code fuzzer
found a test case where the wasm interpreter and the compiled code
produce a different sign bit for a NaN, and as a consequence they
produce different results.

With this CL the interpreter tracks whether it executed an instruction
which can produce a NaN, which are div and sqrt instructions. The
fuzzer uses this information and compares the result of the interpreter
with the result of the compiled code only if there was no instruction
which could have produced a NaN.

R=titzer@chromium.org

TEST=cctest/test-run-wasm-interpreter/TestMayProduceNaN
BUG=chromium:657481

Review-Url: https://chromiumcodereview.appspot.com/2438603003
Cr-Commit-Position: refs/heads/master@{#40474}
2016-10-20 14:27:45 +00:00
mtrofin
2282dd0941 [wasm] remove deprecated deserialization API
We don't need the Deserialize API taking in a SerializedData anymore.

BUG=

Review-Url: https://chromiumcodereview.appspot.com/2436543004
Cr-Commit-Position: refs/heads/master@{#40473}
2016-10-20 14:19:30 +00:00
mtrofin
d2784b985f [turbofan] splinters should spill if there is no register use
When allocating for splinters, we were prematurely reverting to the
hot range behavior, even when the range didn't actually have any
positions requiring a register. This could cause unnecessary moves.

BUG=

Review-Url: https://chromiumcodereview.appspot.com/2436813003
Cr-Commit-Position: refs/heads/master@{#40472}
2016-10-20 14:18:25 +00:00
mstarzinger
510b56d3f2 Revert "[compiler] Ship Ignition for all TurboFan code."
Breaks layout tests on Blink builders.

TBR=machenbach@chromium.org

Review-Url: https://chromiumcodereview.appspot.com/2428413004
Cr-Commit-Position: refs/heads/master@{#40471}
2016-10-20 14:09:29 +00:00
mstarzinger
2b11a0b92d [interpreter] Enable tests that no longer fail.
R=mythria@chromium.org
BUG=v8:5038

Review-Url: https://chromiumcodereview.appspot.com/2437023002
Cr-Commit-Position: refs/heads/master@{#40470}
2016-10-20 12:48:08 +00:00
ishell
9e720e3fdd [ic] Refactoring definition of a smi-encoded load handlers.
BUG=

Review-Url: https://chromiumcodereview.appspot.com/2433333002
Cr-Commit-Position: refs/heads/master@{#40469}
2016-10-20 12:45:41 +00:00
mythria
8a80c3b70f [Interpreter] Collect feedback about Oddballs in Bitwise, Inc, Dec operations.
Add support to collect feedback about oddballs for Bitwise binary operations and
Increment and decrement operations. For the case of Oddballs the code to convert
them to numbers is inlined into the handlers instead of calling the
NonNumberToNumber Stub.

BUG=v8:4280, v8:5400

Review-Url: https://chromiumcodereview.appspot.com/2407103003
Cr-Commit-Position: refs/heads/master@{#40468}
2016-10-20 12:43:47 +00:00
ivica.bogosavljevic
f36713b5e9 MIPS: Simulate SEB and SEH instructions on MIPS32R1 through MacroAssembler
SEB and SEH instructions are not available on MIPS32R1. This caused several failures on
MIPS32R1 in mjsunit/wasm/* and mjsunit/asm test suites.
This fix simulates these instruction in MacroAssembler for those architectures that do not support them.

TEST=mjsunit/asm/sqlite3/sqlite-pointer-masking,mjsunit/wasm/embenchen/lua_binarytrees
BUG=

Review-Url: https://chromiumcodereview.appspot.com/2434973002
Cr-Commit-Position: refs/heads/master@{#40467}
2016-10-20 12:28:40 +00:00
ishell
54194b2d8d [stubs] Cleanup CSA::BitFieldDecode(..) and friends.
This CL also introduces IsSetWord<T>(..) and IsSetWord32<T>(..) operations
to ease checking if the bit field is set or not.

BUG=

Review-Url: https://chromiumcodereview.appspot.com/2436893003
Cr-Commit-Position: refs/heads/master@{#40466}
2016-10-20 12:27:42 +00:00
ulan
4490a7601c Revert of [heap] Start sweeper tasks after evacuation. (patchset #2 id:20001 of https://chromiumcodereview.appspot.com/2428043002/ )
Reason for revert:
Performance regression on arm64: crbug.com/657776

Original issue's description:
> [heap] Start sweeper tasks after evacuation.
>
> This allows us to use more tasks for parallel evacuation.
>
> BUG=

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

Review-Url: https://chromiumcodereview.appspot.com/2440693002
Cr-Commit-Position: refs/heads/master@{#40465}
2016-10-20 12:15:24 +00:00
hablich
555a725810 Revert of [inspector] align console implementation with spec (patchset #2 id:20001 of https://chromiumcodereview.appspot.com/2428473003/ )
Reason for revert:
Breaks roll: https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/164610

See https://chromiumcodereview.appspot.com/2434733002/ for more context

Original issue's description:
> [inspector] align console implementation with spec
>
> console should be non enumerable.
>
> BUG=chromium:656826
> R=dgozman@chromium.org

TBR=dgozman@chromium.org,kozyatinskiy@chromium.org
NOTRY=true
BUG=chromium:656826

Review-Url: https://chromiumcodereview.appspot.com/2435013002
Cr-Commit-Position: refs/heads/master@{#40464}
2016-10-20 11:57:48 +00:00
titzer
85cb43cbb8 [wasm] Fix canonicalization bug for function signatures in CallIndirect.
R=ahaas@chromium.org
BUG=chromium:654231

Review-Url: https://chromiumcodereview.appspot.com/2439613003
Cr-Commit-Position: refs/heads/master@{#40463}
2016-10-20 11:26:26 +00:00
mstarzinger
20d29ff036 [compiler] Ship Ignition for all TurboFan code.
This enables Ignition unconditionally for all code that is destined for
optimization with TurboFan. This ensures all optimization attempts will
go through the BytecodeGraphBuilder and that the AstGraphBuilder pipe is
dried out in practice.

R=mvstanton@chromium.org

Review-Url: https://chromiumcodereview.appspot.com/2427953002
Cr-Commit-Position: refs/heads/master@{#40462}
2016-10-20 10:57:58 +00:00
mstarzinger
e75d6885cd [turbofan] Remove dead state value validation.
This removes validation code for state value consistency within frame
states in the {BytecodeGraphBuilder} that is no longer used.

R=jarin@chromium.org

Review-Url: https://chromiumcodereview.appspot.com/2432043006
Cr-Commit-Position: refs/heads/master@{#40461}
2016-10-20 10:54:23 +00:00
littledan
1ebe7eb361 test262 roll
Review-Url: https://chromiumcodereview.appspot.com/2435783002
Cr-Commit-Position: refs/heads/master@{#40460}
2016-10-20 10:29:28 +00:00
jkummerow
818d61ab28 [cleanup] Delete MacroAssembler::CopyBytes, it is dead code
Review-Url: https://chromiumcodereview.appspot.com/2434753003
Cr-Commit-Position: refs/heads/master@{#40459}
2016-10-20 10:15:34 +00:00
titzer
ff46fcb9e4 [wasm] Only use the table maximum in allocation if it is non-zero.
R=ahaas@chromium.org
BUG=chromium:654231

Review-Url: https://chromiumcodereview.appspot.com/2433313002
Cr-Commit-Position: refs/heads/master@{#40458}
2016-10-20 09:34:11 +00:00
ulan
0a82f09110 [heap] Add a guard for restarting the memory reducer after mark-compact.
Currently it is possible to get into a cycle of
mark-compact -> memory reducer -> mark-compact -> memory reducer ...
where the memory reducer does not free memory.

This patch ensures that the memory reducer restarts only if the
committed memory increased by sufficient amount after the last run.

BUG=

Review-Url: https://chromiumcodereview.appspot.com/2433933005
Cr-Commit-Position: refs/heads/master@{#40457}
2016-10-20 09:04:37 +00:00
jochen
9780e970ff Add CodeStubAssembler::FlattenString
R=danno@chromium.org
BUG=

Review-Url: https://chromiumcodereview.appspot.com/2435953002
Cr-Commit-Position: refs/heads/master@{#40456}
2016-10-20 08:48:35 +00:00
machenbach
5006df44c3 Revert of [inspector] migrate stepping related methods to debug-interface (patchset #3 id:40001 of https://chromiumcodereview.appspot.com/2423153002/ )
Reason for revert:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/10808

https://github.com/v8/v8/wiki/Blink-layout-tests

Original issue's description:
> [inspector] migrate stepping related methods to debug-interface
>
> * introduced DebugInterface::PrepareStep and DebugInterface::ClearStepping method.
> Inspector calls these methods only on pause and not interseted in calling this for not current break_id so we don't need to expose debug interface with break_id argument and can only check that current break_id is valid.
>
> BUG=chromium:652939,v8:5510
> R=yangguo@chromium.org,dgozman@chromium.org

TBR=yangguo@chromium.org,dgozman@chromium.org,kozyatinskiy@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:652939,v8:5510

Review-Url: https://chromiumcodereview.appspot.com/2441583002
Cr-Commit-Position: refs/heads/master@{#40455}
2016-10-20 08:32:17 +00:00
zhengxing.li
3cc949e3be X87: [wasm] Trim graph before scheduling.
port 9902368259 (r40446)

  original commit message:
  The scheduler expects a trimmed graph, so we have to trim the graph
  before scheduling.

BUG=

Review-Url: https://chromiumcodereview.appspot.com/2431213003
Cr-Commit-Position: refs/heads/master@{#40454}
2016-10-20 08:27:30 +00:00
mstarzinger
c44dca798b [turbofan] Make FrameStateBeforeAndAfter explicit.
This makes the creation of frame states "before" and "after" node
sequences explicit in the {BytecodeGraphBuilder}. This removes some
complexity and also allows us to ellide redundant {Checkpoint} nodes
before operations that don't actually eager deoptimize.

In this change such redundant {Checkpoint} nodes have been removed for
arguments object and rest array creation bytecodes. The frame states
used in such {Checkpoint} nodes were actually bogus because they would
resume bytecode execution before the {new.target} value is assigned to
its respective variable.

R=jarin@chromium.org

Review-Url: https://chromiumcodereview.appspot.com/2437683003
Cr-Commit-Position: refs/heads/master@{#40453}
2016-10-20 08:23:09 +00:00
machenbach
b659cc1e81 Revert of [profiler] Update cpu profile tracing format. (patchset #2 id:20001 of https://chromiumcodereview.appspot.com/2425093002/ )
Reason for revert:
Breaks
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/10805

See also:
https://github.com/v8/v8/wiki/Blink-layout-tests

Original issue's description:
> [profiler] Update cpu profile tracing format.
>
> Encapsulate nodes and samples into cpuProfile object.
>
> BUG=chromium:406277

TBR=caseq@chromium.org,lpy@chromium.org,yangguo@chromium.org,alph@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:406277

Review-Url: https://chromiumcodereview.appspot.com/2432373004
Cr-Commit-Position: refs/heads/master@{#40452}
2016-10-20 07:40:36 +00:00
gdeepti
e936685b0d [wasm] Remove incorrect assembler check.
BUG=chromium:644670
R=ahaas@chromium.org, titzer@chromium.org

Review-Url: https://chromiumcodereview.appspot.com/2438593003
Cr-Commit-Position: refs/heads/master@{#40451}
2016-10-20 07:39:15 +00:00
kozyatinskiy
859eddbdef [inspector] migrate stepping related methods to debug-interface
* introduced DebugInterface::PrepareStep and DebugInterface::ClearStepping method.
Inspector calls these methods only on pause and not interseted in calling this for not current break_id so we don't need to expose debug interface with break_id argument and can only check that current break_id is valid.

BUG=chromium:652939,v8:5510
R=yangguo@chromium.org,dgozman@chromium.org

Review-Url: https://chromiumcodereview.appspot.com/2423153002
Cr-Commit-Position: refs/heads/master@{#40450}
2016-10-20 05:37:30 +00:00
v8-autoroll
2cb9213e31 Update V8 DEPS.
Rolling v8/build: e54cf97..ee7e988

Rolling v8/third_party/catapult: ae987bf..fb397f8

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

Review-Url: https://chromiumcodereview.appspot.com/2429233005
Cr-Commit-Position: refs/heads/master@{#40449}
2016-10-20 03:38:14 +00:00
aseemgarg
cf9ee0ec6c [wasm] simd scalar lowering F32x4Add and I32x4Add
BUG=v8:4124
TEST:test-run-wasm-simd-lowering
R=titzer@chromium.org,bradnelson@chromium.org,gdeepti@chromium.org

Review-Url: https://chromiumcodereview.appspot.com/2294743003
Cr-Commit-Position: refs/heads/master@{#40448}
2016-10-20 00:20:07 +00:00
alph
71e390faf6 [profiler] Update cpu profile tracing format.
Encapsulate nodes and samples into cpuProfile object.

BUG=chromium:406277

Review-Url: https://chromiumcodereview.appspot.com/2425093002
Cr-Commit-Position: refs/heads/master@{#40447}
2016-10-19 19:16:15 +00:00
ahaas
9902368259 [wasm] Trim graph before scheduling.
The scheduler expects a trimmed graph, so we have to trim the graph
before scheduling.

R=titzer@chromium.org, bmeurer@chromium.org
TEST=cctest/test-run-wasm/RunWasmCompiled_GraphTrimming

Review-Url: https://chromiumcodereview.appspot.com/2428443002
Cr-Commit-Position: refs/heads/master@{#40446}
2016-10-19 16:21:36 +00:00
jkummerow
03b8554109 [stubs] KeyedStoreIC: Use BuildFastLoop() helper
Bonus: CodeStubAssembler::StringIndexOfChar gets the same treatment.
Review-Url: https://chromiumcodereview.appspot.com/2435713003
Cr-Commit-Position: refs/heads/master@{#40445}
2016-10-19 16:18:33 +00:00
ulan
9eff39aebf [heap] Start sweeper tasks after evacuation.
This allows us to use more tasks for parallel evacuation.

BUG=

Review-Url: https://chromiumcodereview.appspot.com/2428043002
Cr-Commit-Position: refs/heads/master@{#40444}
2016-10-19 15:12:08 +00:00
lpy
65b3af466e Use TracedValue in runtime statistics.
We introduced TracedValue into V8 tracing previously, this patch uses it to
build JSON string of runtime statistics instead of using stringstream as buffer.

BUG=v8:5089
LOG=N

Review-Url: https://chromiumcodereview.appspot.com/2418303002
Cr-Commit-Position: refs/heads/master@{#40443}
2016-10-19 14:56:35 +00:00
jochen
eafa9206ac Bail out in AstTraversalVisitor::VisitFunctionBody for lazy functions
R=verwaest@chromium.org,mstarzinger@chromium.org
BUG=

Review-Url: https://chromiumcodereview.appspot.com/2425563003
Cr-Commit-Position: refs/heads/master@{#40442}
2016-10-19 14:50:32 +00:00
ziyang
489843f552 PPC/s390: [builtins] Remove the unused AllocationSite slot from ConstructFrame.
Port 77419488a9

Original commit message:

  This slot is completely unused and always undefined anyways, so there's
  no need to maintain the slot during object construction.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, bjaideep@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com
BUG=

Review-Url: https://chromiumcodereview.appspot.com/2429983002
Cr-Commit-Position: refs/heads/master@{#40441}
2016-10-19 14:21:54 +00:00
gsathya
cade0f4ba5 [promises] move PromiseResolveThenableJob debugging code to runtime function
Moving the rest of the debugging code is blocked on making IsPromise inlinable.

BUG=v8:5343

Review-Url: https://chromiumcodereview.appspot.com/2431793003
Cr-Commit-Position: refs/heads/master@{#40440}
2016-10-19 14:15:28 +00:00
bjaideep
91c99de0a1 s390x: [wasm] Adding r3 to GP return register list
Taking similar approach as ia32 which also has 1 return register
eax (as per ia32's ABI) but uses edx as return register as well.
This will fix some failures on s390x where a function returns 2
values.

R=titzer@chromium.org, bmeurer@chromium.org

BUG=
LOG=N

Review-Url: https://chromiumcodereview.appspot.com/2426233002
Cr-Commit-Position: refs/heads/master@{#40439}
2016-10-19 13:48:45 +00:00
titzer
07094aaf7d [wasm] Fix minor ternary mistake.
R=clemensh@chromium.org
BUG=

Review-Url: https://chromiumcodereview.appspot.com/2431183005
Cr-Commit-Position: refs/heads/master@{#40438}
2016-10-19 13:47:27 +00:00