Commit Graph

26145 Commits

Author SHA1 Message Date
mstarzinger
747ff0ebf8 [turbofan] Add unit tests for ReduceJSCreateArguments.
R=jarin@chromium.org
TEST=unittests/JSTypedLoweringTest.JSCreateArguments

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

Cr-Commit-Position: refs/heads/master@{#31653}
2015-10-29 13:37:49 +00:00
mstarzinger
d3c4adfd78 [turbofan] Fix and rework deopt in call to super property.
This refactors the handling of calls of type Call::PROPERTY_CALL to
super properties in AstGraphBuilder::VisitCall. It ensures that the
operand stack is kept in sync with full-codegen so that deopts while
evaluating sub-expressions behave as expected.

R=rossberg@chromium.org
TEST=mjsunit/regress/regress-4521
BUG=v8:4521
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31652}
2015-10-29 12:32:49 +00:00
oth
dcf757a16f [Interpreter] Add support for for..in.
For..in introduces 3 new bytecodes ForInPrepare, ForInNext, and
ForInDone to start a for..in loop, get the next element, and check if
the loop is done.

For..in builds upon new LoopBuilder constructs for conditionally
breaking and continuing during iteration: BreakIf{Null|Undefined}
and ContinueIf{Null|Undefined}. New conditional jump bytecodes
support this succinctly: JumpIfNull and JumpIfUndefined.

Add missing check to BytecodeLabel that could allow multiple
forward referencess to the same label which is not supported.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31651}
2015-10-29 12:06:24 +00:00
rmcilroy
76d730b9b2 [Interpreter] Ensure we save the BytecodeArray register properly in InterpreterEntryTrampoline builtin.
Ensure that we save the BytecodeArray register in the InterpreterEntryTrampoline
before calling out to the kStackGuard runtime function.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31650}
2015-10-29 11:47:31 +00:00
hpayer
ce84bb2d3d [heap] Add histogram timers for incremental marking start and finalization event.
Review URL: https://codereview.chromium.org/1431443002

Cr-Commit-Position: refs/heads/master@{#31649}
2015-10-29 11:46:20 +00:00
hpayer
f555708c5e Revert of [heap] Decrease incremental marking finalization retry limit. (patchset #1 id:1 of https://codereview.chromium.org/1408183006/ )
Reason for revert:
crashes on webkit_unit_tests V8-Blink Linux 32

Original issue's description:
> [heap] Decrease incremental marking finalization retry limit.
>
> BUG=chromium:548562
> LOG=n
>
> Committed: https://crrev.com/c689f5759b46506c38c84f404ebd8dc326dcb76f
> Cr-Commit-Position: refs/heads/master@{#31647}

TBR=ulan@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:548562

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

Cr-Commit-Position: refs/heads/master@{#31648}
2015-10-29 11:45:11 +00:00
hpayer
c689f5759b [heap] Decrease incremental marking finalization retry limit.
BUG=chromium:548562
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31647}
2015-10-29 09:42:40 +00:00
mstarzinger
26fc85aae3 [turbofan] Cleanup RawMachineAssembler::Store interface.
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31646}
2015-10-29 09:22:25 +00:00
bmeurer
a0b8650e65 [turbofan] Initial support for transitioning stores.
Add support for stores that transition to writable data fields,
based on the BeginRegion/FinishRegion mechanism for atomic regions
in the scheduler.

This is early work and still a bit rough around the edges, and similar
to regular stores, we don't support transitioning stores to double
fields yet.

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

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

Cr-Commit-Position: refs/heads/master@{#31645}
2015-10-29 09:06:25 +00:00
adamk
40f43c91a5 Inline single test-only call of Scope::LookupThis method
R=littledan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31644}
2015-10-29 06:39:51 +00:00
yangguo
6812883494 Introduce string/regexp related public symbols.
R=littledan@chromium.org
BUG=v8:4305, v8:4343, v8:4344, v8:4345
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31643}
2015-10-29 05:24:55 +00:00
bmeurer
e933b091df [runtime] Refactor Object::Equals to make exception cases explicit.
R=littledan@chromium.org
BUG=v8:3593
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31642}
2015-10-29 04:41:22 +00:00
littledan
7736f47460 Stage ES2015 ToLength semantics
Many places in the JavaScript standard library are changed in ES2015 from
getting an integer using ToUint32 to using ToLength. This patch stages
the flag turning on those new semantics.

