void StackmapList::update(int index, jushort count, jushort height, jushort bci) { if (is_short_map(index)) { juint entry = uint_field(entry_stat_offset(index)); GUARANTEE(height <= 0x3, "Invalid map type chosen in set_stack_height"); GUARANTEE(count <= 0xF, "Invalid map type chosen in set_locals"); entry |= ((height & StackmapListDesc::SHORT_ENTRY_STACK_HEIGHT_MASK) << 1) | (count << 3); // clear out existing bci (IMPL_NOTE: is this necessary?) entry &= 0xFFFF007F; // set new bci entry |= (bci << 7); uint_field_put(entry_stat_offset(index), entry); GUARANTEE(get_stack_height(index) == height, "StackmapList:Invalid short stack height"); GUARANTEE(get_locals(index) == count, "StackmapList:Invalid short locals"); GUARANTEE(get_bci(index) == bci, "StackmapList:set_bci failed"); } else { TypeArray::Raw longmap(obj_field(entry_stat_offset(index))); longmap().ushort_at_put(0, count); longmap().ushort_at_put(1, height); longmap().ushort_at_put(2, bci); GUARANTEE(get_stack_height(index) == height, "StackmapList:Invalid long map stack height"); GUARANTEE(get_locals(index) == count, "StackmapList:Invalid long map locals"); GUARANTEE(get_bci(index) == bci, "StackmapList:Invalid long map bci"); } }
juint suspend_count() { return uint_field(suspend_count_offset()); }
juint flags_and_size() { return uint_field(flags_and_size_offset()); }