Commit Graph

33798 Commits

Author SHA1 Message Date
mstarzinger
0681deb914 [interpreter] Fix destroyed new.target register use.
This fixes a corner-case where the bytecode was using the <new.target>
register directly without going through the local variable. The value
might be clobbered because the deoptimizer doesn't properly restore the
value. The label will causes bytecode pipeline to be flushed and hence
ensure {BytecodeRegisterOptimizer} doesn't reuse <new.target> anymore.

R=rmcilroy@chromium.org
TEST=mjsunit/regress/regress-crbug-645103
BUG=chromium:645103

Review-Url: https://codereview.chromium.org/2325133002
Cr-Commit-Position: refs/heads/master@{#39306}
2016-09-09 12:20:20 +00:00
ulan
6c2a217ef7 Revert of [heap] Fix a formatting bug in --trace-incremental-marking. (patchset #2 id:20001 of https://codereview.chromium.org/2324623004/ )
Reason for revert:
Revert to check if this is causing perf regressions in crbug.com/645411

Original issue's description:
> [heap] Fix a formatting bug in --trace-incremental-marking.
>
> BUG=
>
> Committed: https://crrev.com/212624b7570cd1c1cfad7cf958203b05af961637
> Cr-Commit-Position: refs/heads/master@{#39278}

TBR=mlippautz@chromium.org
# 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/2323293002
Cr-Commit-Position: refs/heads/master@{#39305}
2016-09-09 11:35:52 +00:00
marja
e34dfe04ea Include only stuff you need, part 9: variables.h
TBR=bmeurer@chromium.org
BUG=v8:5294

Review-Url: https://codereview.chromium.org/2324783002
Cr-Commit-Position: refs/heads/master@{#39304}
2016-09-09 10:55:50 +00:00
machenbach
4266d33e76 [gn] Switch noi18n bots to gn
BUG=chromium:474921
NOTRY=true
TBR=jochen@chromium.org

Review-Url: https://codereview.chromium.org/2314423005
Cr-Commit-Position: refs/heads/master@{#39303}
2016-09-09 09:16:00 +00:00
bmeurer
7d4ab7d43e [turbofan] Initial support for polymorphic inlining.
For call sites where the target is not a known constant, but potentially
a list of known constants (i.e. a Phi with all HeapConstant inputs), we
still record the call site as a potential candidate for inlining.
In case the heuristic picks that candidate for inlining, we
expand the call site to a dispatched call site and invoke the
actual inlining logic for all the nested call sites.

Like Crankshaft, we currently allow up to 4 targets for polymorphic inlining,
although we might want to refine that later.

This approach is different from what Crankshaft does in
that we don't duplicate the evaluation of the parameters per polymorphic
case. Instead we first perform the load of the target (which usually
dispatches based on the receiver map), then we evaluate all the
parameters, and then we dispatch again based on the known targets. This
might generate better or worse code compared to what Crankshaft does,
and for the cases where we generate worse code (i.e. because we have
only trivial parameters or no parameters at all), we might want to
investigate optimizing away the double dispatch in the
future.

R=mvstanton@chromium.org
BUG=v8:5267,v8:5365

Review-Url: https://codereview.chromium.org/2325943002
Cr-Commit-Position: refs/heads/master@{#39302}
2016-09-09 08:44:21 +00:00
machenbach
bcc3cb2ea4 [test] Fix the noi18n trybot
This is a work-around as v8_enable_i18n_support=false does
currently not imply icu_use_data_file_flag=false. The
swarming isolator then tries to find the data file also
in builds without ICU.

Making the implication is non-trivial as icu_use_data_file_flag lives
in ICU and v8_enable_i18n_support lives in V8.

BUG=chromium:474921
NOTRY=true
TBR=petermarshall@chromium.org, vogelheim@chromium.org, jochen@chromium.org

Review-Url: https://codereview.chromium.org/2321563007
Cr-Commit-Position: refs/heads/master@{#39301}
2016-09-09 08:23:38 +00:00
marja
751f8e99c9 Move ParseHoistableDeclaration to ParserBase.
BUG=

Review-Url: https://codereview.chromium.org/2311903003
Cr-Commit-Position: refs/heads/master@{#39300}
2016-09-09 07:58:48 +00:00
zhengxing.li
1d2574afe6 X87: [Interpreter] Collect allocation site feedback in call bytecode handler.
port 9a31162d9d3137d09063d6040865655b2e386384(r39283)

  original commit message:
  Adds support to collect allocation site feedback for Array function calls
  to the call bytecode handler.

BUG=

Review-Url: https://codereview.chromium.org/2319123004
Cr-Commit-Position: refs/heads/master@{#39299}
2016-09-09 06:36:13 +00:00
bjaideep
0565291784 PPC/s390: [Interpreter] Collect allocation site feedback in call bytecode handler.
Port 9a31162d9d

Original commit message:

    Adds support to collect allocation site feedback for Array function calls
    to the call bytecode handler.

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

BUG=v8:4280, v8:4780
LOG=N

Review-Url: https://codereview.chromium.org/2319913004
Cr-Commit-Position: refs/heads/master@{#39298}
2016-09-08 21:38:55 +00:00
bgeron
5a4cbaedb1 [turbolizer] Give the HTML file a title, for bookmarks and tab labels.
BUG=

Review-Url: https://codereview.chromium.org/2293483002
Cr-Commit-Position: refs/heads/master@{#39297}
2016-09-08 21:29:01 +00:00
jbroman
4c0ca533e7 Add a missing cast to ValueDeserializer::ReadVarint.
Without this cast, the integer type isn't promoted before being shifted, and so
for types larger than sizeof(int) there is data loss. This will become an issue
once the host begins using this helper to send 64-bit integers.

BUG=chromium:148757

Review-Url: https://codereview.chromium.org/2326653002
Cr-Commit-Position: refs/heads/master@{#39296}
2016-09-08 19:06:09 +00:00
lpy
252b84b0ed [Tracing] Fix runtime call stats tracing for GC.
This patch adds runtime call stats tracing for GC correctly, makes
--runtime-call-stats and tracing mutually exclusive with tracing taking
precedence if both modes are on, and uses only one runtime call stats in
counter.

BUG=v8:5089

Review-Url: https://codereview.chromium.org/2313193002
Cr-Commit-Position: refs/heads/master@{#39295}
2016-09-08 18:57:23 +00:00
adamk
e4273007b6 Properly handle holes following spreads in array literals
Before this change, the spread desugaring would naively call
`%AppendElement($R, the_hole)` and in some cases $R would have
a non-holey elements kind, putting the array into the bad state
of exposing holes to author code.

This patch avoids calling %AppendElement with a hole, instead
simply incrementing $R.length when it sees a hole in the literal
(this is safe because $R is known to be an Array). The existing
logic for elements transitions takes care of giving the array a
holey ElementsKind.

BUG=chromium:644215

Review-Url: https://codereview.chromium.org/2321533003
Cr-Commit-Position: refs/heads/master@{#39294}
2016-09-08 18:50:41 +00:00
cbruni
cd86053fac [printing] Fix DCHECK failure when printing FAST_HOLEY_DOUBLE_ELEMENTS
This CL fixes %DebugPrint for FAST_HOLEY_DOUBLE_ELEMENTS and now properly
distinguishes TheHole and NaN values.

BUG=

Review-Url: https://codereview.chromium.org/2294913004
Cr-Commit-Position: refs/heads/master@{#39293}
2016-09-08 18:31:42 +00:00
cbruni
6faf6c1545 Revert of [runtime] temporarily transform IsContext check from DHECK to CHECK (patchset #2 id:20001 of https://codereview.chromium.org/2164633002/ )
Reason for revert:
There have been no more occurrences of this on dev / beta so we can convert the CHECK back to DCHECK.

Original issue's description:
> [runtime] temporarily transform IsContext check from DCHECK to CHECK
>
> We are enabling this trial on canary to see if we can flush out some missing
> context restores.
>
> BUG=
>
> Committed: https://crrev.com/ec94ad400dc257af396efa3b1899bc3168347d82
> Cr-Commit-Position: refs/heads/master@{#37875}

TBR=jkummerow@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=

Review-Url: https://codereview.chromium.org/2303543003
Cr-Commit-Position: refs/heads/master@{#39292}
2016-09-08 18:28:22 +00:00
caitp
646f1f0a4a [JSON] call replacer function with correct holder in JSON.stringify
BUG=v8:5363
R=adamk@chromium.org, littledan@chromium.org, cbruni@chromium.org

Review-Url: https://codereview.chromium.org/2328523002
Cr-Commit-Position: refs/heads/master@{#39291}
2016-09-08 17:57:56 +00:00
epertoso
f94f2ae20e [turbofan] Introduces another DCHECK in the register allocator.
The previous DCHECK (removed in issue 2316033002) was checking that the new interval strictly overlapped with the first interval.

BUG=

Review-Url: https://codereview.chromium.org/2321113002
Cr-Commit-Position: refs/heads/master@{#39290}
2016-09-08 17:19:43 +00:00
ishell
aec5a80bb7 [stubs] CSA::CopyFixedArrayElements() is now able to convert elements' kind while copying.
Drive-by-fix: the old code never triggered write barrier.
Review-Url: https://codereview.chromium.org/2321993002
Cr-Commit-Position: refs/heads/master@{#39289}
2016-09-08 17:17:35 +00:00
aseemgarg
7b3875d107 [wasm] fix Simd ExtractLane to take immediate instead of param
BUG=v8:4124
TEST:test-run-wasm-simd
R=titzer@chromium.org,bradnelson@chromium.org,gdeepti@chromium.org

Review-Url: https://codereview.chromium.org/2300753005
Cr-Commit-Position: refs/heads/master@{#39288}
2016-09-08 17:16:03 +00:00
ofrobots
20d427a1e2 Revert of Use -fno-delete-null-pointer-checks with gcc builds (patchset #2 id:20001 of https://codereview.chromium.org/2310513002/ )
Reason for revert:
Fails on MIPS: https://build.chromium.org/p/client.v8.ports/builders/V8%20Mips%20-%20builder/builds/3653

Original issue's description:
> Use -fno-delete-null-pointer-checks with gcc builds
>
> R=bmeurer@chromium.org, jochen@chromium.org, machenbach@chromium.org
> BUG=v8:3782
>
> Committed: https://crrev.com/dbefc8ee2e9ee6e41b83f3d09c788c34bc923b43
> Cr-Commit-Position: refs/heads/master@{#39286}

TBR=jochen@chromium.org,bmeurer@chromium.org,machenbach@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3782

Review-Url: https://codereview.chromium.org/2328563002
Cr-Commit-Position: refs/heads/master@{#39287}
2016-09-08 15:56:24 +00:00
ofrobots
dbefc8ee2e Use -fno-delete-null-pointer-checks with gcc builds
R=bmeurer@chromium.org, jochen@chromium.org, machenbach@chromium.org
BUG=v8:3782

Review-Url: https://codereview.chromium.org/2310513002
Cr-Commit-Position: refs/heads/master@{#39286}
2016-09-08 15:49:58 +00:00
machenbach
c90964616e [gn] Switch linux gc stress trybot to gn
Fell through the cracks in a recent CL. Should have switched
with the CI bot, which is on GN already.

BUG=chromium:474921
NOTRY=true

Review-Url: https://codereview.chromium.org/2328533002
Cr-Commit-Position: refs/heads/master@{#39285}
2016-09-08 15:48:23 +00:00
mlippautz
5c3b6ca8d9 [heap] Fix debug check in ShrinkToHighWaterMark
BUG=
R=ulan@chromium.org

Review-Url: https://codereview.chromium.org/2328503002
Cr-Commit-Position: refs/heads/master@{#39284}
2016-09-08 15:06:19 +00:00
mythria
9a31162d9d [Interpreter] Collect allocation site feedback in call bytecode handler.
Adds support to collect allocation site feedback for Array function calls
to the call bytecode handler.

BUG=v8:4280, v8:4780
LOG=N

Review-Url: https://codereview.chromium.org/2307903002
Cr-Commit-Position: refs/heads/master@{#39283}
2016-09-08 14:50:09 +00:00
ahaas
853892a516 [wasm] Do not produce code for br_if if its condition does not validate.
I could not reproduce the bug in either a unittest nor a cctest. That's
why I created an mjsunit test now.

BUG=chromium:644682
R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2319213003
Cr-Commit-Position: refs/heads/master@{#39282}
2016-09-08 14:41:04 +00:00
machenbach
9142671847 [gn] Switch mac asan to gn
BUG=chromium:644643
NOTRY=true

Review-Url: https://codereview.chromium.org/2319583002
Cr-Commit-Position: refs/heads/master@{#39281}
2016-09-08 13:12:11 +00:00
ishell
ff06760b40 [stubs] CSA::LoadFixedDoubleArrayElement() is now able to do a hole check.
Review-Url: https://codereview.chromium.org/2321543003
Cr-Commit-Position: refs/heads/master@{#39280}
2016-09-08 13:03:03 +00:00
franzih
b0a7738a5f [api] Add interceptor for getOwnPropertyDescriptor().
The existing PropertyQueryCallback intercepts getOwnPropertyDescriptor, but
it returns only value and attributes, not the accessors. This
PropertyDescriptorCallback returns a descriptor similar to Ecma-262 6.2.4.

You can either set a PropertyQueryCallback or a PropertyDescriptorCallback,
but not both. When you set a callback for DefineProperty(), you can set a
PropertyDescriptorCallback but not a PropertyQueryCallback.

BUG=v8:5359

Review-Url: https://codereview.chromium.org/2311873002
Cr-Commit-Position: refs/heads/master@{#39279}
2016-09-08 12:51:49 +00:00
ulan
212624b757 [heap] Fix a formatting bug in --trace-incremental-marking.
BUG=

Review-Url: https://codereview.chromium.org/2324623004
Cr-Commit-Position: refs/heads/master@{#39278}
2016-09-08 12:36:34 +00:00
mstarzinger
9d6872cdf1 [deoptimizer] Materialize JSFunction objects without context.
This fixes the materialization of JSFunction objects to not rely on a
context being available. The context has been cleared because it might
be de-materiallized itself.

R=bmeurer@chromium.org
TEST=mjsunit/compiler/escape-analysis-materialize
BUG=chromium:644245

Review-Url: https://codereview.chromium.org/2320983002
Cr-Commit-Position: refs/heads/master@{#39277}
2016-09-08 12:15:50 +00:00
ishell
4ef7e3e7c7 [stubs] Fixing loads/stores from arrays by int32 offsets/indices. Step 3.
Review-Url: https://codereview.chromium.org/2319243002
Cr-Commit-Position: refs/heads/master@{#39276}
2016-09-08 11:59:42 +00:00
rodolph.perfetta
eea147fc2c [ARM] Fix arm assembler test 4.
The test was using some callee saved registers but tests don't save those.

BUG=v8:5354

Review-Url: https://codereview.chromium.org/2322923002
Cr-Commit-Position: refs/heads/master@{#39275}
2016-09-08 11:51:14 +00:00
mstarzinger
517a54286d [deoptimizer] Materialize JSArray objects without context.
This fixes the materialization of JSArray objects to not rely on a
context being available. The context has been cleared because it might
be de-materiallized itself.

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

Review-Url: https://codereview.chromium.org/2323713002
Cr-Commit-Position: refs/heads/master@{#39274}
2016-09-08 11:38:03 +00:00
mlippautz
fdab63f56e [heap] Fixes for heap testing
BUG=chromium:636331
R=ulan@chromium.org

Review-Url: https://codereview.chromium.org/2319683002
Cr-Commit-Position: refs/heads/master@{#39273}
2016-09-08 11:21:19 +00:00
nikolaos
6874978c06 [parser] Refactor of Parse*Statement*, part 3
This patch moves the following parsing methods to ParserBase:

- ParseScopedStatement
- ParseVariableStatement
- ParseDebuggerStatement
- ParseV8Intrinsic

It also cleans up the implementation-specific use counter mechanism.

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

Review-Url: https://codereview.chromium.org/2318263002
Cr-Commit-Position: refs/heads/master@{#39272}
2016-09-08 11:04:24 +00:00
ishell
8295368697 [stubs] Fixing loads/stores from arrays by int32 offsets/indices. Step 2.
Review-Url: https://codereview.chromium.org/2319173002
Cr-Commit-Position: refs/heads/master@{#39271}
2016-09-08 10:57:10 +00:00
mstarzinger
9984d6f689 [deoptimizer] Support materialization of ContextExtension.
This adds support to the deoptimizer to materialize ContextExtension
objects that have been de-materialized by escape analysis. This is
follow-up to the inline allocation of such objects during the create
lowering phase (i.e. JSCreateWithContext and JSCreateCatchContext).

R=bmeurer@chromium.org
TEST=mjsunit/regress/regress-crbug-644245
BUG=chromium:644245

Review-Url: https://codereview.chromium.org/2317353003
Cr-Commit-Position: refs/heads/master@{#39270}
2016-09-08 10:33:20 +00:00
machenbach
45fe9019bf [gn] Switch android bots to gn
Also roll build and android_tools, which contains a bump of
the ndk to r12b.

BUG=chromium:629806

Review-Url: https://codereview.chromium.org/2320843003
Cr-Commit-Position: refs/heads/master@{#39269}
2016-09-08 10:31:10 +00:00
ishell
7dd7d9257b [stubs] Introduce CSA::OptimalParameterMode(), TagParameter() and UntagParameter().
Delete unused CSA::AllocateUninitializedFixedArray() which also does not
respect ParameterMode concept.

Review-Url: https://codereview.chromium.org/2321643002
Cr-Commit-Position: refs/heads/master@{#39268}
2016-09-08 10:04:45 +00:00
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