Commit Graph

21921 Commits

Author SHA1 Message Date
littledan
d0618585a7 Fix scopes for body of sloppy-mode for-in/of loop
This patch fixes an obscure edge case for functions defined as the
direct body of a for-of/for-in loop, such as the following:

 for (foo in []) function foo() { return foo; }

Here, the first occurrence of foo should point to the outer scope;
however, before this patch, it pointed to the inner foo in an
invalid way which caused an assertion about the scope chain to fail.
This patch fixes the scope chain by inserting an extra scope for
the body of the loop, not including the header.

BUG=chromium:542099
LOG=N
R=rossberg

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

Cr-Commit-Position: refs/heads/master@{#31268}
2015-10-14 17:36:16 +00:00
machenbach
dc0adc5668 Revert of Add bailout for large objects when allocating arrays in optimized code. (patchset #1 id:1 of https://codereview.chromium.org/1408553002/ )
Reason for revert:
[Sheriff] Breaks deopt fuzzer:
http://build.chromium.org/p/client.v8/builders/V8%20Deopt%20Fuzzer/builds/5634

See comment in CL for repro.

Original issue's description:
> Add bailout for large objects when allocating arrays in optimized code.
>
> BUG=
>
> Committed: https://crrev.com/0c81c4e924d7bdb45fce98209c21985d754e047d
> Cr-Commit-Position: refs/heads/master@{#31259}

TBR=bmeurer@chromium.org,hpayer@chromium.org,mlippautz@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31266}
2015-10-14 15:04:19 +00:00
jarin
59c616ccd7 [turbofan] Introduce node regions for protection from scheduling.
This CL re-purposes ValueEffect and Finish as delimiters for regions
that are scheduled atomically (renamed to BeginRegion, FinishRegion).

The BeginRegion node takes and produces an effect. For the uses that do
not care about the placement in the effect chain, it is ok to feed
graph->start() as an effect input.

The FinishRegion takes a value and an effect and produces a value and
an effect. It is important that any value or effect produced inside the
region is not used outside the region. The FinishRegion node is the only
way to smuggle an effect and a value out.

At the moment, this does not support control flow inside the region. Control flow would be hard.

During scheduling we do some sanity check, but the checks are not exhaustive. Here is what we check:
- the effect chain between begin and finish is linear (no splitting,
  single effect input and output).
- any value produced is consumed by the FinishRegion node.
- no control flow outputs.

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

Cr-Commit-Position: refs/heads/master@{#31265}
2015-10-14 14:53:12 +00:00
martyn.capewell
a456134b8b [turbofan] Negate with shifted input for ARM64
Support negate with shifted input on ARM64 by supporting lhs zero registers for
binary operations, and removing explicit Neg instruction support.

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

Cr-Commit-Position: refs/heads/master@{#31263}
2015-10-14 14:51:06 +00:00
rmcilroy
2ad5655260 [Interpreter]: Use vector store for array literal computed stores.
Replaces the use of KeyedStoreICGeneric with a vector based KeyedStoreIC for
array literal computed stores now that there is a feedback vector slot for
these expressions. Removes KeyedStoreICGeneric bytecode since this is no
longer necessary.

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

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

Cr-Commit-Position: refs/heads/master@{#31262}
2015-10-14 13:20:11 +00:00
mbrandy
0f51a35061 PPC: VectorICs: use a vector slot to aid in array literal processing.
Port f2f46aff8b

Original commit message:
    The lack of a vector slot for the keyed store operation in filling in
    non-constant array literal properties led to undesirable contortions in
    compilers downwind of full-codegen. The use of a single slot to initialize all
    the array elements is sufficient.

R=mvstanton@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31261}
2015-10-14 13:18:33 +00:00
adamk
d317145d05 Eagerly extract stack limit from Isolate in InitializeAstVisitor()
Previously, any AstVisitor subclasses which wanted to make use of
the shared stack overflow checking code needed to depend on Isolate.

With this patch, it will be easy to create a second InitializeAstVisitor
overload taking a stack_limit directly, for use in code that has no
Isolate available (such as code running in the parser).

AstVisitor subclasses which depended upon the isolate() accessor have
been fixed to either have their own isolate_ member or get it from
somewhere else convenient.

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

Cr-Commit-Position: refs/heads/master@{#31260}
2015-10-14 13:04:55 +00:00
mlippautz
0c81c4e924 Add bailout for large objects when allocating arrays in optimized code.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31259}
2015-10-14 13:00:12 +00:00
hpayer
a0159c1168 Bailout to runtime when BuildUncheckedStringAdd results in a large object.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31258}
2015-10-14 12:59:07 +00:00
hpayer
24622f5f12 Bailout for large object allocations in full code EmitFastOneByteArrayJoin.
BUG=chromium:542823
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31257}
2015-10-14 12:44:45 +00:00
rmcilroy
822b493bee Move AccessorTable from full-codegen.h to ast.h.
It is used by AstGraphBuilder (TF) and BytecodeGenerator (Ignition), so is no
longer a full-codegen datastructure. Removes full-codegen.h dependency from
compiler/ and interpreter/

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

Cr-Commit-Position: refs/heads/master@{#31256}
2015-10-14 12:22:22 +00:00
bmeurer
d702f70795 [turbofan] Move native context specialization before inlining.
Perform native context specialization immediately after graph
construction (also after inlinee graph construction). This way
we can do unified inlining before we go to typing and typed
lowering. And we will get better typing due to constants and
(checked) type feedback.

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

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

Cr-Commit-Position: refs/heads/master@{#31255}
2015-10-14 12:21:03 +00:00
mvstanton
a2a45a1669 Revert of VectorICs: turn on vectors for STORE and KEYED_STORE ics. (patchset #1 id:1 of https://codereview.chromium.org/1396523005/ )
Reason for revert:
Windows crash failure, must be investigated.

Original issue's description:
> 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}

TBR=jkummerow@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31254}
2015-10-14 10:52:32 +00:00
rmcilroy
20fba51253 [Interpreter] Adds Object literal support.
Adds Object literal support to the interpreter. Adds the following bytecodes:
 - ToName
 - CreateObjectLiteral.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31253}
2015-10-14 10:10:27 +00:00
mvstanton
52225f39df VectorICs: turn on vectors for STORE and KEYED_STORE ics.
R=jkummerow@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31252}
2015-10-14 09:27:53 +00:00
mstarzinger
ecc8485da0 [Interpreter] Drop obsolete BuildConstantElements call.
R=rmcilroy@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31251}
2015-10-14 08:59:39 +00:00
mstarzinger
8ff6a0c005 [turbofan] First rudimentary inlining heuristic.
This is a first prototype for a rudimentary inlining heuristic allowing
enabling of general inlining based existing budget flags. Also note that
this approach does not yet work for multi-level inlining, for now the
list of candidates is processed exactly once.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31249}
2015-10-14 08:37:19 +00:00
bmeurer
1262a41c1f [turbofan] Disable native context specialization for the asm.js pipeline.
R=jarin@chromium.org
BUG=v8:4470
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31247}
2015-10-14 05:51:24 +00:00
hpayer
c1a81536ed Do not allow large object allocation from optimized code.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31244}
2015-10-13 19:20:19 +00:00
Djordje.Pesic
d6741e80ea MIPS: Fix mina in mips32 and mips64 simulator
Fix mina instruction in mips32 and mips64 simulator according to IEEE 754-2008 standard

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31243}
2015-10-13 15:47:07 +00:00
mvstanton
f2f46aff8b VectorICs: use a vector slot to aid in array literal processing.
The lack of a vector slot for the keyed store operation in filling in
non-constant array literal properties led to undesirable contortions in
compilers downwind of full-codegen. The use of a single slot to initialize all
the array elements is sufficient.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31242}
2015-10-13 14:48:49 +00:00
jkummerow
c706c0fa19 Add C++ implementation of Object.defineProperties
Not used yet, so this CL shouldn't change behavior.

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

Cr-Commit-Position: refs/heads/master@{#31241}
2015-10-13 14:38:35 +00:00
rmcilroy
6a10a9af3b [Interpreter] Add array literal support.
Adds array literal support to the interpreter. Currently constructed
array elements don't have type feedback slots, so also adds support for
generic keyed store operations.

Adds the following bytecodes:
 - CreateArrayLiteral
 - KeyedStoreICGeneric

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31240}
2015-10-13 14:00:57 +00:00
hpayer
1f98ef6ec8 Revert of [heap] Reland decrease large object limit for regular heap objects. (patchset #3 id:40001 of https://codereview.chromium.org/1401173003/ )
Reason for revert:
Still one failing test on Windows.

Original issue's description:
> [heap] Reland decrease large object limit for regular heap objects.
>
> BUG=
>
> Committed: https://crrev.com/9b91bf3a630b5382080ba1d7f9f3e88de3de8a95
> Cr-Commit-Position: refs/heads/master@{#31228}

TBR=mlippautz@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31239}
2015-10-13 13:47:23 +00:00
rmcilroy
c0185b7d98 [Interpreter] Add support for new local function context creation.
Adds support for creation of new local function contexts (or script context for
top-level code). As part of this, also adds support for context push/pop
operations using a ContextScope object in BytecodeGenerator. Adds the following
bytecodes:
 - PushContext
 - PopContext

Support for inner contexts and loading from / storing to context allocated
variables will come in a future CL.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31238}
2015-10-13 13:09:56 +00:00
ofrobots
010897c16a Reland improve perf_basic_prof filename reporting
Using perf-basic-prof in the test-case was problematic on windows. Use
CodeEventLogger directly.

Previous issue: https://codereview.chromium.org/1396843004/

R=jkummerow@chromium.org,yangguo@chromium.org,yurys@chromium.org
BUG=chromium:539892
LOG=N

