Commit Graph

26075 Commits

Author SHA1 Message Date
jkummerow
5676415b4a Introduce LookupIterator::Restart() and use it
Review URL: https://codereview.chromium.org/1416053007

Cr-Commit-Position: refs/heads/master@{#31483}
2015-10-22 16:31:39 +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
yangguo
b0e4dce609 Move math-related typed arrays off js builtins object..
Review URL: https://codereview.chromium.org/1420473002

Cr-Commit-Position: refs/heads/master@{#31481}
2015-10-22 14:41:08 +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
hpayer
1c4192ab8c [heap] Do not print isoalte address twice in --trace-gc-nvp.
Review URL: https://codereview.chromium.org/1416273003

Cr-Commit-Position: refs/heads/master@{#31478}
2015-10-22 13:41:46 +00:00
Benedikt Meurer
317e80218e [turbofan] Fix rebase failure in tree (not checked by CQ).
TBR=machenbach@chromium.org
BUG=v8:4470
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31477}
2015-10-22 13:40: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
bmeurer
74b4146757 [turbofan] Initial support for monomorphic/polymorphic property stores.
This slightly generalizes the current mechnanism for property loads to
also deal with property stores (both monomorphic and polymorphic). It's
still somewhat adhoc, but it already handles a lot of the interesting
cases. We might want to wait for keyed accesses before we start
refactoring to a more general solution.

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

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

Cr-Commit-Position: refs/heads/master@{#31475}
2015-10-22 13:23:46 +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
mstarzinger
2e61d92884 [turbofan] Make JSInliner use temporary zone again.
This switches inlining back to use a temporary zone for parsing and
analyzing inlinees. The inlinee graph however is still built in the
same zone as the parent graph.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31471}
2015-10-22 12:22:06 +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
mstarzinger
4054961fa4 [turbofan] Fix JSInliner strong mode bailout.
This moves the bailout point in the JSInliner up to a point where it is
still allowed to decide not to inline. Once the inlining decision has
been recorded with CompilationInfo::AddInlinedFunction, we should not
abort anymore.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31469}
2015-10-22 11:42:17 +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
yangguo
a295cb7846 Move error message makers off js builtins object.
R=cbruni@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31467}
2015-10-22 11:30:07 +00:00
chunyang.dai
efbbf0fdcf X87: Move Hydrogen and Lithium to src/crankshaft/
port 81ee94b650 (r31410).

   contributed by zhengxing.li@intel.com

   original commit message:

   additional comment:
   The original r31410 patch needs some additional changes for x87
    1. The frames-x87.h is under src/x87 instead of src/crankshaft/x87

R=weiliang.lin@intel.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31466}
2015-10-22 11:28:36 +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
ulan
527a94017a Introduce new API for detecting when the embedder is in foreground/background.
This will allow us to remove background idle notification calls in Chrome.

BUG=chromium:490559
LOG=NO

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

Cr-Commit-Position: refs/heads/master@{#31464}
2015-10-22 11:09:24 +00:00
mlippautz
ac3919d926 Cleanup FreeSpace: Remove getter for address of next pointer
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31463}
2015-10-22 10:52:16 +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
ulan
5449c9848a Remove non-incremental GC from memory reducer.
Incremental GC now finish quickly in background tabs too because they
do not rely on idle notifications.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31461}
2015-10-22 10:23:58 +00:00
mlippautz
7ad82f914b [heap] Reformat and extend tracing compaction.
BUG=chromium:524425
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31460}
2015-10-22 09:20:45 +00:00
ulan
5520564cb8 Fix typo in V8.GCFinalizeMC histogram.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31459}
2015-10-22 09:18:33 +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
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