| 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 void Clear() { list_.Clear(); } | 269 void Clear() { list_.Clear(); } |
| 270 void Sort() { list_.Sort(); } | 270 void Sort() { list_.Sort(); } |
| 271 | 271 |
| 272 bool is_empty() const { return list_.is_empty(); } | 272 bool is_empty() const { return list_.is_empty(); } |
| 273 int length() const { return list_.length(); } | 273 int length() const { return list_.length(); } |
| 274 | 274 |
| 275 void Add(Handle<Map> handle, Zone* zone) { | 275 void Add(Handle<Map> handle, Zone* zone) { |
| 276 list_.Add(handle.location(), zone); | 276 list_.Add(handle.location(), zone); |
| 277 } | 277 } |
| 278 | 278 |
| 279 void RemoveAt(int i) { |
| 280 list_.RemoveAt(i); |
| 281 } |
| 282 |
| 279 Handle<Map> at(int i) const { | 283 Handle<Map> at(int i) const { |
| 280 return Handle<Map>(list_.at(i)); | 284 return Handle<Map>(list_.at(i)); |
| 281 } | 285 } |
| 282 | 286 |
| 283 Handle<Map> first() const { return at(0); } | 287 Handle<Map> first() const { return at(0); } |
| 284 Handle<Map> last() const { return at(length() - 1); } | 288 Handle<Map> last() const { return at(length() - 1); } |
| 285 | 289 |
| 286 private: | 290 private: |
| 287 // The list stores pointers to Map*, that is Map**, so it's GC safe. | 291 // The list stores pointers to Map*, that is Map**, so it's GC safe. |
| 288 SmallPointerList<Map*> list_; | 292 SmallPointerList<Map*> list_; |
| (...skipping 2632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2921 private: | 2925 private: |
| 2922 Isolate* isolate_; | 2926 Isolate* isolate_; |
| 2923 Zone* zone_; | 2927 Zone* zone_; |
| 2924 Visitor visitor_; | 2928 Visitor visitor_; |
| 2925 }; | 2929 }; |
| 2926 | 2930 |
| 2927 | 2931 |
| 2928 } } // namespace v8::internal | 2932 } } // namespace v8::internal |
| 2929 | 2933 |
| 2930 #endif // V8_AST_H_ | 2934 #endif // V8_AST_H_ |
| OLD | NEW |