2722 assert(TypeArrayKlass::cast(jlsValue->klass())->element_type() == T_CHAR, "compressed string"); |
2722 assert(TypeArrayKlass::cast(jlsValue->klass())->element_type() == T_CHAR, "compressed string"); |
2723 (void) UNICODE::as_utf8(jlsPos, jlsLen, (char *)dst, max_dtrace_string_size); |
2723 (void) UNICODE::as_utf8(jlsPos, jlsLen, (char *)dst, max_dtrace_string_size); |
2724 } |
2724 } |
2725 #endif // ndef HAVE_DTRACE_H |
2725 #endif // ndef HAVE_DTRACE_H |
2726 |
2726 |
|
2727 int SharedRuntime::convert_ints_to_longints_argcnt(int in_args_count, BasicType* in_sig_bt) { |
|
2728 int argcnt = in_args_count; |
|
2729 if (CCallingConventionRequiresIntsAsLongs) { |
|
2730 for (int in = 0; in < in_args_count; in++) { |
|
2731 BasicType bt = in_sig_bt[in]; |
|
2732 switch (bt) { |
|
2733 case T_BOOLEAN: |
|
2734 case T_CHAR: |
|
2735 case T_BYTE: |
|
2736 case T_SHORT: |
|
2737 case T_INT: |
|
2738 argcnt++; |
|
2739 break; |
|
2740 default: |
|
2741 break; |
|
2742 } |
|
2743 } |
|
2744 } else { |
|
2745 assert(0, "This should not be needed on this platform"); |
|
2746 } |
|
2747 |
|
2748 return argcnt; |
|
2749 } |
|
2750 |
|
2751 void SharedRuntime::convert_ints_to_longints(int i2l_argcnt, int& in_args_count, |
|
2752 BasicType*& in_sig_bt, VMRegPair*& in_regs) { |
|
2753 if (CCallingConventionRequiresIntsAsLongs) { |
|
2754 VMRegPair *new_in_regs = NEW_RESOURCE_ARRAY(VMRegPair, i2l_argcnt); |
|
2755 BasicType *new_in_sig_bt = NEW_RESOURCE_ARRAY(BasicType, i2l_argcnt); |
|
2756 |
|
2757 int argcnt = 0; |
|
2758 for (int in = 0; in < in_args_count; in++, argcnt++) { |
|
2759 BasicType bt = in_sig_bt[in]; |
|
2760 VMRegPair reg = in_regs[in]; |
|
2761 switch (bt) { |
|
2762 case T_BOOLEAN: |
|
2763 case T_CHAR: |
|
2764 case T_BYTE: |
|
2765 case T_SHORT: |
|
2766 case T_INT: |
|
2767 // Convert (bt) to (T_LONG,bt). |
|
2768 new_in_sig_bt[argcnt ] = T_LONG; |
|
2769 new_in_sig_bt[argcnt+1] = bt; |
|
2770 assert(reg.first()->is_valid() && !reg.second()->is_valid(), ""); |
|
2771 new_in_regs[argcnt ].set2(reg.first()); |
|
2772 new_in_regs[argcnt+1].set_bad(); |
|
2773 argcnt++; |
|
2774 break; |
|
2775 default: |
|
2776 // No conversion needed. |
|
2777 new_in_sig_bt[argcnt] = bt; |
|
2778 new_in_regs[argcnt] = reg; |
|
2779 break; |
|
2780 } |
|
2781 } |
|
2782 assert(argcnt == i2l_argcnt, "must match"); |
|
2783 |
|
2784 in_regs = new_in_regs; |
|
2785 in_sig_bt = new_in_sig_bt; |
|
2786 in_args_count = i2l_argcnt; |
|
2787 } else { |
|
2788 assert(0, "This should not be needed on this platform"); |
|
2789 } |
|
2790 } |
|
2791 |
2727 // ------------------------------------------------------------------------- |
2792 // ------------------------------------------------------------------------- |
2728 // Java-Java calling convention |
2793 // Java-Java calling convention |
2729 // (what you use when Java calls Java) |
2794 // (what you use when Java calls Java) |
2730 |
2795 |
2731 //------------------------------name_for_receiver---------------------------------- |
2796 //------------------------------name_for_receiver---------------------------------- |