Commit Graph

25950 Commits

Author SHA1 Message Date
ishell
14b31970e7 Remove support for "loads and stores to global vars through property cell shortcuts installed into parent script context" from all compilers.
The plan is to implement the same idea using vector IC machinery.
Stubs implementations and scopes modifications are left untouched for now.

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

Cr-Commit-Position: refs/heads/master@{#31458}
2015-10-22 09:17:24 +00:00
jkummerow
af0a228d90 Add OWNERS files to src/crankshaft/
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#31457}
2015-10-22 09:06:31 +00:00
bmeurer
bb20d7aea0 [turbofan] Unify NamedAccess and PropertyAccess operator parameters.
Use a unified NamedAccess operator parameter for both JSLoadNamed and
JSStoreNamed, and similar use PropertyAccess for both JSLoadProperty and
JSStoreProperty.

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

Cr-Commit-Position: refs/heads/master@{#31456}
2015-10-22 08:48:09 +00:00
bmeurer
b7985aaeb7 [test] Re-enable mjsunit/constant-folding-2 test that no longer fails.
R=jarin@chromium.org
BUG=v8:4506
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31455}
2015-10-22 08:46:11 +00:00
Michael Achenbach
db4f4836e8 Whitespace change to test swarming switch.
Cr-Commit-Position: refs/heads/master@{#31454}
2015-10-22 07:57:18 +00:00
mtrofin
f20c8427aa [turbofan] Fix for register allocation crash
It appears we haven't wired in the 32 float constant passed on the stack.

BUG=v8:4506
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31453}
2015-10-22 07:22:51 +00:00
alph
87c468383a [x64] Implement vpcmpeqd, vpslld, vpsrld AVX instructions.
BUG=v8:4406
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31452}
2015-10-22 07:01:11 +00:00
v8-autoroll
1ee09b29f8 Update V8 DEPS.
Rolling v8/tools/swarming_client to 8fce79620b04bbe5415ace1103db27505bdc4c06

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

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

Cr-Commit-Position: refs/heads/master@{#31451}
2015-10-22 03:23:56 +00:00
caitpotter88
1be2b46c85 [api] expose API for adding per-context Intrinsics to Templates
Add mechanism for adding per-context ECMAScript intrinsics to Template
objects, which may be instantiated in multiple contexts.

BUG=
LOG=N
R=jochen@chromium.org, verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31450}
2015-10-21 20:14:51 +00:00
mbrandy
d3a1fa0be0 Stack buffer for builtin code generation too small in some cases.
With --debug-code specified, 8 KB is not sufficient to contain
some of the builtins on PPC64.

This path is relevant only when snapshots are off.

R=rmcilroy@chromium.org, ulan@chromium.org, michael_dawson@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31449}
2015-10-21 18:27:56 +00:00
mlippautz
c610c6308d [tools] Fix regexp grepping for GC NVP float values.
R=ulan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31448}
2015-10-21 17:33:54 +00:00
neis
2803a3d302 [es6] Partially implement Reflect.getPrototypeOf.
Proxies are not properly supported yet.

R=rossberg
BUG=v8:3931
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31447}
2015-10-21 15:45:24 +00:00
vogelheim
7770e02129 Always dispose backing store.
(With a v8::Vector, the client is responsible for memory management.
 I think there can be a situation where the Vector has a char[1] backing
 store with '\0' in it, in which case the current code would leak.
 If we always Dispose() the backing store this should be avoided.
 Since dispose will delete[] the actual backing store, this should
 also work then the backing store is nullptr.)

R=jochen@chromium.org
BUG=chromium:525885
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31446}
2015-10-21 15:30:27 +00:00
oth
339e0c804e [Interpreter] Reduce temporary register usage in generated bytecode.
This change adds new flavors of Visit() methods for obtaining
expression results:

- VisitForAccumulatorValue() which places result in the accumulator.
- VisitForRegisterValue() which places the result in a register.
- VisitForEffect() which evaluates the expression and discards the result.

