Commit Graph

9661 Commits

Author SHA1 Message Date
verwaest
b694266bb1 Fix Object.preventExtensions, .seal, .freeze on typed arrays
BUG=v8:4460
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31556}
2015-10-26 11:08:02 +00:00
chunyang.dai
a02d0e96b8 Reland: X87: disable the regress-undefined-nan test case for x87.
The reason is when native_context_specialization flag is ture, X87 turbofan
      will hit the known issue that X87 will change a sNaN to qNaN by default. And
      then it will fail when bit-comparing the source (sNaN) and the result (qNaN).

   reland https://codereview.chromium.org/1414733004/.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31552}
2015-10-26 10:27:48 +00:00
bmeurer
ccab8be352 [test] Re-enable typescript that is no longer failing on ia32.
R=jarin@chromium.org
BUG=v8:4493
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31545}
2015-10-26 06:00:35 +00:00
chunyang.dai
e8ff5181d3 Revert of X87: disable the regress-undefined-nan test case for x87. (patchset #1 id:1 of https://codereview.chromium.org/1414733004/ )
Reason for revert:
because of merge mistake, "regress/" is missed when skipping one test case for X87.

 "regress/" will be added when relanding it.

Original issue's description:
> X87: disable the regress-undefined-nan test case for x87.
>
>   The reason is when native_context_specialization flag is ture, X87 turbofan
>   will hit the known issue that X87 will change a sNaN to qNaN by default. And
>   then it will fail when bit-comparing the source (sNaN) and the result (qNaN).
>
> BUG=
>
> Committed: https://crrev.com/b3c719ebbad6c87afefa33a7d0b3f412b2e304db
> Cr-Commit-Position: refs/heads/master@{#31530}

TBR=bmeurer@chromium.org,weiliang.lin@intel.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31543}
2015-10-26 04:42:36 +00:00
alph
762b425bc9 [x64] Implement vcvtsd2si AVX instruction.
BUG=v8:4406
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31539}
2015-10-24 18:55:57 +00:00
alph
ec27fd6e39 [x64] Implement vcvtqsi2sd AVX instruction.
BUG=v8:4406
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31538}
2015-10-24 16:49:52 +00:00
caitpotter88
b078960e70 [es7] bailout Crankshaft in VisitDoExpression
For some reason, the DisableCrankshaft() in ast-numbering.cc does not always
prevent crankshaft from happening. Bailout here rather than asserting an
unreachable condition.

BUG=546967, v8:4488
LOG=N
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31537}
2015-10-24 07:06:59 +00:00
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
chunyang.dai
b3c719ebba X87: disable the regress-undefined-nan test case for x87.
The reason is when native_context_specialization flag is ture, X87 turbofan
  will hit the known issue that X87 will change a sNaN to qNaN by default. And
  then it will fail when bit-comparing the source (sNaN) and the result (qNaN).

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31530}
2015-10-23 15:48:35 +00:00
neis
193410062e Fix corner-case behavior of JSObject::SetPrototype.
Setting the prototype to whatever it currently is must succeed even if
the object is not extensible.

R=verwaest@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31527}
2015-10-23 14:52:26 +00:00
littledan
0a0272dad0 Stage ES2015-style const in sloppy mode
This patch switches sloppy-mode code from legacy const semantics
to ES2015 semantics. It is unknown how much of the web will be
broken by this; likely the patch will have to be reverted before
a branch happens.

BUG=v8:3739
LOG=Y
R=rossberg,adamk

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

Cr-Commit-Position: refs/heads/master@{#31525}
2015-10-23 14:04:53 +00:00
neis
5463e86497 Disable bogus test in preparation for --harmony-completion.
R=rossberg
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31520}
2015-10-23 12:56:50 +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
bmeurer
2ab54f109e [turbofan] Add test case for stores to properties that are also present on prototype.
R=verwaest@chromium.org
BUG=v8:4470
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31517}
2015-10-23 12:09:54 +00:00
neis
8e89e8203b Adapt tests in preparation of shipping --harmony-completion.
R=rossberg
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31507}
2015-10-23 10:26:01 +00:00
mvstanton
e6626cfc67 Alternative approach to using type feedback for Symbol-keyed properties
This patch only treats non-private symbols as valid feedback, thus
avoiding the need to switch to Oddballs for the feedback sentinels
and avoiding breaking the use of private own symbols.

Crankshaft will also optimize these symbol loads into a named load,
just as it does for string keyed loads with type feedback.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31496}
2015-10-23 08:18:02 +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
mvstanton
21724d6799 Re-enable accessor-map-sharing test
It doesn't fail on tip of tree, we'll investigate if it recurs.

R=mstarzinger@chromium.org
BUG=v8:4493
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31489}
2015-10-23 06:14:36 +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
verwaest
f464f12a8b Ensure we never inline class constructors in Crankshaft, as it currently is entirely unsupported.
BUG=v8:3330
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31480}
2015-10-22 14:39:07 +00:00
yangguo
0a7996882e [es6] stage sticky regexps and RegExp.prototype.flags.
R=littledan@chromium.org
BUG=v8:4342
LOG=Y

Committed: https://crrev.com/722719fe31fe7fd5bb50be6256b3581bb28a8169
Cr-Commit-Position: refs/heads/master@{#31390}

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

Cr-Commit-Position: refs/heads/master@{#31479}
2015-10-22 14:15:59 +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
fdfab67243 [Crankshaft] Don't do HMathFloorOfDiv optimization for kUint32 values
BUG=v8:4507
LOG=y
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31474}
2015-10-22 13:22:09 +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
mstarzinger
bfdfb48848 [turbofan] Re-enable webkit test that no longer fail.
R=bmeurer@chromium.org
TEST=webkit/fast/js/toString-number

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

Cr-Commit-Position: refs/heads/master@{#31472}
2015-10-22 12:26:32 +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
littledan
f5e924eb10 Fix user options for fractional digits in Intl.NumberFormatter
The patch in https://crrev.com/ddb5c2d999c5ee6e31c4a9599bb3ddb293cc3f49
moved all fractional digit settings to default values due to a coding
error. These were not even correct default values, and users observed
errors where percentages were written as "23.0%" instead of "23%".

This patch fixes the setting propagation when appropriate and it changes
the default max fractional digits of a percentage to 0, per spec.

BUG=chromium:544122
R=mnita,jochen
CC=hichris123,adamk
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#31468}
2015-10-22 11:31:13 +00:00
neis
2c7787ad84 [es6] Partially implement Reflect.setPrototypeOf.
Proxies are not properly supported yet.

R=rossberg
BUG=v8:3931
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31465}
2015-10-22 11:21:43 +00:00
Benedikt Meurer
71bde166b1 [turbofan] Remove obsolete JSTypeFeedbackSpecializer and JSTypeFeedbackLowering.
Both the JSTypeFeedbackSpecializer and the JSTypeFeedbackLowering is
dead code by now, since the more general JSNativeContextSpecialization
deals with the property/global load/store type feedback in a way that
also interacts properly with inlining.

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

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

Cr-Commit-Position: refs/heads/master@{#31462}
2015-10-22 10:24:27 +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
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
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
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
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
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