Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: src/frames.h

Issue 1764603003: Handle stack frames differently inside and on the boundary of wasm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | src/frames.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 DISALLOW_IMPLICIT_CONSTRUCTORS(StackHandler); 97 DISALLOW_IMPLICIT_CONSTRUCTORS(StackHandler);
98 }; 98 };
99 99
100 #define STACK_FRAME_TYPE_LIST(V) \ 100 #define STACK_FRAME_TYPE_LIST(V) \
101 V(ENTRY, EntryFrame) \ 101 V(ENTRY, EntryFrame) \
102 V(ENTRY_CONSTRUCT, EntryConstructFrame) \ 102 V(ENTRY_CONSTRUCT, EntryConstructFrame) \
103 V(EXIT, ExitFrame) \ 103 V(EXIT, ExitFrame) \
104 V(JAVA_SCRIPT, JavaScriptFrame) \ 104 V(JAVA_SCRIPT, JavaScriptFrame) \
105 V(OPTIMIZED, OptimizedFrame) \ 105 V(OPTIMIZED, OptimizedFrame) \
106 V(WASM, WasmFrame) \ 106 V(WASM, WasmFrame) \
107 V(WASM_TO_JS, WasmToJsFrame) \
108 V(JS_TO_WASM, JsToWasmFrame) \
107 V(INTERPRETED, InterpretedFrame) \ 109 V(INTERPRETED, InterpretedFrame) \
108 V(STUB, StubFrame) \ 110 V(STUB, StubFrame) \
109 V(STUB_FAILURE_TRAMPOLINE, StubFailureTrampolineFrame) \ 111 V(STUB_FAILURE_TRAMPOLINE, StubFailureTrampolineFrame) \
110 V(INTERNAL, InternalFrame) \ 112 V(INTERNAL, InternalFrame) \
111 V(CONSTRUCT, ConstructFrame) \ 113 V(CONSTRUCT, ConstructFrame) \
112 V(ARGUMENTS_ADAPTOR, ArgumentsAdaptorFrame) 114 V(ARGUMENTS_ADAPTOR, ArgumentsAdaptorFrame)
113 115
114 // Every pointer in a frame has a slot id. On 32-bit platforms, doubles consume 116 // Every pointer in a frame has a slot id. On 32-bit platforms, doubles consume
115 // two slots. 117 // two slots.
116 // 118 //
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 this->isolate_ = original.isolate_; 306 this->isolate_ = original.isolate_;
305 } 307 }
306 308
307 // Type testers. 309 // Type testers.
308 bool is_entry() const { return type() == ENTRY; } 310 bool is_entry() const { return type() == ENTRY; }
309 bool is_entry_construct() const { return type() == ENTRY_CONSTRUCT; } 311 bool is_entry_construct() const { return type() == ENTRY_CONSTRUCT; }
310 bool is_exit() const { return type() == EXIT; } 312 bool is_exit() const { return type() == EXIT; }
311 bool is_optimized() const { return type() == OPTIMIZED; } 313 bool is_optimized() const { return type() == OPTIMIZED; }
312 bool is_interpreted() const { return type() == INTERPRETED; } 314 bool is_interpreted() const { return type() == INTERPRETED; }
313 bool is_wasm() const { return type() == WASM; } 315 bool is_wasm() const { return type() == WASM; }
316 bool is_wasm_to_js() const { return type() == WASM_TO_JS; }
317 bool is_js_to_wasm() const { return type() == JS_TO_WASM; }
314 bool is_arguments_adaptor() const { return type() == ARGUMENTS_ADAPTOR; } 318 bool is_arguments_adaptor() const { return type() == ARGUMENTS_ADAPTOR; }
315 bool is_internal() const { return type() == INTERNAL; } 319 bool is_internal() const { return type() == INTERNAL; }
316 bool is_stub_failure_trampoline() const { 320 bool is_stub_failure_trampoline() const {
317 return type() == STUB_FAILURE_TRAMPOLINE; 321 return type() == STUB_FAILURE_TRAMPOLINE;
318 } 322 }
319 bool is_construct() const { return type() == CONSTRUCT; } 323 bool is_construct() const { return type() == CONSTRUCT; }
320 virtual bool is_standard() const { return false; } 324 virtual bool is_standard() const { return false; }
321 325
322 bool is_java_script() const { 326 bool is_java_script() const {
323 Type type = this->type(); 327 Type type = this->type();
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 861
858 protected: 862 protected:
859 inline explicit WasmFrame(StackFrameIteratorBase* iterator); 863 inline explicit WasmFrame(StackFrameIteratorBase* iterator);
860 864
861 Address GetCallerStackPointer() const override; 865 Address GetCallerStackPointer() const override;
862 866
863 private: 867 private:
864 friend class StackFrameIteratorBase; 868 friend class StackFrameIteratorBase;
865 }; 869 };
866 870
871 class WasmToJsFrame : public WasmFrame {
872 public:
873 Type type() const override { return WASM_TO_JS; }
874
875 protected:
876 inline explicit WasmToJsFrame(StackFrameIteratorBase* iterator);
877
878 private:
879 friend class StackFrameIteratorBase;
880 };
881
882 class JsToWasmFrame : public WasmFrame {
883 public:
884 Type type() const override { return JS_TO_WASM; }
885
886 protected:
887 inline explicit JsToWasmFrame(StackFrameIteratorBase* iterator);
888
889 private:
890 friend class StackFrameIteratorBase;
891 };
892
867 class InternalFrame: public StandardFrame { 893 class InternalFrame: public StandardFrame {
868 public: 894 public:
869 Type type() const override { return INTERNAL; } 895 Type type() const override { return INTERNAL; }
870 896
871 // Garbage collection support. 897 // Garbage collection support.
872 void Iterate(ObjectVisitor* v) const override; 898 void Iterate(ObjectVisitor* v) const override;
873 899
874 // Determine the code for the frame. 900 // Determine the code for the frame.
875 Code* unchecked_code() const override; 901 Code* unchecked_code() const override;
876 902
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 1101
1076 1102
1077 // Reads all frames on the current stack and copies them into the current 1103 // Reads all frames on the current stack and copies them into the current
1078 // zone memory. 1104 // zone memory.
1079 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); 1105 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone);
1080 1106
1081 } // namespace internal 1107 } // namespace internal
1082 } // namespace v8 1108 } // namespace v8
1083 1109
1084 #endif // V8_FRAMES_H_ 1110 #endif // V8_FRAMES_H_
OLDNEW
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698