The targets of these calls place the expression result with
result_scope()->SetResultInRegister() or
result_scope()->SetResultInAccumulator().

By being smarter about result locations, there's less temporary
register usage. However, we now have a hazard with assignments
in binary expressions that didn't exist before. This change detects and
DCHECK's when a hazard is detected. A follow on CL will address this.

There are consequential changes to test-bytecode-generator.cc and
this change also adds new bytecode macros A(x, n) and THIS(n) for
register file entries for arguments and this.

BUG=v8:4280
LOG=NO

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

Cr-Commit-Position: refs/heads/master@{#31445}
2015-10-21 15:29:23 +00:00
jarin
14ba9c3dea Introduce a reference to the code object of inlined functions in CompilationInfo.
The newly introduced root makes sure that we do not flush the
optimized code while the function is being compiled.

BUG=v8:4493
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31444}
2015-10-21 15:05:32 +00:00
mlippautz
218c06e803 Reland "[heap] Divide available memory upon compaction tasks"
This reverts commit a31cef44dc.

Original message:

[heap] Divide available memory upon compaction tasks
- Fairly (round-robin) divide available memory upon compaction tasks.
- Ensure an upper limit (of memory) since dividing is O(n) for n free-space
  nodes.
- Refill from free lists managed by sweeper once a compaction space becomes
  empty.

Assumption for dividing memory: Memory in the free lists is sparse upon starting
compaction (which means that only few nodes are available), except for memory
reducer GCs, which happen in idle time though (so it's less of a problem).

BUG=chromium:524425
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31443}
2015-10-21 14:21:15 +00:00
machenbach
d6ebeb4e0d [test] Make cfi more verbose.
Set "no recover" in diagnostic mode to keep triggering
crashes. Otherwise, the v8 test driver won't notice tests
as failing.

Also port some common sanitizer cflags to cfi - those can be
removed on the build side afterwards.

