Index: src/hydrogen-instructions.h |
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
index 38277e955767d8e9723ed2bd8d9233defdba3dd3..955ceb249dcdd74a902f8acba3e791b691cec91b 100644 |
--- a/src/hydrogen-instructions.h |
+++ b/src/hydrogen-instructions.h |
@@ -62,6 +62,7 @@ class LChunkBuilder; |
V(AbnormalExit) \ |
V(AccessArgumentsAt) \ |
V(Add) \ |
+ V(AllocateObject) \ |
V(ApplyArguments) \ |
V(ArgumentsElements) \ |
V(ArgumentsLength) \ |
@@ -1343,11 +1344,13 @@ class HEnterInlined: public HTemplateInstruction<0> { |
HEnterInlined(Handle<JSFunction> closure, |
int arguments_count, |
FunctionLiteral* function, |
- CallKind call_kind) |
+ CallKind call_kind, |
+ bool is_construct) |
: closure_(closure), |
arguments_count_(arguments_count), |
function_(function), |
- call_kind_(call_kind) { |
+ call_kind_(call_kind), |
+ is_construct_(is_construct) { |
} |
virtual void PrintDataTo(StringStream* stream); |
@@ -1356,6 +1359,7 @@ class HEnterInlined: public HTemplateInstruction<0> { |
int arguments_count() const { return arguments_count_; } |
FunctionLiteral* function() const { return function_; } |
CallKind call_kind() const { return call_kind_; } |
+ bool is_construct() const { return is_construct_; } |
virtual Representation RequiredInputRepresentation(int index) { |
return Representation::None(); |
@@ -1368,6 +1372,7 @@ class HEnterInlined: public HTemplateInstruction<0> { |
int arguments_count_; |
FunctionLiteral* function_; |
CallKind call_kind_; |
+ bool is_construct_; |
}; |
@@ -4273,6 +4278,29 @@ class HStringLength: public HUnaryOperation { |
}; |
+class HAllocateObject: public HTemplateInstruction<1> { |
+ public: |
+ HAllocateObject(HValue* context, Handle<JSFunction> constructor) |
+ : constructor_(constructor) { |
+ SetOperandAt(0, context); |
+ set_representation(Representation::Tagged()); |
+ } |
+ |
+ HValue* context() { return OperandAt(0); } |
+ Handle<JSFunction> constructor() { return constructor_; } |
+ |
+ virtual Representation RequiredInputRepresentation(int index) { |
+ return Representation::Tagged(); |
+ } |
+ virtual HType CalculateInferredType(); |
+ |
+ DECLARE_CONCRETE_INSTRUCTION(AllocateObject) |
+ |
+ private: |
+ Handle<JSFunction> constructor_; |
+}; |
+ |
+ |
template <int V> |
class HMaterializedLiteral: public HTemplateInstruction<V> { |
public: |