Commit Graph

811 Commits

Author SHA1 Message Date
mvstanton@chromium.org
c70b41684d Use type feedback for Array (non-constructor) call sites.
BUG=
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15201 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-19 09:25:24 +00:00
mstarzinger@chromium.org
6510948b2c Make Zone::allocation_size work with parallel zones.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15197 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-19 07:48:41 +00:00
mstarzinger@chromium.org
0524263a27 Remove obsolete elements kind check for array literals.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15194 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-18 13:32:06 +00:00
jkummerow@chromium.org
47ba2b2dd8 Migrate BinaryOpICs and UnaryOpICs to new type rep
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15172 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-14 17:02:39 +00:00
danno@chromium.org
61a23ceb4d Refactor only: Rename JSGlobaPropertyCell to PropertyCell
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-14 16:06:12 +00:00
jkummerow@chromium.org
de71923b20 Make MathFloorOfDiv optimization trigger more often
BUG=v8:2205
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15161 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-14 14:33:15 +00:00
verwaest@chromium.org
773c08c58f Try convert polymorphic stores into a single monomorphic store.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15158 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-14 14:16:03 +00:00
verwaest@chromium.org
cff21dc168 Observe smi as input for HCompareIDAndBranch
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15140 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-14 07:45:16 +00:00
svenpanne@chromium.org
bcf5912b3f Reduce the amount of full code generated to fill out array literals.
This is achieved by tuning the calling convention of StoreArrayLiteralStub:

 * The map of the array literal can be loaded in the stub from the
   array literal itself, there is no need to pass it at all.

 * The array literal is already on the stack, so there is no need to
   pass it again via a register.

 * The literal index is unchanged while filling the literal, so we can
   push it on the stack once and avoid passing it every time. Note that
   we need to mirror this change in the stack layout in crankshaft, too.

R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15138 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-14 06:06:00 +00:00
verwaest@chromium.org
91eda65014 Reduce usage of AssumeRepresentation
BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15132 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 18:09:33 +00:00
verwaest@chromium.org
1b5835f69f Remove manual representation annotations for constants.
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15130 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 17:38:10 +00:00
verwaest@chromium.org
1d74cfaaf4 Refactor turning polymorphic loads into monomorphic loads
- remove special code for polymorphic loading of array length
- use it in VisitCountOperation

BUG=
R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15126 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 16:36:15 +00:00
verwaest@chromium.org
4ac1aa533d Temporarily patch HCompareIDAndBranch to accept Smi.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15122 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 14:58:41 +00:00
mvstanton@chromium.org
5b2c1a50d9 HCheckFunction is needed to protect new array constructors in
crankshafted code.

BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15118 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 14:29:01 +00:00
rossberg@chromium.org
94f651bc1b Migrate Compare ICs to new type rep
(Does not yet use common AST expression type field.)

R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-12 17:20:37 +00:00
danno@chromium.org
1b89cbf817 Separate Cell and PropertyCell spaces
This makes it possible to store additional information on property cells, for example Type and optimized Code dependencies.

R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15089 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-12 15:03:44 +00:00
mstarzinger@chromium.org
93ab1864ea Allow the deoptimizer translation to track de-materialized objects.
This allows the deoptimizer to materialize objects (e.g. the arguments
object) while deopting without having a consective stack area holding
the object values. The LEnvironment explicitly tracks locations for
these values and preserves them in the translation.

R=svenpanne@chromium.org
TEST=mjsunit/compiler/inline-arguments

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15087 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-12 14:22:49 +00:00
yangguo@chromium.org
74556569d1 Reland "Enable map dependency to in-flight compilation info."
BUG=248076
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15077 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-12 09:43:22 +00:00
yangguo@chromium.org
6da97b1d4a Revert "Enable map dependency to in-flight compilation info."
This includes r15032, r15030 and r15005.

R=ulan@chromium.org
BUG=248076

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15061 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-11 11:55:56 +00:00
jkummerow@chromium.org
9447014780 Skip some conditional deopts for Div/Mul when all uses are truncating.
- set "can be minus zero" flag properly so minus-zero checks are skipped
- skip "integer result?" check in division code when uses are truncating
- drive-by cleanup: consolidated computation of kCanOverflow flag for Add/Sub into range inference phase

