Commit Graph

4927 Commits

Author SHA1 Message Date
hablich
0188aeadbb Revert of Reland "Use C++ implementation of Object.definePropert{y,ies}" (patchset #2 id:20001 of https://codereview.chromium.org/1413123004/ )
Reason for revert:
Breaks test if rolled into Chromium: http://build.chromium.org/p/chromium.win/buildstatus?builder=Vista%20Tests%20%281%29&number=60441

Original issue's description:
> Reland "Use C++ implementation of Object.definePropert{y,ies}"
>
> This reverts commit 581ead5c8c.
>
> Committed: https://crrev.com/034f4a6ae14cd5c29ceddbdb8f9af179803ca793
> Cr-Commit-Position: refs/heads/master@{#31473}

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

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

Cr-Commit-Position: refs/heads/master@{#31535}
2015-10-23 19:24:23 +00:00
jochen
5587656155 Map v8::Function to JSReceiver + IsCallable
BUG=none
LOG=y
R=verwaest@chromium.org,bmeurer@chromium.org,rossberg@chromium.org
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng

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

Cr-Commit-Position: refs/heads/master@{#31519}
2015-10-23 12:27:06 +00:00
jochen
133d4a88f2 Plumb accessing context through to access control callbacks
BUG=none
LOG=n
R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31495}
2015-10-23 08:13:53 +00:00
zhengxing.li
2e5845f178 X87: Re-reland: Remove register index/code indirection.
port 5cf1c0bcf6 (r31087).

    original commit message:
    Previous to this patch, both the lithium and TurboFan register
    allocators tracked allocated registers by "indices", rather than
    the register codes used elsewhere in the runtime. This patch
    ensures that codes are used everywhere, and in the process cleans
    up a bunch of redundant code and adds more structure to how the
    set of allocatable registers is defined.

    Some highlights of changes:

    * TurboFan's RegisterConfiguration class moved to V8's top level
      so that it can be shared with Crankshaft.
    * Various "ToAllocationIndex" and related methods removed.
    * Code that can be easily shared between Register classes on
      different platforms is now shared.
    * The list of allocatable registers on each platform is declared
      as a list rather than implicitly via the register index <->
      code mapping.

    additional comment:
    This patch must be work with CL https://codereview.chromium.org/1405673003/
    and CL https://codereview.chromium.org/1413343002/
    which provide the needed register allocation common code change in
    v8 for this CL

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31494}
2015-10-23 07:58:47 +00:00
alph
cfcc019aff [x64] Implemennt vroundsd AVX instruction.
BUG=v8:4406
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31493}
2015-10-23 07:49:26 +00:00
alph
7ae54d2b82 [x64] Implement vsqrtsd AVX instruction.
BUG=v8:4406
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31490}
2015-10-23 06:47:46 +00:00
alph
ce8a22a86f [x64] Make MathMinMax use AVX instructions when available.
BUG=v8:4406
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31488}
2015-10-23 06:10:55 +00:00
rmcilroy
6256e1dcd5 [Interpreter] Fill out function prologue support.
Fills out some more of the function prologue support in the
interpreter. Deals with creation of arguments objects and throwing
IllegalRedeclarations if necessary. Also adds (untested) support for
this.function and new.target variable assignment.

Also fixes a bug in Frames::is_java_script() to deal with
interpreter frames correctly.

Cleans up comments in builtins InterpreterEntryTrampoline about
missing prologue support.

Adds the following bytecodes:
  - CreateArgumentsSloppy
  - CreateArgumentsStrict

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31486}
2015-10-22 21:42:04 +00:00
rmcilroy
4e0d11435e [Interpreter] Add support for compound expressions.
Adds support for compound expressions for variables and named / keyed
property assignments.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31485}
2015-10-22 20:42:31 +00:00
rmcilroy
0030805643 [Interpreter] Add support for for count operations.
Adds support for count operations to the interpreter. Deals with count
operations on locals, globals, context allocated variables and named and
keyed properties.

Adds the following bytecodes:
  ToNumber
  Inc
  Dec

BUG=v8:4280
LOG=N
TBR=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31484}
2015-10-22 20:40:27 +00:00
rmcilroy
9a594e783a [Interpreter] Unify global and unallocated variable access.
Unifies the global and unallocated variable type accesses given that
--global_var_shortcuts is going away. Lda/StaGlobal is modified to use
Load/StoreICs on the global object. The named LoadIC and StoreIC bytecodes
are also modified so that they take a constant pool entry index for the
name rather than a register, avoiding unecessary LdaConstant bytecodes to
be emitted.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31482}
2015-10-22 14:56:13 +00:00
chunyang.dai
5978b926c6 For some platform such as X87, Crankshaft and Turbofan needs to use different
register configurations currently. This CL provides a mechanism so that
    optimizing compilers can select different Register Configuration.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31476}
2015-10-22 13:24:49 +00:00
jkummerow
034f4a6ae1 Reland "Use C++ implementation of Object.definePropert{y,ies}"
This reverts commit 581ead5c8c.

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

Cr-Commit-Position: refs/heads/master@{#31473}
2015-10-22 13:16:45 +00:00
yangguo
f430bd040f Allow IdentityMap to store Smi-0.
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31470}
2015-10-22 12:12:20 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
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
Benedikt Meurer
063e2316d7 Revert "[turbofan] Stage --turbo-inlining behind --turbo flag." and "[turbofan] Skip more tests that fail with --turbo-inlining."
This reverts commit 019f9408dc,
6ed05f44af and
e34c343d2a.

