Commit Graph

35879 Commits

Author SHA1 Message Date
rmcilroy
6d90507a7c [Turbofan] Disable JSFrameSpecialization for interpreted frames.
JSFrameSpecialization depends on the layout of the frame and doesn't work
with interpreted frames. Disable it since it is only used for OSR from asmjs code, which shouldn't go through the bytecode graph builder in many cases.

BUG=669517

Review-Url: https://codereview.chromium.org/2538823002
Cr-Commit-Position: refs/heads/master@{#41387}
2016-11-30 14:03:51 +00:00
jochen
a1473f5306 Split parsing of functions and top-level code into two separate methods
Also move them to a separate interface header to avoid having to include
parser.h so much

BUG=v8:5589
R=verwaest@chromium.org,marja@chromium.org

Review-Url: https://codereview.chromium.org/2534393002
Cr-Commit-Position: refs/heads/master@{#41386}
2016-11-30 13:21:37 +00:00
shiyu.zhang
86af70afb0 [turbofan] Remove redundant cmp operands swap.
Remove redundant operands swap for compare operation.

BUG=

Review-Url: https://codereview.chromium.org/2507683002
Cr-Commit-Position: refs/heads/master@{#41385}
2016-11-30 12:32:57 +00:00
jgruber
2f17d5f8e8 [js-perf-test] Move SubRegExp class definition outside loop
Defining the subclass within the loop significantly affects subsequent
test results. For instance, the Search benchmark is 50% slower if the
subclass is defined within the loop.

BUG=v8:5339

Review-Url: https://codereview.chromium.org/2537253003
Cr-Commit-Position: refs/heads/master@{#41384}
2016-11-30 12:20:17 +00:00
hpayer
9d1488e4b0 [heap] Reduce store buffer size to increase chance to run concurrent store buffer processing thread more often.
BUG=

Review-Url: https://codereview.chromium.org/2529623002
Cr-Commit-Position: refs/heads/master@{#41383}
2016-11-30 12:17:28 +00:00
ahaas
4d75ea6082 [wasm] Move wasm runtime functions to runtime-wasm.cc
I removed {IsWasmInstance} because it is not used anywhere, and I moved
ThrowWasmError to runtime-wasm.cc

R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2541633003
Cr-Commit-Position: refs/heads/master@{#41382}
2016-11-30 10:37:17 +00:00
titzer
a0c518627f [wasm] Add a flag --wasm-opt to test optimizations in the WASM pipeline.
R=ahaas@chromium.org,bradnelson@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2528033002
Cr-Commit-Position: refs/heads/master@{#41381}
2016-11-30 10:36:14 +00:00
neis
000dea2fa4 [compiler] Remove dead code from js-generic-lowering.
JSLoadContext and JSStoreContext are always reduced in js-typed-lowering.

R=mstarzinger@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2535253002
Cr-Commit-Position: refs/heads/master@{#41380}
2016-11-30 10:14:17 +00:00
clemensh
5a6483ffda [inspector] Avoid unneeded heap allocations
v8::Global is movable, so no need to heap-allocate them.

R=yangguo@chromium.org, kozyatinskiy@chromium.org

Review-Url: https://codereview.chromium.org/2537433002
Cr-Commit-Position: refs/heads/master@{#41379}
2016-11-30 09:23:34 +00:00
rmcilroy
8037e98e44 [Interpreter] Remove skips for tests that no longer seem to be flaky.
BUG=v8:4680

Review-Url: https://codereview.chromium.org/2541563002
Cr-Commit-Position: refs/heads/master@{#41378}
2016-11-30 09:21:37 +00:00
zhengxing.li
77a9da6b20 X87: [stubs] Port builtin for Array.push fast-case from Crankshaft to TF.
port df2578d2ec (r41368)

  original commit message:
  Improves performance in simple, single element case by 5% and in multiple
  elements cases by 2%.

BUG=

Review-Url: https://codereview.chromium.org/2540803004
Cr-Commit-Position: refs/heads/master@{#41377}
2016-11-30 09:07:15 +00:00
leszeks
7d10f69ca3 [turbofan] Remove bytecode analysis unit test
Blocking roll: https://codereview.chromium.org/2537173002/

NOTRY=true

Review-Url: https://codereview.chromium.org/2532103004
Cr-Commit-Position: refs/heads/master@{#41376}
2016-11-30 09:04:01 +00:00
neis
ee8e1464d7 Check some more invariants on SFIs.
This adds consistency checks for function kind and scope type to
SharedFunctionInfoVerify.

It also fixes an inconsistency in the creation of a ScopeInfo.

R=adamk@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2537093002
Cr-Commit-Position: refs/heads/master@{#41375}
2016-11-30 08:04:54 +00:00
neis
881bacffe3 [ast] Mark removed scopes as such.
When removing a scope (see FinalizeBlockScope), remember the removal by making
the scope its own sibling.  This avoid recalculating the information later on.

R=adamk@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2536993003
Cr-Commit-Position: refs/heads/master@{#41374}
2016-11-30 07:59:56 +00:00
v8-autoroll
fee261af79 Update V8 DEPS.
Rolling v8/build: 11a223f..4e4ff82

Rolling v8/third_party/catapult: 3950931..2dd86f1

Rolling v8/tools/clang: 4d70bef..f81598c

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

Review-Url: https://codereview.chromium.org/2539733003
Cr-Commit-Position: refs/heads/master@{#41373}
2016-11-30 04:22:41 +00:00
bradnelson
14e05c1046 [wasm] asm.js - Parse and convert asm.js to wasm a function at a time.
Make the AsmWasmBuilder drive the process of typing and potentially parsing
function bodies. This will allow us to keep only a single asm.js function's
AST in memory as we convert to WebAssembly.
This is needed to keep our memory footprint low.

Add some additional output to a few tests that's helpful to see which stage they fail at.

BUG= https://bugs.chromium.org/p/v8/issues/detail?id=4203
LOG=N
R=marja@chromium.org,adamk@chromium.org,aseemgarg@chromium.org,titzer@chromium.org

Review-Url: https://codereview.chromium.org/2398023002
Cr-Commit-Position: refs/heads/master@{#41372}
2016-11-30 00:26:05 +00:00
kozyatinskiy
d385ed069b [inspector] removed old v8_inspector::Channel API
BUG=chromium:350797
R=dgozman@chromium.org
TBR=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2527473004
Cr-Commit-Position: refs/heads/master@{#41371}
2016-11-29 19:31:23 +00:00
bjaideep
f80961a782 PPC/s390: [stubs] Port builtin for Array.push fast-case from Crankshaft to TF
Port df2578d2ec

Original Commit Message:

    Improves performance in simple, single element case by 5% and in multiple
    elements cases by 2%.

R=danno@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, bjaideep@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=chromium:608675
LOG=N

Review-Url: https://codereview.chromium.org/2537513005
Cr-Commit-Position: refs/heads/master@{#41370}
2016-11-29 18:48:20 +00:00
alph
9de556ecff [compiler] Bailout reason "Optimized too many times" -> "Deoptimized..."
Rename it to better represent the reason. Also makes the inspector sentence
"Not Optimized: Optimized too many times" look less confusing.

Review-Url: https://codereview.chromium.org/2530423003
Cr-Commit-Position: refs/heads/master@{#41369}
2016-11-29 17:18:44 +00:00
danno
df2578d2ec [stubs] Port builtin for Array.push fast-case from Crankshaft to TF
Improves performance in simple, single element case by 5% and in multiple
elements cases by 2%.

BUG=chromium:608675
LOG=N

Review-Url: https://codereview.chromium.org/2497243002
Cr-Commit-Position: refs/heads/master@{#41368}
2016-11-29 16:58:30 +00:00
rmcilroy
f8b8983962 [Compiler] Don't mark asm-wasm functions for optimization in PostInstantiation.
Functions with asm-wasm data shouldn't be marked for optimization, since
they will be optimized using the asm-wasm data instead.

Review-Url: https://codereview.chromium.org/2537103002
Cr-Commit-Position: refs/heads/master@{#41367}
2016-11-29 16:42:02 +00:00
rmcilroy
5e8b2b8077 [Interpreter] Small cleanup on VisitClassLiteral
Review-Url: https://codereview.chromium.org/2534123003
Cr-Commit-Position: refs/heads/master@{#41366}
2016-11-29 16:09:38 +00:00
mstarzinger
957f3f10e5 [fullcodegen] Remove with-statement support.
This removes support for dynamic scoping via with-statement constructs
from the {FullCodeGenerator}. Consequently optimized code containing
such constructs must use the {BytecodeGraphBuilder} and can no longer
use the {AstGraphBuilder} for graph building.

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

Review-Url: https://codereview.chromium.org/2533283002
Cr-Commit-Position: refs/heads/master@{#41365}
2016-11-29 15:29:07 +00:00
vogelheim
c44008b01f Ensure consistent error handling on 32b/64b platforms.
BUG=chromium:669017

Review-Url: https://codereview.chromium.org/2536783003
Cr-Commit-Position: refs/heads/master@{#41364}
2016-11-29 15:06:05 +00:00
clemensh
8fcfe66f94 [base] Pass scalar arguments by value in CHECK/DCHECK
This not only potentially improves performance, but also avoids weird
linker errors, like the one below, where I used Smi::kMinValue in a
DCHECK_LE.

> [421/649] LINK ./mksnapshot
> FAILED: mksnapshot
> src/base/logging.h|178| error: undefined reference to
  'v8::internal::Smi::kMinValue'

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

Committed: https://crrev.com/76723502528c5af003fdffc3520632ea2a13fef3
Review-Url: https://codereview.chromium.org/2524093002
Cr-Original-Commit-Position: refs/heads/master@{#41273}
Cr-Commit-Position: refs/heads/master@{#41363}
2016-11-29 15:02:26 +00:00
vogelheim
b1b7d19610 Cleanup: Move mjsunit/regress-*.js into mjsunit/regress/.
R=machenbach@chromium.org

Review-Url: https://codereview.chromium.org/2531983004
Cr-Commit-Position: refs/heads/master@{#41362}
2016-11-29 14:20:53 +00:00
leszeks
9b5962720a [turbofan] Keep the next bytecode liveness when analysing
Since the majority of bytecodes have a next instruction, and we iterate
over the bytecodes backwards, we can keep the previous seen (i.e.
sequentially next) bytecode's liveness on a variable instead of looking
it up again.

Review-Url: https://codereview.chromium.org/2541463002
Cr-Commit-Position: refs/heads/master@{#41361}
2016-11-29 14:12:37 +00:00
bmeurer
4047361ab4 [turbofan] Disable loop peeling for asm.js.
BUG=chromium:669494
R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2533303002
Cr-Commit-Position: refs/heads/master@{#41360}
2016-11-29 14:06:04 +00:00
bmeurer
d6752d94a8 [turbofan] Teach escape analysis about ConvertTaggedHoleToUndefined.
The EscapeStatusAnalysis didn't know anything about the simplified
operator ConvertTaggedHoleToUndefined, thus leading to a crash. We
now just handled it by pretending that any allocation that goes into
such a node escapes.

BUG=chromium:669451
R=tebbi@chromium.org

Review-Url: https://codereview.chromium.org/2533263002
Cr-Commit-Position: refs/heads/master@{#41359}
2016-11-29 13:13:55 +00:00
mstarzinger
d045f41c5c [ast] Remove unused BailoutIds for ClassLiteral.
This removes reservation of unused {BailoutId} numbers for all class
literals. These language constructs are by now solely funneled through
bytecode and specific ids for deoptimization are no longer needed.

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

Review-Url: https://codereview.chromium.org/2535223002
Cr-Commit-Position: refs/heads/master@{#41358}
2016-11-29 12:51:32 +00:00
mstarzinger
88320112d3 [fullcodegen] Remove for-of iteration support.
This removes support for iterator loops (i.e. for-of loop constructs)
from the {FullCodeGenerator}. Consequently optimized code containing
such constructs must use the {BytecodeGraphBuilder} and can no longer
use the {AstGraphBuilder} for graph building.

R=bmeurer@chromium.org
BUG=v8:5657

Review-Url: https://codereview.chromium.org/2534883004
Cr-Commit-Position: refs/heads/master@{#41357}
2016-11-29 12:37:14 +00:00
rmcilroy
067e9e295f [Interpreter] Add bytecode aging and use it enable CompilationCache for bytecode
Adds a bytecode_age field to BytecodeArray objects. This is incremented each
time the bytecode array is marked by GC, and reset to zero if the bytecode
is executed.

This is used to enable the CompilationCache for interpreted functions,
where Interpreted entries are evicted once the bytecode becomes old.

BUG=chromium:666275,v8:4680

Review-Url: https://codereview.chromium.org/2534763003
Cr-Commit-Position: refs/heads/master@{#41356}
2016-11-29 12:34:58 +00:00
leszeks
2bf71f888f [ignition/turbo] Perform liveness analysis on the bytecodes
Replaces the graph-based liveness analyzer in the bytecode graph builder
with an initial bytecode-based liveness analysis pass, which is added to
the existing loop extent analysis.

Now the StateValues in the graph have their inputs initialised to
optimized_out, rather than being modified after the graph is built.

Review-Url: https://codereview.chromium.org/2523893003
Cr-Commit-Position: refs/heads/master@{#41355}
2016-11-29 12:27:15 +00:00
rmcilroy
5fd2b71236 [Heap] Remove concept of MarkingParity.
MarkingParity was used to avoid performing an operation on an object if it was
marked multiple times. We no longer mark things multiple times, so this concept
is no longer required.

BUG=chromium:666275

Review-Url: https://codereview.chromium.org/2529173002
Cr-Commit-Position: refs/heads/master@{#41354}
2016-11-29 12:10:16 +00:00
verwaest
73a2d63df8 [scopes] Propagate inner-scope-calls-eval to make sure we context allocate in inserted scopes
BUG=v8:5664

Review-Url: https://codereview.chromium.org/2536153002
Cr-Commit-Position: refs/heads/master@{#41353}
2016-11-29 12:01:34 +00:00
bmeurer
719d6c1d58 [turbofan] Also optimize instanceof with bound functions.
For bound functions on the right-hand side of instanceof we can
constant-fold to the actual [[BoundTargetFunction]], actually
instance OrdinaryHasInstance. Move the Function.prototype[@@hasInstance]
reduction up to the JSCallReducer to allow this optimization to become
effective (and also enable other optimizations).

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

Review-Url: https://codereview.chromium.org/2537763002
Cr-Commit-Position: refs/heads/master@{#41352}
2016-11-29 11:58:55 +00:00
cbruni
95c0ecee66 [counters] Avoid V8_EXPORT_PRIVATE to speed up compilation under windows
BUG=chromium:668748

Review-Url: https://codereview.chromium.org/2534123002
Cr-Commit-Position: refs/heads/master@{#41351}
2016-11-29 11:57:30 +00:00
hpayer
f3d119b9c5 [heap] Reland: Use store buffer for writes coming from mutator.
This reverts commit 810fcb2866.

BUG=chromium:648568, chromium:669270

Review-Url: https://codereview.chromium.org/2530383003
Cr-Commit-Position: refs/heads/master@{#41350}
2016-11-29 11:57:29 +00:00
v8-autoroll
0f6071821e Update V8 DEPS.
Rolling v8/buildtools: 39b1db2..991f459

Rolling v8/third_party/android_tools: https://chromium.googlesource.com/android_tools/+log/25d57ea..811a2c3

Rolling v8/third_party/catapult: 6962f5c..3950931

Rolling v8/third_party/icu: c1a2371..dda089a

Rolling v8/tools/clang: 75350a8..4d70bef

Rolling v8/tools/swarming_client: 380e326..ebc8dab

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

Review-Url: https://codereview.chromium.org/2538723002
Cr-Commit-Position: refs/heads/master@{#41349}
2016-11-29 11:46:48 +00:00
mstarzinger
204babf5a0 [deoptimizer] Fix deoptimization in {TranslatedState}.
This ensures the deoptimization triggered due to materialization of
objects by the {TranslatedState} works in conjunction with OSR. The
optimized code used for OSR is not installed on the function, hence
needs to be specified explicitly when requesting deoptimization for
specific stack frames.

R=jarin@chromium.org
TEST=mjsunit/regress/regress-crbug-668795
BUG=chromium:668795

Review-Url: https://codereview.chromium.org/2534143002
Cr-Commit-Position: refs/heads/master@{#41348}
2016-11-29 11:34:22 +00:00
machenbach
868abcb085 [build] Roll build a3b623a:11a223f
This also ports some build overrides including:
https://codereview.chromium.org/2512043002/

BUG=chromium:659726

Review-Url: https://codereview.chromium.org/2532043002
Cr-Commit-Position: refs/heads/master@{#41347}
2016-11-29 11:17:15 +00:00
leszeks
a2e2a39ff1 Revert of [ignition/turbo] Perform liveness analysis on the bytecodes (patchset #17 id:320001 of https://codereview.chromium.org/2523893003/ )
Reason for revert:
Breaks the build:

https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20shared/builds/14886

Original issue's description:
> [ignition/turbo] Perform liveness analysis on the bytecodes
>
> Replaces the graph-based liveness analyzer in the bytecode graph builder
> with an initial bytecode-based liveness analysis pass, which is added to
> the existing loop extent analysis.
>
> Now the StateValues in the graph have their inputs initialised to
> optimized_out, rather than being modified after the graph is built.
>
> Committed: https://crrev.com/1852300954c216c29cf93444430681d213e87925
> Cr-Commit-Position: refs/heads/master@{#41344}

TBR=jarin@chromium.org,rmcilroy@chromium.org,yangguo@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/2541443002
Cr-Commit-Position: refs/heads/master@{#41346}
2016-11-29 10:51:45 +00:00
bmeurer
777e142ca1 [turbofan] Add appropriate types to express Callable.
This introduces three new types OtherCallable, CallableProxy (and OtherProxy),
and BoundFunction to make it possible to express Callable in the Type system.
It also forces all undetectable receivers to be Callable, which matches the
use case for undetectable, namely document.all (guarded by proper checks and
tests).

It also uses these new types to properly optimize instanceof (indirectly via
OrdinaryHasInstance) based on the type of the constructor and the object. So
we are able to constant-fold certain instanceof expressions based on types
and completely avoid the builtin call.

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

Review-Url: https://codereview.chromium.org/2535753004
Cr-Commit-Position: refs/heads/master@{#41345}
2016-11-29 10:48:13 +00:00
leszeks
1852300954 [ignition/turbo] Perform liveness analysis on the bytecodes
Replaces the graph-based liveness analyzer in the bytecode graph builder
with an initial bytecode-based liveness analysis pass, which is added to
the existing loop extent analysis.

Now the StateValues in the graph have their inputs initialised to
optimized_out, rather than being modified after the graph is built.

Review-Url: https://codereview.chromium.org/2523893003
Cr-Commit-Position: refs/heads/master@{#41344}
2016-11-29 10:46:20 +00:00
cbruni
85321456cd [api] Support sharing prototypes between FunctionTemplates
FunctionTemplateInfo::SetPrototypeProviderTemplate adds support for sharing
prototypes between several function templates. This is used to properly set up
Image.prototype and HTMLImageElement.protoype which should be equal according
to the spec.

BUG=chromium:2969

Review-Url: https://codereview.chromium.org/2531653002
Cr-Commit-Position: refs/heads/master@{#41343}
2016-11-29 10:14:18 +00:00
machenbach
810fcb2866 Revert of [heap] Reland: Use store buffer for writes coming from mutator. (patchset #1 id:1 of https://codereview.chromium.org/2529293004/ )
Reason for revert:
Suspect for tsan failures:
https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20TSAN/builds/12915

Original issue's description:
> [heap] Reland: Use store buffer for writes coming from mutator.
>
> This reverts commit 061c2ab23a.
>
> BUG=chromium:648568, chromium:669270
>
> Committed: https://crrev.com/fa2fdf275197185d9bca9d5e72c16a60722c3893
> Cr-Commit-Position: refs/heads/master@{#41341}

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

Review-Url: https://codereview.chromium.org/2534803004
Cr-Commit-Position: refs/heads/master@{#41342}
2016-11-29 10:02:59 +00:00
hpayer
fa2fdf2751 [heap] Reland: Use store buffer for writes coming from mutator.
This reverts commit 061c2ab23a.

BUG=chromium:648568, chromium:669270

Review-Url: https://codereview.chromium.org/2529293004
Cr-Commit-Position: refs/heads/master@{#41341}
2016-11-29 09:32:41 +00:00
ahaas
68f89a07c0 [wasm] Skip mjsunit/wasm/import-memory on gc-stress
BUG=v8:5683
NOTRY=true
R=machenbach@chromium.org

Review-Url: https://codereview.chromium.org/2541433002
Cr-Commit-Position: refs/heads/master@{#41340}
2016-11-29 09:24:15 +00:00
mstarzinger
7a82d8e9e4 [runtime] Simplify handler table lookup semantics.
The range-based exception handler table is by now only used for bytecode
arrays. The semantics of the interpreter are that bytecode offsets point
to the beginning of the currently executing bytecode instruction. Uses
hence need to compensate for lookups based on a "retrun address". This
change removes the need for such off-by-one compensations by changing
lookup semantics to be based on "current instruction" offsets.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2534893002
Cr-Commit-Position: refs/heads/master@{#41339}
2016-11-29 09:17:09 +00:00
jgruber
4e7571a5a9 [regexp] Migrate @@match to TurboFan
Microbenchmarks show a 4x improvement on the fast path and 2.5x improvement on
the slow path when compared to the CPP builtin implementation.

Compared to the old JS implementation, the fast path is 20% faster and the slow
path 35% slower.

BUG=v8:5339,v8:5562

Review-Url: https://codereview.chromium.org/2527963002
Cr-Commit-Position: refs/heads/master@{#41338}
2016-11-29 09:03:18 +00:00