Index: src/ia32/lithium-ia32.h |
diff --git a/src/ia32/lithium-ia32.h b/src/ia32/lithium-ia32.h |
index 5f4dd2520714e079419e72671d794cd055039a13..0daab5f9dcbd3a6b227c409385334c13fbc6a80e 100644 |
--- a/src/ia32/lithium-ia32.h |
+++ b/src/ia32/lithium-ia32.h |
@@ -572,12 +572,16 @@ class LCmpIDAndBranch: public LControlInstruction<2, 0> { |
}; |
-class LUnaryMathOperation: public LTemplateInstruction<1, 1, 0> { |
+class LUnaryMathOperation: public LTemplateInstruction<1, 2, 0> { |
public: |
- explicit LUnaryMathOperation(LOperand* value) { |
+ LUnaryMathOperation(LOperand* context, LOperand* value) { |
+ inputs_[1] = context; |
inputs_[0] = value; |
} |
+ LOperand* context() { return inputs_[1]; } |
+ LOperand* value() { return inputs_[0]; } |
+ |
DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation, "unary-math-operation") |
DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) |
@@ -654,7 +658,7 @@ class LIsSmiAndBranch: public LControlInstruction<1, 0> { |
class LIsUndetectableAndBranch: public LControlInstruction<1, 1> { |
public: |
- explicit LIsUndetectableAndBranch(LOperand* value, LOperand* temp) { |
+ LIsUndetectableAndBranch(LOperand* value, LOperand* temp) { |
inputs_[0] = value; |
temps_[0] = temp; |
} |
@@ -731,11 +735,12 @@ class LClassOfTestAndBranch: public LControlInstruction<1, 2> { |
}; |
-class LCmpT: public LTemplateInstruction<1, 2, 0> { |
+class LCmpT: public LTemplateInstruction<1, 3, 0> { |
public: |
- LCmpT(LOperand* left, LOperand* right) { |
- inputs_[0] = left; |
- inputs_[1] = right; |
+ LCmpT(LOperand* context, LOperand* left, LOperand* right) { |
+ inputs_[0] = context; |
+ inputs_[1] = left; |
+ inputs_[2] = right; |
} |
DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t") |
@@ -759,10 +764,11 @@ class LInstanceOf: public LTemplateInstruction<1, 3, 0> { |
}; |
-class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 1, 1> { |
+class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 2, 1> { |
public: |
- LInstanceOfKnownGlobal(LOperand* value, LOperand* temp) { |
- inputs_[0] = value; |
+ LInstanceOfKnownGlobal(LOperand* context, LOperand* value, LOperand* temp) { |
+ inputs_[0] = context; |
+ inputs_[1] = value; |
temps_[0] = temp; |
} |
@@ -958,12 +964,16 @@ class LValueOf: public LTemplateInstruction<1, 1, 1> { |
}; |
-class LThrow: public LTemplateInstruction<0, 1, 0> { |
+class LThrow: public LTemplateInstruction<0, 2, 0> { |
public: |
- explicit LThrow(LOperand* value) { |
- inputs_[0] = value; |
+ LThrow(LOperand* context, LOperand* value) { |
+ inputs_[0] = context; |
+ inputs_[1] = value; |
} |
+ LOperand* context() { return inputs_[0]; } |
+ LOperand* value() { return inputs_[1]; } |
+ |
DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") |
}; |
@@ -1021,12 +1031,16 @@ class LArithmeticD: public LTemplateInstruction<1, 2, 0> { |
}; |
-class LArithmeticT: public LTemplateInstruction<1, 2, 0> { |
+class LArithmeticT: public LTemplateInstruction<1, 3, 0> { |
public: |
- LArithmeticT(Token::Value op, LOperand* left, LOperand* right) |
+ LArithmeticT(Token::Value op, |
+ LOperand* context, |
+ LOperand* left, |
+ LOperand* right) |
: op_(op) { |
- inputs_[0] = left; |
- inputs_[1] = right; |
+ inputs_[0] = context; |
+ inputs_[1] = left; |
+ inputs_[2] = right; |
} |
virtual Opcode opcode() const { return LInstruction::kArithmeticT; } |
@@ -1034,6 +1048,9 @@ class LArithmeticT: public LTemplateInstruction<1, 2, 0> { |
virtual const char* Mnemonic() const; |
Token::Value op() const { return op_; } |
+ LOperand* context() { return inputs_[0]; } |
+ LOperand* left() { return inputs_[1]; } |
+ LOperand* right() { return inputs_[2]; } |
private: |
Token::Value op_; |
@@ -1063,16 +1080,18 @@ class LLoadNamedField: public LTemplateInstruction<1, 1, 0> { |
}; |
-class LLoadNamedFieldPolymorphic: public LTemplateInstruction<1, 1, 0> { |
+class LLoadNamedFieldPolymorphic: public LTemplateInstruction<1, 2, 0> { |
public: |
- explicit LLoadNamedFieldPolymorphic(LOperand* object) { |
- inputs_[0] = object; |
+ LLoadNamedFieldPolymorphic(LOperand* context, LOperand* object) { |
+ inputs_[0] = context; |
+ inputs_[1] = object; |
} |
DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field-polymorphic") |
DECLARE_HYDROGEN_ACCESSOR(LoadNamedFieldPolymorphic) |
- LOperand* object() { return inputs_[0]; } |
+ LOperand* context() { return inputs_[0]; } |
+ LOperand* object() { return inputs_[1]; } |
}; |
@@ -1215,9 +1234,9 @@ class LStoreGlobalCell: public LTemplateInstruction<0, 1, 0> { |
class LStoreGlobalGeneric: public LTemplateInstruction<0, 3, 0> { |
public: |
- explicit LStoreGlobalGeneric(LOperand* context, |
- LOperand* global_object, |
- LOperand* value) { |
+ LStoreGlobalGeneric(LOperand* context, |
+ LOperand* global_object, |
+ LOperand* value) { |
inputs_[0] = context; |
inputs_[1] = global_object; |
inputs_[2] = value; |
@@ -1455,11 +1474,15 @@ class LCallNew: public LTemplateInstruction<1, 2, 0> { |
}; |
-class LCallRuntime: public LTemplateInstruction<1, 0, 0> { |
+class LCallRuntime: public LTemplateInstruction<1, 1, 0> { |
public: |
+ explicit LCallRuntime(LOperand* context) { |
+ inputs_[0] = context; |
+ } |
DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") |
DECLARE_HYDROGEN_ACCESSOR(CallRuntime) |
+ LOperand* context() { return inputs_[0]; } |
const Runtime::Function* function() const { return hydrogen()->function(); } |
int arity() const { return hydrogen()->argument_count(); } |
}; |
@@ -1676,46 +1699,52 @@ class LStoreKeyedGeneric: public LTemplateInstruction<0, 4, 0> { |
}; |
-class LStringAdd: public LTemplateInstruction<1, 2, 0> { |
+class LStringAdd: public LTemplateInstruction<1, 3, 0> { |
public: |
- LStringAdd(LOperand* left, LOperand* right) { |
- inputs_[0] = left; |
- inputs_[1] = right; |
+ LStringAdd(LOperand* context, LOperand* left, LOperand* right) { |
+ inputs_[0] = context; |
+ inputs_[1] = left; |
+ inputs_[2] = right; |
} |
DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add") |
DECLARE_HYDROGEN_ACCESSOR(StringAdd) |
- LOperand* left() { return inputs_[0]; } |
- LOperand* right() { return inputs_[1]; } |
+ LOperand* context() { return inputs_[0]; } |
+ LOperand* left() { return inputs_[1]; } |
+ LOperand* right() { return inputs_[2]; } |
}; |
-class LStringCharCodeAt: public LTemplateInstruction<1, 2, 0> { |
+class LStringCharCodeAt: public LTemplateInstruction<1, 3, 0> { |
public: |
- LStringCharCodeAt(LOperand* string, LOperand* index) { |
- inputs_[0] = string; |
- inputs_[1] = index; |
+ LStringCharCodeAt(LOperand* context, LOperand* string, LOperand* index) { |
+ inputs_[0] = context; |
+ inputs_[1] = string; |
+ inputs_[2] = index; |
} |
DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at") |
DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt) |
- LOperand* string() { return inputs_[0]; } |
- LOperand* index() { return inputs_[1]; } |
+ LOperand* context() { return inputs_[0]; } |
+ LOperand* string() { return inputs_[1]; } |
+ LOperand* index() { return inputs_[2]; } |
}; |
-class LStringCharFromCode: public LTemplateInstruction<1, 1, 0> { |
+class LStringCharFromCode: public LTemplateInstruction<1, 2, 0> { |
public: |
- explicit LStringCharFromCode(LOperand* char_code) { |
- inputs_[0] = char_code; |
+ LStringCharFromCode(LOperand* context, LOperand* char_code) { |
+ inputs_[0] = context; |
+ inputs_[1] = char_code; |
} |
DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code") |
DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode) |
- LOperand* char_code() { return inputs_[0]; } |
+ LOperand* context() { return inputs_[0]; } |
+ LOperand* char_code() { return inputs_[1]; } |
}; |
@@ -1837,8 +1866,14 @@ class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> { |
}; |
-class LArrayLiteral: public LTemplateInstruction<1, 0, 0> { |
+class LArrayLiteral: public LTemplateInstruction<1, 1, 0> { |
public: |
+ explicit LArrayLiteral(LOperand* context) { |
+ inputs_[0] = context; |
+ } |
+ |
+ LOperand* context() { return inputs_[0]; } |
+ |
DECLARE_CONCRETE_INSTRUCTION(ArrayLiteral, "array-literal") |
DECLARE_HYDROGEN_ACCESSOR(ArrayLiteral) |
}; |
@@ -1850,22 +1885,34 @@ class LObjectLiteral: public LTemplateInstruction<1, 1, 0> { |
inputs_[0] = context; |
} |
+ LOperand* context() { return inputs_[0]; } |
+ |
DECLARE_CONCRETE_INSTRUCTION(ObjectLiteral, "object-literal") |
DECLARE_HYDROGEN_ACCESSOR(ObjectLiteral) |
- |
- LOperand* context() { return inputs_[0]; } |
}; |
-class LRegExpLiteral: public LTemplateInstruction<1, 0, 0> { |
+class LRegExpLiteral: public LTemplateInstruction<1, 1, 0> { |
public: |
+ explicit LRegExpLiteral(LOperand* context) { |
+ inputs_[0] = context; |
+ } |
+ |
+ LOperand* context() { return inputs_[0]; } |
+ |
DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal") |
DECLARE_HYDROGEN_ACCESSOR(RegExpLiteral) |
}; |
-class LFunctionLiteral: public LTemplateInstruction<1, 0, 0> { |
+class LFunctionLiteral: public LTemplateInstruction<1, 1, 0> { |
public: |
+ explicit LFunctionLiteral(LOperand* context) { |
+ inputs_[0] = context; |
+ } |
+ |
+ LOperand* context() { return inputs_[0]; } |
+ |
DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function-literal") |
DECLARE_HYDROGEN_ACCESSOR(FunctionLiteral) |
@@ -1884,10 +1931,11 @@ class LToFastProperties: public LTemplateInstruction<1, 1, 0> { |
}; |
-class LTypeof: public LTemplateInstruction<1, 1, 0> { |
+class LTypeof: public LTemplateInstruction<1, 2, 0> { |
public: |
- explicit LTypeof(LOperand* value) { |
- inputs_[0] = value; |
+ LTypeof(LOperand* context, LOperand* value) { |
+ inputs_[0] = context; |
+ inputs_[1] = value; |
} |
DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof") |
@@ -1909,17 +1957,19 @@ class LTypeofIsAndBranch: public LControlInstruction<1, 0> { |
}; |
-class LDeleteProperty: public LTemplateInstruction<1, 2, 0> { |
+class LDeleteProperty: public LTemplateInstruction<1, 3, 0> { |
public: |
- LDeleteProperty(LOperand* obj, LOperand* key) { |
- inputs_[0] = obj; |
- inputs_[1] = key; |
+ LDeleteProperty(LOperand* context, LOperand* obj, LOperand* key) { |
+ inputs_[0] = context; |
+ inputs_[1] = obj; |
+ inputs_[2] = key; |
} |
DECLARE_CONCRETE_INSTRUCTION(DeleteProperty, "delete-property") |
- LOperand* object() { return inputs_[0]; } |
- LOperand* key() { return inputs_[1]; } |
+ LOperand* context() { return inputs_[0]; } |
+ LOperand* object() { return inputs_[1]; } |
+ LOperand* key() { return inputs_[2]; } |
}; |
@@ -1946,8 +1996,14 @@ class LOsrEntry: public LTemplateInstruction<0, 0, 0> { |
}; |
-class LStackCheck: public LTemplateInstruction<0, 0, 0> { |
+class LStackCheck: public LTemplateInstruction<0, 1, 0> { |
public: |
+ explicit LStackCheck(LOperand* context) { |
+ inputs_[0] = context; |
+ } |
+ |
+ LOperand* context() { return inputs_[0]; } |
+ |
DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check") |
DECLARE_HYDROGEN_ACCESSOR(StackCheck) |
@@ -1958,15 +2014,17 @@ class LStackCheck: public LTemplateInstruction<0, 0, 0> { |
}; |
-class LIn: public LTemplateInstruction<1, 2, 0> { |
+class LIn: public LTemplateInstruction<1, 3, 0> { |
public: |
- LIn(LOperand* key, LOperand* object) { |
- inputs_[0] = key; |
- inputs_[1] = object; |
+ LIn(LOperand* context, LOperand* key, LOperand* object) { |
+ inputs_[0] = context; |
+ inputs_[1] = key; |
+ inputs_[2] = object; |
} |
- LOperand* key() { return inputs_[0]; } |
- LOperand* object() { return inputs_[1]; } |
+ LOperand* context() { return inputs_[0]; } |
+ LOperand* key() { return inputs_[1]; } |
+ LOperand* object() { return inputs_[2]; } |
DECLARE_CONCRETE_INSTRUCTION(In, "in") |
}; |
@@ -1975,7 +2033,7 @@ class LIn: public LTemplateInstruction<1, 2, 0> { |
class LChunkBuilder; |
class LChunk: public ZoneObject { |
public: |
- explicit LChunk(CompilationInfo* info, HGraph* graph) |
+ LChunk(CompilationInfo* info, HGraph* graph) |
: spill_slot_count_(0), |
info_(info), |
graph_(graph), |