Commit Graph

295 Commits

Author SHA1 Message Date
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
rossberg@chromium.org
55f93b5532 Renamed "symbols" to "internalized strings" throughout the code base,
in preparation of the introduction of ES6 'symbols' (aka private/unique names).

The SymbolTable became the StringTable. I also made sure to adapt all comments. The only remaining use of the term "symbol" (other than unrelated uses in the parser and such) is now 'NewSymbol' in the API and the 'V8.KeyedLoadGenericSymbol' counter, changing which might break embedders.

The one functional change in this CL is that I removed the former 'empty_string' constant, since it is redundant given the 'empty_symbol' constant that we also had (and both were used inconsistently).

R=yangguo@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13781 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-28 17:03:34 +00:00
jkummerow@chromium.org
610d78cd2c Integer HConstants don't need to kDependsOnOsrEntries
Review URL: https://codereview.chromium.org/12299009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13751 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-27 11:40:25 +00:00
mstarzinger@chromium.org
7d681e014d Compile FastCloneShallowObjectStub using Crankshaft.
This changes FastCloneShallowObjectStub to be compiled independent of
the target architecture. It also adds tracing to the deoptimizer for
compiled stubs and contains some minor bugfixes.

R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13732 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-26 13:08:08 +00:00
svenpanne@chromium.org
fb6776e84a Made Isolate a mandatory parameter for everything Handle-related.
Unified parameter order of CreateHandle with the rest of v8 on the way. A few
Isolate::Current()s had to be introduced, which is not nice, and not every place
will win a beauty contest, but we can clean this up later easily in smaller steps.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13717 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-25 14:46:09 +00:00
yangguo@chromium.org
0d63cef35b Constant fold math and string operations.
R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13705 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-21 11:40:37 +00:00
mmassi@chromium.org
8ef28eb5ee Fixed numeric relations on HPhi instances.
Review URL: https://codereview.chromium.org/12301027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13703 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-21 10:22:31 +00:00
ulan@chromium.org
3a1eca4242 Remove prototype checks for leaf maps in optimized code.
Review URL: https://chromiumcodereview.appspot.com/12225099

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13697 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-20 11:49:54 +00:00
mmassi@chromium.org
bb886feb20 Remove purely informative definitions from the graph.
Review URL: https://codereview.chromium.org/12282033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13696 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-19 16:32:02 +00:00
mmassi@chromium.org
20913187c0 Fix HCheckSmiOrInt32 fake observed representation.
Review URL: https://codereview.chromium.org/12259008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13694 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-19 14:24:25 +00:00
mmassi@chromium.org
a5c6716cf5 Infrastructure classes for evaluating numeric relations between values.
Review URL: https://codereview.chromium.org/12226112

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13656 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-13 14:16:15 +00:00
mmassi@chromium.org
6333383ceb Remove instructions properly (stack check elimination was leaving "dangling uses" around).
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13647 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-12 12:04:29 +00:00
mmassi@chromium.org
2fb5064487 Separated smi check from HBoundsCheck.
Review URL: https://codereview.chromium.org/12208013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13645 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-12 11:44:08 +00:00
danno@chromium.org
4c052815df Support pass-through of stub caller arguments
Review URL: https://codereview.chromium.org/12093089

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13593 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-05 08:09:32 +00:00
danno@chromium.org
0c3575c874 Generate the TransitionElementsStub using Crankshaft
This includes:
* Adding support for saving callee-clobbered double registers in Crankshaft code.
* Adding a new "HTrapAllocationMemento" hydrogen instruction to handle AllocationSiteInfo data in crankshafted stubs.
* Adding a new "HAllocate" hydrogen instruction that can allocate raw memory from the GC in crankshafted code.
* Support for manipulation of the hole in HChange instructions for Crankshafted stubs.
* Utility routines to manually build loops and if statements containing hydrogen code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13585 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-04 12:01:59 +00:00
mmassi@chromium.org
3b8a61dcf3 Base iDef update code.
Review URL: https://codereview.chromium.org/12079042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13575 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-01 10:16:16 +00:00
mmassi@chromium.org
89c4153581 Foundation for the use of informative definitions in Crankshaft.
Review URL: https://codereview.chromium.org/12090021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13543 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-29 15:46:34 +00:00
mstarzinger@chromium.org
44ffa0dcd3 Allow monomorphic loads when static type is known.
This allows Crankshaft to generate monomorphic loads when the receiver
type is statically known even though the load site has polymorphic type
feedback. This applies to inlined constructor calls and literals.

