| 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 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1204 | 1204 |
| 1205 // Every FunctionState starts with this id. | 1205 // Every FunctionState starts with this id. |
| 1206 static const int kFirstUsableId = 4; | 1206 static const int kFirstUsableId = 4; |
| 1207 | 1207 |
| 1208 // Every compiled stub starts with this id. | 1208 // Every compiled stub starts with this id. |
| 1209 static const int kStubEntryId = 5; | 1209 static const int kStubEntryId = 5; |
| 1210 | 1210 |
| 1211 int id_; | 1211 int id_; |
| 1212 }; | 1212 }; |
| 1213 | 1213 |
| 1214 |
| 1215 template <class C> |
| 1216 class ContainerPointerWrapper { |
| 1217 public: |
| 1218 typedef typename C::iterator iterator; |
| 1219 typedef typename C::reverse_iterator reverse_iterator; |
| 1220 explicit ContainerPointerWrapper(C* container) : container_(container) {} |
| 1221 iterator begin() { return container_->begin(); } |
| 1222 iterator end() { return container_->end(); } |
| 1223 reverse_iterator rbegin() { return container_->rbegin(); } |
| 1224 reverse_iterator rend() { return container_->rend(); } |
| 1225 private: |
| 1226 C* container_; |
| 1227 }; |
| 1228 |
| 1214 } } // namespace v8::internal | 1229 } } // namespace v8::internal |
| 1215 | 1230 |
| 1216 #endif // V8_UTILS_H_ | 1231 #endif // V8_UTILS_H_ |
| OLD | NEW |