Committed: https://crrev.com/701ba0b255f9c34f4b8c43584ef1e35040474e7d
Cr-Commit-Position: refs/heads/master@{#31197}

patch from issue 1396843004 at patchset 60001 (http://crrev.com/1396843004#ps60001)

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

Cr-Commit-Position: refs/heads/master@{#31237}
2015-10-13 12:45:31 +00:00
yangguo
4f7caf2f57 Debugger: fix stepping when break points are deactivated.
The flag for deactivating break points also affects stepping, since both
are implemented via debug break slots. Fixing this by introducing a new
flag solely responsible for deactivating actual break points.

R=mvstanton@chromium.org
BUG=chromium:119800
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31236}
2015-10-13 12:44:28 +00:00
mlippautz
ec1046f9f8 Revert of [heap] Divide available memory upon compaction tasks (patchset #9 id:340001 of https://codereview.chromium.org/1382003002/ )
Reason for revert:
Failing tests: https://chromegw.corp.google.com/i/client.v8/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20nosnap%20-%20debug%20-%202/builds/3804/steps/Check/logs/DontLeakGlobalObjects

Original issue's description:
> [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/30236c052ba9266fc55412a8fd63b17f683ff40b
> Cr-Commit-Position: refs/heads/master@{#31234}

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

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

Cr-Commit-Position: refs/heads/master@{#31235}
2015-10-13 12:00:11 +00:00
mlippautz
30236c052b [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/1382003002

Cr-Commit-Position: refs/heads/master@{#31234}
2015-10-13 11:05:18 +00:00
yangguo
82b30828bd Check for validity when accessing call site objects in runtime.
R=jkummerow@chromium.org
BUG=chromium:528379
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31233}
2015-10-13 10:53:22 +00:00
mstarzinger
2633401137 Workaround for borked sem_init library function.
This adds a workaround that zeroes out semaphores before they are
initialized. Some versions of sem_init (e.g. GLIBC_2.0) fail to fully
zero out the semaphore, leading to {errno == ENOSYS} with subsequent
sem_timedwait calls.

R=machenbach@chromium.org
BUG=chromium:536813
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31232}
2015-10-13 09:53:10 +00:00
rmcilroy
66e5937337 [Interpreter] Add function literal support.
Adds function literal support and add support for OTHER_CALLS which can be
made when calling a function literal.

Adds the CreateClosure bytecode.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31231}
2015-10-13 09:40:01 +00:00
mstarzinger
e5320d8a59 Move builtin JavaScript sources into own directory.
This moves JavaScript source files that are bundled with V8 into a
separate directory. The goal is to improve code readability and also
being able to formalize ideal reviewers by subsequently adding the
OWNERS file. These files almost exclusively contain implementations
of methods fully specified by ES6.

Note that files in the "debug" directory as well as the "d8.js" file
aren't affected by this change.

R=rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31230}
2015-10-13 09:38:26 +00:00
yangguo
1a94bc20a1 Fix Error object value lookups.
Looking up 'name' and 'message' properties at the same time and loading
the properties later can cause assertion failure if one of the properties
is an accessor and calling it changes the holder map. That may invalidate
the other lookup.

R=jkummerow@chromium.org
BUG=chromium:542101
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31229}
2015-10-13 09:26:47 +00:00
hpayer
9b91bf3a63 [heap] Reland decrease large object limit for regular heap objects.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31228}
2015-10-13 08:43:21 +00:00
jacob.bramley
1d9d7821ff [arm64] Fix a string test in StringCompareStub.
This fixes a regression in Octane's pdf.js after r30818. The bug itself
has been present for a long time, but StringCompareStub wasn't actually
used until r30818 so it went unnoticed.

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

Cr-Commit-Position: refs/heads/master@{#31227}
2015-10-13 08:40:42 +00:00
yangguo
8e4ceb613d Debugger: for frame details, use callee context to wrap receiver.
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31226}
2015-10-13 07:58:15 +00:00
mstarzinger
b79f397f41 [turbofan] Base JSCreateClosure comparison on location.
This changes hashing and comparison functions for JSCreateClosure
operators to be based in the handle location instead of the referenced
object identity. This is in sync with all other JS operators.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31225}
2015-10-13 07:43:43 +00:00
mtrofin
efdcd20267 [turbofan] Splinter into one range.
Before this CL, we created one live range per successive set of
deferred blocks. For scenarios with many such blocks, this creates
an upfront pressure for the register allocator to deal with many ranges.
Linear sorts ranges, which is a super-linear operation.

The change places all deferred intervals into one range, meaning that,
at most, there will be twice as many live ranges as the original set. In
pathological cases (benchmarks/Compile/slow_nbody1.js), this change
halves the compilation time. We see some improvements elsewhere,
notably SQLite at ~4-5%.

We may be able to avoid the subsequent merge. Its cost is the
additional ranges it may need to create. The sole reason for the merge
phase is to provide an unchanged view of the world to the subsequent
phases. With the at-most-one splinter model, we may be able to teach
the other phases about splintering - should we find perf hindrances
due to merging.

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

Cr-Commit-Position: refs/heads/master@{#31224}
2015-10-13 03:58:19 +00:00
dusan.m.milosavljevic
0c5c479574 MIPS: [turbofan] Improve test and equality compare with zero and constants.
TEST=
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31222}
2015-10-13 00:15:48 +00:00
mbrandy
32f13dfbec PPC: Refine "Test for var declarations in eval which conflict with let".
R=joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31221}
2015-10-12 19:09:35 +00:00
mtrofin
cbbfc0ff87 [turbofan] More efficient splintering.
For live ranges with many use positions, such as those encountered in
some unity asm.js code, this change significantly reduces compile time
(e.g. benchmarks/Compile/slow_nbody1.js: from ~6s to 2s). The
improvement is solely due to regressions (fixed by this CL) due to
splintering.

This CL does not fully address compile time problems for large
functions in Turbofan, but constitutes a step in the right direction.

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

