comparison src/share/vm/utilities/growableArray.hpp @ 6725:da91efe96a93

6964458: Reimplement class meta-data storage to use native memory Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author coleenp
date Sat, 01 Sep 2012 13:25:18 -0400
parents d2a62e0f25eb
children 4735d2c84362
comparison
equal deleted inserted replaced
6724:36d1d483d5d6 6725:da91efe96a93
279 if (_data[i] == elem) return i; 279 if (_data[i] == elem) return i;
280 } 280 }
281 return -1; 281 return -1;
282 } 282 }
283 283
284 int find_from_end(const E& elem) const {
285 for (int i = _len-1; i >= 0; i--) {
286 if (_data[i] == elem) return i;
287 }
288 return -1;
289 }
290
284 int find(void* token, bool f(void*, E)) const { 291 int find(void* token, bool f(void*, E)) const {
285 for (int i = 0; i < _len; i++) { 292 for (int i = 0; i < _len; i++) {
286 if (f(token, _data[i])) return i; 293 if (f(token, _data[i])) return i;
287 } 294 }
288 return -1; 295 return -1;
289 } 296 }
290 297
291 int find_at_end(void* token, bool f(void*, E)) const { 298 int find_from_end(void* token, bool f(void*, E)) const {
292 // start at the end of the array 299 // start at the end of the array
293 for (int i = _len-1; i >= 0; i--) { 300 for (int i = _len-1; i >= 0; i--) {
294 if (f(token, _data[i])) return i; 301 if (f(token, _data[i])) return i;
295 } 302 }
296 return -1; 303 return -1;