BUG=chromium:515782
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31442}
2015-10-21 13:35:42 +00:00
adamk
ef18438cb4 Remove unnecessary v8.h include in parameter-initializer-rewriter.cc
R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31441}
2015-10-21 13:29:55 +00:00
adamk
7f1504f51e [es6] Handle super properly when rewriting arrow parameter initializers
R=rossberg@chromium.org
BUG=v8:4395
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#31440}
2015-10-21 13:16:07 +00:00
mlippautz
a31cef44dc Revert of "[heap] Divide available memory upon compaction tasks" (patchset #5 id:90008 of https://codereview.chromium.org/1415733004/ )
Reason for revert:
Failing again: http://build.chromium.org/p/client.v8/builders/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/builds/2183

Original issue's description:
> Reland of "[heap] Divide available memory upon compaction tasks"
>
> This reverts commit cf71c28f13.
>
> Original message:
>
> [heap] Divide available memory upon compaction tasks
> - Fairly (round-robin) divide available memory upon compaction tasks.
> - Ensure an upper limit (of memory) since dividing is O(n) for n free-space
>   nodes.
> - Refill from free lists managed by sweeper once a compaction space becomes
>   empty.
>
> Assumption for dividing memory: Memory in the free lists is sparse upon starting
> compaction (which means that only few nodes are available), except for memory
> reducer GCs, which happen in idle time though (so it's less of a problem).
>
> BUG=chromium:524425
> LOG=N
>
> Committed: https://crrev.com/63f42ecb965d04877f45043c1416170b6f79b962
> Cr-Commit-Position: refs/heads/master@{#31436}

TBR=hpayer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:524425

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

Cr-Commit-Position: refs/heads/master@{#31439}
2015-10-21 13:14:46 +00:00
ishell
be5720c2e3 Disable loads and stores to global vars through property cell shortcuts installed into parent script context.
The plan is to implement the same idea using vector IC machinery.

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

Cr-Commit-Position: refs/heads/master@{#31438}
2015-10-21 13:00:38 +00:00
mstarzinger
d9a5add017 [turbofan] Fix liveness analysis for let variable in TDZ.
This makes sure that initializing assignments of let-declared variables
perform an environment lookup and hence keep the variable alive. This is
needed because full-codegen contains debug code verifying the variable
is still inside the TDZ at the initializing assignment.

R=jarin@chromium.org
TEST=mjsunit/compiler/regress-variable-liveness-let
BUG=v8:4493
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31437}
2015-10-21 12:23:06 +00:00
mlippautz
63f42ecb96 Reland of "[heap] Divide available memory upon compaction tasks"
This reverts commit cf71c28f13.

Original message:

[heap] Divide available memory upon compaction tasks
- Fairly (round-robin) divide available memory upon compaction tasks.
- Ensure an upper limit (of memory) since dividing is O(n) for n free-space
  nodes.
- Refill from free lists managed by sweeper once a compaction space becomes
  empty.

Assumption for dividing memory: Memory in the free lists is sparse upon starting
compaction (which means that only few nodes are available), except for memory
reducer GCs, which happen in idle time though (so it's less of a problem).

BUG=chromium:524425
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31436}
2015-10-21 12:05:44 +00:00
adamk
02e4d21f4c [es6] Fix scoping for default parameters in arrow functions
When eagerly parsing arrow functions, expressions in default
parameter initializers are parsed in the enclosing scope,
rather than in the function's scope (since that scope does not
yet exist). This leads to VariableProxies being added to the
wrong scope, and scope chains for FunctionLiterals being incorrect.

This patch addresses these problems by adding a subclass of
AstExpressionVisitor that moves VariableProxies to the proper
scope and fixes up scope chains of FunctionLiterals.

This is a revert of the revert https://crrev.com/e41614a058426fb6102e4ab2dd4f98997f00c0fc
with a much-improved (though not yet perfect) Scope::ResetOuterScope
method which properly fixes not only the outer_scope_ pointer but also
fixes the inner_scope_ list in the relevant outer_scopes.

More work likely still needs to be done to make this work completely,
but it's very close to correct.

BUG=v8:4395
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#31435}
2015-10-21 12:04:20 +00:00
neis
33f1075933 Move some code from Runtime_GetPrototype into a new Object::GetPrototype.
Also clean up the access check, which was doing too much.

This is in preparation of implementing Reflect.getPrototypeOf.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31434}
2015-10-21 11:17:28 +00:00
shiyu.zhang
a910b8f0e2 X87: Test for var declarations in eval which conflict with let
port d515e5138d30ab5b2a79e4cac99fcc5ca8d8991b(r31211).

contributed by zhengxing.li@intel.com

original commit message:
Previously, name conflicts between var and let declarations were only made into exceptions if they were visible at parse-time. This patch adds runtime checks so that sloppy-mode direct eval can't introduce conflicting var declarations. The change is implemented by traversing the scope chain when a direct eval introduces a var declaration to look for conflicting let declarations, up to the function boundary.

additional comment:
The original r31211 patch needs some additional changes for x87
1. Should use Smi::FromInt(variable->DeclarationPropertyAttributes())

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31433}
2015-10-21 10:45:29 +00:00
neis
d603dc5c42 Move some code from Runtime_SetPrototype to JSObject::SetPrototype.
This is in preparation of implementing Reflect.setPrototypeOf.

R=verwaest@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31432}
2015-10-21 09:54:38 +00:00
neis
79634a3ffe [es6] Partially implement Reflect.preventExtensions.
Ignore proxies for now.

R=rossberg
BUG=v8:3931
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31431}
2015-10-21 09:23:47 +00:00
mtrofin
3e2e2062e7 [Turbofan] Re-enable single splinter.
Revert "Revert of [turbofan] Splinter into one range.
(patchset #2 id:80001 of https://codereview.chromium.org/1391023007/ )"

This reverts commit 23a8837fcc.

Also added a CHECK in Merge to validate that splitting yields a different
range and thus advances the algorithm. Ran stress bots successfully. Likely my earlier change in Splintering addressed the stress test scenario
that was looping infinitely.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31430}
2015-10-21 08:09:43 +00:00
v8-autoroll
d2dd8fbdc9 Update V8 DEPS.
Rolling v8/build/gyp to 3f21260b43401553c37bb28090b65a75577d5b4e

