Commit Graph

324 Commits

Author SHA1 Message Date
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
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
bmeurer@chromium.org
44f576ba65 Replace BuildExternalArrayElementAccess() with AddExternalArrayElementAccess().
This is trivial cleanup. All calls to BuildExternalArrayElementAccess()
pass the result to AddInstruction().

R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15791 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-22 08:20:47 +00:00
bmeurer@chromium.org
1b73068626 Replace BuildFastElementAccess() with AddFastElementAccess().
This is trivial cleanup. All calls to BuildFastElementAccess() pass
the result to AddInstruction().

R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15789 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-22 07:00:46 +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
verwaest@chromium.org
be472d82fd Fix wrong bailout id in polymorphic stores.
BUG=chromium:259787
R=titzer@chromium.org, ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15763 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-19 08:45:47 +00:00
jkummerow@chromium.org
22f2fd8397 Synchronize Compare-Literal behavior in FullCodegen and Hydrogen
BUG=chromium:260345
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15723 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-17 13:13:38 +00:00
bmeurer@chromium.org
410b4b2db4 Reland "Turn ElementsTransitionAndStore stub into a HydrogenCodeStub".
Fix the invalid array length check, replacing it with a check of
the elements pointer similar to TransitionElementsKindStub.
Refactor common code from ElementsTransitionAndStoreStub and TransitionElementsKindStub into BuildTransitionElementsKind() helper method.
Add test case for the MD5 computation that used to crash before,
and a small test case for the specific issue.

R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15713 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-17 11:37:20 +00:00
svenpanne@chromium.org
0e99e77143 Removed unused HOptimizedGraphBuilder::BuildCallSetter method.
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15696 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-17 08:02:08 +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
bmeurer@chromium.org
fb77805ab7 Turn propagate deoptimizing mark into a proper HPhase.
Also turn the recursion on the domination chain into a loop with
an explicit stack, to avoid possible stack overflow here.

R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15660 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-15 09:53:00 +00:00
bmeurer@chromium.org
1384094efc Cleanup leftover definitions in HGraph.
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15654 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-15 07:41:18 +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
bmeurer@chromium.org
c294a40e0a Turn canonicalization into a proper HPhase.
R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15613 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 08:21:50 +00:00
bmeurer@chromium.org
695b18c050 Turn merge removable simulates into a proper HPhase.
R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15609 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 16:34:28 +00:00
bmeurer@chromium.org
5664bcaed3 Refactor compute minus zero checks into a proper HPhase.
R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15595 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 14:08:19 +00:00
verwaest@chromium.org
cc877e4836 Turn polymorphic calls using the same prototype monomorphic.
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15593 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 13:05:41 +00:00
bmeurer@chromium.org
bdff9c70b8 Use BuildGrowElementsCapacity for the TransitionElementsKind stub.
R=danno@chromium.org, dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15589 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 12:19:02 +00:00
verwaest@chromium.org
22d7a85519 Unify Count Operation assignment with other assignments
This relands 15578, disables 1 test in harmony observe re bug v8:2774

R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15588 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 12:02:18 +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
dslomov@chromium.org
6071894047 Revert "Unify the Count Operation assignment with other assignments."
This reverts commit r15578.

This change made mjsunit/harmony/object-observe.js flaky.

TBR=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15580 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 07:53:16 +00:00
verwaest@chromium.org
5eeed4636d Unify the Count Operation assignment with other assignments.
This does not enable inlining of setters (yet).

R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15578 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-09 17:08:47 +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
bmeurer@chromium.org
47df386841 Turn the representation changes into a proper HPhase.
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15541 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 09:02:09 +00:00
bmeurer@chromium.org
99f171a128 Turn redundant bounds checks elimination into a proper HPhase.
R=dslomov@chromium.org, mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15537 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 08:36:28 +00:00
bmeurer@chromium.org
b899185790 Turn infer types into proper HPhase.
R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15535 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 08:33:03 +00:00
bmeurer@chromium.org
e5b69658e4 Turn redundant phi elimination into proper HPhase.
R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15533 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 08:18:29 +00:00
bmeurer@chromium.org
17e58e8198 Turn dead code elimination into a proper HPhase.
R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15529 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-07 06:00:15 +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
titzer@chromium.org
bddf08b0b1 Factor out OSR-related graph-building functionality from hydrogen.cc.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15488 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-04 09:20:07 +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
bmeurer@chromium.org
f60609bd1b Turn UInt32 analysis into a proper HPhase.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15441 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-02 10:53:08 +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
c28a6c9ea2 Use HInstructionIterator more broadly for hydrogen.
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15394 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 16:31:11 +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
382ec92f2a Make use of templatized convienience functions for adding Hydrogen instructions.
Building on the previous changes from https://codereview.chromium.org/18050004/
this patch makes even more use of the templatized functions for adding
Hydrogen instructions.

R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15379 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 11:44:16 +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
hpayer@chromium.org
2957b2fdf8 Fix check style breakage.
BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15363 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 15:17:55 +00:00
danno@chromium.org
f95ddc8891 Add templatized convienience functions for adding hydrogen instructions
R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15360 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 14:36:14 +00:00
bmeurer@chromium.org
32f5e099d4 Add templatized Run() method for Hydrogen phases.
Depends upon https://codereview.chromium.org/17657004

R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15355 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 13:13:18 +00:00
bmeurer@chromium.org
98786ae073 Refactor Hydrogen GVN into an HPhase and use the phase zone.
The HGlobalValueNumberer class is renamed to HGlobalValueNumberingPhase,
following the naming scheme suggested by danno@chromium.org in
https://codereview.chromium.org/17458002

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

Depends upon https://codereview.chromium.org/18022002

R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15353 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 13:09:08 +00:00
bmeurer@chromium.org
073b1d1dfb Move phase_zone from CompilationInfo to CompilationPhase.
Each CompilationPhase has its own zone, used for phase local
allocations. The zone of CompilationInfo should only be used
for non phase local allocations.

R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15352 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 13:03:01 +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
bmeurer@chromium.org
9f05d61a1d Split HPhase for Lithium and Hydrogen using common CompilationPhase base.
Add new base class CompilationPhase, which is the base for both HPhase, LPhase and LAllocatorPhase. HPhase is now for Hydrogen passes only, LPhase is for Lithium passes and LAllocatorPhase is for LAllocator phases.

R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15321 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-25 12:22:26 +00:00