Cr-Commit-Position: refs/heads/master@{#31220}
2015-10-12 18:34:40 +00:00
hpayer
9790e494a4 Revert of [heap] Decrease large object limit for regular heap objects. (patchset #3 id:40001 of https://codereview.chromium.org/1392823003/ )
Reason for revert:
broken tests

Original issue's description:
> [heap] Decrease large object limit for regular heap objects.
>
> Committed: https://crrev.com/e887d42342b3449f64fb6078f84f6c55bae3978d
> Cr-Commit-Position: refs/heads/master@{#31217}

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

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

Cr-Commit-Position: refs/heads/master@{#31219}
2015-10-12 17:11:24 +00:00
adamk
18534dffc9 Don't throw on assignment to function name binding in harmony sloppy mode
BUG=v8:4482
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31218}
2015-10-12 16:55:35 +00:00
hpayer
e887d42342 [heap] Decrease large object limit for regular heap objects.
Review URL: https://codereview.chromium.org/1392823003

Cr-Commit-Position: refs/heads/master@{#31217}
2015-10-12 16:39:33 +00:00
mvstanton
76bee80672 Remove FLAG_cache_optimized_code because we always have it on.
The data structure that holds the optimized code is becoming essential for
additional functionality, too.

R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31216}
2015-10-12 16:10:59 +00:00
mstarzinger
c84c96caa2 Remove cycle breaking include from mksnapshot.cc file.
R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31215}
2015-10-12 15:21:26 +00:00
mstarzinger
e494bcca7e Reland "[heap] No leakage of mark-compact.h outside of heap."
The revert of the original change in question did not recover
regressions, which allows us to reland this cleanup after all.

This reverts commit 871529b4d8.

R=hpayer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31214}
2015-10-12 15:20:31 +00:00
mbrandy
f7a35b9a6e PPC: Vector ICs: Get rid of stack arguments on ia32 transitioning stores.
Port 2d4aeaad2f

Original commit message:
    The stack manipulation was expensive. Two virtual registers are better.

R=mvstanton@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31213}
2015-10-12 15:18:32 +00:00
machenbach
fe6ff6523e Revert of Don't compile functions in a context the caller doesn't have access to (patchset #1 id:1 of https://codereview.chromium.org/1393713006/ )
Reason for revert:
[Sheriff] Breaks layout tests. Please add needsmanualrebaseline upstream first if intended. E.g.:
http://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/2263

(one of them is a timeout that only happens with this commit)

Original issue's description:
> Don't compile functions in a context the caller doesn't have access to
>
> Instead, just return undefined.
>
> A side effect of this is that it's no longer possible to compile
> functions in a detached context.
>
> Based on https://codereview.chromium.org/294073002 but taking access
> check callbacks into account
>
> BUG=chromium:541703
> R=verwaest@chromium.org
> LOG=y
>
> Committed: https://crrev.com/9a5e2f512c4aa90563eb575605c2a8c2a92ac9f4
> Cr-Commit-Position: refs/heads/master@{#31208}

TBR=verwaest@chromium.org,jochen@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:541703

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

Cr-Commit-Position: refs/heads/master@{#31212}
2015-10-12 14:36:00 +00:00
littledan
d515e5138d Test for var declarations in eval which conflict with let
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.

BUG=v8:4454
R=adamk
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#31211}
2015-10-12 14:31:01 +00:00
mythria
9feb530594 Adds support for following operators
-Bitwise Or
  -Bitwise Xor
  -Bitwise And

Adds the above bytecodes, support to BytecodeGenerator and BytecodeArrayBuilder to enable it's use, it's implementation and tests.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31210}
2015-10-12 13:36:07 +00:00
neis
f113f3c384 [es6] Stage --harmony-completion.
R=rossberg
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31209}
2015-10-12 12:36:47 +00:00
jochen
9a5e2f512c Don't compile functions in a context the caller doesn't have access to
Instead, just return undefined.

A side effect of this is that it's no longer possible to compile
functions in a detached context.

Based on https://codereview.chromium.org/294073002 but taking access
check callbacks into account

BUG=chromium:541703
R=verwaest@chromium.org
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#31208}
2015-10-12 12:23:18 +00:00
littledan
0c2dff2936 Revert of Stage --harmony_sloppy_function (patchset #2 id:20001 of https://codereview.chromium.org/1393423002/ )
Reason for revert:
This still breaks Inbox.

Original issue's description:
> Stage --harmony_sloppy_function
>
> This patch turns on ES2015-style function hoisting semantics in
> staging. --harmony_sloppy_function was previously staged, leading
> to a number of bugs being filed and the staging being reversed;
> important bugs have been fixed, so it is time to try again.
>
> R=adamk
> LOG=Y
> BUG=v8:4285
>
> Committed: https://crrev.com/333e27fd99f8187c97e62b9538529900f0a30668
> Cr-Commit-Position: refs/heads/master@{#31190}

TBR=adamk@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4285

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

Cr-Commit-Position: refs/heads/master@{#31206}
2015-10-12 11:07:15 +00:00
mythria
aacc18f053 [Interpreter] Adds shift operators to interpreter
Adds support for following operators
 -Shift left
 -Shift right
 -Shift right logical

Adds the above bytecodes, support to BytecodeGenerator and BytecodeArrayBuilder
to enable it's use, it's implementation and tests.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31205}
2015-10-12 10:45:29 +00:00
mvstanton
2d4aeaad2f Vector ICs: Get rid of stack arguments on ia32 transitioning stores.
The stack manipulation was expensive. Two virtual registers are better.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31204}
2015-10-12 07:34:32 +00:00
adamk
bef2fbcc69 [cleanup] Use NewVariableProxy() instead of NewUnresolved where possible
Review URL: https://codereview.chromium.org/1386383003

Cr-Commit-Position: refs/heads/master@{#31202}
2015-10-09 21:47:51 +00:00
adamk
a0d119c766 [cleanup] Make Scope implementation private, remove dead friend declaration
Scope has no subclasses, so "protected" should just be "private". And
there is no ParserFactory class, so making it a friend doesn't buy us
anything.

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

Cr-Commit-Position: refs/heads/master@{#31201}
2015-10-09 21:42:00 +00:00
karl
60f831749f Emit better error message if array buffer allocation fails
Now emits `Array buffer allocation failed` instead of
`Invalid array buffer length`.

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

Cr-Commit-Position: refs/heads/master@{#31200}
2015-10-09 20:44:50 +00:00
ofrobots
30b57dcd42 Revert of improve perf_basic_prof filename reporting (patchset #4 id:60001 of https://codereview.chromium.org/1396843004/ )
Reason for revert:
The test-case has issues on windows. http://build.chromium.org/p/client.v8/builders/V8%20Win32%20-%20debug%20-%203/builds/5011/steps/Check/logs/stdio

Original issue's description:
> improve perf_basic_prof filename reporting
>
> Re-implement https://codereview.chromium.org/1388543002 after fixing the issue
> with SNPrintF crashing on windows when a zero-length buffer is passed in.
>
> R=jkummerow@chromium.org,yangguo@chromium.org,yurys@chromium.org
> BUG=chromium:539892
> LOG=N
>
> Committed: https://crrev.com/701ba0b255f9c34f4b8c43584ef1e35040474e7d
> Cr-Commit-Position: refs/heads/master@{#31197}

TBR=jkummerow@chromium.org,yangguo@chromium.org,yurys@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:539892

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

Cr-Commit-Position: refs/heads/master@{#31198}
2015-10-09 18:28:21 +00:00
ofrobots
701ba0b255 improve perf_basic_prof filename reporting
Re-implement https://codereview.chromium.org/1388543002 after fixing the issue
with SNPrintF crashing on windows when a zero-length buffer is passed in.

R=jkummerow@chromium.org,yangguo@chromium.org,yurys@chromium.org
BUG=chromium:539892
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31197}
2015-10-09 17:17:40 +00:00
jochen
5e47350645 Pass the context from which a given receiver is accessed explicitly
This will allow for probing access from any context to any receiver in a
future CL.

BUG=none
R=jkummerow@chromium.org,verwaest@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31196}
2015-10-09 13:25:56 +00:00
karl
2daea448d9 [win32] Make sure OS::Abort doesn't return
Fixes clang on windows warning:
..\..\v8\src\base\platform\platform-win32.cc(836,1) :
  error: function declared 'noreturn' should not return
   [-Werror,-Winvalid-noreturn]

CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_clang_rel,win_clang_x64_rel

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

Cr-Commit-Position: refs/heads/master@{#31194}
2015-10-09 12:52:30 +00:00
cbruni
3ac2973b29 Improving error messages when adding properties to non JSObject receiver in
strict mode.

LOG=N
BUG=chromium:423739

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

Cr-Commit-Position: refs/heads/master@{#31192}
2015-10-09 09:12:47 +00:00
littledan
333e27fd99 Stage --harmony_sloppy_function
This patch turns on ES2015-style function hoisting semantics in
staging. --harmony_sloppy_function was previously staged, leading
to a number of bugs being filed and the staging being reversed;
important bugs have been fixed, so it is time to try again.

R=adamk
LOG=Y
BUG=v8:4285

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

Cr-Commit-Position: refs/heads/master@{#31190}
2015-10-09 02:27:45 +00:00
caitpotter88
e2be5ce542 [parser] fix token end position for regexp literals
Make the end position of a regexp literal the first character following the regexp. This matches the behaviour of number literals and string literals, as well as single-character tokens.

This change corrects the lazy-parsing of arrow functions with concise bodies, whose last token is a regular expression literal.

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

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

Cr-Commit-Position: refs/heads/master@{#31189}
2015-10-09 01:02:02 +00:00
littledan
a01ab93f4c Revert of Use simple/fast macro version of MinMax in JS (patchset #2 id:20001 of https://codereview.chromium.org/1390023003/ )
Reason for revert:
This contains bugs, as found by mstarzinger. Reverting until we can find a clean fix (maybe it should be an inline function instead of a macro).

Original issue's description:
> Use simple/fast macro version of MinMax in JS
>
> Use the simple macro version of {Min, Max} where possible to
> improve performance
>
> Follow-up to CR: https://codereview.chromium.org/1331993004
>
> BUG=
>
> Committed: https://crrev.com/27c96c26212a10bb7f19f7bf3ff793b31bbad354
> Cr-Commit-Position: refs/heads/master@{#31162}

TBR=jkummerow@chromium.org,mstarzinger@chromium.org,karl@skomski.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31187}
2015-10-08 20:37:59 +00:00
akos.palfi
29ba2e04fd Fix gcc 4.9.2 sign-compare error.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31186}
2015-10-08 19:34:21 +00:00
karl
9a6c8b2455 Reland: Introduce a V8_NORETURN macro and use it to make GCC 4.9.2 happy again.
Without that, it has a few false positives about out-of-bounds array accesses.
Also makes the clang static-analyzer happy.

Original code review from Sven Panne:
https://codereview.chromium.org/790723002/

CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_arm_dbg,v8_linux_arm64_dbg,v8_mac64_dbg,v8_win_compile_dbg,v8_linux_gcc_rel

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

Cr-Commit-Position: refs/heads/master@{#31185}
2015-10-08 19:03:24 +00:00
bradnelson
2e3c36fb1c Adding support for multiple returns in compiled functions.
This will allow exploration of possibilities like passing around buffer base and length.

BUG=None
TEST=test-multiple-return
LOG=N
R=mtrofin@chromium.org,titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31184}
2015-10-08 18:27:46 +00:00
mlippautz
deccbde161 [heap] Free list refactoring of finding nodes.
R=ulan@chromium.org
BUG=chromium:524425
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31183}
2015-10-08 15:17:22 +00:00
neis
cfe7c9c5ce [es6] Support optional "receiver" argument in Reflect.get.
Also add some more tests.

R=rossberg
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31181}
2015-10-08 14:23:12 +00:00
neis
7a0a682083 [es6] Implement completion value reform (--harmony-completion).
This CL depends on #1362363002.

R=rossberg
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31180}
2015-10-08 13:57:04 +00:00
mlippautz
3feba64470 [heap] Fix mark bits for partially compacted pages.
See bug report.

R=ulan@chromium.org
BUG=chromium:538567
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31179}
2015-10-08 13:49:30 +00:00
bmeurer
9d2e21775c [turbofan] Optimize stores to global properties.
This adds support to also lower stores to global property cells in state
kConstant or kConstantType, where we need to deoptimize eagerly in case
we have a value/type mismatch.

Also fixes bugs in the construction of the frame states in the
AstGraphBuilder.

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

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

Cr-Commit-Position: refs/heads/master@{#31178}
2015-10-08 13:30:00 +00:00
jacob.bramley
29f73ad104 [arm64] Fix some signed/unsigned type inconsistencies.
This fixes several warnings when cross-building using GCC (since r31087,
5cf1c0b).

In particular, CPURegister::code() now returns 'int', matching the other
platforms (and the coding style guide). The rest of the patch consists
of similar changes to make this work.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31176}
2015-10-08 11:32:48 +00:00
mlippautz
93e939837d [heap] Remove unswept bytes counter
This change removes the unswept free bytes counter.

The new approach
- directly decrements allocated memory and capacity before sweeping (using live
  bytes from the marker), and
- adds back capacity during refilling a free list.

This is another pre-work for moving around free lists while keeping the counters
in a sane state.

The previous approach allowed us to nail down how much memory is to-be-swept.
However, there were no users of this as we only used it do decrement it from
allocated memory (which still accounted for dead objects).  If we want to keep
track of unswept free bytes in a space during compaction we can introduce a
separate new concurrent counter for this purpose.

BUG=chromium:524425
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31175}
2015-10-08 10:28:11 +00:00
bmeurer
519f215137 [builtins] Drop useless ToBoolean JavaScript builtin.
There's no need for a dedicated ToBoolean builtin in JavaScript, since
ToBoolean(x) can easily be expressed in JavaScript as !!x, which has the
additional advantage that the compilers are able to properly optimize
that (out of the box).

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

Cr-Commit-Position: refs/heads/master@{#31172}
2015-10-08 09:19:21 +00:00
bmeurer
fd4e0dc2ce [turbofan] Compute proper type for globals with "constant type".
For property cells with cell type kConstantType, we can compute an
appropriate JavaScript type based on the current value of that cell.
Numbers cannot use Type::Of here, because the type might be too precise,
so we handle smi and heap number specially.

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

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

Cr-Commit-Position: refs/heads/master@{#31171}
2015-10-08 08:59:10 +00:00
bmeurer
948c4b40d9 [turbofan] Fix missing operators for JSGlobalSpecialization::Flags.
R=jarin@chromium.org
BUG=v8:4470
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31170}
2015-10-08 08:58:06 +00:00
adamk
d697e7160e In Scope::Print, skip null scope_names_ just like empty ones
R=littledan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31168}
2015-10-08 05:00:14 +00:00
bmeurer
9752a5983e Revert of Reland: Introduce a V8_NORETURN macro and use it to make GCC 4.9.2 happy again. (patchset #3 id:40001 of https://codereview.chromium.org/1383053005/ )
Reason for revert:
Breaks Arm debug.

Original issue's description:
> Reland: Introduce a V8_NORETURN macro and use it to make GCC 4.9.2 happy again.
>
> Without that, it has a few false positives about out-of-bounds array accesses.
> Also makes the clang static-analyzer happy.
>
> Original code review from Sven Panne:
> https://codereview.chromium.org/790723002/
>
> CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_arm_dbg,v8_linux_arm64_dbg,v8_mac64_dbg,v8_win_compile_dbg
>
> Committed: https://crrev.com/93ae81101af68d81b7af84ea4046ea849e605116
> Cr-Commit-Position: refs/heads/master@{#31163}

TBR=jochen@chromium.org,karl@skomski.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#31167}
2015-10-08 04:33:41 +00:00
rmcilroy
688eacdae9 [Interpreter] Add support for global declarations and load/store of global variables
Implements support for declaring global variables. Also adds support for loading
from and storing to both global and unallocated global variables.  Adds the
following bytecodes:
 - StoreGlobal
 - LoadContextSlot

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31166}
2015-10-07 21:20:02 +00:00
rmcilroy
6e64a057e3 [Interpreter] Add ignition-script-filter flag to filter scripts.
Add a flag to explicitly filter scripts in ignition and use it for the test262
variant. The previous approach of overloading ignition-filter meant that only
top-level code was getting compiled through ignition.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31164}
2015-10-07 19:08:37 +00:00
karl
93ae81101a Reland: Introduce a V8_NORETURN macro and use it to make GCC 4.9.2 happy again.
Without that, it has a few false positives about out-of-bounds array accesses.
Also makes the clang static-analyzer happy.

Original code review from Sven Panne:
https://codereview.chromium.org/790723002/

CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_arm_dbg,v8_linux_arm64_dbg,v8_mac64_dbg,v8_win_compile_dbg

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

Cr-Commit-Position: refs/heads/master@{#31163}
2015-10-07 18:58:43 +00:00
karl
27c96c2621 Use simple/fast macro version of MinMax in JS
Use the simple macro version of {Min, Max} where possible to
improve performance

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

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31162}
2015-10-07 18:33:02 +00:00
mstarzinger
68126b52fa Remove unused bailout reasons.
This removes stale strings from the bailout-reason.h file that are no
longer being used and hence only eat up space in the binary.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31161}
2015-10-07 18:27:23 +00:00
littledan
80aa6a5f7f Remove ToObject on elements from Array.prototype.toLocaleString()
In ES5, ToObject was called on elements before invoking the
.toLocaleString() method on them. ES2015 specifies that ToObject is
not called. A test262 test verifies this change. This patch
implements the new ES2015 behavior. It is verified by the test262 test
built-ins/Array/prototype/toLocaleString/primitive_this_value_getter

R=adamk

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

Cr-Commit-Position: refs/heads/master@{#31160}
2015-10-07 18:19:40 +00:00
littledan
eeaf80cd86 TimeClip converts -0 to +0, following ES2015 spec
In ES2015, section 20.3.1.15, TimeClip (an internal algorihtm which is
called when normalizing Date representations) is specified to add 0
to its result, which converts -0 into +0. This patch adds that conversion
to the Date code. It is verified by the test262 test
built-ins/Date/TimeClip_negative_zero

R=adamk

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

Cr-Commit-Position: refs/heads/master@{#31159}
2015-10-07 18:18:58 +00:00
mstarzinger
83a3fc7e7f Make assembler not include the entire compiler.
This removes the include of compiler.h from all our assemblers, which
was only needed for the SourcePosition class.

R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31157}
2015-10-07 16:57:31 +00:00
ofrobots
9f8e8b835a [heap] remove unneeded call to LowerInlineAllocationLimit
Calling LowerInlineAllocationLimit from the bottom of Heap::Scavenge seems to be
a no-op.

  new_space_.LowerInlineAllocationLimit(
      new_space_.inline_allocation_limit_step());

LowerInlineAllocatoinLimit does the following things:

1. Set the inline_allocation_limit_step_ to the passed in value. No-op.
2. Calls UpdateInlineAllocationLimit(0). This is unnecessary here as it has
   already been called when new_space_.ResetAllocationInfo was called above.
3. Sets top_on_previous_step_. This again is unnecessary as it gets reached by
   ResetAllocationInfo as well.

BUG=
R=hpayer@chromium.org,ulan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31156}
2015-10-07 15:19:57 +00:00
adamk
24565b8598 Use Scope::function_kind_ to distinguish arrow function scopes
Previously, arrow function scopes had a separate ScopeType. However,
Scope::DeserializeScopeChain() erroneously deserialized ARROW_SCOPE
ScopeInfos as FUNCTION_SCOPE. This could lead to bugs such as the
attached one, where "super" was disallowed where it should have
been allowed.

This patch utilizes the Scope's FunctionKind to distinguish arrow
functions from others. Besides fixing the above bug, this also
simplifies code in various places that had to deal with two different
ScopeTypes both of which meant "function".

BUG=v8:4466
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31154}
2015-10-07 14:55:45 +00:00
mstarzinger
6c97e54f27 [interpreter] Make --ignition-filter script filtering explicit.
This makes it explicit when the --ignition-filter pattern should be
applied to the script name instead of the function name by using a
proper "s:{name}" pattern. It also hardcodes it to be a prefix match
instead of an exact match, because that is all we need for test262.

R=rmcilroy@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31153}
2015-10-07 14:27:37 +00:00
caitpotter88
24aca87090 [api] expose Array Iterators to API
Allow access to Array Iterator through the API, in order to simplify
setting up interfaces which use these methods. This applies to
WebIDL interfaces with "length" attributes returning integer types and
a getter taking an unsigned long type.

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

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

Cr-Commit-Position: refs/heads/master@{#31152}
2015-10-07 13:17:12 +00:00
mstarzinger
0a6863f029 [turbofan] Separate JSInliningHeuristic into own class.
This separates the core machinery and the heuristics involved with
inlining functions calls. So far the heuristic only respects our
%SetForceInlineFlag hint, but it will the place where general inlining
heuristics can live without impeding clarity of the core machinery.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31150}
2015-10-07 12:18:32 +00:00
mlippautz
465caac813 [heap] Unify accounting committed memory across all spaces.
Untangles committed memory from capacity in a given space and unifies accounting
for all spaces.

Pre-work for parallel compaction.

R=hpayer@chromium.org
BUG=chromium:524425
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31149}
2015-10-07 12:12:06 +00:00
bmeurer
e16dd13d6d [turbofan] Add initial support for global specialization.
Introduce a new JSGlobalSpecialization advanced reducer that runs
during the initial inlining and context specialization, and specializes
the graph to the globals of the native context.  Currently we assume
that we do not inline cross native context, but long-term we will grab
the global object from the JSLoadGlobal/JSStoreGlobal feedback (with the
new global load/store ICs that are currently in the workings), and then
this whole specialization will be fully compositional even across
cross-context inlining.

Note that we cannot really handle most of the stores to global object
property cells because TurboFan doesn't have a mechanism to enforce
certain representations.  Also note that we cannot yet fully benefit
from the type feedback collected on the global object property cells,
because the type system cannot deal with maps in a reasonable way.

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

Committed: https://crrev.com/6fbf7903f94924ea066af481719898bd9667b6eb
Cr-Commit-Position: refs/heads/master@{#31139}

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

Cr-Commit-Position: refs/heads/master@{#31148}
2015-10-07 12:10:54 +00:00
neis
09184acad2 [es6] Implement parts of the Reflect object.
- Reflect.deleteProperty
- Reflect.get
- Reflect.has
- Reflect.isExtensible

Reflect.get doesn't support the receiver argument yet, and
some of the others don't support proxies yet.

R=rossberg
BUG=v8:3931
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31146}
2015-10-07 11:45:25 +00:00
bmeurer
a916059aa7 [turbofan] Don't try to inline non-inlineable functions.
R=mstarzinger@chromium.org
BUG=chromium:540593
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31145}
2015-10-07 11:43:39 +00:00
bmeurer
84065c5f1e Revert of [turbofan] Add initial support for global specialization. (patchset #4 id:60001 of https://codereview.chromium.org/1387393002/ )
Reason for revert:
Breaks GC stress: http://build.chromium.org/p/client.v8/builders/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/builds/1984/steps/Bisect%20c5528ac1.Retry/logs/regress-crbug-450960

Original issue's description:
> [turbofan] Add initial support for global specialization.
>
> Introduce a new JSGlobalSpecialization advanced reducer that runs
> during the initial inlining and context specialization, and specializes
> the graph to the globals of the native context.  Currently we assume
> that we do not inline cross native context, but long-term we will grab
> the global object from the JSLoadGlobal/JSStoreGlobal feedback (with the
> new global load/store ICs that are currently in the workings), and then
> this whole specialization will be fully compositional even across
> cross-context inlining.
>
> Note that we cannot really handle most of the stores to global object
> property cells because TurboFan doesn't have a mechanism to enforce
> certain representations.  Also note that we cannot yet fully benefit
> from the type feedback collected on the global object property cells,
> because the type system cannot deal with maps in a reasonable way.
>
> CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_nosnap_rel
> R=jarin@chromium.org
> BUG=v8:4470
> LOG=n
>
> Committed: https://crrev.com/6fbf7903f94924ea066af481719898bd9667b6eb
> Cr-Commit-Position: refs/heads/master@{#31139}

TBR=jarin@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4470

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

Cr-Commit-Position: refs/heads/master@{#31144}
2015-10-07 11:42:21 +00:00
ishell
1d7c9c8139 The metadata part of TypeFeedbackVector is extracted to TypeFeedbackMetadata array.
Thus TypeFeedbackMetadata can now be shared between different native contexts.

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

Cr-Commit-Position: refs/heads/master@{#31143}
2015-10-07 10:33:32 +00:00
rmcilroy
c5528ac1cb [Interpreter] Support top-level code.
Adds support for compiling top level code to bytecode to be run in the
interpreter.

Also moves PassesFilter to String:: so that it can be used to filter top
level script names as well as functions (used in
https://codereview.chromium.org/1379093002/)

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31142}
2015-10-07 10:30:48 +00:00
bmeurer
6fbf7903f9 [turbofan] Add initial support for global specialization.
Introduce a new JSGlobalSpecialization advanced reducer that runs
during the initial inlining and context specialization, and specializes
the graph to the globals of the native context.  Currently we assume
that we do not inline cross native context, but long-term we will grab
the global object from the JSLoadGlobal/JSStoreGlobal feedback (with the
new global load/store ICs that are currently in the workings), and then
this whole specialization will be fully compositional even across
cross-context inlining.

Note that we cannot really handle most of the stores to global object
property cells because TurboFan doesn't have a mechanism to enforce
certain representations.  Also note that we cannot yet fully benefit
from the type feedback collected on the global object property cells,
because the type system cannot deal with maps in a reasonable way.

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

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

Cr-Commit-Position: refs/heads/master@{#31139}
2015-10-07 10:26:11 +00:00
bmeurer
4979b8e493 [turbofan] Ensure we have enough space for lazy deoptimization in RelocInfo.
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31138}
2015-10-07 09:56:06 +00:00
jkummerow
e03df5229d Revert of improve perf_basic_prof filename reporting (patchset #1 id:1 of https://codereview.chromium.org/1388543002/ )
Reason for revert:
Suspected to cause crbug.com/539892

Original issue's description:
> improve perf_basic_prof filename reporting
>
> The buffer used for appending filenames to the string printed to the
> perf_basic_prof log was unnecessarily too small. Bump it up to be at least
> kUtf8BufferSize.
>
> Truncation of filenames makes it really hard to work with profiles gathered on
> Node.js. Because of the way Node.js works, you can have node module dependencies
> in deeply nested directories. The last thing you want when investigating a
> performance problem is to have script names be truncated.
>
> This patch is a stop-gap. Ideally, I want no truncation of the filename at all
> and use a dynamically growing buffer. That would be a larger change, and I
> wanted to have a quick fix available that can be back-ported to Node.js LTS
> release.
>
> R=yangguo@chromium.org,yurys@chromium.org
> BUG=
>
> Committed: https://crrev.com/03ef3cd004c2fd31ae7e48772f106df67b8c2feb
> Cr-Commit-Position: refs/heads/master@{#31092}

TBR=yangguo@chromium.org,yurys@chromium.org,ofrobots@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31137}
2015-10-07 09:45:58 +00:00
hpayer
5d125f218a [heap] Reland prepare code for smaller large object allocation limit than max allocatable memory.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31136}
2015-10-07 09:14:13 +00:00
bmeurer
74ae226b94 [turbofan] Move global constant optimization to AstGraphBuilder.
Optimizing global constants such as "NaN", "Infinity" and "undefined" is
best performed during graph building. Then the optimization and lowering
passes only need to deal with real loads in case of JSLoadGlobal.

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

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

Cr-Commit-Position: refs/heads/master@{#31135}
2015-10-07 08:19:43 +00:00
rmcilroy
785516821d [Interpreter]: Add support for strict mode load / store ICs.
Adds support for strict mode load / store ICs and cleans up BinaryOp and
CompareOp to only trigger an UNIMPLEMENTED abort if called with STRONG
mode (which is the only language mode which has different compare/binary ops.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31134}
2015-10-07 07:54:27 +00:00
erikcorry
9081ee11af RegExp: Fix update of lastIndex on non-global sticky
R=yangguo@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31133}
2015-10-06 21:24:12 +00:00
caitpotter88
874549c79c [es6] ship @@isConcatSpreadable
As discussed, shipping early in the M48 branch will likely have greater
exposure than staging, in order to find any remaining bugs with this feature,
and provides plenty of time to unship if needed.

BUG=
LOG=N
R=adamk@chromium.org, wingo@chromium.org, rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31132}
2015-10-06 19:56:49 +00:00
caitpotter88
8561dbd655 [es6] silence access-check failure for well-known symbol properties
Symbols marked as "well-known" now return an undefined value when loaded with a failed access check, instead of throwing.

Currently, only @@isConcatSpreadable is marked as well-known, until the correct behaviour is properly specified.

BUG=v8:4289, 507553
LOG=N
R=adamk@chromium.org, jochen@chromium.org, verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31131}
2015-10-06 18:10:37 +00:00
machenbach
2e1dbae08b Revert of Changed scavenge GC to collect unmodified references (patchset #9 id:160001 of https://codereview.chromium.org/1358703003/ )
Reason for revert:
[Sheriff] Speculative revert due to crbug.com/539814

Original issue's description:
> Changed scavenge GC to collect unmodified references
>
> Added a scavenge GC pass that collects unmodified references instead of
> processing object groups.  This mode can be controlled by setting
> FLAG_scavenge_remove_unmodified_objects. By default this is turned off.
> Also, modified a test case to suit the handle the new GC pass.
>
> BUG=v8:4421
> LOG=N
>
> Committed: https://crrev.com/6254019238a853c9f3c09d615ba153043f6957c7
> Cr-Commit-Position: refs/heads/master@{#31102}

TBR=jochen@chromium.org,rmcilroy@chromium.org,mythria@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4421,chromium:539814

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

Cr-Commit-Position: refs/heads/master@{#31130}
2015-10-06 17:39:51 +00:00
machenbach
9af0174f03 Revert of [heap] Prepare code for smaller large object allocation limit than max allocatable memory. (patchset #10 id:180001 of https://codereview.chromium.org/1361853005/ )
Reason for revert:
[Sheriff] Need to revert for reverting https://codereview.chromium.org/1358703003/

Original issue's description:
> [heap] Prepare heap for smaller large object allocation limit than max allocatable memory.
>
> BUG=chromium:524425
> LOG=n
>
> Committed: https://crrev.com/c2bce747993c445daf78975392e587bff20c6677
> Cr-Commit-Position: refs/heads/master@{#31107}

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

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

Cr-Commit-Position: refs/heads/master@{#31129}
2015-10-06 17:11:38 +00:00
littledan
2e7077e02c Destructuring array without initializer throws an exception
Previously, cases like
  var [foo]
led to a parser crash because the parser tried to do something with
the initializer, which was not syntactically present.

This patch fixes the parser issue (implicitly creating an undefined
initializer) and inserts a check for array destructuring that the
right-hand side is coercible to an object, so it can have iterator
methods called on it safely.

BUG=v8:4462
LOG=Y
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#31128}
2015-10-06 17:01:28 +00:00
jschuh
a15c5c9667 Disable VirtualAlloc randomization on 32-bit Windows hosts
ASLR is much weaker in a 2GB address space. Plus the vast
majority of 32-bit Windows hosts are XP, which don't have
ASLR anyway. So, avoid the fragmentation and skip it in
this case.

BUG=chromium:394591
LOG=Y
R=jochen@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31127}
2015-10-06 16:57:55 +00:00
mbrandy
3d1d7f3622 PPC: [builtins] Make sure argument count is always valid for C++ builtins.
Port 9c8262f11e

Original commit message:
    When calling into C++ builtins, we need to make sure that the argument
    count register contains the correct number of arguments, otherwise the
    CEntryStub will not be able to leave the stack in the correct state.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=v8:4413
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31126}
2015-10-06 15:13:37 +00:00
oth
565f0d730b [Interpreter] Unary operators - typeof, void, and logical not.
Implementations and tests for typeof, void, and logical not.

Add missing string type to Object::TypeOf.

BUG=v8:4280
LOG=NO

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

Cr-Commit-Position: refs/heads/master@{#31124}
2015-10-06 14:15:32 +00:00
Benedikt Meurer
8f9858a4da [mips] Fix MIPS/MIPS64 test failures after r31120.
TBR=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31121}
2015-10-06 09:14:41 +00:00
bmeurer
9c8262f11e [builtins] Make sure argument count is always valid for C++ builtins.
When calling into C++ builtins, we need to make sure that the argument
count register contains the correct number of arguments, otherwise the
CEntryStub will not be able to leave the stack in the correct state.

R=ishell@chromium.org
BUG=v8:4413
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31120}
2015-10-06 08:23:51 +00:00
adamk
299c72bc88 Remove dead helper methods from Block AST node
R=rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31119}
2015-10-06 06:16:44 +00:00
littledan
38465598c8 Fix legacy const for-of/in destructuring
Previously, using legacy const in for-of/in loops led to a check-fail
in the parser. This was due to the fact that the destructuring bind
led to an undefined initialization to undefined in the parser, which
caused the for loop code to go down a strange path. This patch
eliminates the undefined initialization in variables declared in
for-in/of loops, so that that path is not used and the error is
fixed.

BUG=v8:4461
LOG=Y
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#31117}
2015-10-05 22:36:33 +00:00
stefan.penner
dcbab0f5fb [es6] Align Promise.resolve with the spec
* Promise.resolve is now works with subclasses
* Spec removed [[PromiseConstructor]] now can simply use constructor
* Promise.resolve ignores species

R=littledan@chromium.org,domenic@chromium.org
BUG=v8:4161,v8:4341
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#31116}
2015-10-05 22:21:25 +00:00
littledan
7e113c47b7 Prohibit let in lexical bindings
This patch prohibits lexical bindings from being called 'let', even in
sloppy mode, following the ES2015 specification. The change affects
multiple cases of lexical bindings, including simple let/const declarations
and both kinds of for loops. var and legacy const bindings still permit
the name to be let, including in destructuring cases. Tests are added to
verify, though some cases are commented out since they led to (pre-existing)
crashes.

BUG=v8:4403
R=adamk
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#31115}
2015-10-05 20:29:22 +00:00
mbrandy
f53fda63eb PPC: Remove register index/code indirection
Port 5cf1c0bcf6

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.

R=danno@chromium.org, bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31114}
2015-10-05 19:45:44 +00:00
hans
57ca0f36c4 Remove unnecessary friend decls; fix Win-Clang builds
Clang builds on Windows were failing with:

..\..\v8\src\register-configuration.cc(85,17) :  error: unqualified friend
declaration referring to type outside of the nearest enclosing namespace is
a Microsoft extension; add a nested name specifier
[-Werror,-Wmicrosoft-unqualified-friend]

  friend struct Register;
                ^
                ::v8::internal::

How did it work on non-Windows? The friend declarations were declaring
new Register and DoubleRegister structs in the current namespace, instead
of refering the existing classes in the outer namespce.

The code isn't referencing any private members of these classes anyway,
so let's drop the friend declarations.

BUG=82385
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31113}
2015-10-05 19:34:52 +00:00
machenbach
369d1c5ae1 Revert of Reland: Introduce a V8_NORETURN macro and use it to make GCC 4.9.2 happy again. (patchset #3 id:40001 of https://codereview.chromium.org/1384873002/ )
Reason for revert:
[Sheriff] Breaks the gcc 4.8 bot:
http://build.chromium.org/p/client.v8/builders/V8%20Linux%20gcc%204.8/builds/3274

Original issue's description:
> Reland: Introduce a V8_NORETURN macro and use it to make GCC 4.9.2 happy again.
>
> Without that, it has a few false positives about out-of-bounds array accesses.
> Also makes the clang static-analyzer happy.
>
> Original code review from Sven Panne:
> https://codereview.chromium.org/790723002/
>
> CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_arm_dbg,v8_linux_arm64_dbg,v8_mac64_dbg,v8_win_compile_dbg
>
> Committed: https://crrev.com/d068574e641e28f05dcde89ddc9a1d0ec6f6f308
> Cr-Commit-Position: refs/heads/master@{#31105}

TBR=jochen@chromium.org,bmeurer@chromium.org,karl@skomski.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#31112}
2015-10-05 18:56:30 +00:00
julien.gilli
1ee712ab86 Add SetAbortOnUncaughtExceptionCallback API
The --abort-on-uncaught-exception command line switch makes
Isolate::Throw abort if the error being thrown cannot be caught by a
try/catch block.

Embedders may want to use other mechanisms than try/catch blocks to
handle uncaught exceptions. For instance, Node.js has "domain" objects
that have error handlers that can handle uncaught exception like
following:

var d = domain.create();

d.on('error', function onError(err) {
  console.log('Handling error');
});

d.run(function() {
  throw new Error("boom");
});

These error handlers are called by isolates' message listeners.

If --abort-on-uncaught-exception is *not* used, the isolate's
message listener will be called, which will in turn call the domain's
error handler. The process will output 'Handling error' and will exit
successfully (not due to an uncaught exception). This is the behavior
that Node.js users expect.

However, if --abort-on-uncaught-exception is used and when throwing an
error within a domain that has an error handler, the process will abort
and the domain's error handler will not be called. This is not the
behavior that Node.js users expect.

Having a SetAbortOnUncaughtExceptionCallback API allows embedders to
determine when it's not appropriate to abort and instead handle the
exception via the isolate's message listener.

In the example above, Node.js would set a custom callback with
SetAbortOnUncaughtExceptionCallback that would be implemented as
following (the sample code has been simplified to remove what's not
relevant to this change):

bool ShouldAbortOnUncaughtException(Isolate* isolate) {
  return !IsDomainActive();
}

Now when --abort-on-uncaught-exception is used, Isolate::Throw would
call that callback and determine that it should not abort if a domain
with an error handler is active. Instead, the isolate's message listener
would be called and the error would be handled by the domain's error
handler.

I believe this can also be useful for other embedders.

BUG=

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31111}
2015-10-05 18:55:15 +00:00
dsinclair
e89226a549 Add cstdarg header to log-utils.h
The log-utils.h file uses va_list but doesn't require the header. This CL
adds the needed header to remove a compiler error we've seen when doing some
bisecting.

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

Cr-Commit-Position: refs/heads/master@{#31110}
2015-10-05 18:54:13 +00:00
littledan
2d4085622a Ensure scopes are backed by blocks in the body of for loops
Clusterfuzz testing discovered that sloppy-mode block-scoped function
declarations introduce lexically-scoped variables in scopes that were
thrown away under the expectation that no lexically-scoped variables
were introduced. These cases are:

  for (;;) function foo() {}
  for (x in y) function foo() {}

This patch ensures that a block is created in those cases to hold the
lexically scoped variable. Usually, scope analysis should discover that
that block is not important, and it should not have a runtime
representation.

BUG=chromium:536750,chromium:536751
LOG=Y
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#31109}
2015-10-05 18:52:58 +00:00
dusan.m.milosavljevic
12d288736d MIPS64: Improve write barriers to reduce split loads and stores.
TEST=
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31108}
2015-10-05 17:11:31 +00:00
hpayer
c2bce74799 [heap] Prepare heap for smaller large object allocation limit than max allocatable memory.
BUG=chromium:524425
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31107}
2015-10-05 17:04:10 +00:00
dusan.m.milosavljevic
d5e6ab9e08 MIPS64: Fix Add CallRuntime support to the interpreter.
TEST=cctest/test-interpreter/InterpreterCall,
     cctest/test-bytecode-generator/CallRuntime
BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31106}
2015-10-05 16:45:05 +00:00
karl
d068574e64 Reland: Introduce a V8_NORETURN macro and use it to make GCC 4.9.2 happy again.
Without that, it has a few false positives about out-of-bounds array accesses.
Also makes the clang static-analyzer happy.

Original code review from Sven Panne:
https://codereview.chromium.org/790723002/

CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_arm_dbg,v8_linux_arm64_dbg,v8_mac64_dbg,v8_win_compile_dbg

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

Cr-Commit-Position: refs/heads/master@{#31105}
2015-10-05 16:34:54 +00:00
mstarzinger
13adffcba8 Remove obsolete lookup-inl.h header.
This removes the lookup-inl.h header file, which actually would break
compilation if included more than once in the codebase. It only holds
methods used solely in the lookup.cc compilation unit.

R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31104}
2015-10-05 16:23:48 +00:00
hpayer
741c955260 [heap] Add specific timer events for finalizing incremental GCs.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31103}
2015-10-05 16:08:05 +00:00
mythria
6254019238 Changed scavenge GC to collect unmodified references
Added a scavenge GC pass that collects unmodified references instead of
processing object groups.  This mode can be controlled by setting
FLAG_scavenge_remove_unmodified_objects. By default this is turned off.
Also, modified a test case to suit the handle the new GC pass.

BUG=v8:4421
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31102}
2015-10-05 16:01:43 +00:00
ulan
3615dae7dc Increase the delay of memory reducer to make it less likely to start GC
when the application is not idle.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31100}
2015-10-05 14:40:15 +00:00
cbruni
cfd417202e [runtime-object]: part fix element key list on global object
BUG=v8:2764
LOG=N
R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31099}
2015-10-05 14:23:26 +00:00
mbrandy
f3f940f435 PPC: [Interpreter] Add CallRuntime support to the interpreter.
Port 75f6ad74b2

