Don't return frame by reference in ProcessTopOptimizedFrame.

R=ulan@chromium.org

Review URL: https://codereview.chromium.org/18592006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15461 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
mstarzinger@chromium.org 2013-07-03 09:47:22 +00:00
parent 57f46c0190
commit 9bd3128736

View File

@ -2181,28 +2181,20 @@ void MarkCompactCollector::ProcessEphemeralMarking(ObjectVisitor* visitor) {
} }
static StackFrame* TopOptimizedFrame(Isolate* isolate) { void MarkCompactCollector::ProcessTopOptimizedFrame(ObjectVisitor* visitor) {
for (StackFrameIterator it(isolate, isolate->thread_local_top()); for (StackFrameIterator it(isolate(), isolate()->thread_local_top());
!it.done(); it.Advance()) { !it.done(); it.Advance()) {
if (it.frame()->type() == StackFrame::JAVA_SCRIPT) { if (it.frame()->type() == StackFrame::JAVA_SCRIPT) {
return NULL; return;
} }
if (it.frame()->type() == StackFrame::OPTIMIZED) { if (it.frame()->type() == StackFrame::OPTIMIZED) {
return it.frame(); Code* code = it.frame()->LookupCode();
} if (!code->CanDeoptAt(it.frame()->pc())) {
}
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->CodeIterateBody(visitor);
} }
ProcessMarkingDeque(); ProcessMarkingDeque();
return;
}
} }
} }