Commit Graph

26121 Commits

Author SHA1 Message Date
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
danno
f1aa556278 [turbofan] Create ExplicitOperands to specify operands without virtual registers
Up until now, if one wanted to specify an explicit stack location                                                                                                                                                                                                or register as an operand for an instruction, it had to also be
explicitly associated with a virtual register as a so-called
FixedRegister or FixedStackSlot.

For the implementation of tail calls, the plan is to use the gap
resolver needs to shuffle stack locations from the caller to the
tail-called callee. In order to do this, it must be possible to
explicitly address operand locations on the stack that are not
associated with virtual registers.

This CL introduces ExplictOperands, which can specify a specific
register or stack location that is not associated with virtual
register. This will allow tail calls to specify the target
locations for the necessary stack moves in the gap for the tail
call without the core register allocation having to know about
the target of the stack moves at all.

In the process this CL:
* creates a new Operand kind, ExplicitOperand, with which
  instructions can specify register and stack slots without an
  associated virtual register.
* creates a LocationOperand class from which AllocatedOperand and
  ExplicitOperand are derived and provides a common interface to
  get Register, DoubleRegister and spill slot information.
* removes RegisterOperand, DoubleRegisterOperand,
  StackSlotOperand and DoubleStackSlotOperand, they are subsumed
  by LocationOperand.
* addresses a cleanup TODO in AllocatedOperand to reduce the
  redundancy of AllocatedOperand::Kind by using machine_type() to
  determine if an operand corresponds to a general purpose or
  double register.

BUG=v8:4076
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31603}
2015-10-27 13:27:00 +00:00
jarin
aadeef9ea7 [turbofan] Remove dead code from simplified lowering.
Review URL: https://codereview.chromium.org/1418423007

Cr-Commit-Position: refs/heads/master@{#31602}
2015-10-27 13:25:54 +00:00
Michael Achenbach
7c6eb5ed7d Whitespace change to test swarming.
Cr-Commit-Position: refs/heads/master@{#31601}
2015-10-27 13:20:02 +00:00
ulan
7ac5af5c12 Remove special handling of background idle notification in memory reducer.
BUG=chromium:490559
LOG=NO

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

Cr-Commit-Position: refs/heads/master@{#31600}
2015-10-27 12:35:56 +00:00
mythria
959e050c1d Adds a scavenge GC pass to collect unmodified references
Adds a scavenge GC pass that collects unmodified references instead of
processing object groups. This mode can be controlled by setting
FLAG_scavenge_reclaim_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/1410593005

Cr-Commit-Position: refs/heads/master@{#31599}
2015-10-27 12:22:31 +00:00
mstarzinger
37f5e23b5c [turbofan] Fix receiver binding for inlined callees.
This introduces a JSConvertReceiver operator to model the implicit
conversion of receiver values for sloppy callees. It is used by the
JSInliner for now, but can also be used to model direction function
calls that bypass call stubs.

Also note that a hint is passed to said operator whenever the source
structure constrains the receiver value type. This hint allows for
optimizations in the lowering of the operator.

The underlying specification in ES6, section 9.2.1.2 is the basis for
this implementation.

R=bmeurer@chromium.org
TEST=mjsunit/compiler/receiver-conversion
BUG=v8:4493, v8:4470
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31598}
2015-10-27 12:13:49 +00:00
mvstanton
15b4804cdf Add non-script SharedFunctionInfos to the Iterator.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31597}
2015-10-27 11:41:02 +00:00
bmeurer
c9ab36061d [turbofan] Use CompareNilIC for abstract equality with null/undefined.
Change CompareNilIC to return true/false instead of 1/0, and use the
CompareNilICStub in TurboFan for abstract equality with null/undefined.
This way we don't always run into the %Equals runtime fallback when
comparing objects with null/undefined.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31596}
2015-10-27 11:21:48 +00:00
neis
1e6cb603e5 Prettyprint symbols in mjsunit tests.
R=jochen
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31595}
2015-10-27 10:23:51 +00:00
bmeurer
d08f9045a1 [turbofan] Introduce simplified NumberBitwise{Or,Xor,And} operators.
Currently we still (mis)used some machine operators in typed lowering
(namely Word32Or, Word32Xor and Word32And). But these operators are
"polymorphic" in the signedness of their inputs and output, hence the
representation selection (and thereby simplified lowering) was unable to
figure out whether a bitwise operation that was seen would produce an
unsigned or a signed result. If such nodes also have frame state uses,
the only safe choice was float64, which was not only a lot less ideal,
but also the main cause of the for-in related deoptimizer loops.

Adding dedicated NumberBitwiseOr, NumberBitwiseAnd and NumberBitwiseXor
simplified operators not only gives us precise (and correct) typing for
the bitwise operations, but also allows us to actually verify the graph
properly after typed lowering.

