OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_FRAMES_H_ | 5 #ifndef V8_FRAMES_H_ |
6 #define V8_FRAMES_H_ | 6 #define V8_FRAMES_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/handles.h" | 9 #include "src/handles.h" |
10 #include "src/safepoint-table.h" | 10 #include "src/safepoint-table.h" |
(...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1104 int LookupExceptionHandlerInTable(int* data); | 1104 int LookupExceptionHandlerInTable(int* data); |
1105 | 1105 |
1106 // Determine the code for the frame. | 1106 // Determine the code for the frame. |
1107 Code* unchecked_code() const override; | 1107 Code* unchecked_code() const override; |
1108 | 1108 |
1109 // Accessors. | 1109 // Accessors. |
1110 Object* wasm_instance() const; | 1110 Object* wasm_instance() const; |
1111 uint32_t function_index() const; | 1111 uint32_t function_index() const; |
1112 Script* script() const override; | 1112 Script* script() const override; |
1113 int position() const override; | 1113 int position() const override; |
1114 bool at_to_number_conversion() const; | |
1115 | 1114 |
1116 static WasmFrame* cast(StackFrame* frame) { | 1115 static WasmFrame* cast(StackFrame* frame) { |
1117 DCHECK(frame->is_wasm()); | 1116 DCHECK(frame->is_wasm()); |
1118 return static_cast<WasmFrame*>(frame); | 1117 return static_cast<WasmFrame*>(frame); |
1119 } | 1118 } |
1120 | 1119 |
1121 protected: | 1120 protected: |
1122 inline explicit WasmFrame(StackFrameIteratorBase* iterator); | 1121 inline explicit WasmFrame(StackFrameIteratorBase* iterator); |
1123 | 1122 |
1124 Address GetCallerStackPointer() const override; | 1123 Address GetCallerStackPointer() const override; |
1125 | 1124 |
1126 private: | 1125 private: |
1127 friend class StackFrameIteratorBase; | 1126 friend class StackFrameIteratorBase; |
1128 }; | 1127 }; |
1129 | 1128 |
1130 class WasmToJsFrame : public StubFrame { | 1129 class WasmToJsFrame : public StubFrame { |
1131 public: | 1130 public: |
1132 Type type() const override { return WASM_TO_JS; } | 1131 Type type() const override { return WASM_TO_JS; } |
1133 | 1132 |
1134 protected: | 1133 protected: |
1135 inline explicit WasmToJsFrame(StackFrameIteratorBase* iterator); | 1134 inline explicit WasmToJsFrame(StackFrameIteratorBase* iterator); |
1136 | 1135 |
1137 private: | 1136 private: |
1138 void ComputeCallerState(State* state) const override; | |
1139 | |
1140 friend class StackFrameIteratorBase; | 1137 friend class StackFrameIteratorBase; |
1141 }; | 1138 }; |
1142 | 1139 |
1143 class JsToWasmFrame : public StubFrame { | 1140 class JsToWasmFrame : public StubFrame { |
1144 public: | 1141 public: |
1145 Type type() const override { return JS_TO_WASM; } | 1142 Type type() const override { return JS_TO_WASM; } |
1146 | 1143 |
1147 protected: | 1144 protected: |
1148 inline explicit JsToWasmFrame(StackFrameIteratorBase* iterator); | 1145 inline explicit JsToWasmFrame(StackFrameIteratorBase* iterator); |
1149 | 1146 |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1368 | 1365 |
1369 | 1366 |
1370 // Reads all frames on the current stack and copies them into the current | 1367 // Reads all frames on the current stack and copies them into the current |
1371 // zone memory. | 1368 // zone memory. |
1372 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); | 1369 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); |
1373 | 1370 |
1374 } // namespace internal | 1371 } // namespace internal |
1375 } // namespace v8 | 1372 } // namespace v8 |
1376 | 1373 |
1377 #endif // V8_FRAMES_H_ | 1374 #endif // V8_FRAMES_H_ |
OLD | NEW |