Commit Graph

33900 Commits

Author SHA1 Message Date
jshin
147c810cc7 Stage Intl.DateTimeFormat.formatToParts
Move it to HARMONY_STAGED bucket

Spec discussion:  https://github.com/tc39/ecma402/issues/30
It's in stage 4 and Firefox has already implemented it.

BUG=v8:5244
TEST=intl/date-format/date-format-to-parts.js
TEST=test262/intl402/DateTimeFormat/prototype/formatToParts/*

Review-Url: https://codereview.chromium.org/2317783003
Cr-Commit-Position: refs/heads/master@{#39258}
2016-09-07 17:17:39 +00:00
adamk
624bc966b3 Super property loads and stores should throw if [[Prototype]] is null
While fixing the bug, removed code duplication from super load/store
runtime calls, and inlined calls of Object::ReadAbsentProperty (left
over from strong mode).

BUG=v8:5335

Review-Url: https://codereview.chromium.org/2311413002
Cr-Commit-Position: refs/heads/master@{#39257}
2016-09-07 17:14:14 +00:00
mstarzinger
279bc5096b [deoptimizer] Support virtual context in interpreted frame.
This adds support for dematerialized context values as part of an
interpreted frame (similar to an FCG frame). Both frame translations
should be kept in sync as much as possible.

R=rmcilroy@chromium.org
BUG=chromium:644728

Review-Url: https://codereview.chromium.org/2313343002
Cr-Commit-Position: refs/heads/master@{#39256}
2016-09-07 16:02:13 +00:00
machenbach
86f119b85d [gn] Turn off lsan on mac asan
Chromium doesn't support lsan with mac's current toolchain.

BUG=chromium:644643
NOTRY=true

Review-Url: https://codereview.chromium.org/2322493002
Cr-Commit-Position: refs/heads/master@{#39255}
2016-09-07 15:30:30 +00:00
jbroman
ef94aab22f ValueSerializer: Take advantage of fast elements in dense array serialization.
This yields a ~5% serialization time improvement on typical JSON-esque data.
The approach taken matches json-stringifier fairly closely.

BUG=chromium:148757

Review-Url: https://codereview.chromium.org/2311063004
Cr-Commit-Position: refs/heads/master@{#39254}
2016-09-07 15:23:33 +00:00
bjaideep
b7625e70dc PPC64: disable regress/regress-353551 due to stack overflow
Testcase regress/regress-353551 fails with stack overflow error on
ppc64, increasing stack-size to 1100 resolves the issue, but will
cause other platforms to fail similar to
https://codereview.chromium.org/2072533002.
For now, disabling the testcase on ppc64.

R=machenbach@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2314343002
Cr-Commit-Position: refs/heads/master@{#39253}
2016-09-07 14:24:35 +00:00
bjaideep
9908c589de PPC [heap]: Increase size of the compiled source object
On PPC the testcase CodeSerializerLargeCodeObject fails as
the object gets allocated in the code_space section of
the heap. This is because the code_space gets expanded
successfully to 1 page size (4MB on PPC) and can accommodate
the object (size=3784608 bytes). Increasing size of the compiled
source to (5096192 bytes) so that code_space is not expanded and
the space is allocated in the Large Object space of the heap.
Testcase was added as part of https://codereview.chromium.org/2226233002

R=mstarzinger@chromium.org, bmeurer@chromium.org

BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2314843003
Cr-Commit-Position: refs/heads/master@{#39252}
2016-09-07 14:17:00 +00:00
nikolaos
dfd03bbd20 [parser] Refactor of Parse*Statement*, part 2
This patch moves the following parsing methods to ParserBase:

- ParseBlock

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

Review-Url: https://codereview.chromium.org/2312263002
Cr-Commit-Position: refs/heads/master@{#39251}
2016-09-07 13:32:24 +00:00
ulan
371c7a388f [heap] Add histogram counters to track GC reasons.
BUG=chromium:644713
LOG=NO

Review-Url: https://codereview.chromium.org/2322453002
Cr-Commit-Position: refs/heads/master@{#39250}
2016-09-07 13:30:55 +00:00
Alexander.Gilday2
5e6a1abf54 [builtins] Create StringToNumber helper.
Move StringToNumber builtin implementation to helper function in
CodeStubAssembler.

BUG=

Review-Url: https://codereview.chromium.org/2293943002
Cr-Commit-Position: refs/heads/master@{#39249}
2016-09-07 13:20:27 +00:00
epertoso
65128ab230 [turbofan] Add liveness analysis to the BytecodeGraphBuilder.
This is analogous to the variable liveness analysis we do in the AstGraphBuilder, but on the bytecode registers.

BUG=

Review-Url: https://codereview.chromium.org/2307863002
Cr-Commit-Position: refs/heads/master@{#39248}
2016-09-07 13:00:28 +00:00
ishell
c20e02e34a [stubs] Turn CSA::FillFixedArrayWithHole() to CSA::FillFixedArrayWithValue().
Review-Url: https://codereview.chromium.org/2319563002
Cr-Commit-Position: refs/heads/master@{#39247}
2016-09-07 12:58:11 +00:00
georgia.kouveli
fdb0f07887 [arm64] Use CMN for cmp(a,sub(0,b)) only when checking equality/inequality.
We were previously incorrectly changing:
  sub r0, 0, r1
  cmp r2, r0
  b.cond <addr>
to:
  cmn r2, r1
  b.cond <addr>

for all conditions. This is incorrect for conditions involving the C (carry)
and V (overflow) flags, and in particular in the case where r1 = INT_MIN.
The optimization is still safe to perform for Equal and NotEqual since they
do not depend on the C and V flags.

BUG=

Review-Url: https://codereview.chromium.org/2318043002
Cr-Commit-Position: refs/heads/master@{#39246}
2016-09-07 12:43:00 +00:00
machenbach
860f6527d4 [build] Fix mac asan dependencies
Remove dynamic libraries that are automatically included.

BUG=chromium:644643
NOTRY=true

Review-Url: https://codereview.chromium.org/2219423002
Cr-Commit-Position: refs/heads/master@{#39245}
2016-09-07 12:21:37 +00:00
mstarzinger
8d1ec9b1f5 [compiler] Stop delegating CompilationInfo::context.
This implements the CompilationInfo::context explicitly instead of
delegating to the underlying ParseInfo. This is in preparation for
ParseInfo not having to store the context at all soon.

R=jochen@chromium.org

Review-Url: https://codereview.chromium.org/2316083002
Cr-Commit-Position: refs/heads/master@{#39244}
2016-09-07 12:03:14 +00:00
jochen
ce3f46b172 Chain ScopeInfos together
This will allow getting the entire scope chain from a SharedFunctionInfo
which in turn will allow for generating bytecode when we just have the
SFI

R=verwaest@chromium.org,marja@chromium.org
BUG=v8:5215

Review-Url: https://codereview.chromium.org/2271993002
Cr-Commit-Position: refs/heads/master@{#39243}
2016-09-07 10:54:22 +00:00
bmeurer
7ac19fe598 [builtins] Migrate Number predicates and make them optimizable.
Migrate the isNaN, isFinite, Number.isFinite, Number.isInteger,
Number.isSafeInteger and Number.isNaN predicates to TurboFan
builtins and make them optimizable (for certain input types) in
JavaScript callees being optimized by TurboFan. That means both
the baseline and the optimized version is now always at maximum,
consistent performance. Especially TurboFan suffered from poor
baseline (and optimized) performance because it cannot play the
same weird tricks that Crankshaft plays for %_IsSmi.

This also adds a bunch of new tests to properly cover the use
of the Harmony predicates in optimized code.

R=franzih@chromium.org
BUG=v8:5049,v8:5267

Review-Url: https://codereview.chromium.org/2313073002
Cr-Commit-Position: refs/heads/master@{#39242}
2016-09-07 10:14:40 +00:00
ishell
d06495b190 [turbofan] Add support for tail-calling a runtime function with 6 arguments.
Review-Url: https://codereview.chromium.org/2317823002
Cr-Commit-Position: refs/heads/master@{#39241}
2016-09-07 10:13:10 +00:00
heimbuef
00fbef8961 Deactivate non functioning test
BUG=v8:5358

Review-Url: https://codereview.chromium.org/2316973002
Cr-Commit-Position: refs/heads/master@{#39240}
2016-09-07 10:06:57 +00:00
ulan
1b26611ce9 [heap] Introduce enum of garbage collection reasons.
Now callers of Heap::CollectGarbage* functions need to
specify the reason as an enum value instead of a string.

Subsequent CL will add stats counter for GC reason.

BUG=

Review-Url: https://codereview.chromium.org/2310143002
Cr-Commit-Position: refs/heads/master@{#39239}
2016-09-07 10:03:08 +00:00
epertoso
cab765fe50 [turbofan] Remove a DCHECK from the register allocator.
The assumption that held when this DCHECK was introduced are no longer valid. Furthermore, the code below it seems to merge two non-overlapping intervals anyway.

Review-Url: https://codereview.chromium.org/2316033002
Cr-Commit-Position: refs/heads/master@{#39238}
2016-09-07 10:02:20 +00:00
mlippautz
79faa52823 Reland of "[heap] Switch to 500k pages"
This reverts commit 332bd5e94c.

BUG=chromium:636331
R=ulan@chromium.org

Review-Url: https://codereview.chromium.org/2313243002
Cr-Commit-Position: refs/heads/master@{#39237}
2016-09-07 09:43:33 +00:00
jochen
1ccb832da7 Comment about why we don't record evals from inner scopes in the script scope
R=marja@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2318953003
Cr-Commit-Position: refs/heads/master@{#39236}
2016-09-07 09:42:43 +00:00
mlippautz
3b7bc9f013 [heap] Test fixes
Various test fixes for issues that get flushed out with smaller pages.

BUG=chromium:636331
R=ulan@chromium.org

Review-Url: https://codereview.chromium.org/2313273002
Cr-Commit-Position: refs/heads/master@{#39235}
2016-09-07 09:22:00 +00:00
mythria
119f311245 [Interpreter] Enable allocation site mementos in CreateArrayLiterals.
In ignition, allocation site mementos were disabled when creating array
literals. Enabled them in this cl.

BUG=v8:4280
LOG=N

Review-Url: https://codereview.chromium.org/2294913006
Cr-Commit-Position: refs/heads/master@{#39234}
2016-09-07 09:06:17 +00:00
marja
8ee581af4b Move sloppy block function hoisting logic from Parser to Scope.
This moves scope-related logic (such as looking up variables) to Scope
where it belongs, and enables PreParser to do more Scope-related
operations in the future.

BUG=

Review-Url: https://codereview.chromium.org/2301183003
Cr-Commit-Position: refs/heads/master@{#39233}
2016-09-07 08:48:32 +00:00
jochen
b11cf2e5b1 Don't record that eval calls in inner scopes in script scopes
When we parse the top-level lazily, we don't get to see eval calls in
inner scopes anyway. By never recording them, we make sure that the
script scope ends up looking the same, no matter how we parsed it.

BUG=v8:5215
R=marja@chromium.org,adamk@chromium.org

Review-Url: https://codereview.chromium.org/2312903003
Cr-Commit-Position: refs/heads/master@{#39232}
2016-09-07 08:30:20 +00:00
mstarzinger
8a1747d08c Revert of Remove --ignition-staging to --ignition-osr implication. (patchset #1 id:1 of https://codereview.chromium.org/2298613003/ )
Reason for revert:
Re-enable to get new data after recent changes.

Original issue's description:
> Remove --ignition-staging to --ignition-osr implication.
>
> Ignition OSR to turbofan seems to cause instruction selector crashes
> (where instructions selector gets simplified operators, probably
> because we break the effect chain somehow).
>
> BUG=chromium:641893
>
> Committed: https://crrev.com/26df3e230ebd8c7d1cd95ea54155959eee7cb830
> Cr-Commit-Position: refs/heads/master@{#39045}

TBR=bmeurer@chromium.org,jarin@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=chromium:641893

Review-Url: https://codereview.chromium.org/2318943002
Cr-Commit-Position: refs/heads/master@{#39231}
2016-09-07 08:02:53 +00:00
lpy
7a38b927c8 Reland - Allow lexically declared "arguments" in function scope in sloppy mode.
Lexically declared "arguments" in sloppy mode will throw redeclaration error
currently, this patch fixes it by delaying the declaration of arguments until we
fully parse parameter list and function body.

BUG=v8:4577
LOG=N

Committed: https://crrev.com/70a613dd0a5f5d205b46559b55702764464851fa
Review-Url: https://codereview.chromium.org/2290753003
Cr-Original-Commit-Position: refs/heads/master@{#39109}
Cr-Commit-Position: refs/heads/master@{#39230}
2016-09-07 06:54:54 +00:00
machenbach
332bd5e94c Revert of [heap] Switch to 500k pages (patchset #5 id:80001 of https://codereview.chromium.org/2314803002/ )
Reason for revert:
Breaks arm64 nosnap debug:
https://build.chromium.org/p/client.v8.ports/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20nosnap%20-%20debug/builds/2178

Original issue's description:
> [heap] Switch to 500k pages
>
> BUG=chromium:636331
> R=ulan@chromium.org
>
> Committed: https://crrev.com/4b618dbf8ec7f0edf377b54b48bf3c852d5e235a
> Cr-Commit-Position: refs/heads/master@{#39220}

TBR=ulan@chromium.org,mlippautz@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:636331

Review-Url: https://codereview.chromium.org/2312853005
Cr-Commit-Position: refs/heads/master@{#39229}
2016-09-07 06:32:23 +00:00
shiyu.zhang
3b083983d0 [turbofan] Instruction scheduler: keep ready nodes with same latency sorted in original order.
This is a complement to
https://codereview.chromium.org/2281523002.

The patch above reversed the order of nodes with same
latency, which caused bench_copy.js 4% regression and
bench_skinning.js 5% regression on Atom when enabling
'--turbo-instruction-scheduling' flag according to our
observation.

We submit this patch to sort the nodes with same latency
in original order. It aligns with instruction scheduling
logic before the patch above and fixes these regression.

BUG=

Review-Url: https://codereview.chromium.org/2284373002
Cr-Commit-Position: refs/heads/master@{#39228}
2016-09-07 02:12:23 +00:00
adamk
30b4b82b9c Remove unused function_name param from DesugarAsyncFunctionBody
R=littledan@chromium.org

Review-Url: https://codereview.chromium.org/2302183002
Cr-Commit-Position: refs/heads/master@{#39227}
2016-09-07 00:59:58 +00:00
dgozman
81b7e77ff0 [inspector] Build inspector under v8_enable_inspector build flag.
- inspector becomes a dependency of v8_base;
- generated public protocol files are placed to gen/v8/include/inspector/<Domain.h>;
- added v8_enable_inspector_override to be used in embedders (gn only);
- combined public headers into v8-inspector.h and v8-inspector-protocol.h.

BUG=chromium:635948

Review-Url: https://codereview.chromium.org/2292053003
Cr-Commit-Position: refs/heads/master@{#39226}
2016-09-06 23:26:35 +00:00
jshin
a3db819c9e Add support for DateTimeFormat.formatToParts
Spec discussion:  https://github.com/tc39/ecma402/issues/30

It's in stage 4 and Firefox has already implemented it.

For now, it's added to HARMONY_IN_PROGRESS bucket behind
'--datetime-format-to-parts' flag.

BUG=v8:5244
TEST=intl/date-format/date-format-to-parts.js
TEST=test262/intl402/DateTimeFormat/prototype/formatToParts/*

Review-Url: https://codereview.chromium.org/2273953003
Cr-Commit-Position: refs/heads/master@{#39225}
2016-09-06 22:57:11 +00:00
jarin
01cc19fa6f [turbofan] Handle word32 truncation in word32->tagged representation change.
Similarly to the word32->float64 case, we interpret word32 as uint32 if
the value is word32 truncated. This is fine because the users declared
they only care about mod 2^32 of the value (that's what word32
truncation means).

This CL also removes the ad-hoc handling of this situation
(https://codereview.chromium.org/2311903002).

BUG=chromium:644048

Review-Url: https://codereview.chromium.org/2312003005
Cr-Commit-Position: refs/heads/master@{#39224}
2016-09-06 20:58:29 +00:00
jarin
595be2dbe7 [turbofan] Tests for simplified lowering of unsigned min/max (it did not have code coverage).
Review-Url: https://codereview.chromium.org/2305523004
Cr-Commit-Position: refs/heads/master@{#39223}
2016-09-06 20:08:24 +00:00
bakkot
2aab10f5b3 [parser] Simplify parse-time function name inference for properties
Move the code to perform function name inference for properties into
parsing the properties themselves, instead of the containing object.

This allows us to avoid unnecessary calls when parsing shorthand
properties and methods and simplifies the logic in the remaining cases.

Also fixes an edge case bug: inferring the name of the getter in
`class { static get constructor(){} }`.

Review-Url: https://codereview.chromium.org/2313723005
Cr-Commit-Position: refs/heads/master@{#39222}
2016-09-06 18:49:49 +00:00
jbroman
11f74547f8 Take advantage of fast properties in ValueSerializer when JSObject has them.
This yields a ~20% serialization time improvement on typical JSON-esque data.

BUG=chromium:148757

Review-Url: https://codereview.chromium.org/2304563004
Cr-Commit-Position: refs/heads/master@{#39221}
2016-09-06 18:05:53 +00:00
mlippautz
4b618dbf8e [heap] Switch to 500k pages
BUG=chromium:636331
R=ulan@chromium.org

Review-Url: https://codereview.chromium.org/2314803002
Cr-Commit-Position: refs/heads/master@{#39220}
2016-09-06 17:55:36 +00:00
bakkot
7bc200c767 Split the AST representation of class properties from object properties.
This introduces ClassLiteralProperty and a supertype LiteralProperty of
it and ObjectLiteralProperty. It also splits the parsing of the two.
This substiantially clarifies some logic, especially as classes
continue to evolve, and is also about a 2% performance improvement to
parsing either kind of property (since no work is wasted on logic
only necessary for the other kind). Also, it saves a word on
ObjectLiteralProperties.

Review-Url: https://codereview.chromium.org/2302643002
Cr-Commit-Position: refs/heads/master@{#39219}
2016-09-06 17:43:51 +00:00
franzih
2b13976820 [api] Rename parameter for consistency.
BUG=

Review-Url: https://codereview.chromium.org/2311913002
Cr-Commit-Position: refs/heads/master@{#39218}
2016-09-06 16:35:53 +00:00
jkummerow
71dfcbacc2 [stubs] Consolidate TryToName implementation
This extends TryToName by HeapNumber-to-intptr support and cached array
index retrieval from non-internalized strings, and uses it in the
KeyedLoadIC_Generic stub.

Bonus: avoid needless movsxlq on x64 in LoadFixed{,Double}ArrayElement
helpers by introducing INTPTR_PARAMETER mode.

Review-Url: https://codereview.chromium.org/2277363002
Cr-Commit-Position: refs/heads/master@{#39217}
2016-09-06 16:18:12 +00:00
leszeks
b28b7e1328 [Interpreter] Remove constant pool type in tests
For historical reasons, the interpreter's bytecode expectations tests
required a type for the constant pool. This had two disadvantages:

 1. Strings and numbers were not visible in mixed pools, and
 2. Mismatches of pool types (e.g. when rebaselining) would cause parser
    errors

This removes the pool types, making everything 'mixed', but appending
the values to string and number valued constants. Specifying a pool type
in the *.golden header now prints a warning (for backwards compatibility).

BUG=v8:5350

Review-Url: https://codereview.chromium.org/2310103002
Cr-Commit-Position: refs/heads/master@{#39216}
2016-09-06 16:11:23 +00:00
franzih
ca6c87341f [api] Improve documentation for PropertyDeleterCallback.
BUG=v8:5260

Review-Url: https://codereview.chromium.org/2312863003
Cr-Commit-Position: refs/heads/master@{#39215}
2016-09-06 15:54:00 +00:00
fmeawad
5dd940082b [RuntimeCallStats] Fix reset scope for tracing
https://codereview.chromium.org/2296243002/ introduced 2 minor bugs
related to the Reset scope.

The tracing version requires that we reset the counters everytime we
start a new top level trace event, unless the top level one is not
really a top level (i.e. has the right type but called in a nested way)

Bugs are:
1- Reseting was guarded behind a check for the runtime call stats
version only.
2- We never set that we are already inside a scope, so the nested
case would fail as well.

R=lpy@chromium.org, cbruni@chromium.org
BUG=642373

Review-Url: https://codereview.chromium.org/2311033002
Cr-Commit-Position: refs/heads/master@{#39214}
2016-09-06 15:48:30 +00:00
ulan
eca8a5ebbd [heap] Refactor incremental marking step.
This patch
- extracts the logic of keeping track of allocated bytes
  from the actual incremental marking step.
- replaces OldSpaceStep with a check for incremental marking start.
- removes the force_marking parameter of AdvanceIncrementalMarking.

BUG=chromium:616434
LOG=NO

Review-Url: https://codereview.chromium.org/2304123003
Cr-Commit-Position: refs/heads/master@{#39213}
2016-09-06 15:29:23 +00:00
mlippautz
1ea41a466c KeyedLookupCache and DescriptorLookupCache -> lookup-cache{-inl.h,.cc,.h}
R=verwaest@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2316503004
Cr-Commit-Position: refs/heads/master@{#39212}
2016-09-06 14:57:56 +00:00
mlippautz
2e3165029d [heap] Removes spaces.h include from heap.h
Together with the presubmit rule of prohibiting src/heap/* includes except for
heap.h this now properly hides all heap internals.

R=ulan@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2314783002
Cr-Commit-Position: refs/heads/master@{#39211}
2016-09-06 14:35:06 +00:00
machenbach
7e60d08d73 Revert of [turbofan] ARM: Implement vswp and use in gap resolver (patchset #2 id:20001 of https://codereview.chromium.org/2313803003/ )
Reason for revert:
Breaks arm compilation:
https://build.chromium.org/p/client.v8.ports/builders/V8%20Arm%20-%20builder/builds/3549

Original issue's description:
> [turbofan] ARM: Implement vswp and use in gap resolver
>
> Use vswp to switch double-precision registers in the gap resolver, with fall
> back temp register-based code if NEON is not available.
>
> BUG=
>
> Committed: https://crrev.com/2837c2e65a2ee5b9fc610f30ce1215f52323ecbd
> Cr-Commit-Position: refs/heads/master@{#39209}

TBR=bmeurer@chromium.org,epertoso@chromium.org,martyn.capewell@arm.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review-Url: https://codereview.chromium.org/2314003003
Cr-Commit-Position: refs/heads/master@{#39210}
2016-09-06 14:23:26 +00:00
martyn.capewell
2837c2e65a [turbofan] ARM: Implement vswp and use in gap resolver
Use vswp to switch double-precision registers in the gap resolver, with fall
back temp register-based code if NEON is not available.

BUG=

Review-Url: https://codereview.chromium.org/2313803003
Cr-Commit-Position: refs/heads/master@{#39209}
2016-09-06 14:07:09 +00:00