Rolling v8/tools/swarming_client to b64f0423ee66e730b0ceb88de8b9b89a98d7b61a

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

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

Cr-Commit-Position: refs/heads/master@{#31429}
2015-10-21 03:28:04 +00:00
caitpotter88
b6596aa73b [es7] implement |do| expressions proposal
Adds an implementation of "do expression" parsing (https://webcache.googleusercontent.com/search?q=cache:MIGALjqPDNgJ:wiki.ecmascript.org/doku.php%3Fid%3Dstrawman:do_expressions+&cd=1&hl=en&ct=clnk&gl=us).

This feature provides a way to evaluate a block of statements within an expression context, producing the resulting completion value. This is very helpful for implementing certain language features via desugaring.

BUG=v8:4488
LOG=N
R=adamk@chromium.org, bmeurer@chromium.org, rossberg@chromium.org, wingo@igalia.com

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

Cr-Commit-Position: refs/heads/master@{#31428}
2015-10-21 02:58:32 +00:00
dpranke
5c1b11b539 Add an external_startup_data config to the GN buildfile.
This change defines a common config for clients of v8 that
need to define V8_USE_EXTERNAL_STARTUP_DATA in order for
client code to be compiled correctly.

R=brettw@chromium.org, jochen@chromium.org
BUG=541791
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31427}
2015-10-21 00:37:46 +00:00
dusan.m.milosavljevic
e40b1b4230 MIPS: [turbofan] Optimize fpu compares with zero literal.
TEST=
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31426}
2015-10-20 21:54:02 +00:00
machenbach
7e5d330917 [test] Disable two more failing tests.
TBR=jarin@chromium.org
NOTREECHECKS=true
BUG=v8:4493
LOG=n
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#31425}
2015-10-20 19:59:17 +00:00
machenbach
581ead5c8c Revert of Use C++ implementation of Object.definePropert{y,ies} (patchset #4 id:60001 of https://codereview.chromium.org/1409613004/ )
Reason for revert:
[Sheriff] Breaks layout tests. Please request rebase upstream first if intended:
http://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/2427

One test times out now.

Original issue's description:
> Use C++ implementation of Object.definePropert{y,ies}
>
> For now, only rewire builtins in v8natives.js to call the new runtime functions.
>
> Committed: https://crrev.com/b2abc0e3ad4ce9dde8d66aab7aafae179e6948d4
> Cr-Commit-Position: refs/heads/master@{#31413}

TBR=verwaest@chromium.org,jkummerow@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#31424}
2015-10-20 19:50:32 +00:00
mstarzinger
2607e2b06b [turbofan] Disable two more failing tests.
R=jarin@chromium.org
NOTREECHECKS=true
BUG=v8:4493
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31423}
2015-10-20 16:52:36 +00:00
mtrofin
27f51390e9 Instead of splintering by chunks of deferred blocks, irrespective of the
range's internal structure, we take a range at a time and splinter based on
the blocks it covers. This is no different in scenarios where a UseInterval
covers non-deferred then deferred blocks. However, in scenarios where
a deferred block jumps to another one, and there are no other blocks
covered by the range in between, this CL will treat the two such blocks
together, while the previous one would treat them separately. This matters
in cases such as deoptimization blocks preceded (not necessarily
consecutively) by a single instruction (jump) Merging block.

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

Cr-Commit-Position: refs/heads/master@{#31422}
2015-10-20 16:00:38 +00:00
bmeurer
d168a1e844 [turbofan] We cannot unconditionally flatten cons strings in the JSGraph.
It is not always safe to allocate new heap objects in the JSGraph. We
might have to revisit this later once we do the canonicalization for
HeapConstants.

R=jarin@chromium.org
BUG=chromium:545364
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31421}
2015-10-20 15:48:07 +00:00
mstarzinger
32ab65e9ea [turbofan] Re-enable debugger tests that no longer fail.
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31420}
2015-10-20 15:32:20 +00:00
mvstanton
4d98941e18 VectorICs: turn on vectors for STORE and KEYED_STORE ics.
R=jkummerow@chromium.org
BUG=

Committed: https://crrev.com/52225f39df578e77b4804506ca4bc15e096f5cab
Cr-Commit-Position: refs/heads/master@{#31252}

Committed: https://crrev.com/31487015de401892b4d12b5faef0c47c201308da
Cr-Commit-Position: refs/heads/master@{#31305}

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

Cr-Commit-Position: refs/heads/master@{#31419}
2015-10-20 15:28:01 +00:00
mbrandy
ac4eaee4b1 Refine "[test] Skip webkit test too slow for ppc."
Skip only for simulator runs.

R=machenbach@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31418}
2015-10-20 15:26:56 +00:00
caitpotter88
d09a925b9a Revert "[api] expose Array Iterators to API"
This reverts commit 24aca87090.

The API makes these values appear to be per-isolate, when in fact
they are per-context. Installing the results of these on Template
objects instantiated in multiple contexts can result in security
violations and contexts being retained indefinitely.

An alternative mechanism for using these in a sensible way is
provided by https://crrev.com/1409593002

BUG=
LOG=N
R=jochen@chromium.org, adamk@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31417}
2015-10-20 15:25:50 +00:00
bmeurer
2abd768e87 [turbofan] Respect effect input when lowering JSToBoolean for string inputs.
This allows us to re-enable the mjsunit/tools/profile test case.

R=jarin@chromium.org
BUG=v8:4493
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31416}
2015-10-20 15:24:26 +00:00
mvstanton
aeffa39e1d Mjsunit/debug-script test fails intermittendly with --vector-stores
The problem is that the gc pattern is different, and the list of debug scripts
may have more or less duplicates than before. The solution is to just turn off
--stress-opt for the test.

R=yangguo@chromium.org
BUG=v8:4502
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31415}
2015-10-20 14:57:23 +00:00
jochen
1440cd3d83 Fix crash in shell.cc when reporting exceptions that aren't Errors
BUG=chromium:534746
R=vogelheim@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31414}
2015-10-20 14:33:52 +00:00
jkummerow
b2abc0e3ad Use C++ implementation of Object.definePropert{y,ies}
For now, only rewire builtins in v8natives.js to call the new runtime functions.

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

