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

Unified Diff: src/frames-inl.h

Issue 1861283002: Prepare StackFrame hierarchy & iterators for WASM (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Ben's comments Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/frames.cc ('k') | src/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames-inl.h
diff --git a/src/frames-inl.h b/src/frames-inl.h
index 5ecbd4567e85086801ca3b2bc02984956a556de8..998be23409cbd99769b76ae7ac00fd842842bb09 100644
--- a/src/frames-inl.h
+++ b/src/frames-inl.h
@@ -199,11 +199,6 @@ inline int JavaScriptFrame::ComputeOperandsCount() const {
}
-inline Object* JavaScriptFrame::receiver() const {
- return GetParameter(-1);
-}
-
-
inline void JavaScriptFrame::set_receiver(Object* value) {
Memory::Object_at(GetParameterSlot(-1)) = value;
}
@@ -214,11 +209,6 @@ inline bool JavaScriptFrame::has_adapted_arguments() const {
}
-inline JSFunction* JavaScriptFrame::function() const {
- return JSFunction::cast(function_slot_object());
-}
-
-
inline Object* JavaScriptFrame::function_slot_object() const {
const int offset = JavaScriptFrameConstants::kFunctionOffset;
return Memory::Object_at(fp() + offset);
@@ -288,6 +278,28 @@ inline JavaScriptFrame* JavaScriptFrameIterator::frame() const {
return static_cast<JavaScriptFrame*>(frame);
}
+inline StandardFrame* StackTraceFrameIterator::frame() const {
+ StackFrame* frame = iterator_.frame();
+ DCHECK(frame->is_java_script() || frame->is_arguments_adaptor() ||
+ frame->is_wasm());
+ return static_cast<StandardFrame*>(frame);
+}
+
+bool StackTraceFrameIterator::is_javascript() const {
+ return frame()->is_java_script();
+}
+
+bool StackTraceFrameIterator::is_wasm() const { return frame()->is_wasm(); }
+
+JavaScriptFrame* StackTraceFrameIterator::javascript_frame() const {
+ DCHECK(is_javascript());
+ return static_cast<JavaScriptFrame*>(frame());
+}
+
+WasmFrame* StackTraceFrameIterator::wasm_frame() const {
+ DCHECK(is_wasm());
+ return static_cast<WasmFrame*>(frame());
+}
inline StackFrame* SafeStackFrameIterator::frame() const {
DCHECK(!done());
« no previous file with comments | « src/frames.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698