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

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: 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
« src/frames.cc ('K') | « 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..55dd00aa34bab583db77daa937adf7934655da33 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,26 @@ 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::isJS() const { return frame()->is_java_script(); }
titzer 2016/04/06 09:53:23 Spell out JavaScript here.
Clemens Hammacher 2016/04/06 10:18:28 OK, changed it to is_javascript.
+
+bool StackTraceFrameIterator::isWasm() const { return frame()->is_wasm(); }
+
+JavaScriptFrame* StackTraceFrameIterator::jsFrame() const {
titzer 2016/04/06 09:53:22 CamelCase doesn't quite fit the surrounding style
Clemens Hammacher 2016/04/06 10:18:28 Done.
+ DCHECK(isJS());
+ return static_cast<JavaScriptFrame*>(frame());
+}
+
+WasmFrame* StackTraceFrameIterator::wasmFrame() const {
+ DCHECK(isWasm());
+ return static_cast<WasmFrame*>(frame());
+}
inline StackFrame* SafeStackFrameIterator::frame() const {
DCHECK(!done());
« src/frames.cc ('K') | « src/frames.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698