BUG=v8:3087,v8:4244
LOG=Y
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#31641}
2015-10-28 21:15:01 +00:00
littledan
700bbdc673 Avoid calling %AddElement with a number out of array index range
This patch wraps callsites to %AddElement to fall back to adding a
named property in case it is given an argument of 2**32 or greater.
The change is needed because %AddElement is called by Array functions
in various places, and ES2015 changes these Array functions to use
ToLength rather than ToUint32, so several callsites of %AddElement
which used to be reliable array indices may be larger numbers. While
the proper long-term solution may be to call out to
Object.defineProperty, this fix should allow the ToLength semantics
to be shipped while preserving correctness and not requiring a
rewrite.

BUG=v8:4516
LOG=Y
R=adamk
TEST=Interactively ran Array.prototype.slice on an Array-like which
exceeded array bounds, and found that this did not check-fail at
runtime as it did before.
Microbenchmarked this technique against the previous version on a
simple reverse implementation and found at most a 1% slowdown, as
opposed to other techniques, like calling %DefineDataPropertyUnchecked,
which had a 20% slowdown or Object.defineProperty with a 80% slowdown.

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

Cr-Commit-Position: refs/heads/master@{#31640}
2015-10-28 20:37:15 +00:00
hpayer
1243ce0bb5 [heap] Clean-up incrementally finalize marking.
Review URL: https://codereview.chromium.org/1424233002

Cr-Commit-Position: refs/heads/master@{#31639}
2015-10-28 18:27:53 +00:00
dusan.m.milosavljevic
4cd3c16967 MIPS64: Fix missing DIVU,MODU,MULU,MUHU r6 instructions in simulator.
TEST=cctest/test-run-machops/RunUint32MulHighP,RunUint32DivP
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31638}
2015-10-28 17:32:26 +00:00
jkummerow
406f557721 API: Let v8::Object::DefineOwnProperty use new C++ implementation
Now that we have a C++ implementation, calling into JS builtins is needlessly inefficient.

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

Cr-Commit-Position: refs/heads/master@{#31637}
2015-10-28 16:49:17 +00:00
adamk
720c531a70 Remove --harmony-new-target flag
It was shipped in M46 without incident.

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

Cr-Commit-Position: refs/heads/master@{#31636}
2015-10-28 16:47:08 +00:00
adamk
a4689fc21f Remove flags for spread calls and arrays
These features shipped in M46 without issue.

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

Cr-Commit-Position: refs/heads/master@{#31635}
2015-10-28 15:57:27 +00:00
mstarzinger
161a0462fb [turbofan] Enable general purpose inlining.
R=bmeurer@chromium.org,hablich@chromium.org
BUG=v8:4493
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31634}
2015-10-28 15:43:33 +00:00
mbrandy
2bd5914bc3 Fix external callback logging in profiler.
For platforms that use function descriptors (currently AIX and
PPC64BE), log an external callback's entrypoint address rather than
its function descriptor address.  This allows proper lookup in the
tick processor's symbol table.

R=jkummerow@chromium.org, michael_dawson@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31633}
2015-10-28 13:42:40 +00:00
mstarzinger
9ada38b4c6 Remove obsolete src/v8.h include from compiler cctests.
R=jochen@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31632}
2015-10-28 13:32:30 +00:00
bmeurer
23ac686ff8 [types] Use the TypeCache consistently for common types.
Rename ZoneTypeCache to TypeCache and use a single shared (immutable)
instance consistently to cache the most commonly used types. Also serves
as a chokepoint for defining those types, so we don't repeat the
definition (and possible bugs) in various places.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31631}
2015-10-28 13:31:22 +00:00
mstarzinger
4a2bb8903b Remove deprecated API usage from compiler cctests.
R=jochen@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31630}
2015-10-28 13:09:55 +00:00
akos.palfi
8eabcb3fb6 Fix debug mode test failures on MIPS and PPC after f1aa5562.
TEST=cctest/test-gap-resolver/FuzzResolver,unittests/MoveOptimizerTest.RemovesRedundantExplicit
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31629}
2015-10-28 13:04:43 +00:00
vogelheim
bf81c494a4 Remove deprecated API usage from test-accessors.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31628}
2015-10-28 12:32:13 +00:00
hpayer
6074b32608 [heap] Convert overapproximate weak closure phase into finalize incremental marking phase and revisit the root set there.
BUG=chromium:548562
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31627}
2015-10-28 12:05:58 +00:00
bmeurer
526e41122a [turbofan] The upper bound for JSArray::length is max uint32.
R=jarin@chromium.org
BUG=v8:4470
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31626}
2015-10-28 11:54:45 +00:00
zhengxing.li
4e00456471 X87: Fix the sqrt precision issue.
In order to resolve the sqrt precision issue described in https://codereview.chromium.org/1425763002/.
  we change the implementation of CreateSqrtFunction() implementation of X87 so that the optimize compiler
  and full-compiler implementation are unified.

