< prev index next >

src/hotspot/share/classfile/bytecodeAssembler.cpp

Print this page

169 }
170 
171 void BytecodeAssembler::dload(u4 index) {
172   xload(index, Bytecodes::_dload_0, Bytecodes::_dload);
173 }
174 
175 void BytecodeAssembler::aload(u4 index) {
176   xload(index, Bytecodes::_aload_0, Bytecodes::_aload);
177 }
178 
179 void BytecodeAssembler::load(BasicType bt, u4 index) {
180   switch (bt) {
181     case T_BOOLEAN:
182     case T_CHAR:
183     case T_BYTE:
184     case T_SHORT:
185     case T_INT:     iload(index); break;
186     case T_FLOAT:   fload(index); break;
187     case T_DOUBLE:  dload(index); break;
188     case T_LONG:    lload(index); break;

189     default:
190       if (is_reference_type(bt)) {
191                     aload(index);
192                     break;
193       }
194       ShouldNotReachHere();
195   }
196 }
197 
198 void BytecodeAssembler::checkcast(Symbol* sym) {
199   u2 cpool_index = _cp->klass(sym);
200   _code->append(Bytecodes::_checkcast);
201   append(cpool_index);
202 }
203 
204 void BytecodeAssembler::invokespecial(Method* method) {
205   invokespecial(method->klass_name(), method->name(), method->signature());
206 }
207 
208 void BytecodeAssembler::invokespecial(Symbol* klss, Symbol* name, Symbol* sig) {

238 }
239 
240 void BytecodeAssembler::areturn() {
241   _code->append(Bytecodes::_areturn);
242 }
243 
244 void BytecodeAssembler::_return() {
245   _code->append(Bytecodes::_return);
246 }
247 
248 void BytecodeAssembler::_return(BasicType bt) {
249   switch (bt) {
250     case T_BOOLEAN:
251     case T_CHAR:
252     case T_BYTE:
253     case T_SHORT:
254     case T_INT:     ireturn(); break;
255     case T_FLOAT:   freturn(); break;
256     case T_DOUBLE:  dreturn(); break;
257     case T_LONG:    lreturn(); break;

258     case T_VOID:    _return(); break;
259     default:
260       if (is_reference_type(bt)) {
261                     areturn();
262                     break;
263       }
264       ShouldNotReachHere();
265   }
266 }

169 }
170 
171 void BytecodeAssembler::dload(u4 index) {
172   xload(index, Bytecodes::_dload_0, Bytecodes::_dload);
173 }
174 
175 void BytecodeAssembler::aload(u4 index) {
176   xload(index, Bytecodes::_aload_0, Bytecodes::_aload);
177 }
178 
179 void BytecodeAssembler::load(BasicType bt, u4 index) {
180   switch (bt) {
181     case T_BOOLEAN:
182     case T_CHAR:
183     case T_BYTE:
184     case T_SHORT:
185     case T_INT:     iload(index); break;
186     case T_FLOAT:   fload(index); break;
187     case T_DOUBLE:  dload(index); break;
188     case T_LONG:    lload(index); break;
189     case T_INLINE_TYPE:
190     default:
191       if (is_reference_type(bt)) {
192                     aload(index);
193                     break;
194       }
195       ShouldNotReachHere();
196   }
197 }
198 
199 void BytecodeAssembler::checkcast(Symbol* sym) {
200   u2 cpool_index = _cp->klass(sym);
201   _code->append(Bytecodes::_checkcast);
202   append(cpool_index);
203 }
204 
205 void BytecodeAssembler::invokespecial(Method* method) {
206   invokespecial(method->klass_name(), method->name(), method->signature());
207 }
208 
209 void BytecodeAssembler::invokespecial(Symbol* klss, Symbol* name, Symbol* sig) {

239 }
240 
241 void BytecodeAssembler::areturn() {
242   _code->append(Bytecodes::_areturn);
243 }
244 
245 void BytecodeAssembler::_return() {
246   _code->append(Bytecodes::_return);
247 }
248 
249 void BytecodeAssembler::_return(BasicType bt) {
250   switch (bt) {
251     case T_BOOLEAN:
252     case T_CHAR:
253     case T_BYTE:
254     case T_SHORT:
255     case T_INT:     ireturn(); break;
256     case T_FLOAT:   freturn(); break;
257     case T_DOUBLE:  dreturn(); break;
258     case T_LONG:    lreturn(); break;
259     case T_INLINE_TYPE:
260     case T_VOID:    _return(); break;
261     default:
262       if (is_reference_type(bt)) {
263                     areturn();
264                     break;
265       }
266       ShouldNotReachHere();
267   }
268 }
< prev index next >