< prev index next >

src/hotspot/share/c1/c1_GraphBuilder.cpp

Print this page

2298   ipush(append_split(i));
2299   i->set_direct_compare(direct_compare(klass));
2300 
2301   if (is_profiling()) {
2302     // Note that we'd collect profile data in this method if we wanted it.
2303     compilation()->set_would_profile(true);
2304 
2305     if (profile_checkcasts()) {
2306       i->set_profiled_method(method());
2307       i->set_profiled_bci(bci());
2308       i->set_should_profile(true);
2309     }
2310   }
2311 }
2312 
2313 
2314 void GraphBuilder::monitorenter(Value x, int bci) {
2315   // save state before locking in case of deoptimization after a NullPointerException
2316   ValueStack* state_before = copy_state_for_exception_with_bci(bci);
2317   compilation()->set_has_monitors(true);

2318   append_with_bci(new MonitorEnter(x, state()->lock(x), state_before), bci);
2319   kill_all();
2320 }
2321 
2322 
2323 void GraphBuilder::monitorexit(Value x, int bci) {
2324   append_with_bci(new MonitorExit(x, state()->unlock()), bci);
2325   kill_all();
2326 }
2327 
2328 
2329 void GraphBuilder::new_multi_array(int dimensions) {
2330   ciKlass* klass = stream()->get_klass();
2331   ValueStack* state_before = !klass->is_loaded() || PatchALot ? copy_state_before() : copy_state_exhandling();
2332 
2333   Values* dims = new Values(dimensions, dimensions, NULL);
2334   // fill in all dimensions
2335   int i = dimensions;
2336   while (i-- > 0) dims->at_put(i, ipop());
2337   // create array

2298   ipush(append_split(i));
2299   i->set_direct_compare(direct_compare(klass));
2300 
2301   if (is_profiling()) {
2302     // Note that we'd collect profile data in this method if we wanted it.
2303     compilation()->set_would_profile(true);
2304 
2305     if (profile_checkcasts()) {
2306       i->set_profiled_method(method());
2307       i->set_profiled_bci(bci());
2308       i->set_should_profile(true);
2309     }
2310   }
2311 }
2312 
2313 
2314 void GraphBuilder::monitorenter(Value x, int bci) {
2315   // save state before locking in case of deoptimization after a NullPointerException
2316   ValueStack* state_before = copy_state_for_exception_with_bci(bci);
2317   compilation()->set_has_monitors(true);
2318   compilation()->push_monitor();
2319   append_with_bci(new MonitorEnter(x, state()->lock(x), state_before), bci);
2320   kill_all();
2321 }
2322 
2323 
2324 void GraphBuilder::monitorexit(Value x, int bci) {
2325   append_with_bci(new MonitorExit(x, state()->unlock()), bci);
2326   kill_all();
2327 }
2328 
2329 
2330 void GraphBuilder::new_multi_array(int dimensions) {
2331   ciKlass* klass = stream()->get_klass();
2332   ValueStack* state_before = !klass->is_loaded() || PatchALot ? copy_state_before() : copy_state_exhandling();
2333 
2334   Values* dims = new Values(dimensions, dimensions, NULL);
2335   // fill in all dimensions
2336   int i = dimensions;
2337   while (i-- > 0) dims->at_put(i, ipop());
2338   // create array
< prev index next >