BUG=v8:2132
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15060 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-11 11:43:57 +00:00
olivf@chromium.org
946ea53264 use compare nil ic only for non-strict equality. strict-equality only has one check and cannot deopt. should therefore not be part of the stub.
BUG=
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15045 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-10 15:47:23 +00:00
olivf@chromium.org
3a26dda780 revert accidental dcommit
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15044 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-10 15:43:40 +00:00
olivf@chromium.org
23691cf023 also remove the constant
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15043 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-10 15:30:17 +00:00
olivf@chromium.org
73b7ab9ae6 remove equality kind from compare nil ic
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15042 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-10 15:30:02 +00:00
yangguo@chromium.org
b0afb77731 Fix parallel recompilation wrt transition maps dependency.
R=ulan@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15032 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-10 11:33:23 +00:00
wingo@igalia.com
f88bca9576 Generator object "next" method takes optional send value
Update the generators implementation to make "next" also do the job of
what was previously called "send" by taking an optional argument.
Remove send, and do a bunch of renamings.

R=rossberg@chromium.org
BUG=v8:2355, v8:2715

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15028 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-10 09:26:18 +00:00
verwaest@chromium.org
3588aa45cd Take all uses into account to clear int32 truncation.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15017 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-07 17:28:46 +00:00
yangguo@chromium.org
17cfe68015 Enable map dependency to in-flight compilation info.
R=ulan@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15005 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-07 13:27:03 +00:00
mvstanton@chromium.org
1fc6065b38 CallNewArray sites need the original feedback cell at crankshaft time.
This CL addresses a TODO in the hydrogen-based array constructor code,
to pass through the actual type feedback cell, rather than the contents
of the cell.

BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15004 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-07 13:21:20 +00:00
verwaest@chromium.org
8afeaabe57 Allow boundscheck elimination to work on Smi keys.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15001 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-07 11:00:39 +00:00
yangguo@chromium.org
82c0ea4b04 Fix bogus assertions for tracing and verify.
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14985 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-06 15:30:46 +00:00
wingo@igalia.com
cb0d146862 Add initial parser support for harmony iteration
This commit adds initial parser support for harmony iteration.
Specifically, it will parse:

  for (x of y) {}
  for (let x of y) {}
  for (var x of y) {}

The semantics are still unimplemented.

TEST=mjsunit/harmony/for-of-syntax
BUG=v8:2214
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14984 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-06 14:38:26 +00:00
verwaest@chromium.org
8bd4199fdd Don't force representations in the loop builder.
Additionally, infer None-typed CompareIDAndBranch to Smi+actual input.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14960 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-05 17:24:14 +00:00
jkummerow@chromium.org
4a70dcf530 Use HSoftDeoptimize instead of HDeoptimize in VisitSwitchStatement, and visit the entire graph
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14949 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-05 11:05:45 +00:00
mvstanton@chromium.org
56f3337ebc Adapt hydrogen-based Array constructor to also support InternalArray and function call
versions.

BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14948 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-05 10:43:18 +00:00
jkummerow@chromium.org
20cedf9a4b Liveness analysis for environment slots in Hydrogen
R=titzer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14938 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-04 16:41:24 +00:00
hpayer@chromium.org
599511d0c0 Added pretenuring support for call new.
BUG=
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14935 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-04 13:20:13 +00:00
mvstanton@chromium.org
8a02fd3be3 Turn off allocation site info for crankshafted array constructor calls.
Once we crankshaft a method, we should turn off allocation site info for
constructed arrays. Additionally, the semantics for doing this were
awkward because the constructed array code stubs get an
AllocationSiteMode as a minor key, but it's used as a permission to
determine the final mode locally based on ElementsKind. I refactored
this to a simpler boolean for override or local control.

BUG=
R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14934 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-04 12:48:51 +00:00
mstarzinger@chromium.org
d7975dfdab Deprecate HAllocateObject in favor of HAllocate.
This models the instantiation of an implicit receiver for CallNew nodes
in hydrogen using HAllocate together with generic stores instead of one
specialized HAllocateObject instruction, hence creating a single choking
point for inlined allocation in optimized code.