Original commit message:
    Adds support for calling runtime functions from the interpreter. Adds the
    CallRuntime bytecode which takes a Runtime::FunctionId of the function to call
    and the arguments in sequential registers. Adds a InterpreterCEntry builtin
    to enable the interpreter to enter C++ code based on the functionId.

    Also renames Builtin::PushArgsAndCall to Builtin::InterpreterPushArgsAndCall
    and groups all the interpreter builtins together.

R=rmcilroy@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31098}
2015-10-05 14:03:57 +00:00
mstarzinger
871529b4d8 Revert "[heap] No leakage of mark-compact.h outside of heap."
The change in question caused regressions on GC-heavy benchmarks,
presumably due to the added indirection that is taken within hot code
like the marking visitor.

This is a manual revert due to conflicts.

This reverts commit 4f55b83012.

R=hpayer@chromium.org
BUG=chromium:539273
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31097}
2015-10-05 12:14:14 +00:00
neis
09185f6e2d Restructuring of JSObject::preventExtensions.
Now there are two functions, one corresponding to the spec's
[[PreventExtensions]] and one corresponding to Object.preventExtensions.
They differ in what they return.

This CL is in preparation of implementing Reflect.preventExtensions.

R=rossberg
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31096}
2015-10-05 12:08:58 +00:00
karl
e28183b597 Fix compilation with GCC 5.2
Fixes:

