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 943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
954 // GC support. | 954 // GC support. |
955 void Iterate(ObjectVisitor* v) const override; | 955 void Iterate(ObjectVisitor* v) const override; |
956 | 956 |
957 // Printing support. | 957 // Printing support. |
958 void Print(StringStream* accumulator, PrintMode mode, | 958 void Print(StringStream* accumulator, PrintMode mode, |
959 int index) const override; | 959 int index) const override; |
960 | 960 |
961 // Determine the code for the frame. | 961 // Determine the code for the frame. |
962 Code* unchecked_code() const override; | 962 Code* unchecked_code() const override; |
963 | 963 |
| 964 static WasmFrame* cast(StackFrame* frame) { |
| 965 DCHECK(frame->is_wasm()); |
| 966 return static_cast<WasmFrame*>(frame); |
| 967 } |
| 968 |
964 protected: | 969 protected: |
965 inline explicit WasmFrame(StackFrameIteratorBase* iterator); | 970 inline explicit WasmFrame(StackFrameIteratorBase* iterator); |
966 | 971 |
967 Address GetCallerStackPointer() const override; | 972 Address GetCallerStackPointer() const override; |
968 | 973 |
969 private: | 974 private: |
970 friend class StackFrameIteratorBase; | 975 friend class StackFrameIteratorBase; |
971 }; | 976 }; |
972 | 977 |
973 class WasmToJsFrame : public WasmFrame { | 978 class WasmToJsFrame : public StubFrame { |
974 public: | 979 public: |
975 Type type() const override { return WASM_TO_JS; } | 980 Type type() const override { return WASM_TO_JS; } |
976 | 981 |
977 protected: | 982 protected: |
978 inline explicit WasmToJsFrame(StackFrameIteratorBase* iterator); | 983 inline explicit WasmToJsFrame(StackFrameIteratorBase* iterator); |
979 | 984 |
980 private: | 985 private: |
981 friend class StackFrameIteratorBase; | 986 friend class StackFrameIteratorBase; |
982 }; | 987 }; |
983 | 988 |
984 class JsToWasmFrame : public WasmFrame { | 989 class JsToWasmFrame : public StubFrame { |
985 public: | 990 public: |
986 Type type() const override { return JS_TO_WASM; } | 991 Type type() const override { return JS_TO_WASM; } |
987 | 992 |
988 protected: | 993 protected: |
989 inline explicit JsToWasmFrame(StackFrameIteratorBase* iterator); | 994 inline explicit JsToWasmFrame(StackFrameIteratorBase* iterator); |
990 | 995 |
991 private: | 996 private: |
992 friend class StackFrameIteratorBase; | 997 friend class StackFrameIteratorBase; |
993 }; | 998 }; |
994 | 999 |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1195 | 1200 |
1196 | 1201 |
1197 // Reads all frames on the current stack and copies them into the current | 1202 // Reads all frames on the current stack and copies them into the current |
1198 // zone memory. | 1203 // zone memory. |
1199 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); | 1204 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); |
1200 | 1205 |
1201 } // namespace internal | 1206 } // namespace internal |
1202 } // namespace v8 | 1207 } // namespace v8 |
1203 | 1208 |
1204 #endif // V8_FRAMES_H_ | 1209 #endif // V8_FRAMES_H_ |
OLD | NEW |