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

Unified Diff: src/ast.h

Issue 14847008: Update deprecated maps before generating optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment Created 7 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
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698