../../test/cctest/compiler/test-js-typed-lowering.cc:224:14:
 error: ‘kJSTypes’ defined but not used [-Werror=unused-variable]
  static Type* kJSTypes[] = {Type::Undefined(), Type::Null(),   Type::Boolean(),

../../src/bignum.cc: In member function
 ‘void v8::internal::Bignum::AssignDecimalString(Vector<const char>)’:
  ../../src/bignum.cc:80:6: error: assuming signed overflow does not occur when
  assuming that (X + c) < X is always false [-Werror=strict-overflow]

../../src/compiler/ia32/code-generator-ia32.cc:1366:3:
  required from here ../../src/base/logging.h:123:26:
   error: comparison between signed and unsigned integer expressions
   [-Werror=sign-compare] DEFINE_CHECK_OP_IMPL(EQ, ==)

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31095}
2015-10-05 11:07:28 +00:00
machenbach
e1743816d3 Reland [swarming] Isolate v8 testing.
This reverts commit 280a6f8ec8.

Reland of https://codereview.chromium.org/1380593002/

BUG=chromium:535160
LOG=n
CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_nosnap_rel;

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

Cr-Commit-Position: refs/heads/master@{#31094}
2015-10-05 09:48:42 +00:00
ofrobots
03ef3cd004 improve perf_basic_prof filename reporting
The buffer used for appending filenames to the string printed to the
perf_basic_prof log was unnecessarily too small. Bump it up to be at least
kUtf8BufferSize.

Truncation of filenames makes it really hard to work with profiles gathered on
Node.js. Because of the way Node.js works, you can have node module dependencies
in deeply nested directories. The last thing you want when investigating a
performance problem is to have script names be truncated.

This patch is a stop-gap. Ideally, I want no truncation of the filename at all
and use a dynamically growing buffer. That would be a larger change, and I
wanted to have a quick fix available that can be back-ported to Node.js LTS
release.

R=yangguo@chromium.org,yurys@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31092}
2015-10-03 05:32:54 +00:00
rmcilroy
75f6ad74b2 [Interpreter] Add CallRuntime support to the interpreter.
Adds support for calling runtime functions from the interpreter. Adds the
CallRuntime bytecode which takes a Runtime::FunctionId of the function to call
and the arguments in sequential registers. Adds a InterpreterCEntry builtin
to enable the interpreter to enter C++ code based on the functionId.

