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

Unified Diff: src/frames-inl.h

Issue 17819003: Extract StackFrameIteratorBase (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase Created 7 years, 6 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') | no next file » | 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 c22a018fb0a1fb09bc0c5199fcf332d0c5a31c1b..bd652da5c4afe2d2ca467c641cc33b8b50fbbfb9 100644
--- a/src/frames-inl.h
+++ b/src/frames-inl.h
@@ -116,7 +116,7 @@ inline Object** StackHandler::code_address() const {
}
-inline StackFrame::StackFrame(StackFrameIterator* iterator)
+inline StackFrame::StackFrame(StackFrameIteratorBase* iterator)
: iterator_(iterator), isolate_(iterator_->isolate()) {
}
@@ -136,22 +136,23 @@ inline Code* StackFrame::GetContainingCode(Isolate* isolate, Address pc) {
}
-inline EntryFrame::EntryFrame(StackFrameIterator* iterator)
+inline EntryFrame::EntryFrame(StackFrameIteratorBase* iterator)
: StackFrame(iterator) {
}
-inline EntryConstructFrame::EntryConstructFrame(StackFrameIterator* iterator)
+inline EntryConstructFrame::EntryConstructFrame(
+ StackFrameIteratorBase* iterator)
: EntryFrame(iterator) {
}
-inline ExitFrame::ExitFrame(StackFrameIterator* iterator)
+inline ExitFrame::ExitFrame(StackFrameIteratorBase* iterator)
: StackFrame(iterator) {
}
-inline StandardFrame::StandardFrame(StackFrameIterator* iterator)
+inline StandardFrame::StandardFrame(StackFrameIteratorBase* iterator)
: StackFrame(iterator) {
}
@@ -201,7 +202,7 @@ inline bool StandardFrame::IsConstructFrame(Address fp) {
}
-inline JavaScriptFrame::JavaScriptFrame(StackFrameIterator* iterator)
+inline JavaScriptFrame::JavaScriptFrame(StackFrameIteratorBase* iterator)
: StandardFrame(iterator) {
}
@@ -269,32 +270,32 @@ inline Object* JavaScriptFrame::function() const {
}
-inline StubFrame::StubFrame(StackFrameIterator* iterator)
+inline StubFrame::StubFrame(StackFrameIteratorBase* iterator)
: StandardFrame(iterator) {
}
-inline OptimizedFrame::OptimizedFrame(StackFrameIterator* iterator)
+inline OptimizedFrame::OptimizedFrame(StackFrameIteratorBase* iterator)
: JavaScriptFrame(iterator) {
}
inline ArgumentsAdaptorFrame::ArgumentsAdaptorFrame(
- StackFrameIterator* iterator) : JavaScriptFrame(iterator) {
+ StackFrameIteratorBase* iterator) : JavaScriptFrame(iterator) {
}
-inline InternalFrame::InternalFrame(StackFrameIterator* iterator)
+inline InternalFrame::InternalFrame(StackFrameIteratorBase* iterator)
: StandardFrame(iterator) {
}
inline StubFailureTrampolineFrame::StubFailureTrampolineFrame(
- StackFrameIterator* iterator) : StandardFrame(iterator) {
+ StackFrameIteratorBase* iterator) : StandardFrame(iterator) {
}
-inline ConstructFrame::ConstructFrame(StackFrameIterator* iterator)
+inline ConstructFrame::ConstructFrame(StackFrameIteratorBase* iterator)
: InternalFrame(iterator) {
}
@@ -325,14 +326,9 @@ inline JavaScriptFrame* JavaScriptFrameIterator::frame() const {
inline JavaScriptFrame* SafeStackFrameIterator::frame() const {
- ASSERT(!iteration_done_);
- // TODO(1233797): The frame hierarchy needs to change. It's
- // problematic that we can't use the safe-cast operator to cast to
- // the JavaScript frame type, because we may encounter arguments
- // adaptor frames.
- StackFrame* frame = iterator_.frame();
- ASSERT(frame->is_java_script());
- return static_cast<JavaScriptFrame*>(frame);
+ ASSERT(!done());
+ ASSERT(frame_->is_java_script());
+ return static_cast<JavaScriptFrame*>(frame_);
}
« no previous file with comments | « src/frames.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698