Index: src/compiler/frame-states.h |
diff --git a/src/compiler/frame-states.h b/src/compiler/frame-states.h |
index a98d599de596408bd3cf9a744f3f193e0ce0ef04..6057d89c2d48f3ca7a688ee9805a8695afecfb49 100644 |
--- a/src/compiler/frame-states.h |
+++ b/src/compiler/frame-states.h |
@@ -5,6 +5,7 @@ |
#ifndef V8_COMPILER_FRAME_STATES_H_ |
#define V8_COMPILER_FRAME_STATES_H_ |
+#include "src/builtins/builtins.h" |
#include "src/handles.h" |
#include "src/objects/shared-function-info.h" |
#include "src/utils.h" |
@@ -14,6 +15,9 @@ namespace internal { |
namespace compiler { |
+class JSGraph; |
+class Node; |
+ |
// Flag that describes how to combine the current environment with |
// the output of a node to obtain a framestate for lazy bailout. |
class OutputFrameStateCombine { |
@@ -80,7 +84,10 @@ enum class FrameStateType { |
kTailCallerFunction, // Represents a frame removed by tail call elimination. |
kConstructStub, // Represents a ConstructStubFrame. |
kGetterStub, // Represents a GetterStubFrame. |
- kSetterStub // Represents a SetterStubFrame. |
+ kSetterStub, // Represents a SetterStubFrame. |
+ kBuiltinContinuation, // Represents a continuation to a stub. |
+ kJavaScriptBuiltinContinuation // Represents a continuation to a JavaScipt |
+ // builtin. |
}; |
class FrameStateFunctionInfo { |
@@ -100,7 +107,8 @@ class FrameStateFunctionInfo { |
static bool IsJSFunctionType(FrameStateType type) { |
return type == FrameStateType::kJavaScriptFunction || |
- type == FrameStateType::kInterpretedFunction; |
+ type == FrameStateType::kInterpretedFunction || |
+ type == FrameStateType::kJavaScriptBuiltinContinuation; |
} |
private: |
@@ -158,6 +166,21 @@ static const int kFrameStateFunctionInput = 4; |
static const int kFrameStateOuterStateInput = 5; |
static const int kFrameStateInputCount = kFrameStateOuterStateInput + 1; |
+enum class ContinuationFrameStateMode { EAGER, LAZY }; |
+ |
+Node* CreateStubBuiltinContinuationFrameState(JSGraph* graph, |
+ Builtins::Name name, |
+ Node* context, Node** parameters, |
+ int parameter_count, |
+ Node* outer_frame_state, |
+ ContinuationFrameStateMode mode); |
+ |
+Node* CreateJavaScriptBuiltinContinuationFrameState( |
+ JSGraph* graph, Handle<JSFunction> function, Builtins::Name name, |
+ Node* target, Node* context, Node** stack_parameters, |
+ int stack_parameter_count, Node* outer_frame_state, |
+ ContinuationFrameStateMode mode); |
+ |
} // namespace compiler |
} // namespace internal |
} // namespace v8 |