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