< prev index next >

src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp

Print this page




1297   args->append(varargs);
1298   LIR_Opr reg = result_register_for(x->type());
1299   __ call_runtime(Runtime1::entry_for(Runtime1::new_multi_array_id),
1300                   LIR_OprFact::illegalOpr,
1301                   reg, args, info);
1302 
1303   LIR_Opr result = rlock_result(x);
1304   __ move(reg, result);
1305 }
1306 
1307 
1308 void LIRGenerator::do_BlockBegin(BlockBegin* x) {
1309   // nothing to do for now
1310 }
1311 
1312 
1313 void LIRGenerator::do_CheckCast(CheckCast* x) {
1314   LIRItem obj(x->obj(), this);
1315 
1316   CodeEmitInfo* patching_info = NULL;
1317   if (!x->klass()->is_loaded() || (PatchALot && !x->is_incompatible_class_change_check())) {
1318     // must do this before locking the destination register as an oop register,
1319     // and before the obj is loaded (the latter is for deoptimization)
1320     patching_info = state_for(x, x->state_before());
1321   }
1322   obj.load_item();
1323 
1324   // info for exceptions
1325   CodeEmitInfo* info_for_exception =
1326       (x->needs_exception_state() ? state_for(x) :
1327                                     state_for(x, x->state_before(), true /*ignore_xhandler*/));
1328 
1329   CodeStub* stub;
1330   if (x->is_incompatible_class_change_check()) {
1331     assert(patching_info == NULL, "can't patch this");
1332     stub = new SimpleExceptionStub(Runtime1::throw_incompatible_class_change_error_id, LIR_OprFact::illegalOpr, info_for_exception);
1333   } else if (x->is_invokespecial_receiver_check()) {
1334     assert(patching_info == NULL, "can't patch this");
1335     stub = new DeoptimizeStub(info_for_exception, Deoptimization::Reason_class_check, Deoptimization::Action_none);
1336   } else {
1337     stub = new SimpleExceptionStub(Runtime1::throw_class_cast_exception_id, obj.result(), info_for_exception);




1297   args->append(varargs);
1298   LIR_Opr reg = result_register_for(x->type());
1299   __ call_runtime(Runtime1::entry_for(Runtime1::new_multi_array_id),
1300                   LIR_OprFact::illegalOpr,
1301                   reg, args, info);
1302 
1303   LIR_Opr result = rlock_result(x);
1304   __ move(reg, result);
1305 }
1306 
1307 
1308 void LIRGenerator::do_BlockBegin(BlockBegin* x) {
1309   // nothing to do for now
1310 }
1311 
1312 
1313 void LIRGenerator::do_CheckCast(CheckCast* x) {
1314   LIRItem obj(x->obj(), this);
1315 
1316   CodeEmitInfo* patching_info = NULL;
1317   if (!x->klass()->is_loaded() || (PatchALot && !x->is_incompatible_class_change_check() && !x->is_invokespecial_receiver_check())) {
1318     // must do this before locking the destination register as an oop register,
1319     // and before the obj is loaded (the latter is for deoptimization)
1320     patching_info = state_for(x, x->state_before());
1321   }
1322   obj.load_item();
1323 
1324   // info for exceptions
1325   CodeEmitInfo* info_for_exception =
1326       (x->needs_exception_state() ? state_for(x) :
1327                                     state_for(x, x->state_before(), true /*ignore_xhandler*/));
1328 
1329   CodeStub* stub;
1330   if (x->is_incompatible_class_change_check()) {
1331     assert(patching_info == NULL, "can't patch this");
1332     stub = new SimpleExceptionStub(Runtime1::throw_incompatible_class_change_error_id, LIR_OprFact::illegalOpr, info_for_exception);
1333   } else if (x->is_invokespecial_receiver_check()) {
1334     assert(patching_info == NULL, "can't patch this");
1335     stub = new DeoptimizeStub(info_for_exception, Deoptimization::Reason_class_check, Deoptimization::Action_none);
1336   } else {
1337     stub = new SimpleExceptionStub(Runtime1::throw_class_cast_exception_id, obj.result(), info_for_exception);


< prev index next >