1162 // Print the bytecodes for this method. 1163 void ciMethod::print_codes_on(outputStream* st) { 1164 check_is_loaded(); 1165 GUARDED_VM_ENTRY(get_Method()->print_codes_on(st);) 1166 } 1167 1168 1169 #define FETCH_FLAG_FROM_VM(flag_accessor) { \ 1170 check_is_loaded(); \ 1171 VM_ENTRY_MARK; \ 1172 return get_Method()->flag_accessor(); \ 1173 } 1174 1175 bool ciMethod::is_empty_method() const { FETCH_FLAG_FROM_VM(is_empty_method); } 1176 bool ciMethod::is_vanilla_constructor() const { FETCH_FLAG_FROM_VM(is_vanilla_constructor); } 1177 bool ciMethod::has_loops () const { FETCH_FLAG_FROM_VM(has_loops); } 1178 bool ciMethod::has_jsrs () const { FETCH_FLAG_FROM_VM(has_jsrs); } 1179 bool ciMethod::is_accessor () const { FETCH_FLAG_FROM_VM(is_accessor); } 1180 bool ciMethod::is_initializer () const { FETCH_FLAG_FROM_VM(is_initializer); } 1181 1182 BCEscapeAnalyzer *ciMethod::get_bcea() { 1183 #ifdef COMPILER2 1184 if (_bcea == NULL) { 1185 _bcea = new (CURRENT_ENV->arena()) BCEscapeAnalyzer(this, NULL); 1186 } 1187 return _bcea; 1188 #else // COMPILER2 1189 ShouldNotReachHere(); 1190 return NULL; 1191 #endif // COMPILER2 1192 } 1193 1194 ciMethodBlocks *ciMethod::get_method_blocks() { 1195 Arena *arena = CURRENT_ENV->arena(); 1196 if (_method_blocks == NULL) { 1197 _method_blocks = new (arena) ciMethodBlocks(arena, this); 1198 } 1199 return _method_blocks; 1200 } 1201 | 1162 // Print the bytecodes for this method. 1163 void ciMethod::print_codes_on(outputStream* st) { 1164 check_is_loaded(); 1165 GUARDED_VM_ENTRY(get_Method()->print_codes_on(st);) 1166 } 1167 1168 1169 #define FETCH_FLAG_FROM_VM(flag_accessor) { \ 1170 check_is_loaded(); \ 1171 VM_ENTRY_MARK; \ 1172 return get_Method()->flag_accessor(); \ 1173 } 1174 1175 bool ciMethod::is_empty_method() const { FETCH_FLAG_FROM_VM(is_empty_method); } 1176 bool ciMethod::is_vanilla_constructor() const { FETCH_FLAG_FROM_VM(is_vanilla_constructor); } 1177 bool ciMethod::has_loops () const { FETCH_FLAG_FROM_VM(has_loops); } 1178 bool ciMethod::has_jsrs () const { FETCH_FLAG_FROM_VM(has_jsrs); } 1179 bool ciMethod::is_accessor () const { FETCH_FLAG_FROM_VM(is_accessor); } 1180 bool ciMethod::is_initializer () const { FETCH_FLAG_FROM_VM(is_initializer); } 1181 1182 bool ciMethod::is_boxing_method() const { 1183 if (holder()->is_box_klass()) { 1184 switch (intrinsic_id()) { 1185 case vmIntrinsics::_Boolean_valueOf: 1186 case vmIntrinsics::_Byte_valueOf: 1187 case vmIntrinsics::_Character_valueOf: 1188 case vmIntrinsics::_Short_valueOf: 1189 case vmIntrinsics::_Integer_valueOf: 1190 case vmIntrinsics::_Long_valueOf: 1191 case vmIntrinsics::_Float_valueOf: 1192 case vmIntrinsics::_Double_valueOf: 1193 return true; 1194 default: 1195 return false; 1196 } 1197 } 1198 return false; 1199 } 1200 1201 bool ciMethod::is_unboxing_method() const { 1202 if (holder()->is_box_klass()) { 1203 switch (intrinsic_id()) { 1204 case vmIntrinsics::_booleanValue: 1205 case vmIntrinsics::_byteValue: 1206 case vmIntrinsics::_charValue: 1207 case vmIntrinsics::_shortValue: 1208 case vmIntrinsics::_intValue: 1209 case vmIntrinsics::_longValue: 1210 case vmIntrinsics::_floatValue: 1211 case vmIntrinsics::_doubleValue: 1212 return true; 1213 default: 1214 return false; 1215 } 1216 } 1217 return false; 1218 } 1219 1220 BCEscapeAnalyzer *ciMethod::get_bcea() { 1221 #ifdef COMPILER2 1222 if (_bcea == NULL) { 1223 _bcea = new (CURRENT_ENV->arena()) BCEscapeAnalyzer(this, NULL); 1224 } 1225 return _bcea; 1226 #else // COMPILER2 1227 ShouldNotReachHere(); 1228 return NULL; 1229 #endif // COMPILER2 1230 } 1231 1232 ciMethodBlocks *ciMethod::get_method_blocks() { 1233 Arena *arena = CURRENT_ENV->arena(); 1234 if (_method_blocks == NULL) { 1235 _method_blocks = new (arena) ciMethodBlocks(arena, this); 1236 } 1237 return _method_blocks; 1238 } 1239 |