242 void invoke_dynamic_at_put(int which, int bootstrap_specifier_index, int name_and_type_index) { |
242 void invoke_dynamic_at_put(int which, int bootstrap_specifier_index, int name_and_type_index) { |
243 tag_at_put(which, JVM_CONSTANT_InvokeDynamic); |
243 tag_at_put(which, JVM_CONSTANT_InvokeDynamic); |
244 *int_at_addr(which) = ((jint) name_and_type_index<<16) | bootstrap_specifier_index; |
244 *int_at_addr(which) = ((jint) name_and_type_index<<16) | bootstrap_specifier_index; |
245 } |
245 } |
246 |
246 |
247 void invoke_dynamic_trans_at_put(int which, int bootstrap_method_index, int name_and_type_index) { |
|
248 tag_at_put(which, JVM_CONSTANT_InvokeDynamicTrans); |
|
249 *int_at_addr(which) = ((jint) name_and_type_index<<16) | bootstrap_method_index; |
|
250 assert(AllowTransitionalJSR292, ""); |
|
251 } |
|
252 |
|
253 // Temporary until actual use |
247 // Temporary until actual use |
254 void unresolved_string_at_put(int which, Symbol* s) { |
248 void unresolved_string_at_put(int which, Symbol* s) { |
255 release_tag_at_put(which, JVM_CONSTANT_UnresolvedString); |
249 release_tag_at_put(which, JVM_CONSTANT_UnresolvedString); |
256 slot_at_put(which, s); |
250 slot_at_put(which, s); |
257 } |
251 } |
568 _indy_argc_offset = 1, // u2 argc |
562 _indy_argc_offset = 1, // u2 argc |
569 _indy_argv_offset = 2 // u2 argv[argc] |
563 _indy_argv_offset = 2 // u2 argv[argc] |
570 }; |
564 }; |
571 int invoke_dynamic_bootstrap_method_ref_index_at(int which) { |
565 int invoke_dynamic_bootstrap_method_ref_index_at(int which) { |
572 assert(tag_at(which).is_invoke_dynamic(), "Corrupted constant pool"); |
566 assert(tag_at(which).is_invoke_dynamic(), "Corrupted constant pool"); |
573 if (tag_at(which).value() == JVM_CONSTANT_InvokeDynamicTrans) |
|
574 return extract_low_short_from_int(*int_at_addr(which)); |
|
575 int op_base = invoke_dynamic_operand_base(which); |
567 int op_base = invoke_dynamic_operand_base(which); |
576 return operands()->short_at(op_base + _indy_bsm_offset); |
568 return operands()->short_at(op_base + _indy_bsm_offset); |
577 } |
569 } |
578 int invoke_dynamic_argument_count_at(int which) { |
570 int invoke_dynamic_argument_count_at(int which) { |
579 assert(tag_at(which).is_invoke_dynamic(), "Corrupted constant pool"); |
571 assert(tag_at(which).is_invoke_dynamic(), "Corrupted constant pool"); |
580 if (tag_at(which).value() == JVM_CONSTANT_InvokeDynamicTrans) |
|
581 return 0; |
|
582 int op_base = invoke_dynamic_operand_base(which); |
572 int op_base = invoke_dynamic_operand_base(which); |
583 int argc = operands()->short_at(op_base + _indy_argc_offset); |
573 int argc = operands()->short_at(op_base + _indy_argc_offset); |
584 DEBUG_ONLY(int end_offset = op_base + _indy_argv_offset + argc; |
574 DEBUG_ONLY(int end_offset = op_base + _indy_argv_offset + argc; |
585 int next_offset = invoke_dynamic_operand_limit(which)); |
575 int next_offset = invoke_dynamic_operand_limit(which)); |
586 assert(end_offset == next_offset, "matched ending"); |
576 assert(end_offset == next_offset, "matched ending"); |