TBR=mstarzinger@chromium.org
BUG=v8:4493
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31393}
2015-10-20 06:23:02 +00:00
alph
fa60b82b19 [x64] Replace movaps with appropriate vmov* instructions when AVX is enabled.
BUG=v8:4406
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31391}
2015-10-20 04:58:16 +00:00
mstarzinger
e34c343d2a [turbofan] Stage --turbo-inlining behind --turbo flag.
This stages the general purpose inlining mechanism in TurboFan and also
disables the remaining tests that still fail. We do this to get test
coverage early and to avoid regressing inlining as we go along.

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

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

Cr-Commit-Position: refs/heads/master@{#31386}
2015-10-20 03:54:12 +00:00
alph
19aa500567 [x64] Emit vmovss when AVX is enabled.
BUG=v8:4406
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31385}
2015-10-19 20:35:36 +00:00
rmcilroy
4d62978d63 [Interpreter] Add support for Throw.
Adds support for throwing exceptions. Adds the bytecode Throw.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31366}
2015-10-19 10:59:12 +00:00
mstarzinger
dbae315a10 [turbofan] Remove locally constructed simplified builders.
This removes all locally constructed SimplifiedOperatorBuilder instances
and uses the one passed along the JSGraph. It ensures that the correct
zone is used to allocate operators, no matter where the reducer is used.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31355}
2015-10-19 08:05:27 +00:00
alph
a57c62f679 [x64] Emit vmovmskpd when AVX is enabled.
BUG=v8:4406
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31350}
2015-10-18 16:12:35 +00:00
alph
9131cf7ec2 [x64] Emit vcvtss2sd & vcvtsd2ss when AVX is enabled.
BUG=v8:4406
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31349}
2015-10-18 16:11:31 +00:00
alph
0138b2652f [x64] Emit vcvttsd2si[q] when AVX is enabled.
BUG=v8:4406
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31348}
2015-10-18 15:43:41 +00:00
rmcilroy
a1e9a6d77f [Interpreter] Add support for RegExp literals.
Adds support for creating RegExp literals and adds some tests. Adds the
CreateRegExpLiteral bytecode.

BUG=v8:4280
LOG=N
TBR=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31345}
2015-10-16 16:14:48 +00:00
rmcilroy
2c8340dac4 [Interpreter] Add support for local context loads and stores.
Adds support for local context loads and stores. Also adds support for
creation of new block contexts (e.g., for let variables) and initializing
const / let variables with the hole appropriately.

Also adds some checks to ensure BytecodeArrayBuilder::context_count is set
appropriately and fixes tests to do so.

Adds the bytecode StaContextSlot.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31343}
2015-10-16 15:29:16 +00:00
rmcilroy
4414a14d71 [Interpreter] Add support for strict mode global stores.
Adds the bytecode StaGlobalStrict and replaces StaGlobal with StaGlobalSloppy.

BUG=v8:4280
LOG=N
TBR=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31339}
2015-10-16 13:58:11 +00:00
mstarzinger
b7990793cf [turbofan] Move SimplifiedOperatorBuilder into JSGraph.
This fixes the lifetime of nodes created by JSGlobalSpecialization that
contain a simplified operator. In the case where this reducer runs as
part of the inliner, the SimplifiedOperatorBuilder was instantiated with
the wrong zone. This led to use-after-free of simplified operators.

To avoid such situations in the future, we decided to move this operator
builder into the JSGraph and make the situation uniform with all other
operator builders.

R=bmeurer@chromium.org
BUG=chromium:543528
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31334}
2015-10-16 12:38:52 +00:00
mlippautz
cf71c28f13 Revert of "[heap] Divide available memory upon compaction tasks" (patchset #2 id:20001 of https://codereview.chromium.org/1399403002/ )
Reason for revert:
Failing: https://chromegw.corp.google.com/i/client.v8/builders/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/builds/2115

Original issue's description:
> Reland of "[heap] Divide available memory upon compaction tasks"
>
> This reverts commit ec1046f9f8.
>
> 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/a805be73f6f97645450124f75c0f7417ec7b3e70
> Cr-Commit-Position: refs/heads/master@{#31329}

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

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

Cr-Commit-Position: refs/heads/master@{#31332}
2015-10-16 11:54:47 +00:00
yangguo
30715157fa Install iterator meta objects via utils object.
R=cbruni@chromium.org, hpayer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31331}
2015-10-16 11:27:33 +00:00
mlippautz
a805be73f6 Reland of "[heap] Divide available memory upon compaction tasks"
This reverts commit ec1046f9f8.

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/1399403002

Cr-Commit-Position: refs/heads/master@{#31329}
2015-10-16 10:34:23 +00:00
alph
5d9c7ab648 [x64] Implement vmovd and vmovq AVX instructions.
BUG=v8:4406
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31322}
2015-10-16 05:20:46 +00:00
ahaas
053e280c88 Added Popcnt as an optional operator and implement it on x64 and ia32.
R=titzer@google.com

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

Cr-Commit-Position: refs/heads/master@{#31319}
2015-10-16 01:23:06 +00:00
ahaas
dd1928ca89 Added a test for CLZ
Review URL: https://codereview.chromium.org/1397883003

Cr-Commit-Position: refs/heads/master@{#31316}
2015-10-15 18:37:24 +00:00
alph
7cdcf0b1bc [x64] Use vcvtlsi2sd when AVX is enabled
BUG=v8:4406
LOG=N

Committed: https://crrev.com/adcbe619a959fe1d8f21d06fbf5984868c4f6b9a
Cr-Commit-Position: refs/heads/master@{#31276}

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

Cr-Commit-Position: refs/heads/master@{#31315}
2015-10-15 17:50:36 +00:00
ahaas
b3334087ec CTZ instruction implemented as optional operator.
Review URL: https://codereview.chromium.org/1405453003

Cr-Commit-Position: refs/heads/master@{#31313}
2015-10-15 17:01:44 +00:00