Also renames Builtin::PushArgsAndCall to Builtin::InterpreterPushArgsAndCall
and groups all the interpreter builtins together.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31089}
2015-10-02 18:13:57 +00:00
rmcilroy
cf036c6fd7 Add some owners to interpreter
Adds the following owners to interpreter/ directory:
 - oth@chromium.org
 - mstarzinger@chromium.org
 - bmeurer@chromium.org

Also sets noparent on the directory.

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

Cr-Commit-Position: refs/heads/master@{#31088}
2015-10-02 17:57:38 +00:00
danno
5cf1c0bcf6 Re-reland: Remove register index/code indirection
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.

Committed: https://crrev.com/80bc6f6e11f79524e3f1ad05579583adfd5f18b2
Cr-Commit-Position: refs/heads/master@{#30913}

Committed: https://crrev.com/7b7a8205d9a00c678fb7a6e032a55fecbc1509cf
Cr-Commit-Position: refs/heads/master@{#31075}

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

Cr-Commit-Position: refs/heads/master@{#31087}
2015-10-02 16:55:22 +00:00
bmeurer
6f81ee6a3d [runtime] Share constructor/non-constructor bound function maps.
Properly share both the constructor and the non-constructor maps
for bound functions. Previously we had only the non-constructor
map shared on the native context, and we had to create a new map
for every bound function whose [[BoundTargetFunction]] is a
constructor (in the ES6 sense).

This should repair the most recent regression on Speedometer.

CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_nosnap_dbg
R=jarin@chromium.org
BUG=chromium:536114,chromium:535408,v8:4430
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31086}
2015-10-02 16:51:31 +00:00
danno
00e07b0057 Revert of Reland: Remove register index/code indirection (patchset #20 id:380001 of https://codereview.chromium.org/1287383003/ )
Reason for revert:
Failures on MIPS

Original issue's description:
> Remove register index/code indirection
>
> 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.
>
> Committed: https://crrev.com/80bc6f6e11f79524e3f1ad05579583adfd5f18b2
> Cr-Commit-Position: refs/heads/master@{#30913}
>
> Committed: https://crrev.com/7b7a8205d9a00c678fb7a6e032a55fecbc1509cf
> Cr-Commit-Position: refs/heads/master@{#31075}

TBR=akos.palfi@imgtec.com,bmeurer@chromium.org,jarin@chromium.org,paul.lind@imgtec.com,titzer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#31083}
2015-10-02 15:37:06 +00:00
ulan
ea22bb1f07 Add a flag for memory reducer.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31082}
2015-10-02 15:16:50 +00:00
ulan
6d13610374 Tune evacuation candidate selection.
This disables aggressive compaction for non-memory reducer GCs.

BUG=chromium:502247
LOG=NO

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

Cr-Commit-Position: refs/heads/master@{#31079}
2015-10-02 15:13:16 +00:00
rmcilroy
b4a2f65624 Revert of [Interpreter] Add CallRuntime support to the interpreter. (patchset #8 id:220001 of https://codereview.chromium.org/1362383002/ )
Reason for revert:
Now breaking arm32 debug bot (worked locally even with --debug-code, so I'll need to figure out what's different on the bot)

Original issue's description:
> [Interpreter] Add CallRuntime support to the interpreter.
>
> Adds support for calling runtime functions from the interpreter. Adds the
> CallRuntime bytecode which takes a Runtime::FunctionId of the function to call
> and the arguments in sequential registers. Adds a InterpreterCEntry builtin
> to enable the interpreter to enter C++ code based on the functionId.
>
> Also renames Builtin::PushArgsAndCall to Builtin::InterpreterPushArgsAndCall
> and groups all the interpreter builtins together.
>
> BUG=v8:4280
> LOG=N
>

TBR=bmeurer@chromium.org,oth@chromium.org,mstarzinger@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4280

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

Cr-Commit-Position: refs/heads/master@{#31078}
2015-10-02 15:12:17 +00:00
rmcilroy
c991d8f384 [Interpreter] Add CallRuntime support to the interpreter.
Adds support for calling runtime functions from the interpreter. Adds the
CallRuntime bytecode which takes a Runtime::FunctionId of the function to call
and the arguments in sequential registers. Adds a InterpreterCEntry builtin
to enable the interpreter to enter C++ code based on the functionId.

Also renames Builtin::PushArgsAndCall to Builtin::InterpreterPushArgsAndCall
and groups all the interpreter builtins together.

BUG=v8:4280
LOG=N

Committed: https://crrev.com/40e8424b744f8b6e3e1d93e20f23487419911dfc
Cr-Commit-Position: refs/heads/master@{#31064}

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

Cr-Commit-Position: refs/heads/master@{#31076}
2015-10-02 14:12:09 +00:00
danno
7b7a8205d9 Remove register index/code indirection
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.

Committed: https://crrev.com/80bc6f6e11f79524e3f1ad05579583adfd5f18b2
Cr-Commit-Position: refs/heads/master@{#30913}

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

Cr-Commit-Position: refs/heads/master@{#31075}
2015-10-02 13:59:06 +00:00
cbruni
1cb899046c [cross-context] create new function prototypes in the context of the function
BUG=v8:4217
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#31074}
2015-10-02 13:30:19 +00:00
ulan
7549792863 Fix Heap::ComputeHeapState after 057514 and 6256dc.
This restores size_of_objects and removed unused fields.

BUG=chromium:538539
LOG=NO

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

Cr-Commit-Position: refs/heads/master@{#31072}
2015-10-02 12:58:37 +00:00
mlippautz
3e19476f28 Add DCHECK_GT macro.
R=ulan@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31071}
2015-10-02 12:08:52 +00:00
mlippautz
5ef26f3a6b [heap] Properly reset flags for partially aborted evacuation candidates.
See bug description.

R=hpayer@chromium.org
BUG=chromium:538257
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31070}
2015-10-02 11:50:12 +00:00
jkummerow
ecf2327691 Fix FixedArrayBase cast in NumberOfOwnElements
The problem was harmless, but made --enable-slow-asserts unhappy.

BUG=chromium:538086
LOG=n
R=cbruni@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31069}
2015-10-02 11:49:00 +00:00
mstarzinger
ea26401266 [turbofan] Call FastNewContextStub for function context.
This lowers JSCreateFunctionContext nodes to call the above stub for
help with allocating function contexts when possible. It also contains
an implementation for inlined allocations of such contexts, which is
still behind a flag until inlined allocations are ready for prime time.

TEST=unittests/JSTypedLoweringTest.JSCreateFunctionContext
R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31068}
2015-10-02 09:30:21 +00:00
rmcilroy
90f69d1610 Revert of [Interpreter] Add CallRuntime support to the interpreter. (patchset #6 id:180001 of https://codereview.chromium.org/1362383002/ )
Reason for revert:
Broke Arm64 bot (CEntry stub is trying to pop arguments off stack when argv_in_reg, so I need to fix this).

Original issue's description:
> [Interpreter] Add CallRuntime support to the interpreter.
>
> Adds support for calling runtime functions from the interpreter. Adds the
> CallRuntime bytecode which takes a Runtime::FunctionId of the function to call
> and the arguments in sequential registers. Adds a InterpreterCEntry builtin
> to enable the interpreter to enter C++ code based on the functionId.
>
> Also renames Builtin::PushArgsAndCall to Builtin::InterpreterPushArgsAndCall
> and groups all the interpreter builtins together.
>
> BUG=v8:4280
> LOG=N
>
> Committed: https://crrev.com/40e8424b744f8b6e3e1d93e20f23487419911dfc
> Cr-Commit-Position: refs/heads/master@{#31064}

TBR=bmeurer@chromium.org,oth@chromium.org,mstarzinger@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4280

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

Cr-Commit-Position: refs/heads/master@{#31066}
2015-10-02 09:21:59 +00:00
rmcilroy
40e8424b74 [Interpreter] Add CallRuntime support to the interpreter.
Adds support for calling runtime functions from the interpreter. Adds the
CallRuntime bytecode which takes a Runtime::FunctionId of the function to call
and the arguments in sequential registers. Adds a InterpreterCEntry builtin
to enable the interpreter to enter C++ code based on the functionId.

Also renames Builtin::PushArgsAndCall to Builtin::InterpreterPushArgsAndCall
and groups all the interpreter builtins together.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31064}
2015-10-02 07:25:56 +00:00
paul.lind
88a3cc79df Fix another gcc 4.9.2 sign-compare error.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31063}
2015-10-02 06:59:56 +00:00
alph
0dedff6bf1 Move strings-storage.* to the profiler directory
Review URL: https://codereview.chromium.org/1378253002

Cr-Commit-Position: refs/heads/master@{#31060}
2015-10-01 18:11:03 +00:00
rmcilroy
03369ed2cb [Interpreter] Add support for short (16 bit) operands.
Adds support for short operands, starting with kIdx16. Introduces
BytecodeTraits to enable compile time determination of various traits for a
bytecode, such as size, operands, etc. Reworks BytecodeIterator,
BytecodeArrayBuilder and Bytecodes::Decode to support 16 bit operands. Adds
support to Interpreter to load 16 bit operands.

Also fixes a bug with ToBoolean where it wouldn't get emitted at the start
of a block, and added a test.

BytecodeTraits template magic inspired by oth@chromium.org.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31058}
2015-10-01 17:23:14 +00:00
titzer
924b0ecf85 [turbofan] Fix calls to computed code objects.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31057}
2015-10-01 17:11:56 +00:00
alph
8d55da3830 Eliminate no_frame_range data
It was supposed to be used by the CPU profiler. But as long as
these ranges are not built when profiler is not running, once
the profiler is started there're no ranges for already compiled
functions. So basically this code never worked.

As long as now CPU profiler uses another approach this code is no
longer needed.

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

Cr-Commit-Position: refs/heads/master@{#31056}
2015-10-01 17:08:55 +00:00
neis
ce08f45b1b Add access check to JSObject::IsExtensible.
R=verwaest@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31055}
2015-10-01 16:10:03 +00:00
bmeurer
2a0759d3ff [es6] Fix missing bits for full @@toPrimitive support.
Introduce %_ToNumber intrinsic, which just calls to the existing
ToNumberStub, and remove all uses of our custom JavaScript plus
intrinsics based ToNumber and friends.

Also replace the TO_NUMBER_INLINE macro with TO_NUMBER,
which is currently a wrapper for %_ToNumber. Newly written JS
code should use TO_NUMBER (similar to TO_STRING, TO_INT32,
and friends).

Also finally remove the DefaultString/DefaultNumber builtins, which
are basically the ES5 version of ToPrimitive. Now all code uses the
ES6 version, which is implemented in Object::ToPrimitive and
JSReceiver::ToPrimitive in C++.

CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_layout_dbg,v8_linux_nosnap_dbg
R=jarin@chromium.org
BUG=v8:4307
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31054}
2015-10-01 16:08:49 +00:00
oth
a7e16e5132 [Interpreter] Add for/while/do support to the bytecode generator.
Improve bytecode generation for if when there's no else clause.

Display target addresses for jump instructions in
Bytecode::Disassemble().

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31052}
2015-10-01 15:04:27 +00:00
neis
cf82eea6d7 Fix completion of try..finally.
R=rossberg
BUG=v8:2529
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#31051}
2015-10-01 13:59:56 +00:00
ishell
90998947bc Distinction between FeedbackVectorICSlot and FeedbackVectorSlot eliminated.
This CL also allows to use arbitrary number of feedback vector elements for particular slot kind.

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

Cr-Commit-Position: refs/heads/master@{#31050}
2015-10-01 13:48:19 +00:00
mlippautz
1d998bd0a6 [heap] Refactor and clean up FreeListCategory.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31048}
2015-10-01 13:17:15 +00:00
mvstanton
5becebee31 Wrap JSFunction bindings in a helper object.
We need to do other things with this bindings object, like store a feedback vector. Therefore, it's a good time to wrap it up in a helper class.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31044}
2015-10-01 11:46:19 +00:00
rossberg
2c2848dccf [es6] Scoping & initialization for var shadowing non-simple parameters
Var-bindings may shadow parameters from a non-simple parameter list. When that happens: they create separate bindings, but are initialised with the respective parameter value. Thus:

(function(x, f = () => x) { var x; var y = x; x = 2; return [x, y, f()] })(1) -->  [2, 1, 1]

This CL implements that by inserting a suitable assignment for every shadwowing var-variable (e.g., x = outer_x above) at the beginning of the function's body block.

R=adamk@chromium.org
BUG=v8:4440,v8:811
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31042}
2015-10-01 10:42:33 +00:00
neis
af33cccfc4 Enable visitor in rewriter to replace statements.
This is in preparation of implementing ES6 completion semantics and
depends on #1362333002.

R=rossberg
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31041}
2015-10-01 09:06:13 +00:00
mlippautz
7a6f47fe22 [heap] Properly account for wasted bytes.
- Wasted bytes are now accounted where they accrue, i.e., the corresponding free
  list. The amount of waste is transferred by concatenating free lists.
- During concatenation, free lists are no longer locked on FreeListCategory
  level, but in the FreeList itself, simplifying the sync between contained nodes
  and wasted bytes (which are effectively dropped nodes).

This is pre-work for properly moving memory to compaction spaces, which requires
correct accounting of wasted memory.

BUG=chromium:524425
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31040}
2015-10-01 08:14:23 +00:00
cbruni
6b629ef76c KeyAccumulator: tweaking parameters for benchmarks
R=ishell@chromium.org
BUG=chromium:536790
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31039}
2015-10-01 07:20:47 +00:00
littledan
76da493315 Extend Annex B 3.3 sloppy-mode block-scoped hoisting to scripts, eval
The ES2015 spec is missing an extension of sloppy-mode block-scoped function
behavior to the global scope in scripts, as well as to eval. This patch
brings that hoisting to those two areas. The behavior is not perfectly
spec-compliant since properties created on the global scope should be
set as enumerable even if they are non-enumerable previously, but the
attributes will not be modified if the property already exists under
this patch.

BUG=v8:4441
LOG=Y
R=adamk
TEST=reddit comment functionality seems to be fixed

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

Cr-Commit-Position: refs/heads/master@{#31037}
2015-09-30 23:48:34 +00:00
mbrandy
6fb3708d68 PPC: Full code shouldn't embed the type feedback vector.
Port c90c60ba26

Original commit message:
    Make sure to always reference it indirectly. This allows us to make the vector
    native-context dependent should we wish.

R=mvstanton@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31036}
2015-09-30 21:16:46 +00:00
mbrandy
aeefe1013d PPC: Introduce LiteralsArray to hide it's implementation.
Port d8cdd6956a

Original commit message:
    The LiteralsArray will soon hold a type feedback vector. Code treats it as an
    ordinary fixed array, and needs to stop that.

R=mvstanton@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31035}
2015-09-30 21:10:35 +00:00
mbrandy
96d6fcffa5 PPC: [es6] Fix invalid ToString in implementation of ToName.
Port 09626525fe

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31034}
2015-09-30 21:09:35 +00:00
mbrandy
8de7235caf PPC: [turbofan] Call ArgumentsAccessStub to materialize arguments.
Port 9b12ec9ac2

Original commit message:
    This lowers JSCreateArgument nodes to call the ArgumentsAccessStub for
    help with materializing arguments objects when possible. Along the way
    this changes the calling convention of said stub to take parameters in
    registers instead of on the stack.

R=mstarzinger@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31033}
2015-09-30 21:07:30 +00:00
adamk
c2c6323218 Two minor cleanups in pattern rewriter
- No need to call AsVariableProxy() on a VariableProxy
- Reduce AST visitor boilerplate using pre-existing macro
  (and re-alphabetize the list of non-patterns).