Cr-Commit-Position: refs/heads/master@{#31413}
2015-10-20 14:29:40 +00:00
mstarzinger
a64d387ad2 [turbofan] Disable failing mjsunit/harmony/reflect test.
R=bmeurer@chromium.org
TEST=mjsunit/harmony/reflect --exhaustive-variants
NOTREECHECKS=true
NOTRY=true
BUG=v8:4493
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31412}
2015-10-20 14:16:53 +00:00
karl
b00371b423 Reland: Use simple/fast inline function version of MinMax in JS
Use the simple inline function version of {Min, Max} where possible to
improve performance

Now uses an forced inline js function instead of a python macro
to avoid expressions be evaluated twice

Follow-up to CR: https://codereview.chromium.org/1331993004

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

Cr-Commit-Position: refs/heads/master@{#31411}
2015-10-20 13:43:53 +00:00
jkummerow
81ee94b650 Move Hydrogen and Lithium to src/crankshaft/
Review URL: https://codereview.chromium.org/1405363003

Cr-Commit-Position: refs/heads/master@{#31410}
2015-10-20 13:25:55 +00:00
bmeurer
58befc9b81 [test] Differentiate between exhaustive and default testing variants.
Review URL: https://codereview.chromium.org/1402353006

Cr-Commit-Position: refs/heads/master@{#31409}
2015-10-20 13:16:51 +00:00