R=jkummerow@chromium.org
TEST=mjsunit/compiler/property-static

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13500 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-24 17:54:30 +00:00
mstarzinger@chromium.org
1d124f0a75 Allow removal of obsolete map checks after transitions.
This allows side effect dominator tracking to remove map checks that are
dominated by a single HStoreNamedField that performs a transition on the
same object. A similar trick could be applied to HAllocateObject.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13488 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-24 09:10:06 +00:00
ulan@chromium.org
d29826544e Correctly set kCanBeDivByZero flag for HMathFloorOfDiv.
After r13289 the divisor can be non-constant, so we should check for zero.

BUG=171641
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13479 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-23 15:58:49 +00:00
yangguo@chromium.org
3c22524119 Avoid handle dereference during graph optimization.
With parallel recompilation enabled, objects made accessible by handles may
have changed between graph construction and graph optimization. Therefore
we must not assume that information on those objects remain the same between
those two phases. To police this, we forbid handle dereferencing during
graph optimization.
Exceptions to this rule are:
 - Dereferencing the handle to obtain the raw location of the object. This
   is safe since parallel recompilation acquires RelocationLock
 - Some places that dereference the handle for a type check. These are checked
   to be safe on a case-by-case basis.

R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13475 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-23 13:52:00 +00:00
yangguo@chromium.org
7f331f6280 Make HCheckPrototypeMaps compatible with parallel recompilation.
HCheckPrototypeMaps currently records the prototype and the holder of the
prototype chain (both ends of the chain) and assumes that the chain elements
and their maps did not change in during the entirety of Crankshaft. The actual
traversal of the prototype chain happens in Lithium at code generation.
With parallel compilation, this assumption is not longer correct.

R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13454 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-21 15:49:00 +00:00
mmassi@chromium.org
ca78326b66 Revert r13409 ("Make the array bounds check elimination phase optional (and set the foundation for introducing SSI in a simple way).") because of a crash in octane/mandreel.
Review URL: https://chromiumcodereview.appspot.com/11962041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13416 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-17 16:09:08 +00:00
jkummerow@chromium.org
a496e0d06a Don't emit code for instructions that are hiding behind an HSoftDeoptimize
Review URL: https://codereview.chromium.org/11377135

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13412 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-17 14:07:47 +00:00
mmassi@chromium.org
583f67b54b Make the array bounds check elimination phase optional (and set the foundation for introducing SSI in a simple way).
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13409 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-17 12:39:16 +00:00
mvstanton@chromium.org
7884216804 Additional work to get array literal allocation tracking working, even with --always-opt
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13406 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-17 08:41:27 +00:00
mstarzinger@chromium.org
0484ddcf50 Fix arguments materialization for inlined apply().
This fixes materialization of the arguments object in case the constant
function check if TryCallApply() inside an inlined frame fails.

R=svenpanne@chromium.org
BUG=v8:2489
TEST=mjsunit/regress/regress-2489

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13386 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-16 09:25:45 +00:00
svenpanne@chromium.org
252fbddc67 Improved printing of HForceRepresentation.
Review URL: https://codereview.chromium.org/11745011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13301 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-03 10:05:40 +00:00
danno@chromium.org
45a012ec2c Elide unnecessary context reload in generated stubs.
Review URL: https://codereview.chromium.org/11550005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13290 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-28 16:25:38 +00:00
danno@chromium.org
e797e5a489 Fix crashes in debug output of generated stubs
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13201 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-11 23:27:15 +00:00
mmassi@chromium.org
3b0ee64664 Revert r13176.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13182 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-10 12:55:50 +00:00
jkummerow@chromium.org
35cd58365d Make sure HMathMinMax always has a supported representation
Review URL: https://codereview.chromium.org/11467021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13180 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-10 12:10:23 +00:00
yangguo@chromium.org
c70a0f9334 Improve integer division on IA32 and X64
If the divisor is a Power-of-2 constant, we could use shifts instead of the
expensive idiv instructions, which also loose the register constraints.