R=weiliang.lin@intel.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31625}
2015-10-28 11:34:38 +00:00
yangguo
200315cb26 Make AstRawString deduplication encoding-agnostic.
R=jkummerow@chromium.org
BUG=v8:4450
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31624}
2015-10-28 11:28:55 +00:00
bmeurer
22b9ec0bcd [turbofan] Improve deferred code handling for polymorphic property access.
Only mark the last fallthrough control as deferred, otherwise the
splintering will ruin the code generation for the (maybe likely)
polymorphic cases.

Drive-by-fix: Reduce overall code duplication between JSLoadNamed
and JSStoreNamed specialization.

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

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

Cr-Commit-Position: refs/heads/master@{#31623}
2015-10-28 11:01:17 +00:00
yangguo
8da26dd6df Remove obsolete field in RelocInfo.
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31622}
2015-10-28 10:23:58 +00:00
jacob.bramley
2f80165f22 [arm64] Implement Float(32|64)(Min|Max) using fcsel.
Float(32|64)Min:
  // (a < b) ? a : b
  fcmp da, db
  fcsel dd, da, db, lo

Float(32|64)Max:
  // (b < a) ? a : b
  fcmp db, da
  fcsel dd, da, db, lo

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31621}
2015-10-28 09:55:12 +00:00
mythria
95e26ec423 [Interpreter] Adds delete operator to interpreter.
Adds support for delete operator, it's implementation and tests.

Adds tests for the following unary operators
  -BitwiseNot
  -Add
  -Sub

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31620}
2015-10-28 09:49:54 +00:00
mstarzinger
d1f773026c [turbofan] Lower mapped arguments objects in inline frame.
This lowers JSCreateArguments nodes within inline (i.e. non-outermost)
frames that create "mapped arguments objects" to inline allocations.

The arguments count as well as each value is statically known and can be
directly stored into the arguments object. Note that the object is still
context-dependent and the map is loaded from the current context. The
object size is not taken into account for now, we might want to limit it
later though to keep code size bounded.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31619}
2015-10-28 09:31:44 +00:00
bmeurer
1d0b7bd28a [turbofan] Optimize JSConvertReceiver if we know something about the receiver.
Typed lowering can lower JSConvertReceiver either based on the operator
hints or the (statically) known receiver type.

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

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

Cr-Commit-Position: refs/heads/master@{#31618}
2015-10-28 09:03:55 +00:00
bmeurer
dfedad42ab [turbofan] Add Mircea Trofin as owner for the register allocator.
Review URL: https://codereview.chromium.org/1423663008

Cr-Commit-Position: refs/heads/master@{#31617}
2015-10-28 05:43:05 +00:00
jing.bao
44f415659d Add trace_wasm_decode_time flag
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31616}
2015-10-28 05:41:23 +00:00
v8-autoroll
06f223fa67 Update V8 DEPS.
Rolling v8/third_party/android_tools to 54492f99c84cab0826a8e656efeb33a1b1bf5a04

TBR=machenbach@chromium.org,vogelheim@chromium.org,hablich@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31615}
2015-10-28 03:24:26 +00:00
littledan
b436635ac4 Update to ES2015 == semantics for Symbol/SIMD wrappers
When == is invoked on a Symbol or SIMD vector and an object, the object should
be converted to a primitive with ToPrimitive and then compared again. This means,
for example, that for a Symbol or SIMD vector s, s == Object(s). This patch makes
that change in the implementation of ==. Only the runtime function needed to be
changed, as the code stubs and compiler specializations don't operate on Symbols
or SIMD vectors, and on these types, a fallback to the runtime function is always
used.