R=littledan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31032}
2015-09-30 20:22:46 +00:00
adamk
163419e8fa Remove --harmony-arrow-functions flag
Arrow functions have been enabled by default since the 4.5 branch.

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

Cr-Commit-Position: refs/heads/master@{#31031}
2015-09-30 19:50:40 +00:00
adamk
51d28914bd [es6] Function constructor-created functions should be named "anonymous"
Besides matching the spec, this matches the behavior of Firefox and Edge.

BUG=v8:3699
LOG=n
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

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

Cr-Commit-Position: refs/heads/master@{#31030}
2015-09-30 19:20:04 +00:00
adamk
bab3b55082 Revert "Stage sloppy block-scoped functions (Annex B 3.3)"
The current implemention breaks sloppy mode code that uses function
declarations inside blocks at top-level. Work is ongoing on a patch
to fix this issue, but in the meantime it seems reasonable to move
the feature out of staging.

Manual revert of commit 6e07f5a75b.

R=littledan@chromium.org
BUG=chromium:535836
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#31029}
2015-09-30 19:17:41 +00:00
kozyatinskiy
ce54e16270 [V8] Add name of function for function's closure scope
Added ScopeDetails.name field for closure scopes. It contains function's debug name of current context of scope.

BUG=493156
LOG=Y
R=yurys@chromium.org,yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31028}
2015-09-30 17:24:33 +00:00
mbrandy
623e802132 PPC: [es6] Introduce spec compliant IsConstructor.
Port 8fe3ac0701

Original commit message:
    There was already a bit on the Map named "function with prototype",
    which basically meant that the Map was a map for a JSFunction that could
    be used as a constructor. Now this CL generalizes that bit to
    IsConstructor, which says that whatever (Heap)Object you are looking at
    can be used as a constructor (i.e. the bit is also set for bound
    functions that can be used as constructors and proxies that have a
    [[Construct]] internal method).

    This way we have a single chokepoint for IsConstructor checking, which
    allows us to get rid of the various ways in which we tried to guess
    whether something could be used as a constructor or not.

    Drive-by-fix: Renamed IsConstructor on FunctionKind to
    IsClassConstructor to resolve the weird name clash, and the
    IsClassConstructor name also matches the spec.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=v8:4413, v8:4430
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31027}
2015-09-30 17:01:21 +00:00
mbrandy
aa30d4e29d PPC: [runtime] Remove weird pushing of something on StackOverflow.
Port 556b522ac6

Original commit message:
    We somehow try to push some stuff on the stack when we detect a stack
    overflow, that we don't need. Even worse we might access outside the
    valid stack bounds. Since we don't need this, it's gone.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=chromium:534881
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31026}
2015-09-30 16:30:21 +00:00
mbrandy
ba79bd48c2 PPC: [builtin] Refactor Invoke to deal with any kind of callable.
Port 634d1d86d8

Original commit message:
    Now both Execution::Call and Execution::New can deal with any
    kind of target and will raise a proper exception if the target is not
    callable (which is not yet spec compliant for New, as we would
    have to check IsConstructor instead, which we don't have yet).

    Now we no longer need to do any of these weird call/construct
    delegate gymnastics in C++, and we finally have a single true
    bottleneck for Call/Construct abstract operations in the code
    base, with only a few special handlings left in the compilers to
    optimize the JSFunction case.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=v8:4430, v8:4413
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31025}
2015-09-30 16:28:55 +00:00
jkummerow
b4b69fd9c0 Teach JSReceiver::GetKeys() how to include symbols
No users of that functionality yet, those will come separately.

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

Cr-Commit-Position: refs/heads/master@{#31024}
2015-09-30 15:00:32 +00:00
jkummerow
e3833fdce2 Add LookupIterator constructor for arbitrary Object keys
Continuing unification of properties/elements handling, the new
LookupIterator::PropertyOrElement(..., Handle<Object> key, ...) takes
any Object and does the required ToPrimitive/ToName/ToArrayIndex
conversions on it.

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

Cr-Commit-Position: refs/heads/master@{#31023}
2015-09-30 14:51:56 +00:00
neis
66660ab02b Reland "Clean up rewriter" (issue 1362333002).
R=rossberg
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31022}
2015-09-30 14:43:30 +00:00
neis
4620029c4b Make AstPrinter print position information.
R=rossberg
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31021}
2015-09-30 14:23:06 +00:00
machenbach
9a03979dc9 [swarming] Only isolate d8 with target toolset.
BUG=chromium:535160,chromium:537247
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31020}
2015-09-30 13:48:26 +00:00
mstarzinger
6a769ac1df [presubmit] Enable readability/namespace linter checking.
This enables linter checking for "readability/namespace" violations
during presubmit and instead marks the few known exceptions that we
allow explicitly.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31019}
2015-09-30 13:47:11 +00:00
cbruni
4988e42ef7 JSObject::GetEnumProperty cleanup
BUG=

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

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

Cr-Commit-Position: refs/heads/master@{#31018}
2015-09-30 12:49:25 +00:00
mstarzinger
9e0e7273c6 [heap] Less aggressive inlining of IncrementalMarking code.
This moves some methods of IncrementalMarking from the inlined header
into the compilation unit. The methods in question are either not hot
or are being called through a non-inline function already.

R=hpayer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31017}
2015-09-30 08:24:10 +00:00
ofrobots
759591dae7 remove unused Debug::has_break_points_
Previous debug refactoring changes removed uses of has_break_points_, but
omitted removing the field itself. This is not necessary anymore.

R=yangguo@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31016}
2015-09-30 06:02:35 +00:00
chunyang.dai
f059762e74 X87: Introduce LiteralsArray to hide it's implementation.
port d8cdd6956a (r31000).

original commit message:

    The LiteralsArray will soon hold a type feedback vector. Code treats it as an
    ordinary fixed array, and needs to stop that.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31015}
2015-09-30 05:37:36 +00:00
mlippautz
5ff8a18979 [api] Avoid recursive GCs through reaching external allocation limit
See bug description.

BUG=chromium:536231
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31012}
2015-09-29 19:17:34 +00:00
dusan.m.milosavljevic
8bd431de92 MIPS64: Add big-endian support for mips64.
TEST=
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31011}
2015-09-29 17:23:55 +00:00
mstarzinger
ddafe2c494 [heap] No leakage of incremental-marking.h outside of heap.
This prevents the internal incremental-marking.h to be usable outisde
of the "heap" directory. The logic inside that component is only useful
within the GC and is now properly encapsulated.

R=hpayer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31010}
2015-09-29 16:59:16 +00:00
mstarzinger
8dfe18559c [turbofan] Pass scope infos as static operator parameters.
This changes the operators for JSCreate[Block|Script]Context to take
their ScopeInfo as a static parameter as opposed to a value input and
in turn allows for easier access to that parameter during lowerings.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31009}
2015-09-29 15:53:28 +00:00
jacob.bramley
f20d646152 [arm] Fix a double-register push operation.
It is not safe to access memory below sp, and this is also forbidden by
the ABI. When pushing, we must either use an atomic operation (such as
vstm+db_w) or move sp before writing the data.

This patch fixes one stack access, and also adds vpush and vpop helpers
to simplify similar code.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31008}
2015-09-29 15:11:30 +00:00
mstarzinger
1d03fc17b4 [turbofan] Remove obsolete helpers from graph verifier.
The NodeProperties helpers are here to stay and won't go away anytime
soon. This removes a TODO from the graph verifier in that regard.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31007}
2015-09-29 14:42:51 +00:00
jarin
904ac0ae2c [turbofan] Make string comparisons effectful.
BUG=v8:4446
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31006}
2015-09-29 14:39:01 +00:00
jarin
d06930fc4b [turbofan] Make Strict(Not)Equal, TypeOf, ToBoolean, UnaryNot effectful.
This is necessary because these operators can read heap (equality can actually write heap when flattening strings).

BUG=v8:4446
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31005}
2015-09-29 13:51:33 +00:00
mlippautz
92a7012b8b [heap] Remove NewSpace::set_top and the corresponding hack
- Remove the hack the resets the new space top pointer from SeqString::Truncate.
- Remove NewSpace::set_top completely as there are no callers (and there should
  be no!)

R=hpayer@chromium.org
BUG=chromium:536163
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31004}
2015-09-29 13:07:39 +00:00
ishell
134180d494 AST pretty printer fix.
It was broken by https://codereview.chromium.org/1376443002.

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

