Reviewers: Yang,

Description:
a small fix: DependentCode contains check against related dependency group

BUG=

Please review this at https://codereview.chromium.org/23648009/

SVN Base: git://github.com/v8/v8.git@master

Affected files (+3, -2 lines):
  src/objects.cc


Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 507fbfc1142ccf057a70995c112c143232a1a402..fc48dbc23b6cbc7b014eb5d5a9a122f9c33477de 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -11408,8 +11408,9 @@ void DependentCode::RemoveCompilationInfo(DependentCode::DependencyGroup group,

 bool DependentCode::Contains(DependencyGroup group, Code* code) {
   GroupStartIndexes starts(this);
-  int number_of_entries = starts.number_of_entries();
-  for (int i = 0; i < number_of_entries; i++) {
+  int start = starts.at(group);
+  int end = starts.at(group + 1);
+  for (int i = start; i < end; i++) {
     if (object_at(i) == code) return true;
   }
   return false;


--
--
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