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

Unified Diff: src/mark-compact.cc

Issue 18592006: Don't return frame by reference in ProcessTopOptimizedFrame. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698