Cr-Commit-Position: refs/heads/master@{#31003}
2015-09-29 12:23:03 +00:00
vogelheim
ed110a1715 Allow JavaScript accessors on API objects.
(This is somewhat experimental; hence protected by #ifdef.)

R=epertoso@chromium.org, jochen@chromium.org
BUG=chromium:508898
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31002}
2015-09-29 11:16:14 +00:00
mvstanton
d8cdd6956a Introduce LiteralsArray to hide it's implementation.
The LiteralsArray will soon hold a type feedback vector. Code treats it as an
ordinary fixed array, and needs to stop that.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31000}
2015-09-29 10:15:39 +00:00
hpayer
ce28d019eb [heap] Reland Remove retry space from AllocateRaw.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30998}
2015-09-29 09:08:22 +00:00
yurys
4fd8c327de Tell MSAN that profiler doesn't expect sp to point at initialized memory
BUG=v8:4444,v8:4151
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30996}
2015-09-29 08:19:04 +00:00
mstarzinger
3bb0174330 [heap] Cleanup string factory methods a bit.
This is mostly removing dead code and also dropping MUST_USE_RESULT
annotations from methods that cannot throw an exception anyways.

R=hpayer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30995}
2015-09-29 08:08:30 +00:00
jacob.bramley
0a844bc0dc Fix Frame::AlignSavedCalleeRegisterSlots
The return value is expected to be the number of padding slots added to the frame. However, the original logic would return -1 if padding was required, so insufficient stack space would be reserved.

This function now returns either 0 or 1, as the existing calling code expects.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30994}
2015-09-29 07:49:00 +00:00
bmeurer
93b2b2622b [es6] Introduce %ToInteger and %ToLength.
This adds ES6 compliant Object::ToInteger, Object::ToInt32,
Object::ToUint32 and Object::ToLength, and replaces the old
Execution wrappers of those abstract operations (which were
not using the correct ToPrimitive).

This also introduces proper %ToInteger and %ToLength runtime
entries, with a fast path %_ToInteger supported in fullcodegen
and Crankshaft (for now). Internal JavaScript code should use
TO_INTEGER and TO_LENGTH respectively.

CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_layout_dbg,v8_linux_nosnap_dbg
BUG=v8:4307
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30993}
2015-09-29 07:41:13 +00:00
machenbach
2839811584 Revert of Clean up rewriter. (patchset #3 id:40001 of https://codereview.chromium.org/1362333002/ )
Reason for revert:
[Sheriff] Seems to break layout tests:
http://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/2073

https://storage.googleapis.com/chromium-layout-test-archives/V8-Blink_Linux_64/2073/layout-test-results/results.html

Please request rebaseline upstream first.

Original issue's description:
> Clean up rewriter.
>
> The main changes are:
> - Fix treatment of loops, which was incorrect and sometimes resulted in
>   the wrong completion value.
> - Get rid of unnecessary variables.
>
> This is in preparation of implementing ES6 completion semantics.
>
> R=rossberg
> BUG=
>
> Committed: https://crrev.com/b466dc14791844b7ae6d1e9ebd00a778965c206d
> Cr-Commit-Position: refs/heads/master@{#30981}

TBR=rossberg@chromium.org,neis@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30992}
2015-09-29 04:53:13 +00:00
bmeurer
6529971a7f Revert of [heap] Remove retry space from AllocateRaw. (patchset #3 id:40001 of https://codereview.chromium.org/1370123002/ )
Reason for revert:
Breaks arm64 nosnap simulator (bogus cctest?): https://chromegw.corp.google.com/i/client.v8/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20nosnap%20-%20debug%20-%201/builds/2934/steps/Bisect%202786ceec.Retry/logs/IncrementalWriteBarri..

Original issue's description:
> [heap] Remove retry space from AllocateRaw.
>
> BUG=
>
> Committed: https://crrev.com/2786ceec1eb491494d24d29a59eefbe3b6704be2
> Cr-Commit-Position: refs/heads/master@{#30984}

TBR=mstarzinger@chromium.org,hpayer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30991}
2015-09-29 04:40:02 +00:00
mtrofin
d5a9dd6539 [turbofan] Greedy: smarter last resort splitting.
When all heuristics fail, we run a "last resort" heuristic. Before, it was
splitting at the first found splittable position either before or after a
use position. That turns out to be too naive: it may split in loops, when
alternative split positions exist outside loops.

This change chooses a "before" use case location that is outside the
loop.

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

Cr-Commit-Position: refs/heads/master@{#30990}
2015-09-29 03:47:35 +00:00
chunyang.dai
22a38d7252 X87: [es6] Fix invalid ToString in implementation of ToName.
port 09626525fe (r30957).

original commit message:

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30988}
2015-09-29 02:21:08 +00:00
alph
e0606c9f00 Move heap and CPU profilers into a dedicated directory.
Drive-by: remove unnecessary includes.

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

Cr-Commit-Position: refs/heads/master@{#30987}
2015-09-28 19:34:18 +00:00
mstarzinger
df7df4df2a [heap] Move CALL_HEAP_FUNCTION macro into factory.cc file.
R=hpayer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30985}
2015-09-28 18:08:30 +00:00
hpayer
2786ceec1e [heap] Remove retry space from AllocateRaw.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30984}
2015-09-28 18:07:30 +00:00
oth
17363fa4f3 [Interpreter] Add interpreter support for compare ops and ToBoolean.
The comparison operators and ToBoolean are implemented by calling into
the runtime. There are new runtime methods are prefixed with Interpreter
to make use case clear.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30983}
2015-09-28 18:07:05 +00:00
ishell
4d03c3aaba Revert of Introduce a V8_NORETURN macro and use it to make GCC 4.9.2 happy again. (patchset #3 id:80001 of https://codereview.chromium.org/1361763004/ )
Reason for revert:
This CL breaks cross-compiling to arm.

Original issue's description:
> Introduce a V8_NORETURN macro and use it to make GCC 4.9.2 happy again.
>
> Without that, it has a few false positives about out-of-bounds array accesses.
> Also makes the clang static-analyzer happy.
>
> Original code review from Sven Panne:
> https://codereview.chromium.org/790723002/
>
> Committed: https://crrev.com/0b48b2a8ebfc791a36f4ec1f299f46db76265a3a
> Cr-Commit-Position: refs/heads/master@{#30977}

TBR=jochen@chromium.org,bmeurer@chromium.org,jkummerow@chromium.org,karl@skomski.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#30982}
2015-09-28 16:47:07 +00:00
neis
b466dc1479 Clean up rewriter.
The main changes are:
- Fix treatment of loops, which was incorrect and sometimes resulted in
  the wrong completion value.
- Get rid of unnecessary variables.

This is in preparation of implementing ES6 completion semantics.

R=rossberg
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30981}
2015-09-28 15:09:56 +00:00
ishell
601c8d9f87 Add ishell@ and mvstanton@ to full codegen owners list.
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#30980}
2015-09-28 15:04:37 +00:00
ben
e874579f28 Fix DCHECK in ScopeInfo::Print().
Review URL: https://codereview.chromium.org/1369913002

Cr-Commit-Position: refs/heads/master@{#30978}
2015-09-28 14:12:54 +00:00
karl
0b48b2a8eb Introduce a V8_NORETURN macro and use it to make GCC 4.9.2 happy again.
Without that, it has a few false positives about out-of-bounds array accesses.
Also makes the clang static-analyzer happy.

Original code review from Sven Panne:
https://codereview.chromium.org/790723002/

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

Cr-Commit-Position: refs/heads/master@{#30977}
2015-09-28 14:03:10 +00:00
jkummerow
7117acd26c objects-inl.h: Remove ACCESSORS_TO_SMI macro
Replacing it with SMI_ACCESSORS.
This change makes accesses to Smi fields in objects more regular (the
accessors now always consume/return an int rather than a Smi*), which
avoids a bunch of manual Smi::FromInt() and Smi::value() conversions,
and is a step on the way towards being able to generate objects-inl.h.

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

Cr-Commit-Position: refs/heads/master@{#30975}
2015-09-28 13:10:29 +00:00
ishell
27ff0671a0 Removing the Class/ObjectLiteral::LayoutFeedbackSlots().
Review URL: https://codereview.chromium.org/1372003002

Cr-Commit-Position: refs/heads/master@{#30974}
2015-09-28 13:02:50 +00:00
mstarzinger
8dc8903f3d [heap] Simplify CALL_HEAP_FUNCTION macro dance.
R=hpayer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30973}
2015-09-28 13:01:49 +00:00
ishell
b2d82a22a1 Refactored interface of FeedbackVectorSpec and friends.
This is a second step towards merging FeedbackVectorSlot and FeedbackVectorICSlot.

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

Cr-Commit-Position: refs/heads/master@{#30971}
2015-09-28 11:41:48 +00:00
neis
d3ef8f4b95 [es6] Ship rest parameters.
R=rossberg
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30970}
2015-09-28 11:19:35 +00:00
hpayer
91397ac7aa [heap] Reland Move large object space selection into AllocateRaw.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30969}
2015-09-28 09:57:43 +00:00
bmeurer
8611fb31a2 [bootstrapper] Fix raw pointer use during potential GC.
This should fix a weird random crash we keep seeing on Linux nosnap
bot with TurboFan enabled.

BUG=v8:4435,v8:4423
LOG=n
R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30968}
2015-09-28 09:42:21 +00:00
bmeurer
39114da1a7 [api] Make sure InterceptorInfo is always in a verifyable state.
This should fix the Threading1 flakiness that we see on the waterfall.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30967}
2015-09-28 09:02:38 +00:00
ben
f78215962b Remove obsolete try/catch from ObjectIsPromise().
Review URL: https://codereview.chromium.org/1367123003

Cr-Commit-Position: refs/heads/master@{#30966}
2015-09-28 08:44:46 +00:00
mlippautz
660d4fa7b0 [heap] Adjust number of parallel compaction tasks
This is a trivial spinoff of the more complicated CL splitting up memory:
  https://codereview.chromium.org/1365743003/

- Parallel compaction is still off.
- We now compute the number of parallel compaction tasks, depending on the
  evacuation candidate list, the number of cores, and some hard limit.

BUG=chromium:524425
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30965}
2015-09-28 08:35:48 +00:00
ishell
6ca00aac1a Use FeedbackVectorSlotKind instead of Code::Kind for type feedback vector.
This is a first step towards merging FeedbackVectorSlot and FeedbackVectorICSlot.

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

Cr-Commit-Position: refs/heads/master@{#30964}
2015-09-28 08:23:50 +00:00
mstarzinger
6a20034d24 [presubmit] Fix whitespace/semicolon linter violations.
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30963}
2015-09-28 08:18:49 +00:00
jarin
dac7c95376 [turbofan] Move node verification methods to the Verifier class.
Review URL: https://codereview.chromium.org/1367423002

Cr-Commit-Position: refs/heads/master@{#30962}
2015-09-28 08:15:19 +00:00
mstarzinger
4f55b83012 [heap] No leakage of mark-compact.h outside of heap.
R=hpayer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30961}
2015-09-28 08:04:25 +00:00
Michael Achenbach
1fe1c74a37 remove byte-accounting assert for crbug.com/536163
The change https://codereview.chromium.org/1274453002 is causing a breakage
on the Chrome OS builds. It is not clear how to easily revert because there is
a following on dependent change (https://codereview.chromium.org/1351983002) am
I am not too familiar with the revert process.

The simplest revert is to remove the DCHECK.

BUG=chromium:536163
LOG=n
NOTRY=true
R=machenbach@chromium.org, cmumford@chromium.org, hpayer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30959}
2015-09-28 06:59:04 +00:00
jarin
5b5bde03d8 [turbofan] In GraphReducer::Replace, check uses to not misuse the replacement.
Review URL: https://codereview.chromium.org/1361893006

Cr-Commit-Position: refs/heads/master@{#30958}
2015-09-28 05:37:41 +00:00
bmeurer
09626525fe [es6] Fix invalid ToString in implementation of ToName.
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30957}
2015-09-28 05:34:08 +00:00
bmeurer
1ce206872f [builtins] Fix ToString in Array.prototype.join.
The internal ConvertToString helper was using the wrong ToPrimitive,
actually the old ES5 like DefaultString, and it also prematurely
optimized for no real benefit.

BUG=v8:4307
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30956}
2015-09-28 05:03:42 +00:00