R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14930 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-04 08:28:33 +00:00
svenpanne@chromium.org
b9e025a8dc Collect type feedback for power-of-2 right operands in BinaryOps.
Improved --trace-ic output for unary/binary ops a bit on the way. Moved int32_t/uint32_t conversion helpers around.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14928 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-04 07:49:45 +00:00
verwaest@chromium.org
179ac2cd0c Improve smi support in crankshaft
- Recover smi in phis if inputs are smi-typed
- Don't record smi-typed values as pointers

BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14926 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-03 16:57:36 +00:00
yangguo@chromium.org
7f8a3d803c Make assertion scopes thread safe.
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14919 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-03 15:32:22 +00:00
jkummerow@chromium.org
b4058a3bd4 Fast literals: fixed initialization of non-copied in-object property fields
BUG=chromium:245424
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14906 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-31 15:50:19 +00:00
verwaest@chromium.org
1a4a904bef Replace DeoptimizeOnUndefined with whitelisting AllowUndefinedAsNan
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14894 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-30 09:11:06 +00:00
mstarzinger@chromium.org
39e9a9030d Make sure IfBuilder::Return clears the current block.
This is a follow-up to an earlier bugfix. It doesn't yet trigger any
known bugs but is a safety precaution since IfBuilder usage increases.

R=jkummerow@chromium.org
BUG=chromium:243868

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14882 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-29 12:36:41 +00:00
verwaest@chromium.org
7d32e7451f Don't explicitly pass requested representations to constants; implement ConstantS
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14874 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-29 10:47:55 +00:00
verwaest@chromium.org
9b6aa9568d Don't explicitly pass the Smi-representation to IfCompare.
BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14873 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-29 09:55:50 +00:00
mstarzinger@chromium.org
3b114cdd64 Fix IfBuilder::Deopt to clear the current block.
R=jkummerow@chromium.org
BUG=chromium:243868
TEST=mjsunit/regress/regress-crbug-243868

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14854 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-28 15:30:49 +00:00
hpayer@chromium.org
44fd249cd2 Refacturing BuildEmitDeepCopy.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14845 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-28 10:44:21 +00:00
hpayer@chromium.org
5b469a6f41 Added old data space allocation infrastructure for pretenuring.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14843 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-28 09:38:28 +00:00
verwaest@chromium.org
cf9b1170d1 Support Smi in CompareIDAndBranch
BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14842 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-28 09:24:39 +00:00
verwaest@chromium.org
4fcaace0a9 Always deoptimize on undefined if a double value implicitly gets converted.
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14832 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-28 06:31:05 +00:00
verwaest@chromium.org
aa2444269b Fix the hole loading optimization.
- Holes are only ever loaded as double or tagged.
- Change to tagged has to deoptimize on undefined (no implicit
  conversions from double the hole NaN -> tagged undefined).

BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14829 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-27 17:33:14 +00:00
rossberg@chromium.org
6fda4e4c28 Collect type feedback in separate pass and store it in AST
Notes:

- For now, just adds the missing type info fields to the AST nodes directly.
  I'd like to factor that out more nicely in a follow-up CL.

- All type feedback now is uniformly collected through AST nodes'
  RecordTypeFeedback functions. At some point, this logic should be moved
  out of ast.cc.

- The typing pass currently simulates the exact same conditions under
  which feedback was collected in Hydrogen before. That also should be
  made more generic in the future.

- Type information itself is unchanged. Making it more regular is
  yet more future work.

Some additional cleanups:

- Lifted out nested class ObjectLiteral::Property, to enable forward declaration.
- Moved around some auxiliary enums.

