changeset 46618 | d503911aa948 |
parent 45327 | ec60e7df88cd |
child 46619 | a3919f5e8d2b |
46617:0330c5fc49ce | 46618:d503911aa948 |
---|---|
610 ImmutableOopMapBuilder::ImmutableOopMapBuilder(const OopMapSet* set) : _set(set), _new_set(NULL), _empty(NULL), _last(NULL), _empty_offset(-1), _last_offset(-1), _offset(0), _required(-1) { |
610 ImmutableOopMapBuilder::ImmutableOopMapBuilder(const OopMapSet* set) : _set(set), _new_set(NULL), _empty(NULL), _last(NULL), _empty_offset(-1), _last_offset(-1), _offset(0), _required(-1) { |
611 _mapping = NEW_RESOURCE_ARRAY(Mapping, _set->size()); |
611 _mapping = NEW_RESOURCE_ARRAY(Mapping, _set->size()); |
612 } |
612 } |
613 |
613 |
614 int ImmutableOopMapBuilder::size_for(const OopMap* map) const { |
614 int ImmutableOopMapBuilder::size_for(const OopMap* map) const { |
615 return align_size_up(sizeof(ImmutableOopMap) + map->data_size(), 8); |
615 return align_size_up((int)sizeof(ImmutableOopMap) + map->data_size(), 8); |
616 } |
616 } |
617 |
617 |
618 int ImmutableOopMapBuilder::heap_size() { |
618 int ImmutableOopMapBuilder::heap_size() { |
619 int base = sizeof(ImmutableOopMapSet); |
619 int base = sizeof(ImmutableOopMapSet); |
620 base = align_size_up(base, 8); |
620 base = align_size_up(base, 8); |
666 int ImmutableOopMapBuilder::fill_map(ImmutableOopMapPair* pair, const OopMap* map, int offset, const ImmutableOopMapSet* set) { |
666 int ImmutableOopMapBuilder::fill_map(ImmutableOopMapPair* pair, const OopMap* map, int offset, const ImmutableOopMapSet* set) { |
667 fill_pair(pair, map, offset, set); |
667 fill_pair(pair, map, offset, set); |
668 address addr = (address) pair->get_from(_new_set); // location of the ImmutableOopMap |
668 address addr = (address) pair->get_from(_new_set); // location of the ImmutableOopMap |
669 |
669 |
670 new (addr) ImmutableOopMap(map); |
670 new (addr) ImmutableOopMap(map); |
671 return align_size_up(sizeof(ImmutableOopMap) + map->data_size(), 8); |
671 return size_for(map); |
672 } |
672 } |
673 |
673 |
674 void ImmutableOopMapBuilder::fill(ImmutableOopMapSet* set, int sz) { |
674 void ImmutableOopMapBuilder::fill(ImmutableOopMapSet* set, int sz) { |
675 ImmutableOopMapPair* pairs = set->get_pairs(); |
675 ImmutableOopMapPair* pairs = set->get_pairs(); |
676 |
676 |