Commit Graph

32852 Commits

Author SHA1 Message Date
mstarzinger
f00b42ae31 [interpreter] Fix profiler when hitting OSR frame.
This fixes the runtime profiler to no longer assume that seeing an
optimized frame on the stack implies the underlying function is not
being interpreted when entered normally. This no longer holds with code
generated for OSR directly from bytecode (not installed on function).

R=rmcilroy@chromium.org
TEST=mjsunit/regress/regress-crbug-632800
BUG=chromium:632800

Review-Url: https://codereview.chromium.org/2208603005
Cr-Commit-Position: refs/heads/master@{#38360}
2016-08-05 08:47:48 +00:00
mstarzinger
5671b663f9 [interpreter] Avoid tier-up when there is an OSR activation.
This makes sure we prevent a tier-up for function which also have an
optimized activation of OSR code on the stack. In case the OSR code
deoptimizes, it needs the bytecode to still be around.

R=rmcilroy@chromium.org
TEST=mjsunit/regress/regress-5262
BUG=v8:5262

Review-Url: https://codereview.chromium.org/2206363004
Cr-Commit-Position: refs/heads/master@{#38359}
2016-08-05 07:55:03 +00:00
yangguo
771b81f806 [debug] fix exception prediction for asm frames.
R=mstarzinger@chromium.org
BUG=chromium:633999

Review-Url: https://codereview.chromium.org/2215713002
Cr-Commit-Position: refs/heads/master@{#38358}
2016-08-05 07:14:21 +00:00
machenbach
0dabe5f6fe [test] Skip test failing without i18n support
BUG=chromium:634273,chromium:634357,v8:5162
NOTRY=true
TBR=caitp

Review-Url: https://codereview.chromium.org/2211383002
Cr-Commit-Position: refs/heads/master@{#38357}
2016-08-05 07:10:35 +00:00
machenbach
e1b5cb43a9 Revert of [api] Clean up scopes and precheck instantiations cache (patchset #3 id:40001 of https://codereview.chromium.org/2206773003/ )
Reason for revert:
[Sheriff] Leads to mac asan failures:
https://build.chromium.org/p/client.v8/builders/V8%20Mac64%20ASAN/builds/7835

Original issue's description:
> [api] Clean up scopes and precheck instantiations cache
>
> Make sure all the scopes used in api-natives.cc have inlineable constructors
> and destructors. Additionally directly precheck the instantiations cache before
> trying to enter the InvokeScope which sets the save_context.
>
> BUG=chromium:630217
>
> Committed: https://crrev.com/a2496b942cad524f0f3144b107936eaa9a7c9fd5
> Cr-Commit-Position: refs/heads/master@{#38346}

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

Review-Url: https://codereview.chromium.org/2216903003
Cr-Commit-Position: refs/heads/master@{#38356}
2016-08-05 06:56:33 +00:00
bmeurer
cad5b29610 [turbofan] Remove unnecessary prototype checks for element access.
We don't need to add stability dependencies on JSObject prototypes when
storing to an element, because we do the map check (and thereby guard
the elements kind) and we also properly deoptimize on holes if the array
protector is not usable.

R=verwaest@chromium.org
BUG=chromium:616709

Review-Url: https://codereview.chromium.org/2198833002
Cr-Commit-Position: refs/heads/master@{#38355}
2016-08-05 04:55:03 +00:00
v8-autoroll
9216b2bd4c Update V8 DEPS.
Rolling v8/build to f0243d787961584ac95a86e7dae897b9b60ea674

Rolling v8/buildtools to 9c6ad6f5cbc2f30989edc3504ec7f9d360542512

Rolling v8/tools/clang to 0b06ba9e49a0cba97f6accd71a974c1623d69e16

Rolling v8/tools/mb to 60b89880ddfbccdc978f3c1562b2431119aea3d4

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

Review-Url: https://codereview.chromium.org/2211333002
Cr-Commit-Position: refs/heads/master@{#38354}
2016-08-05 03:24:21 +00:00
caitp
0272aa502f [promise] separate PerformPromiseThen from PromiseThen
The `PerformPromiseThen` spec-internal operation is used by the async functions
proposal, in order to ensure that AwaitExpressions are not observable via
usual mechanisms/hooks, such as Symbol.species.

BUG=v8:5253
R=littledan@chromium.org, adamk@chromium.org, gsathya@chromium.org, yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2209433003
Cr-Commit-Position: refs/heads/master@{#38353}
2016-08-04 22:56:45 +00:00
clarkchenwang
e1a58dc439 [wasm] Fix build error on MIPS
BUG=

Review-Url: https://codereview.chromium.org/2216813002
Cr-Commit-Position: refs/heads/master@{#38352}
2016-08-04 22:05:08 +00:00
alph
3214886855 Initial implementation of dedicated FixedArray processing.
FixedArrays could be shown differently based on their subtypes.

Review-Url: https://codereview.chromium.org/2208753002
Cr-Commit-Position: refs/heads/master@{#38351}
2016-08-04 21:05:34 +00:00
gdeepti
1269306a3b [wasm] Grow memory should return -1 on failure.
Return -1 instead of out of throwing errors, update tests.

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

Review-Url: https://codereview.chromium.org/2216443002
Cr-Commit-Position: refs/heads/master@{#38350}
2016-08-04 20:39:32 +00:00
clarkchenwang
dfd8db8bec Add signature checking when directly import a foreign function
Review-Url: https://codereview.chromium.org/2204703002
Cr-Commit-Position: refs/heads/master@{#38349}
2016-08-04 20:34:02 +00:00
marja
bf3081c837 Put Scopes into temporary Zone (second try)
When parsing a eagerly-parsed-but-lazily-compiled function, we
used to put some of its AST nodes into a discardable Zone. This
CL puts the function Scope, its inner Scopes and the related AST
nodes (Declarations, VariableProxys) into the temporary Zone
too. This reduces peak memory usage and enables future work to
keep the temporary Zone around for later compilation.

BUG=

Review-Url: https://codereview.chromium.org/2210243002
Cr-Commit-Position: refs/heads/master@{#38348}
2016-08-04 19:15:55 +00:00
caitp
9977a2caf3 [elements] update Dictionary in IncludesValue if own elements change
Ensure that receiver->elements() == *dictionary after calling an accessor, in
addition to checking the prototype.

BUG=chromium:634273, chromium: 634357, v8:5162
R=cbruni@chromium.org, mstarzinger@chromium.org

Review-Url: https://codereview.chromium.org/2212963002
Cr-Commit-Position: refs/heads/master@{#38347}
2016-08-04 19:09:30 +00:00
cbruni
a2496b942c [api] Clean up scopes and precheck instantiations cache
Make sure all the scopes used in api-natives.cc have inlineable constructors
and destructors. Additionally directly precheck the instantiations cache before
trying to enter the InvokeScope which sets the save_context.

BUG=chromium:630217

Review-Url: https://codereview.chromium.org/2206773003
Cr-Commit-Position: refs/heads/master@{#38346}
2016-08-04 16:43:29 +00:00
adamk
e6d2c9b584 Properly pass InitializationFlag back from ScriptContextTable lookups
This was dropped accidentally in bb97d27ab.

R=verwaest@chromium.org
BUG=chromium:633884

Review-Url: https://codereview.chromium.org/2203213003
Cr-Commit-Position: refs/heads/master@{#38345}
2016-08-04 16:13:41 +00:00
caitp
0d7f7dc3ee [elements] limit TypedElementsAccessor::IncludesValue to backing store length
The contract is that the method is only invoked when there are no elements on
the prototype, and this elements type forbids accessor elements. So it is safe
to limit the search to the end of the backing store.

BUG=chromium:634269, v8:5162
R=cbruni@chromium.org, mstarzinger@chromium.org

Review-Url: https://codereview.chromium.org/2209273002
Cr-Commit-Position: refs/heads/master@{#38344}
2016-08-04 15:54:55 +00:00
yangguo
b96823ff29 [inspector] suppress build warnings on windows/clang
R=machenbach@chromium.org,thakis@chromium.org
BUG=v8:5258

Review-Url: https://codereview.chromium.org/2206983002
Cr-Commit-Position: refs/heads/master@{#38343}
2016-08-04 15:43:13 +00:00
machenbach
03f5124822 [test] Enable test status filtering by variant
This adds the possibility to address test cases in the
status file with the variant under which the test is running.
This is only allowed in top-level sections.

Example:
[{
  'test-case': [PASS, SLOW],
}]

['variant == foo', {
  'test-case': [FAIL],
}]

The test case "test-case" is marked as slow in all variants.
Additionally, in variant foo, it'll be expected to fail.

This CL also exemplifies the new feature with test cases
running under the ignition_turbofan variant. The
corresponding legacy flag is deprecated.

BUG=v8:5238

Review-Url: https://codereview.chromium.org/2203013002
Cr-Commit-Position: refs/heads/master@{#38342}
2016-08-04 14:42:16 +00:00
jyan
f32577f648 s390: Remove OrComplement and andComplement
OrComplement and AndComplement has no native support on s390.
So remove them.

R=joransiu@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com, bjaideep@ca.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/2213783002
Cr-Commit-Position: refs/heads/master@{#38341}
2016-08-04 13:45:03 +00:00
ahaas
d61c9873ee [wasm] Turn off wasm jit tests.
There seems to be a fundamental problem with calling runtime functions
from wasm if the runtime function can cause a GC.

NOTRY=true
R=machenbach@chromium.org, titzer@chromium.org

Review-Url: https://codereview.chromium.org/2216433003
Cr-Commit-Position: refs/heads/master@{#38340}
2016-08-04 12:41:14 +00:00
hpayer
6fa88169c0 [heap] Remove unused MarkCompactCollector::VisitLiveObjectsBody.
BUG=

Review-Url: https://codereview.chromium.org/2209193002
Cr-Commit-Position: refs/heads/master@{#38339}
2016-08-04 12:41:13 +00:00
epertoso
7eee144480 [turbofan] Basic reductions of 64-bit machine operators.
Only basic things for now, but enough, for example, to emit

mov rax, [rax+0xc]

instead of

mov rax, 0x3
mov rdx, [rdx+rax*4]

on x64.

BUG=

Review-Url: https://codereview.chromium.org/2211633003
Cr-Commit-Position: refs/heads/master@{#38338}
2016-08-04 12:37:08 +00:00
yangguo
bb819edf92 [debug] add jgruber as owner.
R=jgruber@chromium.org

Review-Url: https://codereview.chromium.org/2213583003
Cr-Commit-Position: refs/heads/master@{#38337}
2016-08-04 11:26:11 +00:00
mstarzinger
667d8ad099 [turbofan] Fix missing bailout for accessors in literals.
This adds the missing lazy bailout point when defining accessor pairs
within object literals via Runtime::kDefineAccessorPropertyUnchecked.
The runtime function in question can indeed trigger a lazy deopt due
to a DependentCode::kPrototypeCheckGroup dependency.

R=bmeurer@chromium.org
TEST=mjsunit/regress/regress-crbug-633585
BUG=chromium:633585

Review-Url: https://codereview.chromium.org/2207413002
Cr-Commit-Position: refs/heads/master@{#38336}
2016-08-04 10:28:46 +00:00
ahaas
7a1deffbd1 [serializer][heap] Record references in deserialized code objects.
References in code objects to new-space embedded objects have to be
recorded in a remembered set so that they get updated by the garbage
collector.

TEST=cctest/test-serialize/CodeSerializerEmbeddedObject

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

Review-Url: https://codereview.chromium.org/2200333004
Cr-Commit-Position: refs/heads/master@{#38335}
2016-08-04 09:39:57 +00:00
neis
9ab456d65b In Isolate::Throw, call PredictExceptionCatcher only if necessary.
This reverts an unintended change that was part of my recent CL
(https://codereview.chromium.org/2203803002).

BUG=

Review-Url: https://codereview.chromium.org/2208473008
Cr-Commit-Position: refs/heads/master@{#38334}
2016-08-04 09:24:08 +00:00
ivica.bogosavljevic
d6b62dc4de Fix compilation failure when v8 is compiled with Chromium using GYP.
Compilation breaks when compiling v8 through Chromium using GYP. The isssue
started to appear after https://codereview.chromium.org/2190973003 landed.
It happens because trace_event_common.h header is on different location if we
are compiling v8 through Chromium compared to when we are compiling v8 standalone.

BUG=

Review-Url: https://codereview.chromium.org/2207943002
Cr-Commit-Position: refs/heads/master@{#38333}
2016-08-04 09:12:34 +00:00
jochen
52cc7ddfba Don't dereference handles in DoParseLazy
This will allow for using DoParseLazy on a background thread, so we can
also parse inner functions on the background thread.

BUG=v8:5215
R=adamk@chromium.org,marja@chromium.org

Review-Url: https://codereview.chromium.org/2201423002
Cr-Commit-Position: refs/heads/master@{#38332}
2016-08-04 08:53:51 +00:00
rskang
94ad974df8 [Tracing] V8 Tracing Controller - Fix async trace event bug
Usage of hex IO manipulator for async event IDs corrupts future decimal number
outputs.

BUG=v8:5261

Review-Url: https://codereview.chromium.org/2200113003
Cr-Commit-Position: refs/heads/master@{#38331}
2016-08-04 08:49:22 +00:00
jgruber
887952e8c3 By default, don't clear exceptions in JSEntryStub
BUG=v8:5259
R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2213793003
Cr-Commit-Position: refs/heads/master@{#38330}
2016-08-04 08:49:21 +00:00
bmeurer
fad8340199 [turbofan] Add support for "ignore OOB stores" to typed arrays.
Add missing support for the STORE_NO_TRANSITION_IGNORE_OUT_OF_BOUNDS
store mode to TurboFan.

R=epertoso@chromium.org
BUG=v8:4470

Review-Url: https://codereview.chromium.org/2210883002
Cr-Commit-Position: refs/heads/master@{#38329}
2016-08-04 08:30:48 +00:00
hpayer
62f2e7e8b0 Revert "[heap] Temporarily use old live object iterator to investigate Win 10 memory regression."
This reverts commit d2cf6e2956.

BUG=chromium:633537

Review-Url: https://codereview.chromium.org/2207383002
Cr-Commit-Position: refs/heads/master@{#38328}
2016-08-04 08:26:21 +00:00
mstarzinger
13d2feefba Remove catch prediction from handler table API.
This removes the ability to specify a catch prediction for exception
handler tables that are based on return addresses. The encoding for
handlers still looks the same to keep it in sync with tables based on
ranges, just no payload is stored in the respective bits.

R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2205893002
Cr-Commit-Position: refs/heads/master@{#38327}
2016-08-04 08:22:28 +00:00
ahaas
c088aea922 [heap] Record references in the new code objects in heap::CopyCode.
R=mlippautz@chromium.org
BUG=chromium:633539
TEST=cctest/test-heap/TestNewSpaceRefsInCopiedCode

Review-Url: https://codereview.chromium.org/2203783002
Cr-Commit-Position: refs/heads/master@{#38326}
2016-08-04 08:14:29 +00:00
jgruber
ea6b9609a6 Handle stack overflows in NoSideEffectToString
An infinite recursion can be triggered when NoSideEffectToString is
called on an error object with its name property set to itself.

BUG=633998

Review-Url: https://codereview.chromium.org/2206313002
Cr-Commit-Position: refs/heads/master@{#38325}
2016-08-04 07:45:11 +00:00
jgruber
a53d468747 Properly handle exceptions in cctests
Thrown exceptions must be handled before another exception is thrown.
This fixes all remaining test failures exposed by not clearing pending
exceptions in JSEntryStub.

BUG=v8:5259

Review-Url: https://codereview.chromium.org/2207923002
Cr-Commit-Position: refs/heads/master@{#38324}
2016-08-04 07:22:11 +00:00
jgruber
76193d4b6c Fix several stack-traces tests using assertUnreachable()
These tests all called assertUnreachable within a try/catch block.

BUG=v8:5246

Review-Url: https://codereview.chromium.org/2209663003
Cr-Commit-Position: refs/heads/master@{#38323}
2016-08-04 07:22:10 +00:00
hablich
39a5998f04 [Infra] Whitespace change for switching Ignition benchmarks.
Ignition benchmarks will be switched to --ignition-staging.

TBR=machenbach@chromium.org
NOTRY=true
NOTREECHECKS=true
NOPRESUBMIT=true

Review-Url: https://codereview.chromium.org/2210873002
Cr-Commit-Position: refs/heads/master@{#38322}
2016-08-04 07:18:03 +00:00
bmeurer
887583a15a [turbofan] Use CheckMaps for the COW check on elements.
Use a single CheckMaps node instead of the sequence of LoadField,
ReferenceEqual and CheckIf. This also makes it easier to eliminate
the COW check if there are multiple of them in a row.

R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2216453002
Cr-Commit-Position: refs/heads/master@{#38321}
2016-08-04 06:07:27 +00:00
zhengxing.li
6f94976b02 X87: Clear exceptions in Invoke instead of JSEntryStub.
port cdae865436 (r38292)

  original commit message:
  A corresponding flag was added as well to help us find out what breaks when we
  do not clear pending exceptions on each JS entry.

BUG=

Review-Url: https://codereview.chromium.org/2212733002
Cr-Commit-Position: refs/heads/master@{#38320}
2016-08-04 04:27:37 +00:00
v8-autoroll
3c9823972f Update V8 DEPS.
Rolling v8/build to c6b327c244be25a972266cad3228279266a03c66

Rolling v8/buildtools to 88c6fc5bde77b9477345f0885cd88d4a57ad1844

Rolling v8/tools/mb to 72a708590a056993adf080a92211ddc8221010e7

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

Review-Url: https://codereview.chromium.org/2212753002
Cr-Commit-Position: refs/heads/master@{#38319}
2016-08-04 03:24:30 +00:00
gsathya
140b898091 [promises] Avoid creating resolving functions in
Promise.resolve

Instead of creating resolve and reject closures, directly
call ResolvePromise after creating the promise.

Using the following as a microbenchmark --
```
var b = 0;
var start = performance.now();
for (var i = 0; i < 1000000; i++) {
  Promise.resolve(1).then((val) => {
    b += val;
    if (b == 1000000) print(performance.now() - start)
  });
}
```

I see a 16.01% improvement over 5 runs with this patch.

BUG=v8:5046

Review-Url: https://codereview.chromium.org/2143553002
Cr-Commit-Position: refs/heads/master@{#38318}
2016-08-03 22:59:39 +00:00
titzer
6cf621ec89 [wasm] Require global names to be validate UTF-8.
R=ahaas@chromium.org,bradnelson@chromium.org
BUG=chromium:628542

Review-Url: https://codereview.chromium.org/2207183002
Cr-Commit-Position: refs/heads/master@{#38317}
2016-08-03 22:55:43 +00:00
gsathya
80329cdd34 [promises] remove duplicate var initialization
BUG=v8:5046

Review-Url: https://codereview.chromium.org/2209773003
Cr-Commit-Position: refs/heads/master@{#38316}
2016-08-03 22:04:13 +00:00
lpy
c9c448c305 Revert of [Tracing] Embed V8 runtime call stats into tracing. (patchset #8 id:140001 of https://codereview.chromium.org/2187693002/ )
Reason for revert:
Mac64 ASAN failure. https://build.chromium.org/p/client.v8/builders/V8%20Mac64%20ASAN/builds/7810/steps/Check/logs/Threading4

Original issue's description:
> [Reland][Tracing] Embed V8 runtime call stats into tracing.
>
> Currently we have V8 RuntimeCallStats that is independently from tracing when
> running d8 with flag --runtime_call_stats. This patch embeds V8 runtime call
> stats into tracing, by having a global table of runtime call counters each
> isolate, resetting the table each time we enter a top level trace event, and
> dumping the table for each top level trace event. This will make trace file more
> compat, as well as enable runtime call stats in tracing system.
>
> This patch adds ~5% overhead to V8 when the category is enabled, we measure the
> overhead by running a script when category is enabled.
>
> BUG=v8:5089
>
> Committed: https://crrev.com/d014866173eaa2b548c566217b2c94b1d49385fa
> Committed: https://crrev.com/1ca3b73bba4a7253ca8eeef39321d70e7d414331
> Cr-Original-Commit-Position: refs/heads/master@{#38270}
> Cr-Commit-Position: refs/heads/master@{#38314}

TBR=cbruni@chromium.org,fmeawad@chromium.org,machenbach@chromium.org,bmeurer@chromium.org,adamk@chromium.org,rmcilroy@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5089

Review-Url: https://codereview.chromium.org/2200373003
Cr-Commit-Position: refs/heads/master@{#38315}
2016-08-03 21:47:10 +00:00
lpy
1ca3b73bba [Reland][Tracing] Embed V8 runtime call stats into tracing.
Currently we have V8 RuntimeCallStats that is independently from tracing when
running d8 with flag --runtime_call_stats. This patch embeds V8 runtime call
stats into tracing, by having a global table of runtime call counters each
isolate, resetting the table each time we enter a top level trace event, and
dumping the table for each top level trace event. This will make trace file more
compat, as well as enable runtime call stats in tracing system.

This patch adds ~5% overhead to V8 when the category is enabled, we measure the
overhead by running a script when category is enabled.

BUG=v8:5089

Committed: https://crrev.com/d014866173eaa2b548c566217b2c94b1d49385fa
Review-Url: https://codereview.chromium.org/2187693002
Cr-Original-Commit-Position: refs/heads/master@{#38270}
Cr-Commit-Position: refs/heads/master@{#38314}
2016-08-03 20:48:38 +00:00
machenbach
276f15d4c1 [build] Enable v8 backtrace on all standalone bots
BUG=

Review-Url: https://codereview.chromium.org/2204593009
Cr-Commit-Position: refs/heads/master@{#38313}
2016-08-03 19:46:16 +00:00
bjaideep
31554f5b03 PPC/s390: Clear exceptions in Invoke instead of JSEntryStub
Port cdae865436

Original commit message:

    A corresponding flag was added as well to help us find out what breaks when we
    do not clear pending exceptions on each JS entry.

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

BUG=5259
LOG=N

Review-Url: https://codereview.chromium.org/2208073003
Cr-Commit-Position: refs/heads/master@{#38312}
2016-08-03 18:24:52 +00:00
hpayer
d2cf6e2956 [heap] Temporarily use old live object iterator to investigate Win 10 memory regression.
BUG=chromium:633537

Review-Url: https://codereview.chromium.org/2205373002
Cr-Commit-Position: refs/heads/master@{#38311}
2016-08-03 18:11:43 +00:00