OLD | NEW |
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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 Map* updated = map->CurrentMapForDeprecated(); | 284 Map* updated = map->CurrentMapForDeprecated(); |
285 if (updated == NULL) return; | 285 if (updated == NULL) return; |
286 map = Handle<Map>(updated); | 286 map = Handle<Map>(updated); |
287 for (int i = 0; i < length(); ++i) { | 287 for (int i = 0; i < length(); ++i) { |
288 if (at(i).is_identical_to(map)) return; | 288 if (at(i).is_identical_to(map)) return; |
289 } | 289 } |
290 Add(map, zone); | 290 Add(map, zone); |
291 } | 291 } |
292 | 292 |
293 void Add(Handle<Map> handle, Zone* zone) { | 293 void Add(Handle<Map> handle, Zone* zone) { |
294 ASSERT(!handle->is_deprecated()); | |
295 list_.Add(handle.location(), zone); | 294 list_.Add(handle.location(), zone); |
296 } | 295 } |
297 | 296 |
298 Handle<Map> at(int i) const { | 297 Handle<Map> at(int i) const { |
299 return Handle<Map>(list_.at(i)); | 298 return Handle<Map>(list_.at(i)); |
300 } | 299 } |
301 | 300 |
302 Handle<Map> first() const { return at(0); } | 301 Handle<Map> first() const { return at(0); } |
303 Handle<Map> last() const { return at(length() - 1); } | 302 Handle<Map> last() const { return at(length() - 1); } |
304 | 303 |
(...skipping 2904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3209 private: | 3208 private: |
3210 Isolate* isolate_; | 3209 Isolate* isolate_; |
3211 Zone* zone_; | 3210 Zone* zone_; |
3212 Visitor visitor_; | 3211 Visitor visitor_; |
3213 }; | 3212 }; |
3214 | 3213 |
3215 | 3214 |
3216 } } // namespace v8::internal | 3215 } } // namespace v8::internal |
3217 | 3216 |
3218 #endif // V8_AST_H_ | 3217 #endif // V8_AST_H_ |
OLD | NEW |