< prev index next >

src/hotspot/share/jvmci/jvmciCompilerToVM.hpp

Print this page

137                       JavaCallArguments* jca,
138                       arrayOop args,
139                       bool is_static)
140     : SignatureIterator(signature)
141   {
142     this->_return_type = T_ILLEGAL;
143     _jca = jca;
144     _index = 0;
145     _args = args;
146     if (!is_static) {
147       _jca->push_oop(next_arg(T_OBJECT));
148     }
149     do_parameters_on(this);
150     assert(_index == args->length(), "arg count mismatch with signature");
151   }
152 
153  private:
154   friend class SignatureIterator;  // so do_parameters_on can call do_type
155   void do_type(BasicType type) {
156     if (is_reference_type(type)) {
157       _jca->push_oop(next_arg(T_OBJECT));
158       return;
159     }
160     Handle arg = next_arg(type);
161     int box_offset = java_lang_boxing_object::value_offset(type);
162     switch (type) {
163     case T_BOOLEAN:     _jca->push_int(arg->bool_field(box_offset));    break;
164     case T_CHAR:        _jca->push_int(arg->char_field(box_offset));    break;
165     case T_SHORT:       _jca->push_int(arg->short_field(box_offset));   break;
166     case T_BYTE:        _jca->push_int(arg->byte_field(box_offset));    break;
167     case T_INT:         _jca->push_int(arg->int_field(box_offset));     break;
168     case T_LONG:        _jca->push_long(arg->long_field(box_offset));   break;
169     case T_FLOAT:       _jca->push_float(arg->float_field(box_offset));    break;
170     case T_DOUBLE:      _jca->push_double(arg->double_field(box_offset));  break;
171     default:            ShouldNotReachHere();
172     }
173   }
174 };
175 
176 class JNIHandleMark : public StackObj {
177   JavaThread* _thread;

137                       JavaCallArguments* jca,
138                       arrayOop args,
139                       bool is_static)
140     : SignatureIterator(signature)
141   {
142     this->_return_type = T_ILLEGAL;
143     _jca = jca;
144     _index = 0;
145     _args = args;
146     if (!is_static) {
147       _jca->push_oop(next_arg(T_OBJECT));
148     }
149     do_parameters_on(this);
150     assert(_index == args->length(), "arg count mismatch with signature");
151   }
152 
153  private:
154   friend class SignatureIterator;  // so do_parameters_on can call do_type
155   void do_type(BasicType type) {
156     if (is_reference_type(type)) {
157       (type == T_INLINE_TYPE) ? _jca->push_oop(next_arg(T_INLINE_TYPE)) : _jca->push_oop(next_arg(T_OBJECT));
158       return;
159     }
160     Handle arg = next_arg(type);
161     int box_offset = java_lang_boxing_object::value_offset(type);
162     switch (type) {
163     case T_BOOLEAN:     _jca->push_int(arg->bool_field(box_offset));    break;
164     case T_CHAR:        _jca->push_int(arg->char_field(box_offset));    break;
165     case T_SHORT:       _jca->push_int(arg->short_field(box_offset));   break;
166     case T_BYTE:        _jca->push_int(arg->byte_field(box_offset));    break;
167     case T_INT:         _jca->push_int(arg->int_field(box_offset));     break;
168     case T_LONG:        _jca->push_long(arg->long_field(box_offset));   break;
169     case T_FLOAT:       _jca->push_float(arg->float_field(box_offset));    break;
170     case T_DOUBLE:      _jca->push_double(arg->double_field(box_offset));  break;
171     default:            ShouldNotReachHere();
172     }
173   }
174 };
175 
176 class JNIHandleMark : public StackObj {
177   JavaThread* _thread;
< prev index next >