Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp @ 845:df6caf649ff7
6700789: G1: Enable use of compressed oops with G1 heaps
Summary: Modifications to G1 so as to allow the use of compressed oops.
Reviewed-by: apetrusenko, coleenp, jmasa, kvn, never, phh, tonyp
author | ysr |
---|---|
date | Tue, 14 Jul 2009 15:40:39 -0700 |
parents | ad8c8ca4ab0f |
children | cff162798819 |
comparison
equal
deleted
inserted
replaced
839:bb18957ad21e | 845:df6caf649ff7 |
---|---|
422 if (addr >= csp()->top()) return csp()->top(); | 422 if (addr >= csp()->top()) return csp()->top(); |
423 while (next_boundary < addr) { | 423 while (next_boundary < addr) { |
424 while (n <= next_boundary) { | 424 while (n <= next_boundary) { |
425 q = n; | 425 q = n; |
426 oop obj = oop(q); | 426 oop obj = oop(q); |
427 if (obj->klass() == NULL) return q; | 427 if (obj->klass_or_null() == NULL) return q; |
428 n += obj->size(); | 428 n += obj->size(); |
429 } | 429 } |
430 assert(q <= next_boundary && n > next_boundary, "Consequence of loop"); | 430 assert(q <= next_boundary && n > next_boundary, "Consequence of loop"); |
431 // [q, n) is the block that crosses the boundary. | 431 // [q, n) is the block that crosses the boundary. |
432 alloc_block_work2(&next_boundary, &next_index, q, n); | 432 alloc_block_work2(&next_boundary, &next_index, q, n); |
434 } else { | 434 } else { |
435 while (next_boundary < addr) { | 435 while (next_boundary < addr) { |
436 while (n <= next_boundary) { | 436 while (n <= next_boundary) { |
437 q = n; | 437 q = n; |
438 oop obj = oop(q); | 438 oop obj = oop(q); |
439 if (obj->klass() == NULL) return q; | 439 if (obj->klass_or_null() == NULL) return q; |
440 n += _sp->block_size(q); | 440 n += _sp->block_size(q); |
441 } | 441 } |
442 assert(q <= next_boundary && n > next_boundary, "Consequence of loop"); | 442 assert(q <= next_boundary && n > next_boundary, "Consequence of loop"); |
443 // [q, n) is the block that crosses the boundary. | 443 // [q, n) is the block that crosses the boundary. |
444 alloc_block_work2(&next_boundary, &next_index, q, n); | 444 alloc_block_work2(&next_boundary, &next_index, q, n); |