379
380 // If true we're iterating over the coarse table; if false the fine
381 // table.
382 enum IterState {
383 Sparse,
384 Fine,
385 Coarse
386 };
387 IterState _is;
388
389 // In both kinds of iteration, heap offset of first card of current
390 // region.
391 size_t _cur_region_card_offset;
392 // Card offset within cur region.
393 size_t _cur_region_cur_card;
394
395 // Coarse table iteration fields:
396
397 // Current region index;
398 int _coarse_cur_region_index;
399 int _coarse_cur_region_cur_card;
400
401 bool coarse_has_next(size_t& card_index);
402
403 // Fine table iteration fields:
404
405 // Index of bucket-list we're working on.
406 int _fine_array_index;
407 // Per Region Table we're doing within current bucket list.
408 PosParPRT* _fine_cur_prt;
409
410 /* SparsePRT::*/ SparsePRTIter _sparse_iter;
411
412 void fine_find_next_non_null_prt();
413
414 bool fine_has_next();
415 bool fine_has_next(size_t& card_index);
416
417 public:
418 // We require an iterator to be initialized before use, so the
419 // constructor does little.
|
379
380 // If true we're iterating over the coarse table; if false the fine
381 // table.
382 enum IterState {
383 Sparse,
384 Fine,
385 Coarse
386 };
387 IterState _is;
388
389 // In both kinds of iteration, heap offset of first card of current
390 // region.
391 size_t _cur_region_card_offset;
392 // Card offset within cur region.
393 size_t _cur_region_cur_card;
394
395 // Coarse table iteration fields:
396
397 // Current region index;
398 int _coarse_cur_region_index;
399 size_t _coarse_cur_region_cur_card;
400
401 bool coarse_has_next(size_t& card_index);
402
403 // Fine table iteration fields:
404
405 // Index of bucket-list we're working on.
406 int _fine_array_index;
407 // Per Region Table we're doing within current bucket list.
408 PosParPRT* _fine_cur_prt;
409
410 /* SparsePRT::*/ SparsePRTIter _sparse_iter;
411
412 void fine_find_next_non_null_prt();
413
414 bool fine_has_next();
415 bool fine_has_next(size_t& card_index);
416
417 public:
418 // We require an iterator to be initialized before use, so the
419 // constructor does little.
|