| 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 void Clear() { list_.Clear(); } | 268 void Clear() { list_.Clear(); } |
| 269 void Sort() { list_.Sort(); } | 269 void Sort() { list_.Sort(); } |
| 270 | 270 |
| 271 bool is_empty() const { return list_.is_empty(); } | 271 bool is_empty() const { return list_.is_empty(); } |
| 272 int length() const { return list_.length(); } | 272 int length() const { return list_.length(); } |
| 273 | 273 |
| 274 void Add(Handle<Map> handle, Zone* zone) { | 274 void Add(Handle<Map> handle, Zone* zone) { |
| 275 list_.Add(handle.location(), zone); | 275 list_.Add(handle.location(), zone); |
| 276 } | 276 } |
| 277 | 277 |
| 278 void Remove(Handle<Map> handle) { |
| 279 list_.RemoveElement(handle.location()); |
| 280 } |
| 281 |
| 278 Handle<Map> at(int i) const { | 282 Handle<Map> at(int i) const { |
| 279 return Handle<Map>(list_.at(i)); | 283 return Handle<Map>(list_.at(i)); |
| 280 } | 284 } |
| 281 | 285 |
| 282 Handle<Map> first() const { return at(0); } | 286 Handle<Map> first() const { return at(0); } |
| 283 Handle<Map> last() const { return at(length() - 1); } | 287 Handle<Map> last() const { return at(length() - 1); } |
| 284 | 288 |
| 285 private: | 289 private: |
| 286 // The list stores pointers to Map*, that is Map**, so it's GC safe. | 290 // The list stores pointers to Map*, that is Map**, so it's GC safe. |
| 287 SmallPointerList<Map*> list_; | 291 SmallPointerList<Map*> list_; |
| (...skipping 2608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2896 private: | 2900 private: |
| 2897 Isolate* isolate_; | 2901 Isolate* isolate_; |
| 2898 Zone* zone_; | 2902 Zone* zone_; |
| 2899 Visitor visitor_; | 2903 Visitor visitor_; |
| 2900 }; | 2904 }; |
| 2901 | 2905 |
| 2902 | 2906 |
| 2903 } } // namespace v8::internal | 2907 } } // namespace v8::internal |
| 2904 | 2908 |
| 2905 #endif // V8_AST_H_ | 2909 #endif // V8_AST_H_ |
| OLD | NEW |