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

Side by Side Diff: src/ast.h

Issue 251683003: Fix CurrentMapForDeprecated() to return MaybeHandle instead of a null handle. (Closed) Base URL: git@github.com:v8/v8.git@master
Patch Set: Mark functions that return MaybeHandle with V8_WARN_UNUSED_RESULT. Created 6 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
« 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 SmallMapList(int capacity, Zone* zone) : list_(capacity, zone) {} 274 SmallMapList(int capacity, Zone* zone) : list_(capacity, zone) {}
275 275
276 void Reserve(int capacity, Zone* zone) { list_.Reserve(capacity, zone); } 276 void Reserve(int capacity, Zone* zone) { list_.Reserve(capacity, zone); }
277 void Clear() { list_.Clear(); } 277 void Clear() { list_.Clear(); }
278 void Sort() { list_.Sort(); } 278 void Sort() { list_.Sort(); }
279 279
280 bool is_empty() const { return list_.is_empty(); } 280 bool is_empty() const { return list_.is_empty(); }
281 int length() const { return list_.length(); } 281 int length() const { return list_.length(); }
282 282
283 void AddMapIfMissing(Handle<Map> map, Zone* zone) { 283 void AddMapIfMissing(Handle<Map> map, Zone* zone) {
284 map = Map::CurrentMapForDeprecated(map); 284 if (!Map::CurrentMapForDeprecated(map).ToHandle(&map)) return;
285 if (map.is_null()) return;
286 for (int i = 0; i < length(); ++i) { 285 for (int i = 0; i < length(); ++i) {
287 if (at(i).is_identical_to(map)) return; 286 if (at(i).is_identical_to(map)) return;
288 } 287 }
289 Add(map, zone); 288 Add(map, zone);
290 } 289 }
291 290
292 void FilterForPossibleTransitions(Map* root_map) { 291 void FilterForPossibleTransitions(Map* root_map) {
293 for (int i = list_.length() - 1; i >= 0; i--) { 292 for (int i = list_.length() - 1; i >= 0; i--) {
294 if (at(i)->FindRootMap() != root_map) { 293 if (at(i)->FindRootMap() != root_map) {
295 list_.RemoveElement(list_.at(i)); 294 list_.RemoveElement(list_.at(i));
(...skipping 3069 matching lines...) Expand 10 before | Expand all | Expand 10 after
3365 3364
3366 private: 3365 private:
3367 Zone* zone_; 3366 Zone* zone_;
3368 Visitor visitor_; 3367 Visitor visitor_;
3369 }; 3368 };
3370 3369
3371 3370
3372 } } // namespace v8::internal 3371 } } // namespace v8::internal
3373 3372
3374 #endif // V8_AST_H_ 3373 #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