4321 null_check(args->at(0));
4322 Instruction* offset = args->at(2);
4323 #ifndef _LP64
4324 offset = append(new Convert(Bytecodes::_l2i, offset, as_ValueType(T_INT)));
4325 #endif
4326 Instruction* op = append(new UnsafeGetAndSetObject(t, args->at(1), offset, args->at(3), is_add));
4327 compilation()->set_has_unsafe_access(true);
4328 kill_all();
4329 push(op->type(), op);
4330 }
4331 return InlineUnsafeOps;
4332 }
4333
4334 #ifndef PRODUCT
4335 void GraphBuilder::print_stats() {
4336 vmap()->print();
4337 }
4338 #endif // PRODUCT
4339
4340 void GraphBuilder::profile_call(ciMethod* callee, Value recv, ciKlass* known_holder, Values* obj_args, bool inlined) {
4341 append(new ProfileCall(method(), bci(), callee, recv, known_holder, obj_args, inlined));
4342 }
4343
4344 void GraphBuilder::profile_return_type(Value ret, ciMethod* callee, ciMethod* m, int invoke_bci) {
4345 assert((m == NULL) == (invoke_bci < 0), "invalid method and invalid bci together");
4346 if (m == NULL) {
4347 m = method();
4348 }
4349 if (invoke_bci < 0) {
4350 invoke_bci = bci();
4351 }
4352 ciMethodData* md = m->method_data_or_null();
4353 ciProfileData* data = md->bci_to_data(invoke_bci);
4354 if (data->is_CallTypeData() || data->is_VirtualCallTypeData()) {
4355 append(new ProfileReturnType(m , invoke_bci, callee, ret));
4356 }
4357 }
4358
4359 void GraphBuilder::profile_invocation(ciMethod* callee, ValueStack* state) {
4360 append(new ProfileInvoke(callee, state));
|
4321 null_check(args->at(0));
4322 Instruction* offset = args->at(2);
4323 #ifndef _LP64
4324 offset = append(new Convert(Bytecodes::_l2i, offset, as_ValueType(T_INT)));
4325 #endif
4326 Instruction* op = append(new UnsafeGetAndSetObject(t, args->at(1), offset, args->at(3), is_add));
4327 compilation()->set_has_unsafe_access(true);
4328 kill_all();
4329 push(op->type(), op);
4330 }
4331 return InlineUnsafeOps;
4332 }
4333
4334 #ifndef PRODUCT
4335 void GraphBuilder::print_stats() {
4336 vmap()->print();
4337 }
4338 #endif // PRODUCT
4339
4340 void GraphBuilder::profile_call(ciMethod* callee, Value recv, ciKlass* known_holder, Values* obj_args, bool inlined) {
4341 // A default method's holder is an interface
4342 if (known_holder != NULL && known_holder->is_interface()) {
4343 assert(known_holder->is_instance_klass() && ((ciInstanceKlass*)known_holder)->has_default_methods(), "should be default method");
4344 known_holder = NULL;
4345 }
4346 append(new ProfileCall(method(), bci(), callee, recv, known_holder, obj_args, inlined));
4347 }
4348
4349 void GraphBuilder::profile_return_type(Value ret, ciMethod* callee, ciMethod* m, int invoke_bci) {
4350 assert((m == NULL) == (invoke_bci < 0), "invalid method and invalid bci together");
4351 if (m == NULL) {
4352 m = method();
4353 }
4354 if (invoke_bci < 0) {
4355 invoke_bci = bci();
4356 }
4357 ciMethodData* md = m->method_data_or_null();
4358 ciProfileData* data = md->bci_to_data(invoke_bci);
4359 if (data->is_CallTypeData() || data->is_VirtualCallTypeData()) {
4360 append(new ProfileReturnType(m , invoke_bci, callee, ret));
4361 }
4362 }
4363
4364 void GraphBuilder::profile_invocation(ciMethod* callee, ValueStack* state) {
4365 append(new ProfileInvoke(callee, state));
|