Reviewers: ulan,
Description:
Don't return frame by reference in ProcessTopOptimizedFrame.
R=u...@chromium.org
Please review this at https://codereview.chromium.org/18592006/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/mark-compact.cc
Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index
449e6556e42f62ce5f23bfd45372426a0bfecb69..7eab22a8ce0d44f727c7ec071ecb066e9ffdfb9f
100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -2181,28 +2181,20 @@ void
MarkCompactCollector::ProcessEphemeralMarking(ObjectVisitor* visitor) {
}
-static StackFrame* TopOptimizedFrame(Isolate* isolate) {
- for (StackFrameIterator it(isolate, isolate->thread_local_top());
+void MarkCompactCollector::ProcessTopOptimizedFrame(ObjectVisitor*
visitor) {
+ for (StackFrameIterator it(isolate(), isolate()->thread_local_top());
!it.done(); it.Advance()) {
if (it.frame()->type() == StackFrame::JAVA_SCRIPT) {
- return NULL;
+ return;
}
if (it.frame()->type() == StackFrame::OPTIMIZED) {
- return it.frame();
- }
- }
- return NULL;
-}
-
-
-void MarkCompactCollector::ProcessTopOptimizedFrame(ObjectVisitor*
visitor) {
- StackFrame* frame = TopOptimizedFrame(isolate());
- if (frame != NULL) {
- Code* code = frame->LookupCode();
- if (!code->CanDeoptAt(frame->pc())) {
- code->CodeIterateBody(visitor);
+ Code* code = it.frame()->LookupCode();
+ if (!code->CanDeoptAt(it.frame()->pc())) {
+ code->CodeIterateBody(visitor);
+ }
+ ProcessMarkingDeque();
+ return;
}
- ProcessMarkingDeque();
}
}
--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.