R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14825 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-27 13:59:20 +00:00
titzer@chromium.org
0a4289618d Extract GlobalValueNumberer and helper classes from hydrogen.cc and move to hydrogen-gvn.cc.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14824 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-27 12:45:46 +00:00
verwaest@chromium.org
a64b7f926f Remove HCheckSmi, LCheckSmi and rename LCheckSmiAndReturn to LCheckSmi.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14816 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-27 09:58:46 +00:00
verwaest@chromium.org
8fc2101ce0 Fix build
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14815 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-27 08:50:52 +00:00
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
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
af4516847a Don't use fast literal if the boilerplate map is still deprecated.
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14774 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-23 11:30:24 +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
hpayer@chromium.org
2cbc81a5ce Move global pretenuring flag check to ShouldGloballyPretenure().
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14763 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-23 08:17:03 +00:00
mstarzinger@chromium.org
b704cb9139 Fix bogus deopt in BuildEmitDeepCopy for holey arrays.
R=verwaest@chromium.org
BUG=chromium:242924
TEST=mjsunit/regress/regress-crbug-242924

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14757 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-22 17:58:21 +00:00
mstarzinger@chromium.org
bf413b5122 Fix VisitLogicalExpression for empty blocks on RHS.
R=jkummerow@chromium.org
BUG=chromium:242870
TEST=mjsunit/regress/regress-crbug-242870

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14747 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-22 13:27:00 +00:00
mmassi@chromium.org
3947fefe40 a tiny bug in DehoistArrayIndex
R=mmassi@chromium.org

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

Patch from Weiliang Lin <weiliang.lin2@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14733 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-21 14:09:28 +00:00
verwaest@chromium.org
9f32d94cb3 Don't create new maps in CurrentMapForDeprecated.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-21 11:20:24 +00:00
danno@chromium.org
58a3fd3666 Fill in one-word-fillers for the unused property fields.
BUG=chromium:240056

Review URL: https://chromiumcodereview.appspot.com/15247003
Patch from Toon Verwaest <verwaest@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14714 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-17 06:58:06 +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
c3dde4bd9d Encapsulating Type information in the CompareICStub
Encapsulate type information in a convenient wrapper instead of storing it in a naked bitfield. This especially facilitates transitioning to a new state and converting from/to the extraICState representation. Additionally cleaning up ToBooleanICStub::Types for consistency.

BUG=
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14704 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-16 10:59:17 +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
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
ulan@chromium.org
9e620bb689 Revert r14610 because of test-262 failures.
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14622 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-10 13:21:24 +00:00
svenpanne@chromium.org
911c14556d Cleaned up Crankshaft pipeline a bit.
Two tiny changes:

  * Some phases were missing an HPhase, which was added, so we can now see all
    phases in the visualizer output.

  * Consistently test commandline flags directly in the pipeline, making it
    clearer which parts are optional and which are not.

R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14615 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-10 11:32:13 +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
ulan@chromium.org
cc1053379d Use AssumeRepresentation when the representation is known and will not change.
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14611 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-10 09:31:28 +00:00
ulan@chromium.org
36910718fe Verify that no-side-effects scope does not add unsafe phis and does not change push-pop balance of the environment.
R=danno@chromium.org
BUG=v8:2671

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14610 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-10 09:26:53 +00:00
verwaest@chromium.org
5068079aff Always use BuildCheckNonSmi, and don't emit check if HeapObject.
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14606 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-10 08:58:58 +00:00
verwaest@chromium.org
addb8f96c1 Don't CheckSmi when type is Smi.
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14605 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-10 08:39:37 +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
ulan@chromium.org
cd4e9866b7 Fix environment in HOptimizedGraphBuilder::VisitCountOperation. Follow-up for r14584.
R=danno@chromium.org
BUG=v8:2671
TEST=mjsunit/regress/regress-2671-1.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14596 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-08 14:58:06 +00:00
verwaest@chromium.org
4c2c665420 Turn off tracking of fields for the roll.
Revert polymorphic stores suspect of crashes.

Revert "Turn on tracking of fields."
Revert "Turn polymorphic stores monomorphic if store sequence matches."
Revert "Fix polymorphic store."

R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14593 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-08 14:18:30 +00:00
verwaest@chromium.org
3d7e2912ba Fix polymorphic store.
Review URL: https://chromiumcodereview.appspot.com/14696011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14590 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-08 10:34:51 +00:00
verwaest@chromium.org
e5feaf31fa Turn polymorphic stores monomorphic if store sequence matches.
Review URL: https://chromiumcodereview.appspot.com/14796012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14589 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-08 09:39:26 +00:00
ulan@chromium.org
e5a29e8ff9 Do not change environment between simulate and scope with no observable side-effects in HandlePropertyAssignment.
LChunkBuilder reconstructs the environment by applying simulates. A scope with no observable side-effects has no simulates. If the scope deoptimizes, then LChunkBuilder would miss the changes to the environment between the last simulate and the scope.

