Commit Graph

358 Commits

Author SHA1 Message Date
verwaest@chromium.org
3cb8f95c91 Tag smi-constants as smi. This also fixes code that copies holes into arrays.
BUG=
R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/15861009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14814 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-27 08:43:58 +00:00
verwaest@chromium.org
2a28f53b18 Fix hole handling, and ensure smi representation is handled properly
R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/16013003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14807 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-24 13:40:02 +00:00
titzer@chromium.org
77f85fa0d3 Remove offset() and is_in_object() from hydrogen and lithium LoadNamedField and StoreNamedField and use the appropriate methods on HObjectAccess instead
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14806 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-24 12:40:08 +00:00
verwaest@chromium.org
c417df74f4 Update representation-from-uses to support smi.
R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/15692004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14801 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-24 12:29:37 +00:00
verwaest@chromium.org
c9a22a3c8d Replace tagged keys for fast access by smi, and use smi in boundscheck.
BUG=
R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/15763004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14794 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-24 08:52:35 +00:00
titzer@chromium.org
94b4240f5c Introduce ObjectAccess, which is used by LoadNamedField and StoreNamedField to denote what parts of an object are referred to by a given load or store. Refactor HGraphBuilder to use ObjectAccess, which removes the need to manually set GVN flags and simplifies the code as well.
Review URL: https://codereview.chromium.org/14284010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14791 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-24 08:38:21 +00:00
verwaest@chromium.org
d057410e20 Require smi for keyed store to smi.
R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/15884002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14779 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-23 15:01:17 +00:00
verwaest@chromium.org
632f591884 Tag length of FixedArrayBase and smi-array[x] as smi representation
R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/15858006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14778 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-23 14:38:39 +00:00
yangguo@chromium.org
a1e18bdf3c Improve SeqStringSetChar implementation.
R=jkummerow@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/15743006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14769 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-23 09:51:06 +00:00
jkummerow@chromium.org
f691f48c14 Avoid creating duplicate entries for a value when merging HSimulates
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14766 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-23 09:17:01 +00:00
verwaest@chromium.org
308e69755b Implement HChange support for Smis and use it in Load/StoreNameField
BUG=
R=verwaest@chromium.org

Review URL: https://chromiumcodereview.appspot.com/15303004

