Index: src/ast.h |
diff --git a/src/ast.h b/src/ast.h |
index 10ae7de458d1653e36a7ab688dd15b9b68e297f4..b36d9677081d4ec17e7203e4909cdb22bd0d4c80 100644 |
--- a/src/ast.h |
+++ b/src/ast.h |
@@ -277,6 +277,14 @@ class SmallMapList { |
bool is_empty() const { return list_.is_empty(); } |
int length() const { return list_.length(); } |
+ void AddMapIfMissing(Handle<Map> map, Zone* zone) { |
+ map = Map::CurrentMapForDeprecated(map); |
+ for (int i = 0; i < length(); ++i) { |
+ if (at(i).is_identical_to(map)) return; |
+ } |
+ Add(map, zone); |
+ } |
+ |
void Add(Handle<Map> handle, Zone* zone) { |
list_.Add(handle.location(), zone); |
} |