Commit Graph

34059 Commits

Author SHA1 Message Date
mstarzinger
96164b74f1 [deoptimizer] Clear context before NotifyDeoptimized.
This clears the context register by setting it to Smi(0) before calling
the Runtime::kNotifyDeoptimized helper. The deoptimizer must be able to
materialize all heap objects without any context available. The context
itself might be dematerialized.

With this change we make sure that invariant is maintained even without
escape analysis kicking in. We also satisfy the check that the context
register is either Smi(0) or a valid context. It might have been the
special {arguments_marker} in this particular case.

R=bmeurer@chromium.org
BUG=chromium:644245

Review-Url: https://codereview.chromium.org/2320673002
Cr-Commit-Position: refs/heads/master@{#39267}
2016-09-08 09:52:07 +00:00
bmeurer
4ed27fc836 [turbofan] Ensure that all prototypes are stable for push/pop.
When lowering Array.prototype.push/.pop to the fast inlined version, we
first need to ensure that all prototypes (including the Object.prototype)
are stable.

R=mvstanton@chromium.org
BUG=chromium:644689

Review-Url: https://codereview.chromium.org/2319533005
Cr-Commit-Position: refs/heads/master@{#39266}
2016-09-08 08:48:32 +00:00
marija.antic
0ef20b51b2 MIPS: Fix compilation failure for GCC5
BUG=

Review-Url: https://codereview.chromium.org/2304133002
Cr-Commit-Position: refs/heads/master@{#39265}
2016-09-08 07:51:51 +00:00
martyn.capewell
c0637c1f23 Reland of [turbofan] ARM: Implement vswp and use in gap resolver
Reason for revert:
Breaks g++ build.

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}

BUG=

Review-Url: https://codereview.chromium.org/2314043002
Cr-Commit-Position: refs/heads/master@{#39264}
2016-09-08 07:12:17 +00:00
landell
26c5b8fa1e uclibc now has support for backtrace and demangle functions
BUG=

Review-Url: https://codereview.chromium.org/2292973002
Cr-Commit-Position: refs/heads/master@{#39263}
2016-09-08 06:54:45 +00:00
bmeurer
91ed540ee6 [turbofan] Revert "Avoid overflow checks on SpeculativeNumberAdd/Subtract/Multiply."
The optimization is not correct for unsigned output types, and we the
overall complexity seems too high. We need to find a better way to
take into account the input/output type restrictions.

Also added a regression test for the unsigned output bug.

BUG=v8:5267,v8:5270,v8:5357
TBR=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2320013002
Cr-Commit-Position: refs/heads/master@{#39262}
2016-09-08 04:20:31 +00:00
jarin
b4f8a7c900 [turbofan] Ensure monotonicity for induction variable typing.
The trouble here is that the type of the induction variable might be
a bit ahead of the increment (JSAdd) operation's type. When we update
the type of the increment, we might only update the induction variable
type while the JSAdd type might be stale. If the induction variable typing
needs to fall back to normal phi typing (e.g., when the increment is not
an integer anymore), it might use the stale type.

To get around this, we fake monotonicity if we fallback to normal phi
typing. Another option would be to force re-typing of the increment
operation, but that seems to be harder to maintain.

BUG=chromium:644633

Review-Url: https://codereview.chromium.org/2320803002
Cr-Commit-Position: refs/heads/master@{#39261}
2016-09-08 03:51:11 +00:00
littledan
46edbd164d Clean up RegExp comments and test262 status
This patch fixes a bunch of out-of-date TODOs, un-skips some tests
and refers to appropriate bug numbers and current specification
status where appropriate.

R=adamk

Review-Url: https://codereview.chromium.org/2319203002
Cr-Commit-Position: refs/heads/master@{#39260}
2016-09-07 19:40:11 +00:00
franzih
9048298d4c [api] Fix typo.
BUG=

Review-Url: https://codereview.chromium.org/2315413002
Cr-Commit-Position: refs/heads/master@{#39259}
2016-09-07 18:55:40 +00:00
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