Drive-by-fix: Remove the double-to-smi magic from the Deoptimizer, which
is responsible for various deopt-loops in TurboFan, and is no longer
needed with the addition of the NumberBitwise operators.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31594}
2015-10-27 09:08:19 +00:00
yangguo
85e085b770 RegExp: remove last match info override.
With ES6 21.2.5.8, step 13, we no longer have to keep up the illusion
that matching and calling replace function is interleaved. This is
observable through unspec'ed static properties such as RegExp.$1.

Last match info not working yet.

R=littledan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31593}
2015-10-27 08:24:08 +00:00
chunyang.dai
d43bbd068d X87: fix the sqrt issue.
The test mjsunit/regress/regress-sqrt compares the result of Math.sqrt function
       when using full-compiler and turbofan/crankshaft compiler seperately. But according
       to glibc bug fixing(https://sourceware.org/bugzilla/show_bug.cgi?id=14032). The
       glibc implementation of std::sqrt() (It is invoked in the generated code when
       full-compiler is used.) will change since glibc 2.19.

       In order to keep consistence of Math.sqrt translation in turbofan compiler
       and the pass of mjsunit/regress/regress-sqrt. we translate the Math.sqrt func
       according to the same fix in glibc change.  If the GLIBC version >=2.19, we will
       set the precision to Double. (the original is extended-double).

       This fix is to fix the same issue in https://codereview.chromium.org/606403002 for
       crankshaft. This fix may be ported for crankshaft too.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31592}
2015-10-27 08:14:21 +00:00
bmeurer
89ffdbc26a [turbofan] Lower abstract equality of boolean values.
Abstract equality of boolean values reduces to reference equality.

R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31591}
2015-10-27 08:12:14 +00:00
littledan
78abedb944 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

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

Cr-Commit-Position: refs/heads/master@{#31590}
2015-10-27 05:46:23 +00:00
bmeurer
113b78e9e6 [turbofan] Slightly refactor JSLoadGlobal specialization.
Reduce code duplication somewhat restructure the code to make
it easier to spot the code paths for the different property
cell types.

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

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

Cr-Commit-Position: refs/heads/master@{#31589}
2015-10-27 04:40:34 +00:00
littledan
e68adf4548 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

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

Cr-Commit-Position: refs/heads/master@{#31588}
2015-10-27 04:39:25 +00:00
adamk
a6ef1ea8ae Scope cleanup: remove unused bits and accessors
- inner_scope_uses_arguments_ was completely unused
- The public accessor for contains_with() was not called
- inside_with() had helper methods on Parser and PatternRewriter, but was
  only called in one place.

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

Cr-Commit-Position: refs/heads/master@{#31587}
2015-10-27 00:48:02 +00:00
ahaas
0abac748cd Removed the dependency of the test RunComputedCodeObject from RawMachineAssemblerTester.
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31586}
2015-10-27 00:38:06 +00:00
Michael Achenbach
fa4f555373 Whitespace change to test swarming.
Cr-Commit-Position: refs/heads/master@{#31585}
2015-10-26 19:06:55 +00:00
rmcilroy
c0c214daa8 [Interpreter] Add support for loading from / storing to outer context variables.
Adds support for loading from and storing to outer context
variables. Also adds support for declaring functions on contexts and
locals. Finally, fixes a couple of issues with StaContextSlot where
we weren't emitting the write barrier and therefore would crash in the
GC.

Also added code so that --print-bytecode will output the
function name before the bytecodes, and replaces MachineType with StoreRepresentation in RawMachineAssembler::Store and updates tests.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31584}
2015-10-26 18:11:35 +00:00
mbrandy
2a4f5a64c4 AIX: Fix 'may be used uninitialized' compiler errors
Fix additional cases where the AIX compiler reports that a variable
may be used uninitialized.

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

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

Cr-Commit-Position: refs/heads/master@{#31583}
2015-10-26 18:05:28 +00:00
paul.lind
efa752d98b MIPS64: Fix r6 boolean materializations after a float32 compare.
The upper 32-bits of the FP compare register are undefined in
the float32 case. The compare instruction returns all 1's or
all 0's, so just use the LS bit.

Remove unnecessary use of 'at' reg. Change mips32 for consistency,
but it did not have the bug.

TEST=mjsunit/asm/embenchen/box2d (r6)
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31582}
2015-10-26 17:46:51 +00:00
mtrofin
109f856536 Reland of "[Turbofan] Fix perf regression (patchset #1 id:1 of
https://codereview.chromium.org/1412123009/ )"

This reverts commit 5308a999eb.

BUG=chromium:546416
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31581}
2015-10-26 17:40:51 +00:00
cbruni
c05137e108 [runtime] Handle Exceptions from Indexed- and NamedInterceptor
LOG=N
BUG=v8:4026

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

Cr-Commit-Position: refs/heads/master@{#31580}
2015-10-26 17:24:49 +00:00