Commit Graph

433 Commits

Author SHA1 Message Date
jkummerow@chromium.org
e9046dccb3 Disable Smi representation support for HMathMinMax
because it's incomplete on x64.

BUG=v8:2808
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15893 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-26 09:00:43 +00:00
verwaest@chromium.org
8e719ea472 Remove support for smi-based keyed accesses on 64bit.
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15881 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-25 12:22:23 +00:00
verwaest@chromium.org
5de783d47e Adding Smi support to Add, Sub, Mul, and Bitwise
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15879 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-25 11:53:38 +00:00
titzer@chromium.org
5dd517ff3b Move representation into HObjectAccess and remove from HLoadNamedField and HStoreNamedField.
BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15875 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-25 09:37:52 +00:00
mmassi@chromium.org
b5a43f48a6 New array bounds check elimination pass (focused on induction variables and bitwise operations).
R=titzer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15866 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-25 06:37:25 +00:00
titzer@chromium.org
82a54b0077 Remove HCompareConstantEqAndBranch (never used), and its corresponding Lithium instructions.
BUG=
R=bmeurer@chromium.org, mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15853 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-24 10:48:16 +00:00
mstarzinger@chromium.org
3cdeb2f9cd Avoid adding HWrapReceiver during graph building.
This adds an early check to the graph builder which prevents adding an
HWrapReceiver instruction if the receiver type is already known at graph
building time. Also HAllocate no longer unnecessarily postpones setting
it's type until type inference but sets it right away. These changes are
in preparation for escape analysis.

R=titzer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15843 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-24 08:05:49 +00:00
danno@chromium.org
8cbbdd066c Unify SoftDeoptimize and Deoptimize hydrogen instructions
BUG=chromium:258519
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15827 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-23 13:35:10 +00:00
verwaest@chromium.org
7e08f81e6d Also eliminate map checks with transitions.
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15821 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-23 10:01:06 +00:00
verwaest@chromium.org
babce318d1 Eliminate map checks of constant values.
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15819 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-23 09:18:42 +00:00
olivf@chromium.org
b8d7bee4a3 Avoid tagged values for Instructions that truncate the operands with ToNumber.
I case the ToNumber is applied to a non numeric value but its not observable (some constants and oddballs) we should already do it in hydrogen...

BUG=
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15818 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-23 09:13:59 +00:00
yangguo@chromium.org
5aa717a0ad Cosmetic changes.
R=bmeurer@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15815 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-23 07:31:46 +00:00
hpayer@chromium.org
ecc31a0cee Prefill pre-allocated memory of folded allocation with one pointer fillers when heap verifier is on.
BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15798 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-22 11:07:43 +00:00
mvstanton@chromium.org
ec8c6f4692 Rename AllocationSiteInfo to AllocationMemento
This is just a rename change with the exception of a bug found along the way in
CodeStubGraphBuilder<FastCloneShallowArrayStub>::BuildCodeStub(). There, the
intent is to get the boilerplate object from an AllocationSite. But the wrong
HObjectAccess was used. It only succeeds because it happened to be the same
offset :).

BUG=
R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15778 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-19 13:30:49 +00:00
bmeurer@chromium.org
5e85399572 Cleanup StringAddFlags.
Avoid duplication of StringAddFlags in the platform specific code stubs header files.
Fix the inverted flag logic, replacing it with a scheme that is easier to understand.

Depends on: https://codereview.chromium.org/19541003

R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15775 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-19 11:52:42 +00:00
bmeurer@chromium.org
d750a6dcd8 Consistently use HStringAdd instead of HCallStub with CodeStub::StringAdd.
Previously there were two ways to actually use the StringAddStub
from Hydrogen:

- Either using HStringAdd (which implied NO_STRING_CHECK_IN_STUB
  and and does the argument handling internally),
- or using HCallStub with CodeStub::StringAdd (which implied
  NO_STRING_ADD_FLAGS and expected the arguments to be on the
  stack already).

R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15771 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-19 09:42:15 +00:00
mvstanton@chromium.org
b9f0c06ab2 The gc should be able to traverse all AllocationSites for decision making. The sites are threaded into a weak list. Special problems include:
* Allocations of AllocationSites occur in generated code, so generated code needs to be able to add to the list. For now I have a special hydrogen instruction, though it would be nice to use general purpose instructions.
* The snapshot contains AllocationSites, and these need to be re-threaded into the list on deserialization.

