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

Side by Side Diff: src/ast.h

Issue 15358005: Don't create new maps in CurrentMapForDeprecated. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 SmallMapList(int capacity, Zone* zone) : list_(capacity, zone) {} 271 SmallMapList(int capacity, Zone* zone) : list_(capacity, zone) {}
272 272
273 void Reserve(int capacity, Zone* zone) { list_.Reserve(capacity, zone); } 273 void Reserve(int capacity, Zone* zone) { list_.Reserve(capacity, zone); }
274 void Clear() { list_.Clear(); } 274 void Clear() { list_.Clear(); }
275 void Sort() { list_.Sort(); } 275 void Sort() { list_.Sort(); }
276 276
277 bool is_empty() const { return list_.is_empty(); } 277 bool is_empty() const { return list_.is_empty(); }
278 int length() const { return list_.length(); } 278 int length() const { return list_.length(); }
279 279
280 void AddMapIfMissing(Handle<Map> map, Zone* zone) { 280 void AddMapIfMissing(Handle<Map> map, Zone* zone) {
281 map = Map::CurrentMapForDeprecated(map); 281 Map* updated = map->CurrentMapForDeprecated();
282 if (updated == NULL) return;
283 map = Handle<Map>(updated);
282 for (int i = 0; i < length(); ++i) { 284 for (int i = 0; i < length(); ++i) {
283 if (at(i).is_identical_to(map)) return; 285 if (at(i).is_identical_to(map)) return;
284 } 286 }
285 Add(map, zone); 287 Add(map, zone);
286 } 288 }
287 289
288 void Add(Handle<Map> handle, Zone* zone) { 290 void Add(Handle<Map> handle, Zone* zone) {
289 ASSERT(!handle->is_deprecated()); 291 ASSERT(!handle->is_deprecated());
290 list_.Add(handle.location(), zone); 292 list_.Add(handle.location(), zone);
291 } 293 }
(...skipping 2772 matching lines...) Expand 10 before | Expand all | Expand 10 after
3064 private: 3066 private:
3065 Isolate* isolate_; 3067 Isolate* isolate_;
3066 Zone* zone_; 3068 Zone* zone_;
3067 Visitor visitor_; 3069 Visitor visitor_;
3068 }; 3070 };
3069 3071
3070 3072
3071 } } // namespace v8::internal 3073 } } // namespace v8::internal
3072 3074
3073 #endif // V8_AST_H_ 3075 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698