< prev index next >

src/hotspot/share/c1/c1_GraphBuilder.cpp

Print this page




2200   InstanceOf* i = new InstanceOf(klass, apop(), state_before);
2201   ipush(append_split(i));
2202   i->set_direct_compare(direct_compare(klass));
2203 
2204   if (is_profiling()) {
2205     // Note that we'd collect profile data in this method if we wanted it.
2206     compilation()->set_would_profile(true);
2207 
2208     if (profile_checkcasts()) {
2209       i->set_profiled_method(method());
2210       i->set_profiled_bci(bci());
2211       i->set_should_profile(true);
2212     }
2213   }
2214 }
2215 
2216 
2217 void GraphBuilder::monitorenter(Value x, int bci) {
2218   // save state before locking in case of deoptimization after a NullPointerException
2219   ValueStack* state_before = copy_state_for_exception_with_bci(bci);

2220   append_with_bci(new MonitorEnter(x, state()->lock(x), state_before), bci);
2221   kill_all();
2222 }
2223 
2224 
2225 void GraphBuilder::monitorexit(Value x, int bci) {
2226   append_with_bci(new MonitorExit(x, state()->unlock()), bci);
2227   kill_all();
2228 }
2229 
2230 
2231 void GraphBuilder::new_multi_array(int dimensions) {
2232   bool will_link;
2233   ciKlass* klass = stream()->get_klass(will_link);
2234   ValueStack* state_before = !klass->is_loaded() || PatchALot ? copy_state_before() : copy_state_exhandling();
2235 
2236   Values* dims = new Values(dimensions, dimensions, NULL);
2237   // fill in all dimensions
2238   int i = dimensions;
2239   while (i-- > 0) dims->at_put(i, ipop());




2200   InstanceOf* i = new InstanceOf(klass, apop(), state_before);
2201   ipush(append_split(i));
2202   i->set_direct_compare(direct_compare(klass));
2203 
2204   if (is_profiling()) {
2205     // Note that we'd collect profile data in this method if we wanted it.
2206     compilation()->set_would_profile(true);
2207 
2208     if (profile_checkcasts()) {
2209       i->set_profiled_method(method());
2210       i->set_profiled_bci(bci());
2211       i->set_should_profile(true);
2212     }
2213   }
2214 }
2215 
2216 
2217 void GraphBuilder::monitorenter(Value x, int bci) {
2218   // save state before locking in case of deoptimization after a NullPointerException
2219   ValueStack* state_before = copy_state_for_exception_with_bci(bci);
2220   compilation()->set_has_monitors(true);
2221   append_with_bci(new MonitorEnter(x, state()->lock(x), state_before), bci);
2222   kill_all();
2223 }
2224 
2225 
2226 void GraphBuilder::monitorexit(Value x, int bci) {
2227   append_with_bci(new MonitorExit(x, state()->unlock()), bci);
2228   kill_all();
2229 }
2230 
2231 
2232 void GraphBuilder::new_multi_array(int dimensions) {
2233   bool will_link;
2234   ciKlass* klass = stream()->get_klass(will_link);
2235   ValueStack* state_before = !klass->is_loaded() || PatchALot ? copy_state_before() : copy_state_exhandling();
2236 
2237   Values* dims = new Values(dimensions, dimensions, NULL);
2238   // fill in all dimensions
2239   int i = dimensions;
2240   while (i-- > 0) dims->at_put(i, ipop());


< prev index next >