Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(557)

Unified Diff: src/hydrogen-instructions.h

Issue 5961016: Optimize array-length and fast element loads.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
===================================================================
--- src/hydrogen-instructions.h (revision 6124)
+++ src/hydrogen-instructions.h (working copy)
@@ -118,7 +118,6 @@
// HStoreKeyedFastElement
// HStoreKeyedGeneric
// HUnaryOperation
-// HArrayLength
// HBitNot
// HChange
// HCheckFunction
@@ -128,6 +127,8 @@
// HCheckPrototypeMaps
// HCheckSmi
// HDeleteProperty
+// HFixedArrayLength
+// HJSArrayLength
// HLoadElements
// HTypeofIs
// HLoadNamedField
@@ -171,7 +172,6 @@
V(ArgumentsElements) \
V(ArgumentsLength) \
V(ArgumentsObject) \
- V(ArrayLength) \
V(ArrayLiteral) \
V(BitAnd) \
V(BitNot) \
@@ -204,6 +204,7 @@
V(Deoptimize) \
V(Div) \
V(EnterInlined) \
+ V(FixedArrayLength) \
V(FunctionLiteral) \
V(GlobalObject) \
V(GlobalReceiver) \
@@ -214,6 +215,7 @@
V(IsSmi) \
V(HasInstanceType) \
V(HasCachedArrayIndex) \
+ V(JSArrayLength) \
V(ClassOfTest) \
V(LeaveInlined) \
V(LoadElements) \
@@ -1339,9 +1341,9 @@
};
-class HArrayLength: public HUnaryOperation {
+class HJSArrayLength: public HUnaryOperation {
public:
- explicit HArrayLength(HValue* value) : HUnaryOperation(value) {
+ explicit HJSArrayLength(HValue* value) : HUnaryOperation(value) {
// The length of an array is stored as a tagged value in the array
// object. It is guaranteed to be 32 bit integer, but it can be
// represented as either a smi or heap number.
@@ -1354,10 +1356,26 @@
return Representation::Tagged();
}
- DECLARE_CONCRETE_INSTRUCTION(ArrayLength, "array_length")
+ DECLARE_CONCRETE_INSTRUCTION(JSArrayLength, "js_array_length")
};
+class HFixedArrayLength: public HUnaryOperation {
+ public:
+ explicit HFixedArrayLength(HValue* value) : HUnaryOperation(value) {
+ set_representation(Representation::Tagged());
+ SetFlag(kDependsOnArrayLengths);
+ SetFlag(kUseGVN);
+ }
+
+ virtual Representation RequiredInputRepresentation(int index) const {
+ return Representation::Tagged();
+ }
+
+ DECLARE_CONCRETE_INSTRUCTION(FixedArrayLength, "fixed_array_length")
+};
+
+
class HBitNot: public HUnaryOperation {
public:
explicit HBitNot(HValue* value) : HUnaryOperation(value) {
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698