< prev index next >

src/hotspot/share/ci/ciStreams.cpp

Print this page


 175   case Bytecodes::_newarray:
 176     return get_index_u2();
 177   default:
 178     ShouldNotReachHere();
 179     return 0;
 180   }
 181 }
 182 
 183 // ------------------------------------------------------------------
 184 // ciBytecodeStream::get_klass
 185 //
 186 // If this bytecode is a new, newarray, multianewarray, instanceof,
 187 // or checkcast, get the referenced klass.
 188 ciKlass* ciBytecodeStream::get_klass(bool& will_link) {
 189   VM_ENTRY_MARK;
 190   constantPoolHandle cpool(_method->get_Method()->constants());
 191   return CURRENT_ENV->get_klass_by_index(cpool, get_klass_index(), will_link, _holder);
 192 }
 193 
 194 // ------------------------------------------------------------------
 195 // ciBytecodeStream::get_never_null
 196 //
 197 // Get information about nullability from the constant pool.
 198 bool ciBytecodeStream::get_never_null() const {
 199   VM_ENTRY_MARK;
 200   constantPoolHandle cpool(_method->get_Method()->constants());
 201   return CURRENT_ENV->get_never_null(cpool, get_klass_index());
 202 }
 203 
 204 // ------------------------------------------------------------------
 205 // ciBytecodeStream::get_constant_raw_index
 206 //
 207 // If this bytecode is one of the ldc variants, get the index of the
 208 // referenced constant.
 209 int ciBytecodeStream::get_constant_raw_index() const {
 210   // work-alike for Bytecode_loadconstant::raw_index()
 211   switch (cur_bc()) {
 212   case Bytecodes::_ldc:
 213     return get_index_u1();
 214   case Bytecodes::_ldc_w:
 215   case Bytecodes::_ldc2_w:
 216     return get_index_u2();
 217   default:
 218     ShouldNotReachHere();
 219     return 0;
 220   }
 221 }




 175   case Bytecodes::_newarray:
 176     return get_index_u2();
 177   default:
 178     ShouldNotReachHere();
 179     return 0;
 180   }
 181 }
 182 
 183 // ------------------------------------------------------------------
 184 // ciBytecodeStream::get_klass
 185 //
 186 // If this bytecode is a new, newarray, multianewarray, instanceof,
 187 // or checkcast, get the referenced klass.
 188 ciKlass* ciBytecodeStream::get_klass(bool& will_link) {
 189   VM_ENTRY_MARK;
 190   constantPoolHandle cpool(_method->get_Method()->constants());
 191   return CURRENT_ENV->get_klass_by_index(cpool, get_klass_index(), will_link, _holder);
 192 }
 193 
 194 // ------------------------------------------------------------------
 195 // ciBytecodeStream::is_klass_never_null
 196 //
 197 // Get information about nullability from the constant pool.
 198 bool ciBytecodeStream::is_klass_never_null() const {
 199   VM_ENTRY_MARK;
 200   constantPoolHandle cpool(_method->get_Method()->constants());
 201   return CURRENT_ENV->is_klass_never_null(cpool, get_klass_index());
 202 }
 203 
 204 // ------------------------------------------------------------------
 205 // ciBytecodeStream::get_constant_raw_index
 206 //
 207 // If this bytecode is one of the ldc variants, get the index of the
 208 // referenced constant.
 209 int ciBytecodeStream::get_constant_raw_index() const {
 210   // work-alike for Bytecode_loadconstant::raw_index()
 211   switch (cur_bc()) {
 212   case Bytecodes::_ldc:
 213     return get_index_u1();
 214   case Bytecodes::_ldc_w:
 215   case Bytecodes::_ldc2_w:
 216     return get_index_u2();
 217   default:
 218     ShouldNotReachHere();
 219     return 0;
 220   }
 221 }


< prev index next >