BUG=v8:3593
LOG=Y
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#31614}
2015-10-27 20:20:24 +00:00
mstarzinger
f8465b45f7 [turbofan] Fix OSR-ed callee trigged ty do-expressions.
This fixes a missing SSA-renaming of the callee value used in the frame
state of a call node. An OSR-entry within do-expressions contained in
one of the argument expression can trigger that renaming.

R=rossberg@chromium.org
TEST=mjsunit/regress/regress-crbug-546968
BUG=chromium:546968
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31613}
2015-10-27 17:21:10 +00:00
machenbach
fd0ee28048 [swarming] Isolate custom libcxx.
BUG=chromium:535160
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31612}
2015-10-27 17:09:31 +00:00
fedor
8d6a228819 [heap] fix crash during the scavenge of ArrayBuffer
Scavenger should not attempt to visit ArrayBuffer's storage, it is a
user-supplied pointer that may have any alignment. Visiting it, may
result in a crash.

BUG=
R=jochen

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

Cr-Commit-Position: refs/heads/master@{#31611}
2015-10-27 16:34:55 +00:00
littledan
8adb1c4705 Reland of Check that array length stays a safe integer in Array.prototype.push (patchset #1 id:1 of https://codereview.chromium.org/1418093007/ )
Reason for revert:
The test failure was unrelated; relanding.

Original issue's description:
> Revert of Check that array length stays a safe integer in Array.prototype.push (patchset #7 id:120001 of https://codereview.chromium.org/1428483002/ )
>
> Reason for revert:
> Caused for-in-opt test to fail
>
> Original issue's description:
> > Check that array length stays a safe integer in Array.prototype.push
> >
> > This patch adds a check in Array.prototype.push to assert that the new
> > length does not become greater than 2**53-1. Such a length would be
> > dangerous because integer arithmetic becomes imprecise after the
> > boundary. The check is also required by a test262 test.
> >
> > R=adamk
> > LOG=Y
> > BUG=v8:3087
> >
> > Committed: https://crrev.com/e68adf4548dd101dc08fcbff14444152fb1b7fe7
> > Cr-Commit-Position: refs/heads/master@{#31588}
>
> TBR=adamk@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=v8:3087
>
> Committed: https://crrev.com/78abedb94431a233842fcb2f7a910805a05bed09
> Cr-Commit-Position: refs/heads/master@{#31590}

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

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

Cr-Commit-Position: refs/heads/master@{#31610}
2015-10-27 16:30:45 +00:00
bmeurer
7709e41aec [turbofan] Try hard(er) to use smi representation for float64 values.
Previously ChangeLowering would always box float64 values when going to
tagged representation, but that introduces a lot of deoptimizer loops
and polymorphism into TurboFan, which is unfortunate and unnecessary.

This adds some logic to ChangeFloat64ToTagged to try harder to create a
Smi when going from Float64 to Tagged, instead of always allocating a
HeapNumber.  This might need some additional tweaking, but at least it
makes it possible to start comparing TurboFan and Crankshaft for some
regular JavaScript.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31609}
2015-10-27 16:18:15 +00:00
machenbach
424ae37746 [swarming] Isolate shared libraries for linux32.
BUG=chromium:535160
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31608}
2015-10-27 15:27:48 +00:00
jkummerow
cabeb7db3a Fix deoptimization at ForInStatement::BodyId()
Full-codegen prepared for the bailout in the wrong place, causing side
effects to be replayed when they shouldn't. Crankshaft and Turbofan are
in agreement about where the deopt should jump to.

TEST=mjsunit/for-in-opt
R=jarin@chromium.org
BUG=v8:4381
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#31607}
2015-10-27 15:17:24 +00:00
Michael Achenbach
0b14070d5f Whitespace change to test swarming.
Cr-Commit-Position: refs/heads/master@{#31606}
2015-10-27 15:11:13 +00:00
mbrandy
a0e7a76a81 Fix cctest/test-spaces/CompactionSpace
kExpectedPages should be ceil(kNumObjects / kNumObjectsPerPage)

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

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

Cr-Commit-Position: refs/heads/master@{#31605}
2015-10-27 13:41:31 +00:00
rmcilroy
f85c410626 [Interpreter] Fix a register allocation bug and add a DCHECK.
BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31604}
2015-10-27 13:33:29 +00:00