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

Unified Diff: src/objects.cc

Issue 2809923002: Unify implementations of Map handles vectors and lists (Closed)
Patch Set: Style nit Created 3 years, 8 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
« src/ic/ic.cc ('K') | « 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 b0ad2219b674ccf9e737a414aaaa933eb0910852..d09ee34dbaeb43bcb90e1bb16feda8c671256493 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -4834,16 +4834,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());
« src/ic/ic.cc ('K') | « src/objects.h ('k') | src/type-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698