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

Unified Diff: src/ia32/lithium-ia32.h

Issue 6219001: Split LInstruction into multiple variant to make our LIR more compact.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 11 months 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 | « no previous file | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/lithium-ia32.h
===================================================================
--- src/ia32/lithium-ia32.h (revision 6230)
+++ src/ia32/lithium-ia32.h (working copy)
@@ -309,9 +309,9 @@
LPointerMap* pointer_map() const { return pointer_map_.get(); }
bool HasPointerMap() const { return pointer_map_.is_set(); }
- void set_result(LOperand* operand) { result_.set(operand); }
- LOperand* result() const { return result_.get(); }
- bool HasResult() const { return result_.is_set(); }
+ virtual void set_result(LOperand* operand) = 0;
Kevin Millikin (Chromium) 2011/01/10 11:41:44 Maybe we should put these only on the Result=1 spe
fschneider 2011/01/10 11:55:57 Done.
+ virtual LOperand* result() const = 0;
+ virtual bool HasResult() const = 0;
void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; }
HValue* hydrogen_value() const { return hydrogen_value_; }
@@ -329,12 +329,33 @@
private:
SetOncePointer<LEnvironment> environment_;
SetOncePointer<LPointerMap> pointer_map_;
- SetOncePointer<LOperand> result_;
HValue* hydrogen_value_;
SetOncePointer<LEnvironment> deoptimization_environment_;
};
+template <int Result = 0>
Kevin Millikin (Chromium) 2011/01/10 11:41:44 I think I'd rather have two separate specializatio
fschneider 2011/01/10 11:55:57 Done.
+class LTemplateInstruction: public LInstruction {
+ virtual void set_result(LOperand* operand) { UNREACHABLE(); }
+ virtual LOperand* result() const {
+ UNREACHABLE();
+ return NULL;
+ }
+ virtual bool HasResult() const { return false; }
+};
+
+
+template<>
+class LTemplateInstruction<1>: public LInstruction {
+ public:
+ virtual void set_result(LOperand* operand) { result_.set(operand); }
+ virtual LOperand* result() const { return result_.get(); }
+ virtual bool HasResult() const { return result_.is_set(); }
+ private:
+ SetOncePointer<LOperand> result_;
+};
+
+
class LParallelMove : public ZoneObject {
public:
LParallelMove() : move_operands_(4) { }
@@ -356,7 +377,7 @@
};
-class LGap: public LInstruction {
+class LGap: public LTemplateInstruction<0> {
public:
explicit LGap(HBasicBlock* block)
: block_(block) {
@@ -397,7 +418,7 @@
};
-class LGoto: public LInstruction {
+class LGoto: public LTemplateInstruction<0> {
public:
LGoto(int block_id, bool include_stack_check = false)
: block_id_(block_id), include_stack_check_(include_stack_check) { }
@@ -415,7 +436,7 @@
};
-class LLazyBailout: public LInstruction {
+class LLazyBailout: public LTemplateInstruction<0> {
public:
LLazyBailout() : gap_instructions_size_(0) { }
@@ -431,7 +452,7 @@
};
-class LDeoptimize: public LInstruction {
+class LDeoptimize: public LTemplateInstruction<0> {
public:
DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize")
};
@@ -459,13 +480,13 @@
};
-class LParameter: public LInstruction {
+class LParameter: public LTemplateInstruction<1> {
public:
DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter")
};
-class LCallStub: public LInstruction {
+class LCallStub: public LTemplateInstruction<1> {
public:
DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub")
DECLARE_HYDROGEN_ACCESSOR(CallStub)
@@ -476,13 +497,14 @@
};
-class LUnknownOSRValue: public LInstruction {
+class LUnknownOSRValue: public LTemplateInstruction<1> {
public:
DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value")
};
-class LUnaryOperation: public LInstruction {
+template<int R>
+class LUnaryOperation: public LTemplateInstruction<R> {
public:
explicit LUnaryOperation(LOperand* input) : input_(input) { }
@@ -497,7 +519,7 @@
};
-class LBinaryOperation: public LInstruction {
+class LBinaryOperation: public LTemplateInstruction<1> {
public:
LBinaryOperation(LOperand* left, LOperand* right)
: left_(left), right_(right) { }
@@ -537,7 +559,7 @@
};
-class LAccessArgumentsAt: public LInstruction {
+class LAccessArgumentsAt: public LTemplateInstruction<1> {
public:
LAccessArgumentsAt(LOperand* arguments, LOperand* length, LOperand* index)
: arguments_(arguments), length_(length), index_(index) { }
@@ -557,15 +579,16 @@
};
-class LArgumentsLength: public LUnaryOperation {
+class LArgumentsLength: public LUnaryOperation<1> {
public:
- explicit LArgumentsLength(LOperand* elements) : LUnaryOperation(elements) {}
+ explicit LArgumentsLength(LOperand* elements)
+ : LUnaryOperation<1>(elements) {}
DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments-length")
};
-class LArgumentsElements: public LInstruction {
+class LArgumentsElements: public LTemplateInstruction<1> {
public:
LArgumentsElements() { }
@@ -648,10 +671,10 @@
};
-class LUnaryMathOperation: public LUnaryOperation {
+class LUnaryMathOperation: public LUnaryOperation<1> {
public:
explicit LUnaryMathOperation(LOperand* value)
- : LUnaryOperation(value) { }
+ : LUnaryOperation<1>(value) { }
DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation, "unary-math-operation")
DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
@@ -692,10 +715,10 @@
};
-class LIsNull: public LUnaryOperation {
+class LIsNull: public LUnaryOperation<1> {
public:
LIsNull(LOperand* value, bool is_strict)
- : LUnaryOperation(value), is_strict_(is_strict) {}
+ : LUnaryOperation<1>(value), is_strict_(is_strict) {}
DECLARE_CONCRETE_INSTRUCTION(IsNull, "is-null")
@@ -734,10 +757,10 @@
};
-class LIsObject: public LUnaryOperation {
+class LIsObject: public LUnaryOperation<1> {
public:
LIsObject(LOperand* value, LOperand* temp)
- : LUnaryOperation(value), temp_(temp) {}
+ : LUnaryOperation<1>(value), temp_(temp) {}
DECLARE_CONCRETE_INSTRUCTION(IsObject, "is-object")
@@ -776,9 +799,9 @@
};
-class LIsSmi: public LUnaryOperation {
+class LIsSmi: public LUnaryOperation<1> {
public:
- explicit LIsSmi(LOperand* value) : LUnaryOperation(value) {}
+ explicit LIsSmi(LOperand* value) : LUnaryOperation<1>(value) {}
DECLARE_CONCRETE_INSTRUCTION(IsSmi, "is-smi")
DECLARE_HYDROGEN_ACCESSOR(IsSmi)
@@ -807,10 +830,10 @@
};
-class LHasInstanceType: public LUnaryOperation {
+class LHasInstanceType: public LUnaryOperation<1> {
public:
explicit LHasInstanceType(LOperand* value)
- : LUnaryOperation(value) { }
+ : LUnaryOperation<1>(value) { }
DECLARE_CONCRETE_INSTRUCTION(HasInstanceType, "has-instance-type")
DECLARE_HYDROGEN_ACCESSOR(HasInstanceType)
@@ -848,9 +871,9 @@
};
-class LHasCachedArrayIndex: public LUnaryOperation {
+class LHasCachedArrayIndex: public LUnaryOperation<1> {
public:
- explicit LHasCachedArrayIndex(LOperand* value) : LUnaryOperation(value) {}
+ explicit LHasCachedArrayIndex(LOperand* value) : LUnaryOperation<1>(value) {}
DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndex, "has-cached-array-index")
DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndex)
@@ -880,10 +903,10 @@
};
-class LClassOfTest: public LUnaryOperation {
+class LClassOfTest: public LUnaryOperation<1> {
public:
LClassOfTest(LOperand* value, LOperand* temp)
- : LUnaryOperation(value), temporary_(temp) {}
+ : LUnaryOperation<1>(value), temporary_(temp) {}
DECLARE_CONCRETE_INSTRUCTION(ClassOfTest, "class-of-test")
DECLARE_HYDROGEN_ACCESSOR(ClassOfTest)
@@ -987,10 +1010,10 @@
};
-class LInstanceOfKnownGlobal: public LUnaryOperation {
+class LInstanceOfKnownGlobal: public LUnaryOperation<1> {
public:
LInstanceOfKnownGlobal(LOperand* left, LOperand* temp)
- : LUnaryOperation(left), temp_(temp) { }
+ : LUnaryOperation<1>(left), temp_(temp) { }
DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal,
"instance-of-known-global")
@@ -1057,7 +1080,7 @@
};
-class LConstant: public LInstruction {
+class LConstant: public LTemplateInstruction<1> {
DECLARE_INSTRUCTION(Constant)
};
@@ -1098,10 +1121,10 @@
};
-class LBranch: public LUnaryOperation {
+class LBranch: public LUnaryOperation<1> {
public:
LBranch(LOperand* input, int true_block_id, int false_block_id)
- : LUnaryOperation(input),
+ : LUnaryOperation<1>(input),
true_block_id_(true_block_id),
false_block_id_(false_block_id) { }
@@ -1120,9 +1143,9 @@
};
-class LCmpMapAndBranch: public LUnaryOperation {
+class LCmpMapAndBranch: public LUnaryOperation<1> {
public:
- explicit LCmpMapAndBranch(LOperand* value) : LUnaryOperation(value) { }
+ explicit LCmpMapAndBranch(LOperand* value) : LUnaryOperation<1>(value) { }
DECLARE_CONCRETE_INSTRUCTION(CmpMapAndBranch, "cmp-map-and-branch")
DECLARE_HYDROGEN_ACCESSOR(CompareMapAndBranch)
@@ -1139,28 +1162,28 @@
};
-class LJSArrayLength: public LUnaryOperation {
+class LJSArrayLength: public LUnaryOperation<1> {
public:
- explicit LJSArrayLength(LOperand* input) : LUnaryOperation(input) { }
+ explicit LJSArrayLength(LOperand* input) : LUnaryOperation<1>(input) { }
DECLARE_CONCRETE_INSTRUCTION(JSArrayLength, "js-array-length")
DECLARE_HYDROGEN_ACCESSOR(JSArrayLength)
};
-class LFixedArrayLength: public LUnaryOperation {
+class LFixedArrayLength: public LUnaryOperation<1> {
public:
- explicit LFixedArrayLength(LOperand* input) : LUnaryOperation(input) { }
+ explicit LFixedArrayLength(LOperand* input) : LUnaryOperation<1>(input) { }
DECLARE_CONCRETE_INSTRUCTION(FixedArrayLength, "fixed-array-length")
DECLARE_HYDROGEN_ACCESSOR(FixedArrayLength)
};
-class LValueOf: public LUnaryOperation {
+class LValueOf: public LUnaryOperation<1> {
public:
LValueOf(LOperand* input, LOperand* temporary)
- : LUnaryOperation(input), temporary_(temporary) { }
+ : LUnaryOperation<1>(input), temporary_(temporary) { }
LOperand* temporary() const { return temporary_; }
@@ -1172,17 +1195,17 @@
};
-class LThrow: public LUnaryOperation {
+class LThrow: public LUnaryOperation<1> {
public:
- explicit LThrow(LOperand* value) : LUnaryOperation(value) { }
+ explicit LThrow(LOperand* value) : LUnaryOperation<1>(value) { }
DECLARE_CONCRETE_INSTRUCTION(Throw, "throw")
};
-class LBitNotI: public LUnaryOperation {
+class LBitNotI: public LUnaryOperation<1> {
public:
- explicit LBitNotI(LOperand* use) : LUnaryOperation(use) { }
+ explicit LBitNotI(LOperand* use) : LUnaryOperation<1>(use) { }
DECLARE_CONCRETE_INSTRUCTION(BitNotI, "bit-not-i")
};
@@ -1238,26 +1261,26 @@
};
-class LReturn: public LUnaryOperation {
+class LReturn: public LUnaryOperation<1> {
public:
- explicit LReturn(LOperand* use) : LUnaryOperation(use) { }
+ explicit LReturn(LOperand* use) : LUnaryOperation<1>(use) { }
DECLARE_CONCRETE_INSTRUCTION(Return, "return")
};
-class LLoadNamedField: public LUnaryOperation {
+class LLoadNamedField: public LUnaryOperation<1> {
public:
- explicit LLoadNamedField(LOperand* object) : LUnaryOperation(object) { }
+ explicit LLoadNamedField(LOperand* object) : LUnaryOperation<1>(object) { }
DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field")
DECLARE_HYDROGEN_ACCESSOR(LoadNamedField)
};
-class LLoadNamedGeneric: public LUnaryOperation {
+class LLoadNamedGeneric: public LUnaryOperation<1> {
public:
- explicit LLoadNamedGeneric(LOperand* object) : LUnaryOperation(object) { }
+ explicit LLoadNamedGeneric(LOperand* object) : LUnaryOperation<1>(object) { }
DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic")
DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric)
@@ -1267,10 +1290,10 @@
};
-class LLoadFunctionPrototype: public LUnaryOperation {
+class LLoadFunctionPrototype: public LUnaryOperation<1> {
public:
LLoadFunctionPrototype(LOperand* function, LOperand* temporary)
- : LUnaryOperation(function), temporary_(temporary) { }
+ : LUnaryOperation<1>(function), temporary_(temporary) { }
DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype, "load-function-prototype")
DECLARE_HYDROGEN_ACCESSOR(LoadFunctionPrototype)
@@ -1283,9 +1306,9 @@
};
-class LLoadElements: public LUnaryOperation {
+class LLoadElements: public LUnaryOperation<1> {
public:
- explicit LLoadElements(LOperand* obj) : LUnaryOperation(obj) { }
+ explicit LLoadElements(LOperand* obj) : LUnaryOperation<1>(obj) { }
DECLARE_CONCRETE_INSTRUCTION(LoadElements, "load-elements")
};
@@ -1323,43 +1346,43 @@
};
-class LLoadGlobal: public LInstruction {
+class LLoadGlobal: public LTemplateInstruction<1> {
public:
DECLARE_CONCRETE_INSTRUCTION(LoadGlobal, "load-global")
DECLARE_HYDROGEN_ACCESSOR(LoadGlobal)
};
-class LStoreGlobal: public LUnaryOperation {
+class LStoreGlobal: public LUnaryOperation<1> {
public:
- explicit LStoreGlobal(LOperand* value) : LUnaryOperation(value) {}
+ explicit LStoreGlobal(LOperand* value) : LUnaryOperation<1>(value) {}
DECLARE_CONCRETE_INSTRUCTION(StoreGlobal, "store-global")
DECLARE_HYDROGEN_ACCESSOR(StoreGlobal)
};
-class LPushArgument: public LUnaryOperation {
+class LPushArgument: public LUnaryOperation<1> {
public:
- explicit LPushArgument(LOperand* argument) : LUnaryOperation(argument) {}
+ explicit LPushArgument(LOperand* argument) : LUnaryOperation<1>(argument) {}
DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument")
};
-class LGlobalObject: public LInstruction {
+class LGlobalObject: public LTemplateInstruction<1> {
public:
DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object")
};
-class LGlobalReceiver: public LInstruction {
+class LGlobalReceiver: public LTemplateInstruction<1> {
public:
DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global-receiver")
};
-class LCallConstantFunction: public LInstruction {
+class LCallConstantFunction: public LTemplateInstruction<1> {
public:
DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function")
DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction)
@@ -1371,7 +1394,7 @@
};
-class LCallKeyed: public LInstruction {
+class LCallKeyed: public LTemplateInstruction<1> {
public:
DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed")
DECLARE_HYDROGEN_ACCESSOR(CallKeyed)
@@ -1382,7 +1405,7 @@
};
-class LCallNamed: public LInstruction {
+class LCallNamed: public LTemplateInstruction<1> {
public:
DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named")
DECLARE_HYDROGEN_ACCESSOR(CallNamed)
@@ -1394,7 +1417,7 @@
};
-class LCallFunction: public LInstruction {
+class LCallFunction: public LTemplateInstruction<1> {
public:
DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function")
DECLARE_HYDROGEN_ACCESSOR(CallFunction)
@@ -1403,7 +1426,7 @@
};
-class LCallGlobal: public LInstruction {
+class LCallGlobal: public LTemplateInstruction<1> {
public:
DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global")
DECLARE_HYDROGEN_ACCESSOR(CallGlobal)
@@ -1415,7 +1438,7 @@
};
-class LCallKnownGlobal: public LInstruction {
+class LCallKnownGlobal: public LTemplateInstruction<1> {
public:
DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global")
DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal)
@@ -1427,9 +1450,9 @@
};
-class LCallNew: public LUnaryOperation {
+class LCallNew: public LUnaryOperation<1> {
public:
- explicit LCallNew(LOperand* constructor) : LUnaryOperation(constructor) { }
+ explicit LCallNew(LOperand* constructor) : LUnaryOperation<1>(constructor) { }
DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new")
DECLARE_HYDROGEN_ACCESSOR(CallNew)
@@ -1440,7 +1463,7 @@
};
-class LCallRuntime: public LInstruction {
+class LCallRuntime: public LTemplateInstruction<1> {
public:
DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime")
DECLARE_HYDROGEN_ACCESSOR(CallRuntime)
@@ -1450,26 +1473,26 @@
};
-class LInteger32ToDouble: public LUnaryOperation {
+class LInteger32ToDouble: public LUnaryOperation<1> {
public:
- explicit LInteger32ToDouble(LOperand* use) : LUnaryOperation(use) { }
+ explicit LInteger32ToDouble(LOperand* use) : LUnaryOperation<1>(use) { }
DECLARE_CONCRETE_INSTRUCTION(Integer32ToDouble, "int32-to-double")
};
-class LNumberTagI: public LUnaryOperation {
+class LNumberTagI: public LUnaryOperation<1> {
public:
- explicit LNumberTagI(LOperand* use) : LUnaryOperation(use) { }
+ explicit LNumberTagI(LOperand* use) : LUnaryOperation<1>(use) { }
DECLARE_CONCRETE_INSTRUCTION(NumberTagI, "number-tag-i")
};
-class LNumberTagD: public LUnaryOperation {
+class LNumberTagD: public LUnaryOperation<1> {
public:
explicit LNumberTagD(LOperand* value, LOperand* temp)
- : LUnaryOperation(value), temp_(temp) { }
+ : LUnaryOperation<1>(value), temp_(temp) { }
DECLARE_CONCRETE_INSTRUCTION(NumberTagD, "number-tag-d")
@@ -1481,9 +1504,9 @@
// Sometimes truncating conversion from a tagged value to an int32.
-class LDoubleToI: public LUnaryOperation {
+class LDoubleToI: public LUnaryOperation<1> {
public:
- explicit LDoubleToI(LOperand* value) : LUnaryOperation(value) { }
+ explicit LDoubleToI(LOperand* value) : LUnaryOperation<1>(value) { }
DECLARE_CONCRETE_INSTRUCTION(DoubleToI, "double-to-i")
DECLARE_HYDROGEN_ACCESSOR(Change)
@@ -1493,10 +1516,10 @@
// Truncating conversion from a tagged value to an int32.
-class LTaggedToI: public LUnaryOperation {
+class LTaggedToI: public LUnaryOperation<1> {
public:
LTaggedToI(LOperand* value, LOperand* temp)
- : LUnaryOperation(value), temp_(temp) { }
+ : LUnaryOperation<1>(value), temp_(temp) { }
DECLARE_CONCRETE_INSTRUCTION(TaggedToI, "tagged-to-i")
DECLARE_HYDROGEN_ACCESSOR(Change)
@@ -1509,26 +1532,26 @@
};
-class LSmiTag: public LUnaryOperation {
+class LSmiTag: public LUnaryOperation<1> {
public:
- explicit LSmiTag(LOperand* use) : LUnaryOperation(use) { }
+ explicit LSmiTag(LOperand* use) : LUnaryOperation<1>(use) { }
DECLARE_CONCRETE_INSTRUCTION(SmiTag, "smi-tag")
};
-class LNumberUntagD: public LUnaryOperation {
+class LNumberUntagD: public LUnaryOperation<1> {
public:
- explicit LNumberUntagD(LOperand* value) : LUnaryOperation(value) { }
+ explicit LNumberUntagD(LOperand* value) : LUnaryOperation<1>(value) { }
DECLARE_CONCRETE_INSTRUCTION(NumberUntagD, "double-untag")
};
-class LSmiUntag: public LUnaryOperation {
+class LSmiUntag: public LUnaryOperation<1> {
public:
LSmiUntag(LOperand* use, bool needs_check)
- : LUnaryOperation(use), needs_check_(needs_check) { }
+ : LUnaryOperation<1>(use), needs_check_(needs_check) { }
DECLARE_CONCRETE_INSTRUCTION(SmiUntag, "smi-untag")
@@ -1539,7 +1562,7 @@
};
-class LStoreNamed: public LInstruction {
+class LStoreNamed: public LTemplateInstruction<0> {
public:
LStoreNamed(LOperand* obj, Handle<Object> name, LOperand* val)
: object_(obj), name_(name), value_(val) { }
@@ -1605,7 +1628,7 @@
};
-class LStoreKeyed: public LInstruction {
+class LStoreKeyed: public LTemplateInstruction<0> {
public:
LStoreKeyed(LOperand* obj, LOperand* key, LOperand* val)
: object_(obj), key_(key), value_(val) { }
@@ -1645,19 +1668,19 @@
};
-class LCheckFunction: public LUnaryOperation {
+class LCheckFunction: public LUnaryOperation<0> {
public:
- explicit LCheckFunction(LOperand* use) : LUnaryOperation(use) { }
+ explicit LCheckFunction(LOperand* use) : LUnaryOperation<0>(use) { }
DECLARE_CONCRETE_INSTRUCTION(CheckFunction, "check-function")
DECLARE_HYDROGEN_ACCESSOR(CheckFunction)
};
-class LCheckInstanceType: public LUnaryOperation {
+class LCheckInstanceType: public LUnaryOperation<0> {
public:
LCheckInstanceType(LOperand* use, LOperand* temp)
- : LUnaryOperation(use), temp_(temp) { }
+ : LUnaryOperation<0>(use), temp_(temp) { }
DECLARE_CONCRETE_INSTRUCTION(CheckInstanceType, "check-instance-type")
DECLARE_HYDROGEN_ACCESSOR(CheckInstanceType)
@@ -1669,16 +1692,16 @@
};
-class LCheckMap: public LUnaryOperation {
+class LCheckMap: public LUnaryOperation<0> {
public:
- explicit LCheckMap(LOperand* use) : LUnaryOperation(use) { }
+ explicit LCheckMap(LOperand* use) : LUnaryOperation<0>(use) { }
DECLARE_CONCRETE_INSTRUCTION(CheckMap, "check-map")
DECLARE_HYDROGEN_ACCESSOR(CheckMap)
};
-class LCheckPrototypeMaps: public LInstruction {
+class LCheckPrototypeMaps: public LTemplateInstruction<0> {
public:
LCheckPrototypeMaps(LOperand* temp,
Handle<JSObject> holder,
@@ -1700,10 +1723,10 @@
};
-class LCheckSmi: public LUnaryOperation {
+class LCheckSmi: public LUnaryOperation<0> {
public:
LCheckSmi(LOperand* use, Condition condition)
- : LUnaryOperation(use), condition_(condition) { }
+ : LUnaryOperation<0>(use), condition_(condition) { }
Condition condition() const { return condition_; }
@@ -1717,7 +1740,7 @@
};
-class LMaterializedLiteral: public LInstruction {
+class LMaterializedLiteral: public LTemplateInstruction<1> {
public:
DECLARE_INSTRUCTION(MaterializedLiteral)
};
@@ -1744,7 +1767,7 @@
};
-class LFunctionLiteral: public LInstruction {
+class LFunctionLiteral: public LTemplateInstruction<1> {
public:
DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function-literal")
DECLARE_HYDROGEN_ACCESSOR(FunctionLiteral)
@@ -1753,17 +1776,17 @@
};
-class LTypeof: public LUnaryOperation {
+class LTypeof: public LUnaryOperation<1> {
public:
- explicit LTypeof(LOperand* input) : LUnaryOperation(input) { }
+ explicit LTypeof(LOperand* input) : LUnaryOperation<1>(input) { }
DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof")
};
-class LTypeofIs: public LUnaryOperation {
+class LTypeofIs: public LUnaryOperation<1> {
public:
- explicit LTypeofIs(LOperand* input) : LUnaryOperation(input) { }
+ explicit LTypeofIs(LOperand* input) : LUnaryOperation<1>(input) { }
virtual void PrintDataTo(StringStream* stream) const;
DECLARE_CONCRETE_INSTRUCTION(TypeofIs, "typeof-is")
@@ -1807,7 +1830,7 @@
};
-class LOsrEntry: public LInstruction {
+class LOsrEntry: public LTemplateInstruction<0> {
public:
LOsrEntry();
@@ -1830,7 +1853,7 @@
};
-class LStackCheck: public LInstruction {
+class LStackCheck: public LTemplateInstruction<0> {
public:
DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check")
};
@@ -2077,13 +2100,14 @@
// Methods for setting up define-use relationships.
// Return the same instruction that they are passed.
- LInstruction* Define(LInstruction* instr, LUnallocated* result);
- LInstruction* Define(LInstruction* instr);
- LInstruction* DefineAsRegister(LInstruction* instr);
- LInstruction* DefineAsSpilled(LInstruction* instr, int index);
- LInstruction* DefineSameAsFirst(LInstruction* instr);
- LInstruction* DefineFixed(LInstruction* instr, Register reg);
- LInstruction* DefineFixedDouble(LInstruction* instr, XMMRegister reg);
+ LInstruction* Define(LTemplateInstruction<1>* instr, LUnallocated* result);
Kevin Millikin (Chromium) 2011/01/10 11:41:44 This is nice.
+ LInstruction* Define(LTemplateInstruction<1>* instr);
+ LInstruction* DefineAsRegister(LTemplateInstruction<1>* instr);
+ LInstruction* DefineAsSpilled(LTemplateInstruction<1>* instr, int index);
+ LInstruction* DefineSameAsFirst(LTemplateInstruction<1>* instr);
+ LInstruction* DefineFixed(LTemplateInstruction<1>* instr, Register reg);
+ LInstruction* DefineFixedDouble(LTemplateInstruction<1>* instr,
+ XMMRegister reg);
LInstruction* AssignEnvironment(LInstruction* instr);
LInstruction* AssignPointerMap(LInstruction* instr);
« no previous file with comments | « no previous file | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698