Commit Graph

341 Commits

Author SHA1 Message Date
bmeurer@chromium.org
9929a9cd12 Use V8_FINAL and V8_OVERRIDE in various places, fixing bugs revealed by them.
- Use V8_FINAL and V8_OVERRIDE in objects.
- Use V8_FINAL and V8_OVERRIDE in Ast classes.
- Use V8_FINAL and V8_OVERRIDE in Lithium mips backend.
- Use V8_FINAL and V8_OVERRIDE in Lithium arm backend.
- Use V8_FINAL and V8_OVERRIDE in Lithium x64 backend.
- Use V8_FINAL and V8_OVERRIDE in Lithium ia32 backend.
- Use V8_FINAL and V8_OVERRIDE in Lithium classes.
- Use V8_FINAL and V8_OVERRIDE in Hydrogen classes.

R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16232 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-20 07:27:06 +00:00
verwaest@chromium.org
ee53b0a5ed Make all load-named-fields depend on their map-check, unless explicitly ignored.
BUG=
R=titzer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16139 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-09 18:40:10 +00:00
mstarzinger@chromium.org
cc3b7a007f Allow HPhis to have an invalid merge index.
All phis that do not represent local variables or values on the operand
stack are not allowed to carry a merge index, as the replay of the
HEnvironment during LChunkBuilder time might get out of sync due to
colliding indexes.

R=danno@chromium.org
BUG=v8:2815

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16135 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-09 15:18:23 +00:00
mvstanton@chromium.org
201c512dc7 Deoptimization is easier to diagnose when there is a text reason.
BUG=
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16131 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-09 12:50:42 +00:00
svenpanne@chromium.org
bc6fe88030 Desugar bitwise negation into XOR and kill all UnaryOp stuff.
R=mstarzinger@chromium.org, verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16073 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-06 13:34:51 +00:00
verwaest@chromium.org
04b5e7fa63 Replace HCheckPrototypeMaps by explicit map checks of constant values.
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16055 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-05 13:45:16 +00:00
svenpanne@chromium.org
d5b9616991 Clean some unuse code of unary negation
R=svenpanne@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16036 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-05 06:34:26 +00:00
loislo@chromium.org
d2c443b774 Extract hardcoded error strings into a single place and replace them with enum.
I'd like to propagate bailout reason to cpu profiler.
So I need to save it into heap object SharedFunctionInfo.
But:
1) all bailout reason strings spread across all the sources.
2) they are native strings and if I convert them into String then I may have a performance issue.
3) one byte is enough for 184 bailout reasons. Otherwise we need 8 bytes for the pointer.

Also I think it would be nice to have error strings collected in one place.
In that case we will get additional benefits:

It allows us to keep this set of messages under control.
It gives us a chance to internationalize them.
It slightly reduces the binary footprint.

From the other hand the developers have to add new strings into that enum.

BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16024 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-02 09:53:11 +00:00
bmeurer@chromium.org
3da5d1ad7b Get rid of HStringLength.
Use HLoadNamedField to load the string length field instead.

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

R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16002 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-01 08:42:47 +00:00
danno@chromium.org
4cdffbf4fe Improve instruction creating/adding shorthand in HGraphBuilder
Add multi-argument templates for New, NewUncasted, Add and AddUncasted that
call boilerplate HInstruction::New methods rather than the constructor directly.
This allows for automatic passing of the zone and context for instructions that
need them.

R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15990 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-31 14:58:39 +00:00
verwaest@chromium.org
3143f5f88b Remove special handling of fields in combination with elements transitions in Crankshaft.
Instead first try to keep ICs monomorphic if elements kinds generalize. If that fails, use standard polymorphic handling. The Try*PolymorphicAsMonomorphic methods will automatically produce code similar to the previous approach using CheckMapsWithTransitions.

BUG=
R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15982 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-31 10:08:05 +00:00
bmeurer@chromium.org
82e4ba6f70 Turn mark deoptimize on undefined into a proper HPhase.
This patch also removes the implicit recursion on phi operands,
using a loop and a worklist instead, to avoid potential stack
overflows.

R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15952 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-30 10:25:20 +00:00
bmeurer@chromium.org
b019910a38 This adds generic support for ExternalReferences in Hydrogen (and Lithium), as required for AddIncrementCounter.
R=danno@chromium.org, titzer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15936 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-29 13:56:51 +00:00
mstarzinger@chromium.org
f06f57f7fb Make standalone D8 trace to single hydrogen.cfg file.
R=titzer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15882 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-25 14:11:53 +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
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
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