R=danno@chromium.org
BUG=v8:2671
TEST=mjsunit/regress/regress-2671.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-08 07:40:28 +00:00
mvstanton@chromium.org
d7b013de57 Becuase of cross-context calls, hydrogen-based Array constructor needs to ensure
the array constructor pointer passed in matches that of the current context.

BUG=
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14581 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-07 21:01:53 +00:00
verwaest@chromium.org
46d39cabd6 Fix polymorphic to monomorphic load to take representation into account.
Review URL: https://chromiumcodereview.appspot.com/14966005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14565 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-07 10:32:23 +00:00
verwaest@chromium.org
2aad78052e Don't double unlink in DCE.
Review URL: https://chromiumcodereview.appspot.com/14914004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14545 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-03 13:39:11 +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
eaf9d14be9 Use worklist to find out Phis that could not be truncated to int32
Review URL: https://codereview.chromium.org/13950013

Patch from Haitao Feng <haitao.feng@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14528 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-02 17:00:53 +00:00
jkummerow@chromium.org
f78f583110 Detect truncating Phi uses of Phis with constant inputs
Review URL: https://codereview.chromium.org/14260013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14525 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-02 16:30:58 +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
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
mvstanton@chromium.org
adb450bc44 Fix test/build failures (win64 compile warning, isolate test parallel compilation failure, gcmole issue, isolate test intermittant failure)
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14449 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-26 08:49:20 +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
yangguo@chromium.org
49ce7642be Do not dereference handles during relocation.
R=hpayer@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14445 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-26 07:35:07 +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
mstarzinger@chromium.org
23f39546b9 Generators can resume
The generator object methods "next", "send", and "throw" now
include some inline assembly to set up a resumed stack frame.  In some
common cases, we can just jump back into the frame to resume it.
Otherwise the resume code calls out to a runtime to fill in the operand
stack, rewind the handlers, and possibly to throw an exception.

BUG=v8:2355
TESTS=mjsunit/harmony/generators-iteration

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

Patch from Andy Wingo <wingo@igalia.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14415 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-24 13:00:16 +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
danno@chromium.org
a0aed63bbb Replace qsort with std::sort.
std::sort is a template, so it can be inlined more aggressively. Also, it's
O(n log n), while libc's qsort is O(n^2)

BUG=2639

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14406 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-24 11:20:16 +00:00
ulan@chromium.org
bc4d7878e6 Do not emit Simulates in HandlePolymorphicElementAccess.
BUG=v8:2653
R=jkummerow@chromium.org
TEST=mjsunit/regress/regress-2653.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14396 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-23 15:28:44 +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
mstarzinger@chromium.org
6f595c231a Replace CheckBuilder with IfBuilder everywhere.
This deprecates and removes the CheckBuilder which is less powerful
than the generic IfBuilder which can deopt as well by now.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14372 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-22 11:15:43 +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
mstarzinger@chromium.org
e288a65ec1 Switch elements access to use IfBuilder instead of CheckBuilder.
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14360 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-19 16:21:09 +00:00
danno@chromium.org
0c5c6c50bb Remove unused member variables in IfBuilder
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14351 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-19 13:20:45 +00:00
mstarzinger@chromium.org
adf9afc09e Fix missing Smi check in grow mode keyed stores.
R=danno@chromium.org
TEST=mjsunit/regress/regress-grow-store-smi-check

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14332 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-18 14:18:27 +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
danno@chromium.org
fded35e019 Fix bugs in IfBuilder and improve functionality
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14327 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-18 10:51:24 +00:00
yangguo@chromium.org
b3707c17d6 Inline String.fromCharCode in hydrogen.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14315 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-17 16:37:11 +00:00
titzer@chromium.org
705735ce79 Remove previous_ast_id and related code in hydrogen.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14308 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-17 14:11:39 +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
jkummerow@chromium.org
586c4e74b6 Replace OS::MemCopy with OS::MemMove (just as fast but more flexible).
Review URL: https://codereview.chromium.org/13932006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14280 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-16 12:30:51 +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
svenpanne@chromium.org
f70bcae9a9 Actually implement the sqrt intrinsic in Crankshaft
Review URL: https://codereview.chromium.org/13844009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14260 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-15 10:36:12 +00:00
dslomov@chromium.org
1441a13599 Homogenizes map checks for all polymorphic named field loads.
Tests show no perf regressions

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14259 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-15 09:05:50 +00:00
hpayer@chromium.org
acc4568aff Enable pretenuring of fast literals in high promotion mode.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14248 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-12 09:45:46 +00:00
hpayer@chromium.org
e7a5e69688 Remove unnecessary BailoutIds.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14246 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-12 09:36:56 +00:00
hpayer@chromium.org
66f5c75dab Separate calculation of double element and object element sizes in IsFastLiteral.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14241 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-12 08:42:17 +00:00
hpayer@chromium.org
5fd24b0afa Added non observable side effects scope and removed unnecessary calls to AddSimulate.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14232 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-11 13:07:37 +00:00
hpayer@chromium.org
2db9e62fc8 Build fast literals in hydrogen.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14211 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-10 13:52:08 +00:00
yangguo@chromium.org
9559181b0e Fix worst-case behavior of MergeRemovableSimulates().
Currently, when a long series of removable simulates are merged, we do
this by merging them one by one as we find them.  As we merge the value
value lists of the simulates, those lists snowball so that we get a
quadratic complexity wrt runtime and memory consumption.

