< prev index next >

src/hotspot/share/c1/c1_GraphBuilder.cpp

Print this page

2249   InstanceOf* i = new InstanceOf(klass, apop(), state_before);
2250   ipush(append_split(i));
2251   i->set_direct_compare(direct_compare(klass));
2252 
2253   if (is_profiling()) {
2254     // Note that we'd collect profile data in this method if we wanted it.
2255     compilation()->set_would_profile(true);
2256 
2257     if (profile_checkcasts()) {
2258       i->set_profiled_method(method());
2259       i->set_profiled_bci(bci());
2260       i->set_should_profile(true);
2261     }
2262   }
2263 }
2264 
2265 
2266 void GraphBuilder::monitorenter(Value x, int bci) {
2267   // save state before locking in case of deoptimization after a NullPointerException
2268   ValueStack* state_before = copy_state_for_exception_with_bci(bci);

2269   append_with_bci(new MonitorEnter(x, state()->lock(x), state_before), bci);
2270   kill_all();
2271 }
2272 
2273 
2274 void GraphBuilder::monitorexit(Value x, int bci) {
2275   append_with_bci(new MonitorExit(x, state()->unlock()), bci);
2276   kill_all();
2277 }
2278 
2279 
2280 void GraphBuilder::new_multi_array(int dimensions) {
2281   bool will_link;
2282   ciKlass* klass = stream()->get_klass(will_link);
2283   ValueStack* state_before = !klass->is_loaded() || PatchALot ? copy_state_before() : copy_state_exhandling();
2284 
2285   Values* dims = new Values(dimensions, dimensions, NULL);
2286   // fill in all dimensions
2287   int i = dimensions;
2288   while (i-- > 0) dims->at_put(i, ipop());

2249   InstanceOf* i = new InstanceOf(klass, apop(), state_before);
2250   ipush(append_split(i));
2251   i->set_direct_compare(direct_compare(klass));
2252 
2253   if (is_profiling()) {
2254     // Note that we'd collect profile data in this method if we wanted it.
2255     compilation()->set_would_profile(true);
2256 
2257     if (profile_checkcasts()) {
2258       i->set_profiled_method(method());
2259       i->set_profiled_bci(bci());
2260       i->set_should_profile(true);
2261     }
2262   }
2263 }
2264 
2265 
2266 void GraphBuilder::monitorenter(Value x, int bci) {
2267   // save state before locking in case of deoptimization after a NullPointerException
2268   ValueStack* state_before = copy_state_for_exception_with_bci(bci);
2269   compilation()->set_has_monitors(true);
2270   append_with_bci(new MonitorEnter(x, state()->lock(x), state_before), bci);
2271   kill_all();
2272 }
2273 
2274 
2275 void GraphBuilder::monitorexit(Value x, int bci) {
2276   append_with_bci(new MonitorExit(x, state()->unlock()), bci);
2277   kill_all();
2278 }
2279 
2280 
2281 void GraphBuilder::new_multi_array(int dimensions) {
2282   bool will_link;
2283   ciKlass* klass = stream()->get_klass(will_link);
2284   ValueStack* state_before = !klass->is_loaded() || PatchALot ? copy_state_before() : copy_state_exhandling();
2285 
2286   Values* dims = new Values(dimensions, dimensions, NULL);
2287   // fill in all dimensions
2288   int i = dimensions;
2289   while (i-- > 0) dims->at_put(i, ipop());
< prev index next >