Index: src/ia32/lithium-ia32.h |
diff --git a/src/ia32/lithium-ia32.h b/src/ia32/lithium-ia32.h |
index bad064687d751f26690fc9f72da893dea5972698..c42119284ece7003e630d53b45248d9b0ca6f48c 100644 |
--- a/src/ia32/lithium-ia32.h |
+++ b/src/ia32/lithium-ia32.h |
@@ -603,12 +603,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) |
@@ -873,11 +877,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") |
@@ -901,10 +906,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; |
} |
@@ -1100,12 +1106,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; |
+ explicit 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") |
}; |
@@ -1163,12 +1173,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; } |
@@ -1176,6 +1190,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_; |
@@ -1205,16 +1222,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; |
+ explicit 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]; } |
}; |
@@ -1597,11 +1616,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(); } |
}; |
@@ -1818,46 +1841,51 @@ 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* 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; |
+ explicit 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]; } |
}; |
@@ -1979,8 +2007,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) |
}; |
@@ -1992,22 +2026,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) |
@@ -2026,10 +2072,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; |
+ explicit LTypeof(LOperand* context, LOperand* value) { |
+ inputs_[0] = context; |
+ inputs_[1] = value; |
} |
DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof") |
@@ -2066,17 +2113,18 @@ 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* object() { return inputs_[1]; } |
+ LOperand* key() { return inputs_[2]; } |
}; |
@@ -2103,8 +2151,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) |