src/share/vm/oops/constantPool.hpp

changeset 4983
15a99ca4ee34
parent 4643
f16e75e0cf11
child 4984
c115fac239eb
     1.1 --- a/src/share/vm/oops/constantPool.hpp	Wed Apr 24 15:57:17 2013 -0700
     1.2 +++ b/src/share/vm/oops/constantPool.hpp	Thu Apr 25 03:58:53 2013 -0700
     1.3 @@ -567,6 +567,47 @@
     1.4           _indy_argc_offset = 1,  // u2 argc
     1.5           _indy_argv_offset = 2   // u2 argv[argc]
     1.6    };
     1.7 +
     1.8 +  // These functions are used in RedefineClasses for CP merge
     1.9 +
    1.10 +  int operand_offset_at(int bootstrap_specifier_index) {
    1.11 +    assert(0 <= bootstrap_specifier_index &&
    1.12 +           bootstrap_specifier_index < operand_array_length(operands()),
    1.13 +           "Corrupted CP operands");
    1.14 +    return operand_offset_at(operands(), bootstrap_specifier_index);
    1.15 +  }
    1.16 +  int operand_bootstrap_method_ref_index_at(int bootstrap_specifier_index) {
    1.17 +    int offset = operand_offset_at(bootstrap_specifier_index);
    1.18 +    return operands()->at(offset + _indy_bsm_offset);
    1.19 +  }
    1.20 +  int operand_argument_count_at(int bootstrap_specifier_index) {
    1.21 +    int offset = operand_offset_at(bootstrap_specifier_index);
    1.22 +    int argc = operands()->at(offset + _indy_argc_offset);
    1.23 +    return argc;
    1.24 +  }
    1.25 +  int operand_argument_index_at(int bootstrap_specifier_index, int j) {
    1.26 +    int offset = operand_offset_at(bootstrap_specifier_index);
    1.27 +    return operands()->at(offset + _indy_argv_offset + j);
    1.28 +  }
    1.29 +  int operand_next_offset_at(int bootstrap_specifier_index) {
    1.30 +    int offset = operand_offset_at(bootstrap_specifier_index) + _indy_argv_offset
    1.31 +                   + operand_argument_count_at(bootstrap_specifier_index);
    1.32 +    return offset;
    1.33 +  }
    1.34 +  // Compare a bootsrap specifier in the operands arrays
    1.35 +  bool compare_operand_to(int bootstrap_specifier_index1, constantPoolHandle cp2,
    1.36 +                          int bootstrap_specifier_index2, TRAPS);
    1.37 +  // Find a bootsrap specifier in the operands array
    1.38 +  int find_matching_operand(int bootstrap_specifier_index, constantPoolHandle search_cp,
    1.39 +                            int operands_cur_len, TRAPS);
    1.40 +  // Resize the operands array with delta_len and delta_size
    1.41 +  void resize_operands(int delta_len, int delta_size, TRAPS);
    1.42 +  // Extend the operands array with the length and size of the ext_cp operands
    1.43 +  void extend_operands(constantPoolHandle ext_cp, TRAPS);
    1.44 +  // Shrink the operands array to a smaller array with new_len length
    1.45 +  void shrink_operands(int new_len, TRAPS);
    1.46 +
    1.47 +
    1.48    int invoke_dynamic_bootstrap_method_ref_index_at(int which) {
    1.49      assert(tag_at(which).is_invoke_dynamic(), "Corrupted constant pool");
    1.50      int op_base = invoke_dynamic_operand_base(which);

mercurial