Instead, we gather simulates that need to be merged, and merge them
backwards starting from the last simulate.

R=jkummerow@chromium.org
BUG=v8:2612

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14169 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-08 17:37:22 +00:00
mstarzinger@chromium.org
d71678676f Refactor parser mode configuration for correctness
This patch refactors the parser and preparser interface to be more
readable and type-safe.  It has no behavior changes.

Previously, parsers and preparsers were configured via bitfield called
parser_flags in the Parser constructor, and flags in
PreParser::PreParseProgram, ParserApi::Parse, and ParserApi::PreParse.
This was error-prone in practice: six call sites passed incorrectly
typed values to this interface (a boolean FLAG value, a boolean false
and a boolean true value).  None of these errors were caught by the
compiler because it's just an "int".

The parser flags interface was also awkward because it encoded a
language mode, but the language mode was only used to turn on harmony
scoping or not -- it wasn't used to actually set the parser's language
mode.

Fundamentally these errors came in because of the desire for a
procedural parser interface, in ParserApi.  Because we need to be able
to configure the parser in various ways, the flags argument got added;
but no one understood how to use the flags properly.  Also they were
only used by constructors: callers packed bits, and the constructors
unpacked them into booleans on the parser or preparser.

The solution is to allow parser construction, configuration, and
invocation to be separated.  This patch does that.

It passes the existing tests.

BUG=

Review URL: https://codereview.chromium.org/13450007
Patch from Andy Wingo <wingo@igalia.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14151 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-05 13:01:06 +00:00
hpayer@chromium.org
ff85f50e84 Refactoring BuildAllocateElements.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14147 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-05 08:35:40 +00:00
mstarzinger@chromium.org
af25102f41 Compile FastCloneShallowArrayStub using Crankshaft.
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14143 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-04 17:55:43 +00:00
danno@chromium.org
cb650a51de Remove extranous holder load in some prototype-chain checking cases
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14136 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-04 11:38:10 +00:00
dslomov@chromium.org
a172a5e839 Remove (H|L)JSArrayLength instructions
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14127 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-03 16:25:24 +00:00
mstarzinger@chromium.org
2816f19680 Add parser support for generators.
This patchset begins by adding support for "yield", which is unlike other tokens
in JS. In a generator, whether strict or classic, it is a syntactic keyword.
In classic mode it is an identifier. In strict mode it is reserved.

This patch adds YIELD as a token to the scanner, and adapts the preparser and
parser appropriately. It also parses "function*", indicating that a function is
actually a generator, for both eagerly and lazily parsed functions.

Currently "yield" just compiles as "return".

BUG=v8:2355
TEST=mjsunit/harmony/generators-parsing

