Commit Graph

35150 Commits

Author SHA1 Message Date
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
jochen
f4be20cbda Add tests for CodeStubAssembler::ToString
R=danno@chromium.org

Review-Url: https://chromiumcodereview.appspot.com/2438483002
Cr-Commit-Position: refs/heads/master@{#40437}
2016-10-19 13:37:24 +00:00
jochen
e4ac0105b8 Move DivisionByConstant template instantiations to cpp file
R=bmeurer@chromium.org
BUG=

Review-Url: https://chromiumcodereview.appspot.com/2437733002
Cr-Commit-Position: refs/heads/master@{#40436}
2016-10-19 13:32:34 +00:00
bmeurer
b888150afd [interpreter] Also optimize small functions earlier.
For fullcodegen the RuntimeProfiler has a shortcut that allows it to
tier up small functions earlier, when enough type feedback is available.
Port the same optimization for the Ignition+TurboFan pipeline.

R=mstarzinger@chromium.org

Review-Url: https://chromiumcodereview.appspot.com/2427283004
Cr-Commit-Position: refs/heads/master@{#40435}
2016-10-19 13:12:24 +00:00
titzer
418b239f0b [wasm] Use a Managed<WasmModule> to hold metadata about modules.
This CL refactors the handling of metadata associated with WebAssembly
modules to reduce the duplicate marshalling of data from the C++ world
to the JavaScript world. It does this by wrapping the C++ WasmModule*
object in a Foreign that is rooted from the on-heap WasmCompiledModule
(which is itself just a FixedArray). Upon serialization, the C++ object
is ignored and the original WASM wire bytes are serialized. Upon
deserialization, the C++ object is reconstituted by reparsing the bytes.

This is motivated by increasing complications in implementing the JS
API, in particular WebAssembly.Table, which must perform signature
canonicalization across instances.

Additionally, this CL implements the proper base + offset initialization
behavior for tables.

R=rossberg@chromium.org,bradnelson@chromium.org,mtrofin@chromium.org,yangguo@chromium.org
BUG=v8:5507, chromium:575167, chromium:657316

Review-Url: https://chromiumcodereview.appspot.com/2424623002
Cr-Commit-Position: refs/heads/master@{#40434}
2016-10-19 13:07:22 +00:00
franzih
db733efda1 [tools] Add legend to IC explorer.
Add legend that explains the abbreviations for different IC states
to IC explorer. Copied from ic.cc.

BUG=

Review-Url: https://chromiumcodereview.appspot.com/2431183004
Cr-Commit-Position: refs/heads/master@{#40433}
2016-10-19 12:48:26 +00:00
yangguo
61dc1de0f6 [debugger] remove test for legacy JSON API to return V8's version.
R=jgruber@chromium.org
BUG=v8:5510

Review-Url: https://chromiumcodereview.appspot.com/2430673002
Cr-Commit-Position: refs/heads/master@{#40432}
2016-10-19 12:35:34 +00:00
machenbach
526d955c26 [CQ] Temporarily reduce coverage bot's frequency
NOTRY=true
NOPRESUBMIT=true
TBR=tandrii@chromium.org

Review-Url: https://chromiumcodereview.appspot.com/2437723002
Cr-Commit-Position: refs/heads/master@{#40431}
2016-10-19 12:13:40 +00:00
jarin
7296bd4980 [turbofan] Remove representation changes for machine constants.
No machine constants should reach the representation selector.

Review-Url: https://chromiumcodereview.appspot.com/2431693002
Cr-Commit-Position: refs/heads/master@{#40430}
2016-10-19 12:05:49 +00:00
cbruni
b7ff0d7136 [stubs] Implement TF builtin for Object.create fast paths
BUG=

Review-Url: https://chromiumcodereview.appspot.com/2385423005
Cr-Commit-Position: refs/heads/master@{#40429}
2016-10-19 11:34:04 +00:00
bmeurer
3c10b97c34 [interpreter] Don't canonicalize results of feedback collecting handlers.
For binary operations that collect feedback (in Ignition), don't
canonicalize when the operation itself is already performed in
Float64. This is the first step to fix the performance difference
we still see between TurboFan and TurboFan+Ignition.

R=mythria@chromium.org

Review-Url: https://chromiumcodereview.appspot.com/2431363002
Cr-Commit-Position: refs/heads/master@{#40428}
2016-10-19 11:13:47 +00:00
Benedikt Meurer
09410621f9 [turbofan] Don't introduce PlainPrimitiveToNumber for String inputs.
During JSTypedLowering we can decide to insert PlainPrimitiveToNumber
operators on the inputs to still utilize pure Number operators, when
the type feedback on the numeric binary operation is NumberOrOddball.
However that is not beneficial if the inputs can be Strings, that is
we cannot statically rule out String based on input type, as that
inserts a ToNumber stub call into the hot code path.

This repairs the NavierStokes regression with Ignition on Octane.

R=jarin@chromium.org

Review URL: https://codereview.chromium.org/2432143003 .

Cr-Commit-Position: refs/heads/master@{#40427}
2016-10-19 10:33:08 +00:00
titzer
acf99a893c [wasm] Improve naming consistency for WASM instances.
R=clemensh@chromium.org,ahaas@chromium.org
BUG=

Review-Url: https://chromiumcodereview.appspot.com/2428343005
Cr-Commit-Position: refs/heads/master@{#40426}
2016-10-19 10:30:38 +00:00
jgruber
ae64bdce4e [debugger] Remove unused arg from setPauseOnExceptionsImpl
BUG=v8:5530

Review-Url: https://chromiumcodereview.appspot.com/2436613002
Cr-Commit-Position: refs/heads/master@{#40425}
2016-10-19 10:25:12 +00:00
machenbach
9acec9f0a5 [test] Correctly deduce test-driver arguments on bots using GN
This makes auto-detect-build-configs work on bots (i.e.
if --buildbot was passed).

BUG=v8:5533
CQ_INCLUDE_TRYBOTS=master.tryserver.v8:v8_linux64_msan_rel,v8_linux64_tsan_rel,v8_linux_arm64_dbg,v8_linux_gc_stress_dbg,v8_linux_noi18n_rel_ng,v8_linux_nosnap_rel

Review-Url: https://chromiumcodereview.appspot.com/2431653002
Cr-Commit-Position: refs/heads/master@{#40424}
2016-10-19 10:23:53 +00:00
jkummerow
194c43a103 [stubs] Port KeyedStoreIC dispatcher to TurboFan
BUG=

Review-Url: https://chromiumcodereview.appspot.com/2403483002
Cr-Commit-Position: refs/heads/master@{#40423}
2016-10-19 10:11:45 +00:00
machenbach
3c91cdea1d Revert of [inspector] Turn on inspector by default (patchset #1 id:1 of https://codereview.chromium.org/2395763002/ )
Reason for revert:
Has test failures on windows and blocks landing a test driver fix.

Original issue's description:
> [inspector] Turn on inspector by default
>
> BUG=chromium:635948
>
> Committed: https://crrev.com/8146402c69044affff0e95f9641eee532fb70312
> Cr-Commit-Position: refs/heads/master@{#40380}

TBR=kozyatinskiy@chromium.org,dgozman@chromium.org,yangguo@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=chromium:635948

Review-Url: https://chromiumcodereview.appspot.com/2430223003
Cr-Commit-Position: refs/heads/master@{#40422}
2016-10-19 08:56:37 +00:00
Benedikt Meurer
8b94aee525 [turbofan] Also remove minus zero check for rhs of CheckedInt32Add.
Similar to http://crrev.com/2410883003 we don't need to do a minus zero
check for the right hand side of CheckedInt32Add, because we already
know that the left hand side cannot be minus zero, and the only way that
addition can yield -0 is (-0) + (-0).

R=jarin@chromium.org

Review URL: https://codereview.chromium.org/2431233003 .

Cr-Commit-Position: refs/heads/master@{#40421}
2016-10-19 08:28:14 +00:00
ahaas
2f3ca961c7 [turbofan] Use uint32 to store the number of control outputs instead of uint16.
Using uint32 to store the the number of control outputs allows WebAssembly switches to have more than 2^16 case.

BUG=v8:5531
TEST=mjsunit/regress/wasm/regression-5531
R=titzer@chromium.org

Review-Url: https://chromiumcodereview.appspot.com/2425983002
Cr-Commit-Position: refs/heads/master@{#40420}
2016-10-19 07:25:51 +00:00
bmeurer
efe4fd4b5b [builtins] Optimize Number.parseInt for HeapNumbers in Signed32 range.
When the input to Number.parseInt is a HeapNumber in Signed32 range, we
can just return the (truncated) input value (i.e. we need to map -0 to
0 due to the ToString conversion).

R=jarin@chromium.org

Review-Url: https://chromiumcodereview.appspot.com/2432923002
Cr-Commit-Position: refs/heads/master@{#40419}
2016-10-19 05:41:31 +00:00
bmeurer
3a7eac15e8 [turbofan] Fix invalid Number.parseInt inlining.
The inlined version of Number.parseInt did a ToInt32 truncation, which
is not what the EcmaScript specification says.

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

Review-Url: https://chromiumcodereview.appspot.com/2432143002
Cr-Commit-Position: refs/heads/master@{#40418}
2016-10-19 05:17:52 +00:00
v8-autoroll
dce6ebad07 Update V8 DEPS.
Rolling v8/build: eb8eb7a..e54cf97

Rolling v8/third_party/catapult: 9a96d45..ae987bf

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

Review-Url: https://chromiumcodereview.appspot.com/2432033002
Cr-Commit-Position: refs/heads/master@{#40417}
2016-10-19 03:36:18 +00:00
zhengxing.li
572c231c98 X87: [ic] Unify CallIC feedback collection and handling.
port 308788b306 (r40397)

  original commit message:
  Consistently collect CallIC feedback in fullcodegen and Ignition, even
  for possibly direct eval calls, that were treated specially so far, for
  no apparent reason. With the upcoming SharedFunctionInfo based CallIC
  feedback, we might be able to even inline certain direct eval calls, if
  they manage to hit the eval cache. More importantly, this patch
  simplifies the collection and dealing with CallIC feedback (and as a
  side effect fixes an inconsistency with feedback for super constructor
  calls).

BUG=

Review-Url: https://chromiumcodereview.appspot.com/2429623005
Cr-Commit-Position: refs/heads/master@{#40416}
2016-10-19 03:32:41 +00:00
kozyatinskiy
ea511e769e [inspector] finish test runner gracefully..
.. to make windows bot happy.

BUG=chromium:635948
R=dgozman@chromium.org

Review-Url: https://chromiumcodereview.appspot.com/2428213002
Cr-Commit-Position: refs/heads/master@{#40415}
2016-10-19 02:04:48 +00:00
kozyatinskiy
550910445f [inspector] align console implementation with spec
console should be non enumerable.

BUG=chromium:656826
R=dgozman@chromium.org

Review-Url: https://chromiumcodereview.appspot.com/2428473003
Cr-Commit-Position: refs/heads/master@{#40414}
2016-10-19 02:02:20 +00:00
kozyatinskiy
377533fc06 [inspector] move changeBreakpointState from debugger-script to native
* introduced v8::DebugInterface::ChangeBreakOnException(Isolate*,ExceptionBreakState);
* migrated inspector to new API;
* added cctest for new API;
* added inspector test for setPauseOnExceptionState.

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

Review-Url: https://chromiumcodereview.appspot.com/2396193002
Cr-Commit-Position: refs/heads/master@{#40413}
2016-10-19 02:00:57 +00:00
bjaideep
78085e4d7f PPC/s390: [ic] Unify CallIC feedback collection and handling.
Port 308788b306

Original commit message:

    Consistently collect CallIC feedback in fullcodegen and Ignition, even
    for possibly direct eval calls, that were treated specially so far, for
    no apparent reason. With the upcoming SharedFunctionInfo based CallIC
    feedback, we might be able to even inline certain direct eval calls, if
    they manage to hit the eval cache. More importantly, this patch
    simplifies the collection and dealing with CallIC feedback (and as a
    side effect fixes an inconsistency with feedback for super constructor
    calls).

R=bmeurer@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://codereview.chromium.org/2425243003
Cr-Commit-Position: refs/heads/master@{#40412}
2016-10-18 22:59:12 +00:00
gdeepti
0c6354e03b [wasm] GrowMemory should use maximum size declared in WebAssembly.Memory
BUG=

Review-Url: https://codereview.chromium.org/2410763002
Cr-Commit-Position: refs/heads/master@{#40411}
2016-10-18 22:19:53 +00:00
jochen
d1daae6221 Fix inspector test in components build
R=jgruber@chromium.org,machenbach@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2421303002
Cr-Commit-Position: refs/heads/master@{#40410}
2016-10-18 20:08:12 +00:00
bmeurer
669a084a2b [builtins] Fix typo in Number.parseInt TurboFan builtin.
http://crrev.com/2424403002 contained a typo comparing the input map
against the undefined constant rather than the HeapNumber map, which
tanks the case where Number.parseInt is used instead of Math.floor.

TBR=epertoso@chromium.org
BUG=v8:5049

Review-Url: https://codereview.chromium.org/2425703007
Cr-Commit-Position: refs/heads/master@{#40409}
2016-10-18 20:01:15 +00:00