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

Side by Side Diff: src/ast.h

Issue 23615012: Properly filter types using the initial map from HAllocate. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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') | src/hydrogen.cc » ('J')
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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 void AddMapIfMissing(Handle<Map> map, Zone* zone) { 281 void AddMapIfMissing(Handle<Map> map, Zone* zone) {
282 Map* updated = map->CurrentMapForDeprecated(); 282 Map* updated = map->CurrentMapForDeprecated();
283 if (updated == NULL) return; 283 if (updated == NULL) return;
284 map = Handle<Map>(updated); 284 map = Handle<Map>(updated);
285 for (int i = 0; i < length(); ++i) { 285 for (int i = 0; i < length(); ++i) {
286 if (at(i).is_identical_to(map)) return; 286 if (at(i).is_identical_to(map)) return;
287 } 287 }
288 Add(map, zone); 288 Add(map, zone);
289 } 289 }
290 290
291 void FilterForPossibleTransitions(Map* root_map, Zone* zone) {
Michael Starzinger 2013/09/05 20:07:23 The "zone" parameter is obsolete, as we only remov
Toon Verwaest 2013/09/06 09:23:12 Done.
292 for (int i = list_.length() - 1; i >= 0; i--) {
293 if (at(i)->FindRootMap() != root_map) {
294 list_.RemoveElement(list_.at(i));
295 }
296 }
297 }
298
291 void Add(Handle<Map> handle, Zone* zone) { 299 void Add(Handle<Map> handle, Zone* zone) {
292 list_.Add(handle.location(), zone); 300 list_.Add(handle.location(), zone);
293 } 301 }
294 302
295 Handle<Map> at(int i) const { 303 Handle<Map> at(int i) const {
296 return Handle<Map>(list_.at(i)); 304 return Handle<Map>(list_.at(i));
297 } 305 }
298 306
299 Handle<Map> first() const { return at(0); } 307 Handle<Map> first() const { return at(0); }
300 Handle<Map> last() const { return at(length() - 1); } 308 Handle<Map> last() const { return at(length() - 1); }
(...skipping 2954 matching lines...) Expand 10 before | Expand all | Expand 10 after
3255 private: 3263 private:
3256 Isolate* isolate_; 3264 Isolate* isolate_;
3257 Zone* zone_; 3265 Zone* zone_;
3258 Visitor visitor_; 3266 Visitor visitor_;
3259 }; 3267 };
3260 3268
3261 3269
3262 } } // namespace v8::internal 3270 } } // namespace v8::internal
3263 3271
3264 #endif // V8_AST_H_ 3272 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | src/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698