Patch from Daniel Clifford <danno@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14765 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-23 08:32:07 +00:00
verwaest@chromium.org
d1b5a2518d Handle holes in smi-untag from LoadKeyed requiring hole handling.
R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/15737003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14756 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-22 16:32:33 +00:00
verwaest@chromium.org
b353b1d131 Don't allow copying holes to fields.
R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/15745006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-22 15:33:53 +00:00
titzer@chromium.org
5746d38351 Fix code gen bug on arm and mips; SeqStringSetChar overwrites a register; Add better default PrintDataTo for HInstruction
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14710 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-16 14:27:39 +00:00
olivf@chromium.org
8bbe48c7b9 Add a HBreak instruction for debugging
BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14691 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-15 14:24:47 +00:00
titzer@chromium.org
68eb1e50ca Improve dead code elimination by transitively marking live code and removing all dead code. Replace unreachable phi removal algorithm with the new dead code elimination pass, which is more thorough.
Review URL: https://codereview.chromium.org/14676011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14661 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-14 13:10:52 +00:00
danno@chromium.org
6862babfd6 Remove HIsNilAndBranch (it's now unused)
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14660 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-14 12:56:53 +00:00
svenpanne@chromium.org
c1bc396c2d Consistently assume that arithmetic operations can overflow unless one can prove the opposite.
Previously, HDiv never had its CanOverflow flag cleared and HMod had
inverted logic (compared to HAdd, HSub and HMul). Minor cleanups on the way.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14644 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-13 13:48:15 +00:00
jkummerow@chromium.org
7636fdec27 Fix missing hole check for loads from Smi arrays when all uses are changes
BUG=chromium:233737

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14638 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-13 11:58:10 +00:00
danno@chromium.org
05e8e0e7b4 Elide hole checks on KeyedLoads of holey double arrays
Improves NavierStokes by about 5%

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14630 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-13 07:35:26 +00:00
verwaest@chromium.org
df57747fc4 Track heap objects.
R=danno@chromium.org

Review URL: https://chromiumcodereview.appspot.com/14996004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14625 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-10 17:17:50 +00:00
mstarzinger@chromium.org
8829a94c24 Remove obsolete HArrayLiteral instruction.
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14613 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-10 09:52:08 +00:00
mstarzinger@chromium.org
efe91b56f6 Remove obsolete HObjectLiteral instruction.
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14612 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-10 09:47:05 +00:00
mvstanton@chromium.org
ef5211d8af Parallel compilation bug: LCallNewArray dereferenced a handle unnecessarily.
BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14599 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-08 16:48:27 +00:00
verwaest@chromium.org
52008429b7 Use mutable heapnumbers to store doubles in fields.
R=danno@chromium.org

Review URL: https://chromiumcodereview.appspot.com/14850006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14597 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-08 15:02:08 +00:00
danno@chromium.org
bd9274436c Bias commutative single-use register inputs and support lea adds
This improves register allocation for many common add and multiply patterns on ia32 and x64 by reducing register pressure.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14587 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-08 08:37:24 +00:00
titzer@chromium.org
dbcd0e925a Remove HLoadElements instruction and replace with use of more general HLoadNamedField. This removes the need for both the hydrogen and lithium instructions and allows both kinds of loads to be GVN'd.
Review URL: https://codereview.chromium.org/14556020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14542 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-03 12:21:16 +00:00
jkummerow@chromium.org
0ac47f23d8 Remove 'unanimous use observations' rule from Phi representation inference
Review URL: https://codereview.chromium.org/14840014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14536 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-03 08:50:48 +00:00
mstarzinger@chromium.org
04fdcad547 Fix HConstant::InNewSpace() for parallel compilation.
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14488 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-30 08:00:43 +00:00
mvstanton@chromium.org
bc50e21b23 HConstant::InNewSpace() should be a constant function
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14466 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-26 15:48:13 +00:00
verwaest@chromium.org
99e17bb12a Track storage types of instance variables.
Review URL: https://chromiumcodereview.appspot.com/14146005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14464 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-26 15:30:41 +00:00
mvstanton@chromium.org
84355ae411 Lithium: avoid registers for constants when possible.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14460 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-26 14:04:07 +00:00
mstarzinger@chromium.org
bb2d8a51da Implement support for Math.imul in Crankshaft.
R=jkummerow@chromium.org
TEST=mjsunit/math-imul

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14450 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-26 08:52:35 +00:00
jkummerow@chromium.org
f80d86cbb1 Better handling of Phi nodes with constant inputs
Review URL: https://codereview.chromium.org/14471034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14448 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-26 08:47:02 +00:00
mvstanton@chromium.org
e751ad06d9 Constructed arrays can be created with Hydrogen code stubs. The feature is still off by default (--optimize-constructed-arrays).
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14441 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-25 16:00:32 +00:00
yangguo@chromium.org
1ad3d57d9d Get isolate from thread local instead of (potentially missing) block in HConstant.
R=ulan@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/14284011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14433 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-25 10:57:24 +00:00
svenpanne@chromium.org
bc06a802a7 Fixed HUnaryMathOperation regarding its possible operations.
Review URL: https://codereview.chromium.org/14333013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14422 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-24 14:51:14 +00:00
svenpanne@chromium.org
b08fcc54a0 MathSqrt and MathPowHalf do not cause any promotion.
Review URL: https://codereview.chromium.org/13829009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14414 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-24 12:43:33 +00:00
danno@chromium.org
f8ddf3a262 Add monomorphic CompareNilICs and Crankshaft support
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14407 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-24 11:32:17 +00:00
mvstanton@chromium.org
535df803b9 If the input to an HChange is of type smi, then no need to mark gvn flag changes new space promotion.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14401 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-24 09:14:56 +00:00
svenpanne@chromium.org
cd34acdae3 Do not emit double values at their use sites.
Revert part of r14179. From the regression test's comment:

Currently, the gap resolver doesn't handle moves from a ConstantOperand to a
DoubleRegister, but these kind of moves appeared when HConstant::EmitAtUses
was changed to allow special double values (-0, NaN, hole). So we should
either enhance the gap resolver or make sure that such moves don't happen.

BUG=chrome:234101

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14394 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-23 13:08:10 +00:00
yangguo@chromium.org
28bbe46a98 Disallow dereferencing deferred handles when generating optimized code.
R=mvstanton@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/14403015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14388 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-23 09:23:07 +00:00
jkummerow@chromium.org
0c634a1dae Ignore observed Double output in binary operations when all uses are truncating to Integer32
BUG=v8:2424

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14381 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-22 16:31:16 +00:00
titzer@chromium.org
3575f97036 Refactor HCheckMaps to have a private constructor, removing duplicated code and simplifying calls in clients.
Ignore bsuite directory.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14362 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-19 16:46:13 +00:00
danno@chromium.org
bc04544f02 Replace math.h with cmath
This will make it easier to use other STL headers in the future

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

Patch from Jochen Eisinger <jochen@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14352 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-19 13:26:47 +00:00
titzer@chromium.org
e210d8325f Inline isUint32() method from HConstant, which was only used in one place.
Add utility method for checking whether an HValue is a given int32_t constant.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14329 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-18 11:22:29 +00:00
svenpanne@chromium.org
55324693aa Unify canonicalization of HAdd/HSub/HMul a bit.
HDiv/HMul are a slightly different story and will be handled in a separate CL.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14322 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-18 09:24:29 +00:00
svenpanne@chromium.org
0d8b7f7608 Improve handling of unary plus.
Simple strategy: Transform unary plus into multiplication by one directly in the
parser and remove it from the Hydrogen graph later. This gives correct type
feedback without any special stub for it.

BUG=v8:2527

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14306 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-17 12:47:15 +00:00
yangguo@chromium.org
e1742a6716 Remove relocation lock.
Freeze HValue hash codes that are based on object addresses.

R=svenpanne@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/14040006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14273 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-16 11:00:02 +00:00
hpayer@chromium.org
2345bdbeb3 Implement direct allocation in old data space infrastructure.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14262 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-15 11:52:34 +00:00