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

Unified Diff: src/type-info.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.cc ('k') | test/cctest/test-feedback-vector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/type-info.cc
diff --git a/src/type-info.cc b/src/type-info.cc
index ee646afb749f18db2fdba43109c660811ea05ce1..12a63001470d647a675cc78710328f981afd1b4d 100644
--- a/src/type-info.cc
+++ b/src/type-info.cc
@@ -445,14 +445,14 @@ void TypeFeedbackOracle::CollectReceiverTypes(FeedbackSlot slot,
void TypeFeedbackOracle::CollectReceiverTypes(FeedbackNexus* nexus,
SmallMapList* types) {
- MapHandleList maps;
+ MapHandles maps;
if (nexus->ExtractMaps(&maps) == 0) {
return;
}
- types->Reserve(maps.length(), zone());
- for (int i = 0; i < maps.length(); i++) {
- types->AddMapIfMissing(maps.at(i), zone());
+ types->Reserve(static_cast<int>(maps.size()), zone());
+ for (Handle<Map> map : maps) {
+ types->AddMapIfMissing(map, zone());
}
}
« no previous file with comments | « src/objects.cc ('k') | test/cctest/test-feedback-vector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698