jushort *ushort_base_address() { GUARANTEE(ObjectHeap::is_gc_active() || is_short_array(), "type check"); return (jushort*)base_address(); }
int offset_from_ushort_index(int index) const { GUARANTEE(ObjectHeap::is_gc_active() || is_short_array(), "Array must be short array"); GUARANTEE(is_within_bounds(index), "Array index out of bounds"); return base_offset() + (index * sizeof(jushort)); }
void set_start_pc(int index, jushort start_pc) { GUARANTEE(((index * 3) + 1) < length(), "local var table: start_pc index out of range"); GUARANTEE(is_short_array(), "Local variable table wrong type"); ushort_at_put((index * 3) + 1, start_pc); }
void set_line_number(int index, jushort line_num) { GUARANTEE(((index * 2) + 1) < length(), "line number table line_num index out of bounds"); GUARANTEE(is_short_array(), "Line number table wrong type"); ushort_at_put((index * 2) + 1, line_num); }
void set_pc(int index, jushort start_pc) { GUARANTEE((index * 2) < length(), "line number table pc index out of bounds"); GUARANTEE(is_short_array(), "Line number table wrong type"); short_at_put(index * 2, start_pc); }
void set_slot(int index, jushort slot) { GUARANTEE((index * 3) < length(), "local var table: slot index out of range"); GUARANTEE(is_short_array(), "Local variable table wrong type"); ushort_at_put(index * 3, slot); }
void set_code_length(int index, jushort code_length) { GUARANTEE(((index * 3) + 2) < length(), "local var table: code_length index out of range"); GUARANTEE(is_short_array(), "Local variable table wrong type"); ushort_at_put((index * 3) + 2, code_length); }