Commit Graph

37476 Commits

Author SHA1 Message Date
petermarshall
f4739ea863 [builtins] Fix crash on stack overflow in CheckSpreadAndPushToStack.
For x64, ia32 and x87 we would pop the return address before the stack
overflow check. This meant the stack couldn't be unwound properly if
it was going to overflow. This CL moves the pop of the return address
to after the stack overflow check.

Also adds a regression test to check that a RangeError is thrown.

BUG=689016

Review-Url: https://codereview.chromium.org/2681643004
Cr-Commit-Position: refs/heads/master@{#42984}
2017-02-07 09:58:19 +00:00
marja
44a381ad99 [parser] Skipping inner funcs: produce the same scopes / variables for this expressions.
BUG=v8:5516
R=vogelheim@chromium.org

Review-Url: https://codereview.chromium.org/2683563002
Cr-Commit-Position: refs/heads/master@{#42983}
2017-02-07 09:14:54 +00:00
ishell
ef4e2ab7bd [ic] Encode LoadGlobalIC's typeof mode in slot kind instead of code object's flags.
BUG=v8:5917

Review-Url: https://codereview.chromium.org/2673383002
Cr-Commit-Position: refs/heads/master@{#42982}
2017-02-07 09:03:16 +00:00
mstarzinger
e34f536620 [turbofan] Mark {JSCreate} as potentially throwing.
This correctly marks the {JSCreate} operator as potentially throwing,
since it might trigger a property access of the 'prototype' property
during instantiation. This is observable, can throw (not kNoThrow),
might have side-effects (not kNoWrite), or even trigger a lazy deopt
event (not kNoDeopt). The inlining logic has been adapted to wire up
control projections accordingly.

Note that this does not yet take care of the "after" frame-state which
is associated with the {JSCreate} node introduced by the inliner. We
still might re-evaluate the property access upon lazy deoptimization.

R=bmeurer@chromium.org
TEST=mjsunit/regress/regress-5638
BUG=v8:5638

Review-Url: https://codereview.chromium.org/2671203003
Cr-Commit-Position: refs/heads/master@{#42981}
2017-02-07 09:00:18 +00:00
neis
b87d99495e [parsing] Make maybe-assigned more precise for sloppy block functions.
A script like "{ function foo() {} }" declares a VAR-variable at the
top-level and a LET-variable inside the block.  The LET-variable does
not need to be unconditionally marked as assigned.

BUG=v8:5636

Review-Url: https://codereview.chromium.org/2680443002
Cr-Commit-Position: refs/heads/master@{#42980}
2017-02-07 08:12:55 +00:00
v8-autoroll
c6bc6d28ec Update V8 DEPS.
Rolling v8/build: ed0758e..7968040

Rolling v8/third_party/catapult: 1e91982..df67b47

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

Change-Id: I80660e6eca542bfe76d5f78656c38583829eab90
Reviewed-on: https://chromium-review.googlesource.com/438964
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#42979}
2017-02-07 07:49:54 +00:00
kozyatinskiy
6e17719e79 [inspector] introduced v8::debug::EntriesPreview for inspector
- entries preview available even if debugger agent is disabled,
- less deprecated mirrors usage in debugger-script.js
- no usage of debugger context - zero probability of leaking it.
- better test coverage.

BUG=v8:5510
R=yangguo@chromium.org,jgruber@chromium.org,alph@chromium.org,luoe@chromium.org

Review-Url: https://codereview.chromium.org/2672213002
Cr-Commit-Position: refs/heads/master@{#42978}
2017-02-07 07:46:21 +00:00
jkummerow
a5298c6f52 Revert "[stubs] KeyedLoadGeneric: support loading properties from strings"
Adding a code path for strings introduces Phi nodes on the fast
(i.e. non-string) path, causing a performance regression.

BUG=chromium:687075

Review-Url: https://codereview.chromium.org/2670353004
Cr-Commit-Position: refs/heads/master@{#42977}
2017-02-07 01:05:42 +00:00
littledan
a701fce85e [parser] Cleanup: remove unused parameters to DeclareFunction
R=adamk

Review-Url: https://codereview.chromium.org/2677373002
Cr-Commit-Position: refs/heads/master@{#42976}
2017-02-06 22:29:11 +00:00
caitp
0f1c626d55 [typedarrays] move %TypedArray%.prototype.copyWithin to C++
- Removes shared InnerArrayCopyWithin JS builtin from src/js/array.js
- Implements %TypedArray%.prototype.copyWithin as a C++ builtin, which
relies on std::memmove rather than accessing individual eleements.
- Fixes the case where copyWithin is invoked on a TypedArray with a
detached buffer.
- Add tests to ensure that +/-Infinity (for all 3 parameters) is handled correctly by the
algorithm

The C++ version gets through the benchmark more than 25000 times as
quickly as the JS implementation.

BUG=v8:5925, v8:5929, v8:4648
R=cbruni@chromium.org, adamk@chromium.org, littledan@chromium.org

Review-Url: https://codereview.chromium.org/2671233002
Cr-Commit-Position: refs/heads/master@{#42975}
2017-02-06 17:45:14 +00:00
mlippautz
9e248dde60 [api] Mark functions related to object grouping as DEPRECATED
Embedders should use the new EmbedderHeapTracer api.

BUG=v8:5828

Review-Url: https://codereview.chromium.org/2642743008
Cr-Commit-Position: refs/heads/master@{#42974}
2017-02-06 17:42:13 +00:00
ahaas
7517e68202 [wasm] With possible nondeterminism the fuzzer should not check traps
The non-determinism of NaNs does not only affect the result of the test
function, it also affects the traps that are thrown.

R=titzer@chromium.org, eholk@chromium.org
BUG=v8:5924

Review-Url: https://codereview.chromium.org/2671813004
Cr-Commit-Position: refs/heads/master@{#42973}
2017-02-06 17:19:53 +00:00
bjaideep
8330952bf7 Revert of PPC/s390: [debugger] remove debugger statement support from FCG/CS. (patchset #1 id:1 of https://codereview.chromium.org/2672813002/ )
Reason for revert:
Original CL got reverted https://codereview.chromium.org/2672823007

Original issue's description:
> PPC/s390: [debugger] remove debugger statement support from FCG/CS.
>
> Port eef855a1dc
>
> R=yangguo@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
> BUG=
> LOG=N
>
> Review-Url: https://codereview.chromium.org/2672813002
> Cr-Commit-Position: refs/heads/master@{#42898}
> Committed: f2d2ebcae8

TBR=joransiu@ca.ibm.com,jyan@ca.ibm.com,michael_dawson@ca.ibm.com,yangguo@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=

Review-Url: https://codereview.chromium.org/2677183003
Cr-Commit-Position: refs/heads/master@{#42972}
2017-02-06 16:28:39 +00:00
v8-autoroll
c7c804b233 Update V8 DEPS.
Rolling v8/third_party/catapult: 3ea8977..1e91982

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

Change-Id: I5c635ee102c8e523491285ab96e72278ecbaf5c1
Reviewed-on: https://chromium-review.googlesource.com/437965
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#42971}
2017-02-06 15:44:48 +00:00
jbroman
790518c130 Trivial simplification in JSObject::AddDataElement.
Spotted by clang static analyzer, these variables are declared outside of
the condition but only used within.

Review-Url: https://codereview.chromium.org/2668003002
Cr-Commit-Position: refs/heads/master@{#42970}
2017-02-06 14:57:39 +00:00
v8-autoroll
ae40e9683a Update V8 DEPS.
Rolling v8/build: ab0bc70..ed0758e

Rolling v8/third_party/catapult: d637de7..3ea8977

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

Review-Url: https://codereview.chromium.org/2672353002
Cr-Commit-Position: refs/heads/master@{#42969}
2017-02-06 14:45:59 +00:00
mstarzinger
b628aba090 [turbofan] Enable inlining based on SharedFunctionInfo.
This adapts the inlining logic to allow for inlining based solely on a
statically known underlying SharedFunctionInfo instead of a concrete
closure of the call target.

In cases where the closure is known, its bound context is constant
promoted just as before. In the new cases where only the SFI for an
entire class of closures is known, we use the dynamic SSA-value of the
bound context.

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

Review-Url: https://codereview.chromium.org/2626783003
Cr-Commit-Position: refs/heads/master@{#42968}
2017-02-06 13:54:38 +00:00
caitp
ec922ef6c7 [cleanup] fix comment in builtins-typedarray.cc
It's supposed to be a JSTypedArray, not a JSGeneratorObject

BUG=
R=littledan@chromium.org, adamk@chromium.org, jgruber@chromium.org

Review-Url: https://codereview.chromium.org/2674133002
Cr-Commit-Position: refs/heads/master@{#42967}
2017-02-06 13:05:46 +00:00
Michael Achenbach
aedcbfae92 [foozzie] Mock out performance.now
Also improve suppression of Math.pow precision.

BUG=chromium:679957
NOTRY=true
TBR=mstarzinger@chromium.org,jarin@chromium.org

Change-Id: I43d0cd6f6f6d0867be9f2337990114c07c716df5
Reviewed-on: https://chromium-review.googlesource.com/438327
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#42966}
2017-02-06 12:58:58 +00:00
jgruber
5ea144afe3 [regexp] Add stub for RegExpExec instead of inlining
The code produced for RegExpExec is quite large, and we ended up completely
inlining it several spots.  This CL moves RegExpPrototypeExecBody into two
stubs (one each for fast and slow paths) and converts inlined uses into stub
calls. This decreases the local x64 snapshot size by around 80K.

BUG=chromium:688972

Review-Url: https://codereview.chromium.org/2677073004
Cr-Commit-Position: refs/heads/master@{#42965}
2017-02-06 12:56:23 +00:00
franzih
a495fc92da [test] Cleanup CHECK_EQ order.
Keep the order in CHECK_EQ calls consistent as
(expected, actual).

Simplify CHECK_EQ(true, expected) to CHECK(expected) and
CHECK_EQ(false, expected) to CHECK(!expected).

BUG=

Review-Url: https://codereview.chromium.org/2677133002
Cr-Commit-Position: refs/heads/master@{#42964}
2017-02-06 12:51:53 +00:00
marja
35a82866d7 [iwyu] runtime.h doesn't need objects.h
BUG=v8:5294
R=mstarzinger@chromium.org

Review-Url: https://codereview.chromium.org/2675233002
Cr-Commit-Position: refs/heads/master@{#42963}
2017-02-06 12:26:31 +00:00
hpayer
d1e5676026 [heap] Add debug code for investigating store buffer crasher.
BUG=chromium:673308

Review-Url: https://codereview.chromium.org/2677163002
Cr-Commit-Position: refs/heads/master@{#42962}
2017-02-06 12:05:52 +00:00
petermarshall
54a14005fd [Test] Update 'default' SixSpeed benchmark to use different processes.
The results are unreliable as-is, because es5 and es6 run in the same d8
process consecutively. The graph also shows a huge amount of noise,
which seems to be mostly resolved with this change.

Review-Url: https://codereview.chromium.org/2675263002
Cr-Commit-Position: refs/heads/master@{#42961}
2017-02-06 11:51:35 +00:00
petermarshall
d6f76908c8 [Test] Enable turbofan for spread call SixSpeed tests.
In preparation for more perf work in turbofan, so that we can actually
see the results on the graph.

BUG=v8:5932

Review-Url: https://codereview.chromium.org/2676263002
Cr-Commit-Position: refs/heads/master@{#42960}
2017-02-06 11:16:05 +00:00
jochen
b049d1a598 Ensure we align zone memory at 8 byte boundaries on all platforms
BUG=v8:5668
R=verwaest@chromium.org

Review-Url: https://codereview.chromium.org/2672203002
Cr-Commit-Position: refs/heads/master@{#42959}
2017-02-06 11:14:56 +00:00
ishell
8f2245bf99 [ic] Fix StoreIC_SlowSloppy/Strict builtins.
... by using KeyedStoreIC_Slow builtin instead. The issue with hard-coded
language mode is that the stub can be re-used through megamorphic stub cache for
an IC with incompatible language mode. KeyedStoreIC_Slow already does the
right thing - it decodes the language mode from the IC slot kind.

This CL also fixes the code kinds of the slow IC handlers. The code kind of
IC handlers is used only for checking that the handler was added to the right
megamorphic stub cache, which expect the handlers' code kinds to be either
Code::LOAD_IC or Code::STORE_IC.

And the megamorphic builtins are just helper code stubs that are called from
IC dispatchers, therefore they should have BUILTIN code kind. Same applies to
the other stubs which are neither IC dispatchers nor handlers.

BUG=v8:5917

Review-Url: https://codereview.chromium.org/2677603004
Cr-Commit-Position: refs/heads/master@{#42958}
2017-02-06 10:41:12 +00:00
marja
01c2b45560 [parser] Skipping inner funcs: produce the same scopes / variables for loops.
BUG=v8:5516
R=vogelheim@chromium.org

Review-Url: https://codereview.chromium.org/2673313003
Cr-Commit-Position: refs/heads/master@{#42957}
2017-02-06 10:40:00 +00:00
Michael Achenbach
ea7dc87cbd [foozzie] Suppress some test cases using f.arguments
BUG=chromium:662424
NOTRY=true
TBR=mstarzinger@chromium.org,jarin@chromium.org

Change-Id: I3576f90a864831e22d065af6ff6ab6b0e2264b1d
Reviewed-on: https://chromium-review.googlesource.com/438305
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#42956}
2017-02-06 10:29:34 +00:00
jarin
252eb7054d Ignore generic IC state count for Ignition->Turbo tier up decision.
We benefit from the optimizing compiler even if the IC state is generic,
so we'd better ignore the generic IC state count for the optimization
decision. This improves our speedometer score from 61.5 to 63.7
(default configuration is 65.9).

Review-Url: https://codereview.chromium.org/2674203002
Cr-Commit-Position: refs/heads/master@{#42955}
2017-02-06 10:22:08 +00:00
petermarshall
b69b24a2a2 [Test] Update all SixSpeed tests to run in separate processes.
BUG=v8:5922

Review-Url: https://codereview.chromium.org/2674873002
Cr-Commit-Position: refs/heads/master@{#42954}
2017-02-06 10:19:24 +00:00
mvstanton
aea3ce3df3 [TypeFeedbackVector] Root feedback vectors at function literal site.
TypeFeedbackVectors are strongly rooted by a closure. However, in modern
JavaScript closures are created and abandoned more freely. An important
closure may not be present in the root-set at time of garbage collection,
even though we've cached optimized code and use it regularly. For
example, consider leaf functions in an event dispatching system. They may
well be "hot," but tragically non-present when we collect the heap.

Until now, we've relied on a weak root to cache the feedback vector in
this case. Since there is no way to signal intent or relative importance,
this weak root is as susceptible to clearing as any other weak root at
garbage collection time.

Meanwhile, the feedback vector has become more important. All of our
ICs store their data there. Literal and regex boilerplates are stored there.
If we lose the vector, then we not only lose optimized code built from
it, we also lose the very feedback which allowed us to create that optimized
code. Therefore it's vital to express that dependency through the root
set.

This CL does this by creating a strong link to a feedback
vector at the instantiation site of the function closure.
This instantiation site is in the code and feedback vector
of the outer closure.

BUG=v8:5456

Review-Url: https://codereview.chromium.org/2674593003
Cr-Commit-Position: refs/heads/master@{#42953}
2017-02-06 10:18:05 +00:00
Michael Achenbach
f3aa32d971 [test] Skip flaky cpu-profiler tests.
BUG=v8:5193
NOTRY=true
TBR=alph@chromium.org,yangguo@chromium.org

Change-Id: I9740f4504c855d9526c7b6b446965996f7c50c0c
Reviewed-on: https://chromium-review.googlesource.com/438344
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Hablich <hablich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#42952}
2017-02-06 10:15:37 +00:00
ishell
979009041e [stubs] Port KeyedStoreIC_Slow/Miss and StoreSlowElementStub to TF.
This CL also removes unused LoadApiGetterStub and renames StoreElementStub to StoreSlowElementStub.

BUG=v8:4587

Review-Url: https://codereview.chromium.org/2670863003
Cr-Commit-Position: refs/heads/master@{#42951}
2017-02-06 10:04:58 +00:00
jgruber
9576d08c92 [string] Don't tail-call into runtime with adaptor frames
TailCallRuntime currently does not seem to handle adaptor frames
correctly.

BUG=chromium:688690

Review-Url: https://codereview.chromium.org/2675133003
Cr-Commit-Position: refs/heads/master@{#42950}
2017-02-06 09:47:55 +00:00
ishell
52555c86b7 [ic] Encode [Keyed]StoreIC's language mode in slot kind instead of code object's flags.
BUG=v8:5917

Review-Url: https://codereview.chromium.org/2676583002
Cr-Commit-Position: refs/heads/master@{#42949}
2017-02-06 09:31:52 +00:00
Michael Achenbach
c737982c90 [build] Let v8gen support mipsel architectures
NOTRY=true
R=ishell@chromium.org

Change-Id: I99dc19f9904b24ba491334e76adb9486697e8a12
Reviewed-on: https://chromium-review.googlesource.com/438324
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#42948}
2017-02-06 09:28:07 +00:00
neis
fbd4cc9a36 [ast] Minor cleanup in scopes.cc.
- Remove TODO concerning maybe-assigned. For LOOKUP variables, the flag
  doesn't really matter, so let's just set it to true to avoid confusion.

- Simplify a condition.

R=adamk@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2677653003
Cr-Commit-Position: refs/heads/master@{#42947}
2017-02-06 09:11:56 +00:00
hablich
a0b7db1b0c [Tests] Add microbenchmark for defaults
R=franzih@chromium.org
NOTRY=true

Review-Url: https://codereview.chromium.org/2676773004
Cr-Commit-Position: refs/heads/master@{#42946}
2017-02-06 07:03:20 +00:00
v8-autoroll
72ba1eee3f Update V8 DEPS.
Rolling v8/build: 629b322..ab0bc70

Rolling v8/third_party/catapult: bffe083..d637de7

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

Review-Url: https://codereview.chromium.org/2675183002
Cr-Commit-Position: refs/heads/master@{#42945}
2017-02-06 04:25:54 +00:00
caitp
d36f14a73d [tests] add microbenchmark for %TypedArray%.prototype.copyWithin
Add a simple microbenchmark for calling copyWithin on a moderately large
Float64Array with 10,000 elements.

BUG=v8:5925, v8:5929, v8:4648
R=cbruni@chromium.org, adamk@chromium.org, littledan@chromium.org

Review-Url: https://codereview.chromium.org/2676193002
Cr-Commit-Position: refs/heads/master@{#42944}
2017-02-06 04:20:09 +00:00
v8-autoroll
84b9c6301e Update V8 DEPS.
Rolling v8/third_party/catapult: 5e0a1c8..bffe083

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

Review-Url: https://codereview.chromium.org/2671183002
Cr-Commit-Position: refs/heads/master@{#42943}
2017-02-05 04:27:41 +00:00
kozyatinskiy
7c79736019 Revert of [debugger] remove debugger statement support from FCG/CS. (patchset #5 id:80001 of https://codereview.chromium.org/2650193002/ )
Reason for revert:
Fails on chromium leak bot:
https://uberchromegw.corp.google.com/i/chromium.webkit/builders/WebKit%20Linux%20Trusty%20Leak/builds/2007

Original issue's description:
> [debugger] remove debugger statement support from FCG/CS.
>
>
> R=mstarzinger@chromium.org
>
> Review-Url: https://codereview.chromium.org/2650193002
> Cr-Commit-Position: refs/heads/master@{#42892}
> Committed: eef855a1dc

TBR=mstarzinger@chromium.org,yangguo@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.

Review-Url: https://codereview.chromium.org/2672823007
Cr-Commit-Position: refs/heads/master@{#42942}
2017-02-04 18:11:10 +00:00
franzih
29e8d49f56 [runtime] Fix use of attributes if intercepted.
The property details of a LookupIterator are not accessible,
if the iterator state is interceptor. Instead, use the
property attributes.

Fixes a crash in Node.js tests in Debug mode, see
c2c6ae52ea

BUG=

Review-Url: https://codereview.chromium.org/2675993002
Cr-Commit-Position: refs/heads/master@{#42941}
2017-02-04 16:30:05 +00:00
v8-autoroll
22a6785eb6 Update V8 DEPS.
Rolling v8/build: d4321a9..629b322

Rolling v8/third_party/catapult: 53604dd..5e0a1c8

Rolling v8/tools/clang: 88069f4..426ef62

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

Review-Url: https://codereview.chromium.org/2677613006
Cr-Commit-Position: refs/heads/master@{#42940}
2017-02-04 04:25:46 +00:00
kozyatinskiy
39afa5af06 [inspector] fixed taskHeapSnapshot on pause
Blink uses access checks to be sure that objects from one context doesn't access objects in another. Heap profiler uses current context to call this checks, we need to be sure that current context is empty to allow heap profiler collect all objects without crash.

BUG=chromium:661223
R=alph@chromium.org,ulan@chromium.org

Review-Url: https://codereview.chromium.org/2669393002
Cr-Commit-Position: refs/heads/master@{#42939}
2017-02-04 01:21:58 +00:00
binji
79837f5f6f Improve ValueSerializer perf regression after 96635558
BUG=687196
R=jbroman@chromium.org

Review-Url: https://codereview.chromium.org/2674613002
Cr-Commit-Position: refs/heads/master@{#42938}
2017-02-04 00:44:47 +00:00
binji
67fc083aae [d8] Fix ArrayBuffer memory leaks in d8 introduced by commit 96635558.
BUG=686338
R=cbruni@chromium.org,jbroman@chromium.org

Review-Url: https://codereview.chromium.org/2662193002
Cr-Commit-Position: refs/heads/master@{#42937}
2017-02-04 00:43:36 +00:00
lukasza
de20581ca3 Adapt String::find method via StringUtil adapter.
This is needed to insulate generated code from blink::protocol namespace
from naming changes that we plan to do in the Great Blink Rename (which
in particular will rename wtf::StringBuilder::find method into Find).

This CL also includes roll of inspector_protocol which starts to
generate code that uses the new StringUtil::find adapter method:
rolling third_party/inspector to 1a7cbe8ba8fa0d622586f549a97c73d9b52efbea

BUG=683447

Review-Url: https://codereview.chromium.org/2675763003
Cr-Commit-Position: refs/heads/master@{#42936}
2017-02-03 22:17:24 +00:00
kozyatinskiy
6b6ed60155 [inspector] return meaningful error on Debug.setScriptSource for ES module
BUG=v8:1569
R=dgozman@chromium.org,alph@chromium.org

Review-Url: https://codereview.chromium.org/2669713002
Cr-Commit-Position: refs/heads/master@{#42935}
2017-02-03 22:10:04 +00:00