Review URL: https://codereview.chromium.org/12646003
Patch from Andy Wingo <wingo@igalia.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14116 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-02 17:34:59 +00:00
dslomov@chromium.org
e357ddc249 Replace ICStub for array.length with hydrogen stub
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14090 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-28 12:43:19 +00:00
rossberg@chromium.org
83d4a41dec ES6 symbols: turn symbols into a proper primitive type
(qua last week's TC39)

Specifically:
- Install Symbol constructor function on the global object.
- Adjust code generation for typeof.
- Remove IsSymbol built-in, IS_SYMBOL macro now defined using typeof.
- Remove hack that allowed symbols as constructor results, and some other special cases.
- Remove symbol_delegate and GetDelegate function.
- Extend ToBoolean stub to handle symbols.
- Extend ToNumber to return NaN on symbols.
- Poison symbol's toString function, and thereby ToString on symbols.

R=mstarzinger@chromium.org
BUG=v8:2158

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14051 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-22 16:33:50 +00:00
danno@chromium.org
b8fd25277a Fix bugs in previous_ast_id tracking
R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14045 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-22 12:34:38 +00:00
danno@chromium.org
ffd0c712e8 Implement many KeyedStoreStubs using Crankshaft
- Addition of a compiled hydrogen stub for KeyedStores.
- Inlining of "grow" stubs into OPTIMIZED_FUNCTIONs
- Addition of new "ignore OOB" ic stub that silently swallows out-of-bounds stores to external typed arrays.
- Addition of new "copy-on-write" ic stub that inlines allocation and copying operations for cow array
- New stub are generated with Crankshaft, so they are automatically inlined into OPTIMIZED_FUNCTIONs

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14001 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-20 10:37:13 +00:00
jkummerow@chromium.org
e2cd7aa423 Fix detection of |handle_smi| case in HOptimizedGraphBuilder::HandlePolymorphicCallNamed
BUG=chromium:196583

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13963 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-18 12:41:52 +00:00
mmassi@chromium.org
73e83b0b0f Handling expression decomposition and array bounds check hoisting: working code with lots of debugging PrintFs, postdominance check still missing.
Review URL: https://codereview.chromium.org/12377072

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13961 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-18 08:06:00 +00:00
hpayer@chromium.org
05a71fc9e4 Allow direct allocation in old pointer space.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13940 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-14 08:32:52 +00:00
yangguo@chromium.org
a722726dc4 Parallel recompilation: fewer handle dereferences and tighter checks.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13935 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-13 16:13:05 +00:00
verwaest@chromium.org
4cb46f4d57 Polymorphism support for numbers and strings
Necessary to support fast polymorphic toString.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13914 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-12 17:01:03 +00:00
jkummerow@chromium.org
00df65117d In the absence of type feedback, pessimistically force Tagged representation for UnaryAdd
BUG=v8:2527

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13890 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-11 08:42:07 +00:00
mvstanton@chromium.org
1691f43b8b To fully support hydrogen code stubs which accept a variable number of arguments,
the HReturn/LReturn instruction needs to be able to determine argument count
from a stack evaluation rather than as a constant from scope.

R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13888 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-08 21:07:55 +00:00
svenpanne@chromium.org
61a2c53d09 Track Hydrogen statistics on a per-Isolate basis
This is basically the same fix as the one for --trace-hydrogen, but now for
--hydrogen-stats. Removed a few train wrecks on the way.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13835 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-06 10:49:34 +00:00
svenpanne@chromium.org
0e3ed17ea4 Separate output files for --trace-hydrogen.
The output filenames have now the form "hydrogen-<ProcessId>-<IsolateId>.cfg".
Minor cleanup on the way.

Note that we have a similar bug regarding statistics, but this will be handled
in a separate CL.

BUG=v8:2563

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13834 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-06 07:25:46 +00:00
mvstanton@chromium.org
575c2c5a54 Bugfix: allow handle dereference only when we have a valid hydrogen graph or lithium chunk.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13793 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-04 12:34:49 +00:00
mvstanton@chromium.org
c4caf766bf Allocation Info Tracking, continued.
Addresses missing cases for array literals.
Adds support for "new Array()" call sites. This isn't complete yet, I have to run with --noinline_new.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13790 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-01 16:06:34 +00:00
mvstanton@chromium.org
fce0a11f05 Handle dereferencing needs to be allowed for printing during optimization phase.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13789 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-01 15:50:57 +00:00