| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_COMPILER_FRAME_STATES_H_ | 5 #ifndef V8_COMPILER_FRAME_STATES_H_ |
| 6 #define V8_COMPILER_FRAME_STATES_H_ | 6 #define V8_COMPILER_FRAME_STATES_H_ |
| 7 | 7 |
| 8 #include "src/builtins/builtins.h" |
| 8 #include "src/handles.h" | 9 #include "src/handles.h" |
| 9 #include "src/utils.h" | 10 #include "src/utils.h" |
| 10 | 11 |
| 11 namespace v8 { | 12 namespace v8 { |
| 12 namespace internal { | 13 namespace internal { |
| 13 | 14 |
| 14 // Forward declarations. | 15 // Forward declarations. |
| 15 class SharedFunctionInfo; | 16 class SharedFunctionInfo; |
| 16 | 17 |
| 17 namespace compiler { | 18 namespace compiler { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 76 |
| 76 | 77 |
| 77 // The type of stack frame that a FrameState node represents. | 78 // The type of stack frame that a FrameState node represents. |
| 78 enum class FrameStateType { | 79 enum class FrameStateType { |
| 79 kJavaScriptFunction, // Represents an unoptimized JavaScriptFrame. | 80 kJavaScriptFunction, // Represents an unoptimized JavaScriptFrame. |
| 80 kInterpretedFunction, // Represents an InterpretedFrame. | 81 kInterpretedFunction, // Represents an InterpretedFrame. |
| 81 kArgumentsAdaptor, // Represents an ArgumentsAdaptorFrame. | 82 kArgumentsAdaptor, // Represents an ArgumentsAdaptorFrame. |
| 82 kTailCallerFunction, // Represents a frame removed by tail call elimination. | 83 kTailCallerFunction, // Represents a frame removed by tail call elimination. |
| 83 kConstructStub, // Represents a ConstructStubFrame. | 84 kConstructStub, // Represents a ConstructStubFrame. |
| 84 kGetterStub, // Represents a GetterStubFrame. | 85 kGetterStub, // Represents a GetterStubFrame. |
| 85 kSetterStub // Represents a SetterStubFrame. | 86 kSetterStub, // Represents a SetterStubFrame. |
| 87 kBuiltinContinuation // Represents a continuation to a stub |
| 86 }; | 88 }; |
| 87 | 89 |
| 88 class FrameStateFunctionInfo { | 90 class FrameStateFunctionInfo { |
| 89 public: | 91 public: |
| 90 FrameStateFunctionInfo(FrameStateType type, int parameter_count, | 92 FrameStateFunctionInfo(FrameStateType type, int parameter_count, |
| 91 int local_count, | 93 int local_count, |
| 92 Handle<SharedFunctionInfo> shared_info) | 94 Handle<SharedFunctionInfo> shared_info) |
| 93 : type_(type), | 95 : type_(type), |
| 94 parameter_count_(parameter_count), | 96 parameter_count_(parameter_count), |
| 95 local_count_(local_count), | 97 local_count_(local_count), |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 std::ostream& operator<<(std::ostream&, FrameStateInfo const&); | 155 std::ostream& operator<<(std::ostream&, FrameStateInfo const&); |
| 154 | 156 |
| 155 static const int kFrameStateParametersInput = 0; | 157 static const int kFrameStateParametersInput = 0; |
| 156 static const int kFrameStateLocalsInput = 1; | 158 static const int kFrameStateLocalsInput = 1; |
| 157 static const int kFrameStateStackInput = 2; | 159 static const int kFrameStateStackInput = 2; |
| 158 static const int kFrameStateContextInput = 3; | 160 static const int kFrameStateContextInput = 3; |
| 159 static const int kFrameStateFunctionInput = 4; | 161 static const int kFrameStateFunctionInput = 4; |
| 160 static const int kFrameStateOuterStateInput = 5; | 162 static const int kFrameStateOuterStateInput = 5; |
| 161 static const int kFrameStateInputCount = kFrameStateOuterStateInput + 1; | 163 static const int kFrameStateInputCount = kFrameStateOuterStateInput + 1; |
| 162 | 164 |
| 165 class JSGraph; |
| 166 class Node; |
| 167 |
| 168 enum CheckpointMode { CREATE_CHECKPOINT, DONT_CREATE_CHECKPOINT }; |
| 169 |
| 170 std::pair<Node*, Node*> CreateStubBuiltinContinuationFrameState( |
| 171 JSGraph* graph, Builtins::Name name, Node* context, Node** parameters, |
| 172 int parameter_count, Node* effect, Node* control, Node* outer_frame_state, |
| 173 CheckpointMode mode); |
| 174 |
| 175 std::pair<Node*, Node*> CreateJavaScriptBuiltinContinuationFrameState( |
| 176 JSGraph* graph, Handle<SharedFunctionInfo> shared, Builtins::Name name, |
| 177 Node* target, Node* context, Node** stack_parameters, |
| 178 int stack_parameter_count, Node* effect, Node* control, |
| 179 Node* outer_frame_state, CheckpointMode mode); |
| 180 |
| 163 } // namespace compiler | 181 } // namespace compiler |
| 164 } // namespace internal | 182 } // namespace internal |
| 165 } // namespace v8 | 183 } // namespace v8 |
| 166 | 184 |
| 167 #endif // V8_COMPILER_FRAME_STATES_H_ | 185 #endif // V8_COMPILER_FRAME_STATES_H_ |
| OLD | NEW |