Something nice is that the AllocationSites are only created in old space, so a special new space visitor isn't required.

BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15715 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-17 11:50:24 +00:00
mvstanton@chromium.org
4465c83104 Calls to HCheckFunction can be eliminated if the value is an HConstant.
Reland "Calls to HCheckFunction can be eliminated if the value is an HConstant"
(https://codereview.chromium.org/18751003/).

The CL failed because of heap snapshot issues. alph@chromium.org just checked in
a fix for that (https://code.google.com/p/v8/source/detail?r=15694).

BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15704 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-17 08:46:01 +00:00
mstarzinger@chromium.org
35052bc2ea Reland deprecation of HAllocateObject in favor of HAllocate.
This essentially relands r14930 and r14935 with adaptions to the current
code base. It 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/19207002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-15 15:12:16 +00:00
hpayer@chromium.org
99d541a486 Allocation folding integrated into the GVN phase.
BUG=
R=mstarzinger@chromium.org, titzer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15624 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 11:41:33 +00:00
mvstanton@chromium.org
448b268962 Revert "Calls to HCheckFunction can be eliminated if the value is an HConstant"
This reverts commit 3f96122cc572f7a0b638c30f65328c3cb3666795.

BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15590 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 12:19:37 +00:00
olivf@chromium.org
857178ad23 Replace custom builtin invocation instructions by a generic version
BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15582 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 09:02:23 +00:00
mvstanton@chromium.org
23695eb86e Rename AllocationSite::payload to AllocationSite::transition_info
BUG=
R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15556 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 15:00:12 +00:00
mvstanton@chromium.org
67d9051bcd Create AllocationSite objects, pointed to by AllocationSiteInfo.
This creates a platform where we can do additional things with allocation sites,
other than just aid in reducing array transitions.

BUG=
R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15545 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 10:02:16 +00:00
mvstanton@chromium.org
eea586f2a1 Calls to HCheckFunction can be eliminated if the value is an HConstant
function, and that function handle matches the target handle.

BUG=
R=danno@chromium.org, mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15540 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 09:00:59 +00:00
danno@chromium.org
bd50e6d38f Refactoring and cleanup of control instructions
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15513 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 10:40:14 +00:00
danno@chromium.org
345cc98a25 Generate StoreGlobal stubs with Hydrogen
- Constants globals are inlined into Hydrogen code using code dependencies that invalidate the Crankshafted code when global PropertyCells or the global object change.
- The more general case generates code that is just as good as the hand-written assembly stubs on all platforms.

R=rossberg@chromium.org, ulan@chromium.org

Committed: http://code.google.com/p/v8/source/detail?r=15419

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15512 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 10:34:02 +00:00
olivf@chromium.org
240c7aced9 Convert UnaryOpStub to a HydrogenCodeStub
BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15506 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 09:26:22 +00:00
hpayer@chromium.org
8983f669e4 Set GVN ChangesNewSpacePromotion for OSR Entry.
BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15501 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 08:17:30 +00:00
olivf@chromium.org
950a372834 Revert "Convert UnaryOpStub to a HydrogenCodeStub"
The problem is the HCallConstantFunction which is not context sensitive, so we leak the builtin. We first need a Hydrogen version of __ IvokeBuiltin.

BUG=
R=danno@chromium.org, machenbach@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15486 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-03 19:57:25 +00:00
olivf@chromium.org
0d2fed8f26 Convert UnaryOpStub to a HydrogenCodeStub
BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15473 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-03 14:56:53 +00:00
titzer@chromium.org
63abcc515b Remove HFixedArrayBaseLength instruction and replace with regular HLoadNamedField.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15454 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-02 15:31:17 +00:00
jkummerow@chromium.org
a2d4cf9de7 Not consider the use representation in unintiliazed ArrayLiteral which always requires SMI
R=jkummerow@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15450 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-02 15:00:13 +00:00
danno@chromium.org
77c20c30a3 Revert r15419: "Generate StoreGlobal stubs with Hydrogen"
TBR=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15427 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 15:12:21 +00:00
danno@chromium.org
a3bce19868 Generate StoreGlobal stubs with Hydrogen
- Constants globals are inlined into Hydrogen code using code dependencies that invalidate the Crankshafted code when global PropertyCells or the global object change.
- The more general case generates code that is just as good as the hand-written assembly stubs on all platforms.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15419 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 13:22:13 +00:00
mstarzinger@chromium.org
8b976da60e First simplistic implementation of escape analysis.
R=jkummerow@chromium.org, titzer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15393 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 16:09:54 +00:00
mvstanton@chromium.org
83519ec87a Hydrogen array constructor cleanup and improvements
* Cleanup of LCallNewArray::PrintDataTo() method
* Created HCallNewArray::PrintDataTo()
* Created many more tests in array-constructor-feedback.js
* Removed redundant instructions in
  GenerateRecordCallTarget
* Bugfix in CreateArrayDispatchOneArgument: on a call to
  new Array(0), we'd like to set the type feedback cell to
  a packed elements kind, but we shouldn't do it if the
  cell contains the megamorphic sentinel.
* When used from crankshaft, ArrayConstructorStubs can
  avoid verifying that the function being called is the
  array function from the current native context, relying
  instead on the fact that crankshaft issues an
  HCheckFunction to protect the constructor call. (this
  new minor key is used in LCodeGen::DoCallNewArray(), and
  influences code generation in
  CodeStubGraphBuilderBase::BuildArrayConstructor()).
* Optimization: the array constructor specialized for
  FAST_SMI_ELEMENTS can save some instructions by looking
  up the correct map on the passed in constructor, rather
  than indexing into the array of cached maps per element
  kind.

BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15383 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 13:16:14 +00:00
bmeurer@chromium.org
f11af230e8 Refactor HInferRepresentation into an HPhase and use the phase zone.
Rename HInferRepresentation to HInferRepresentationPhase,
following naming scheme suggested by danno@chromium.org in
https://codereview.chromium.org/17458002

The HInferRepresentationPhase now uses the phase zone for all its
allocations.

Depends on https://codereview.chromium.org/17587008

R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15373 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 07:40:35 +00:00
danno@chromium.org
3b60d6de8e Make sure HCallNewArray uses right ElementsKind
Close a small gc window that exists between when a HNewArrayCall instruction is
created and the ElementsKind type feedback for the construction function is
accesses.

R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15359 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 14:22:07 +00:00
olivf@chromium.org
21cd74eaa2 Avoid Unnecessary Smi Checks
BUG=
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15344 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-26 17:37:55 +00:00
mstarzinger@chromium.org
bd90e71b01 Fix ugly typo in HValue::UpdateRepresentation.
R=jkummerow@chromium.org
TEST=mjsunit/math-min-max --extra-flags="--gc-interval=500"

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15301 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 14:34:07 +00:00
rossberg@chromium.org
0977c60984 Use AST's type field and merge types for unary, binary & compare ICs
R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15264 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-21 11:10:06 +00:00
olivf@chromium.org
29d3461529 Let NaN flow as double into HBranch + some minor improvements
BUG=
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15246 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 13:51:03 +00:00
verwaest@chromium.org
4922e3d206 Flexible representation for BuildIncrement, but CannotBeTagged.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15244 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 13:22:46 +00:00
mstarzinger@chromium.org
ea87d08557 Revert r14930 and r14935 temporarily.
This is a temporary revert to track down a potential perf regression
introduced in r14930. The following two changes were reverted:
- "Deprecate HAllocateObject in favor of HAllocate."
- "Added pretenuring support for call new."

R=danno@chromium.org
BUG=chromium:247504

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15229 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 10:48:14 +00:00
verwaest@chromium.org
328aeb14fb Revert "Improved range analysis for bitwise operations."
This reverts commit r15170

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15173 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-14 17:25:03 +00:00
verwaest@chromium.org
98167ed0a8 Improved range analysis for bitwise operations.
R=fschneider@chromium.org, verwaest@chromium.org

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

Patch from Stephen Adams <sra@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15170 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-14 16:55:34 +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
verwaest@chromium.org
84759d7e6e Cleanup RepresentationFromUseRequirements, move it to HValue and use it where relevant
BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15155 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-14 14:13:48 +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