Revision: 16574
Author:   [email protected]
Date:     Fri Sep  6 12:25:46 2013 UTC
Log: It should break out while loop once page_has_scan_on_scavenge_flag is found, there is no need check all of the items in the list.

[email protected]

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

Patch from Bangfu Tao <[email protected]>.
http://code.google.com/p/v8/source/detail?r=16574

Modified:
 /branches/bleeding_edge/src/store-buffer.cc

=======================================
--- /branches/bleeding_edge/src/store-buffer.cc Thu Jul 11 09:17:03 2013 UTC
+++ /branches/bleeding_edge/src/store-buffer.cc Fri Sep  6 12:25:46 2013 UTC
@@ -170,7 +170,10 @@
   PointerChunkIterator it(heap_);
   MemoryChunk* chunk;
   while ((chunk = it.next()) != NULL) {
-    if (chunk->scan_on_scavenge()) page_has_scan_on_scavenge_flag = true;
+    if (chunk->scan_on_scavenge()) {
+      page_has_scan_on_scavenge_flag = true;
+      break;
+    }
   }

   if (page_has_scan_on_scavenge_flag) {
@@ -279,7 +282,10 @@
   MemoryChunk* chunk;
   bool page_has_scan_on_scavenge_flag = false;
   while ((chunk = it.next()) != NULL) {
-    if (chunk->scan_on_scavenge()) page_has_scan_on_scavenge_flag = true;
+    if (chunk->scan_on_scavenge()) {
+      page_has_scan_on_scavenge_flag = true;
+      break;
+    }
   }

   if (page_has_scan_on_scavenge_flag) {

--
--
v8-dev mailing list
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to