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

Unified Diff: src/objects.cc

Issue 2809923002: Unify implementations of Map handles vectors and lists (Closed)
Patch Set: Review feedback Created 3 years, 7 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 | « src/objects.h ('k') | src/type-info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 28d936f655e1ce3b10dcf19ba1ab0702b1ec8f40..b6847fa814aff9f0842399c2f8959decdece3464 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -4832,16 +4832,15 @@ int AccessorInfo::AppendUnique(Handle<Object> descriptors,
valid_descriptors);
}
-
-static bool ContainsMap(MapHandleList* maps, Map* map) {
+static bool ContainsMap(MapHandles const& maps, Map* map) {
DCHECK_NOT_NULL(map);
- for (int i = 0; i < maps->length(); ++i) {
- if (!maps->at(i).is_null() && *maps->at(i) == map) return true;
+ for (Handle<Map> current : maps) {
+ if (!current.is_null() && *current == map) return true;
}
return false;
}
-Map* Map::FindElementsKindTransitionedMap(MapHandleList* candidates) {
+Map* Map::FindElementsKindTransitionedMap(MapHandles const& candidates) {
DisallowHeapAllocation no_allocation;
DisallowDeoptimization no_deoptimization(GetIsolate());
« no previous file with comments | « src/objects.h ('k') | src/type-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698