Review URL: https://chromiumcodereview.appspot.com/11478043
Patch from Yuqiang Xian <yuqiang.xian@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13178 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-10 11:02:22 +00:00
mmassi@chromium.org
1aa2891ca4 Make keyed operations use the unchecked index but still depend on the checked one.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13176 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-10 08:56:24 +00:00
yangguo@chromium.org
c75ca45000 Improve array to string conversion.
BUG=v8:2435

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13144 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-05 15:49:22 +00:00
jkummerow@chromium.org
79563b22c9 Faster implementation of Math.exp()
Review URL: https://codereview.chromium.org/11418149

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13054 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-26 13:12:35 +00:00
mmassi@chromium.org
a0582112f8 Revert r13025 and r13026 (they introduced a bug on arm and regressed octane crypto).
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13039 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-23 10:53:03 +00:00
mmassi@chromium.org
5e7f30a596 Use the property load IC for accessing the array length.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13025 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-21 11:49:15 +00:00
jkummerow@chromium.org
1c086d1202 Lattice-based representation inference, powered by left/right specific type feedback for BinaryOps and comparisons
Review URL: https://chromiumcodereview.appspot.com/10837165

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12961 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-14 15:59:45 +00:00
svenpanne@chromium.org
6f9a75a449 Removed useless Canonicalize implementations subsumed by dead code elimination.
Review URL: https://codereview.chromium.org/11362085

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12857 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-05 14:38:00 +00:00
ulan@chromium.org
f106c9c9f7 Add rotate-right instruction to hydrogen and use it instead of bitwise operations
of the form ((x >>> i) | (x << (32 - i))).

This CL is based on https://chromiumcodereview.appspot.com/10984057/
by Jay Conrod <dconrod@codeaurora.org>.

R=danno@chromium.org,mstarzinger@chromium.org,dconrod@codeaurora.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12855 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-05 13:28:10 +00:00
svenpanne@chromium.org
9de1d40d28 Improve handling of property loads on the proto chain.
Previously Crankshaft emitted a generic load for these, now we emit a load of a
named field, guarded by a proto chain check.

LCheckPrototypeMaps now returns the holder, which is for free, because it
already had to check its map as the last step, anyway. This is in sync with what
StubCompiler::CheckPrototype does.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12847 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-05 08:53:54 +00:00
mvstanton@chromium.org
a85fd03caa Consolidated all the key store/load classes in the Hydrogen and Lithium
space into just two:
HLoadKeyed/HLoadKeyedGeneric and HStoreKeyed/HStoreKeyedGeneric
LLoadKeyed/LLoadKeyedGeneric and LStoreKeyed/LStoreKeyedGeneric
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12839 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-02 09:18:53 +00:00
mstarzinger@chromium.org
c0461d999c Update ReceiverObjectNeedsWriteBarrier to include HFastLiteral
This will prevent unnecessary write barriers for literals.
BUG=none
TEST=none

Review URL: https://codereview.chromium.org/11143005
Patch from Derek J Conrod <dconrod@codeaurora.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12823 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 15:45:24 +00:00
mstarzinger@chromium.org
e119459af2 Set kChangesNewSpacePromotion for HStringAdd
TEST=none
BUG=none

Review URL: https://codereview.chromium.org/11143006
Patch from Derek J Conrod <dconrod@codeaurora.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12822 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 15:23:39 +00:00
svenpanne@chromium.org
bcb383e055 Improved printing of HLoadElements instruction.
TBR=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12743 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-16 11:41:07 +00:00
svenpanne@chromium.org
86bcbcdc0b HChange is only deletable under certain circumstances.
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12702 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-11 14:14:03 +00:00
svenpanne@chromium.org
f03fd70d9e Added a simple dead code removal phase.
We iteratively remove all dead Hydrogen instruction until we reach a fixed point. We consider an instruction dead if it is unused, has no observable side effects and is deletable. The last part of the condition is currently not very nice: We basically have to whitelist "safe" instructions, because we are missing more detailed dependencies and/or more detailed tracking of side effects.

We disable dead code elimination for now in our test runners, because we have tons of poorly written tests which wouldn't test anymore what they are supposed to test with this phase enabled. To get test coverage for dead code elimination itself, we should enable it on a few build bots. This is not really a perfect state, but the best we can do for now.

This patch includes a few const-correctness fixes, most of them were necessary for this CL.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12697 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-11 10:52:58 +00:00
svenpanne@chromium.org
f81b06dde5 Make sure that the context argument of HAdd is never NULL.
Although this doesn't hurt currently, it hurts any future compiler
pass relying on the invariant that no operand is NULL.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12681 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-09 13:53:24 +00:00
verwaest@chromium.org
efe955587e Allow optimistically hoisting elements transitions over accesses.
Review URL: https://chromiumcodereview.appspot.com/10972011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12642 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-01 16:22:43 +00:00