Index: src/compiler/common-operator.h |
diff --git a/src/compiler/common-operator.h b/src/compiler/common-operator.h |
index 137155e0f6f2302fd36925c2c31533ac0520cbf1..52c0af29f913439cfcf4c460776232a1992d76b1 100644 |
--- a/src/compiler/common-operator.h |
+++ b/src/compiler/common-operator.h |
@@ -6,6 +6,7 @@ |
#define V8_COMPILER_COMMON_OPERATOR_H_ |
#include "src/compiler/machine-type.h" |
+#include "src/unique.h" |
namespace v8 { |
namespace internal { |
@@ -13,9 +14,6 @@ namespace internal { |
// Forward declarations. |
class ExternalReference; |
class OStream; |
-template <typename> |
-class Unique; |
-class Zone; |
namespace compiler { |
@@ -34,18 +32,34 @@ enum OutputFrameStateCombine { |
}; |
+// The type of stack frame that a FrameState node represents. |
+enum FrameStateType { |
+ JS_FRAME, // Represents an unoptimized JavaScriptFrame. |
+ ARGUMENTS_ADAPTOR // Represents an ArgumentsAdaptorFrame. |
+}; |
+ |
+ |
class FrameStateCallInfo FINAL { |
public: |
- FrameStateCallInfo(BailoutId bailout_id, |
- OutputFrameStateCombine state_combine) |
- : bailout_id_(bailout_id), frame_state_combine_(state_combine) {} |
- |
+ FrameStateCallInfo( |
+ FrameStateType type, BailoutId bailout_id, |
+ OutputFrameStateCombine state_combine, |
+ MaybeHandle<JSFunction> jsfunction = MaybeHandle<JSFunction>()) |
+ : type_(type), |
+ bailout_id_(bailout_id), |
+ frame_state_combine_(state_combine), |
+ jsfunction_(jsfunction) {} |
+ |
+ FrameStateType type() const { return type_; } |
BailoutId bailout_id() const { return bailout_id_; } |
OutputFrameStateCombine state_combine() const { return frame_state_combine_; } |
+ MaybeHandle<JSFunction> jsfunction() const { return jsfunction_; } |
private: |
+ FrameStateType type_; |
BailoutId bailout_id_; |
OutputFrameStateCombine frame_state_combine_; |
+ MaybeHandle<JSFunction> jsfunction_; |
}; |
@@ -81,8 +95,10 @@ class CommonOperatorBuilder FINAL { |
const Operator* ValueEffect(int arguments); |
const Operator* Finish(int arguments); |
const Operator* StateValues(int arguments); |
- const Operator* FrameState(BailoutId bailout_id, |
- OutputFrameStateCombine combine); |
+ const Operator* FrameState( |
+ FrameStateType type, BailoutId bailout_id, |
+ OutputFrameStateCombine state_combine, |
+ MaybeHandle<JSFunction> jsfunction = MaybeHandle<JSFunction>()); |
const Operator* Call(const CallDescriptor* descriptor); |
const Operator* Projection(size_t index); |