2219 InstanceOf* i = new InstanceOf(klass, apop(), state_before);
2220 ipush(append_split(i));
2221 i->set_direct_compare(direct_compare(klass));
2222
2223 if (is_profiling()) {
2224 // Note that we'd collect profile data in this method if we wanted it.
2225 compilation()->set_would_profile(true);
2226
2227 if (profile_checkcasts()) {
2228 i->set_profiled_method(method());
2229 i->set_profiled_bci(bci());
2230 i->set_should_profile(true);
2231 }
2232 }
2233 }
2234
2235
2236 void GraphBuilder::monitorenter(Value x, int bci) {
2237 // save state before locking in case of deoptimization after a NullPointerException
2238 ValueStack* state_before = copy_state_for_exception_with_bci(bci);
2239 append_with_bci(new MonitorEnter(x, state()->lock(x), state_before), bci);
2240 kill_all();
2241 }
2242
2243
2244 void GraphBuilder::monitorexit(Value x, int bci) {
2245 append_with_bci(new MonitorExit(x, state()->unlock()), bci);
2246 kill_all();
2247 }
2248
2249
2250 void GraphBuilder::new_multi_array(int dimensions) {
2251 ciKlass* klass = stream()->get_klass();
2252 ValueStack* state_before = !klass->is_loaded() || PatchALot ? copy_state_before() : copy_state_exhandling();
2253
2254 Values* dims = new Values(dimensions, dimensions, NULL);
2255 // fill in all dimensions
2256 int i = dimensions;
2257 while (i-- > 0) dims->at_put(i, ipop());
2258 // create array
|
2219 InstanceOf* i = new InstanceOf(klass, apop(), state_before);
2220 ipush(append_split(i));
2221 i->set_direct_compare(direct_compare(klass));
2222
2223 if (is_profiling()) {
2224 // Note that we'd collect profile data in this method if we wanted it.
2225 compilation()->set_would_profile(true);
2226
2227 if (profile_checkcasts()) {
2228 i->set_profiled_method(method());
2229 i->set_profiled_bci(bci());
2230 i->set_should_profile(true);
2231 }
2232 }
2233 }
2234
2235
2236 void GraphBuilder::monitorenter(Value x, int bci) {
2237 // save state before locking in case of deoptimization after a NullPointerException
2238 ValueStack* state_before = copy_state_for_exception_with_bci(bci);
2239 compilation()->push_monitor();
2240 append_with_bci(new MonitorEnter(x, state()->lock(x), state_before), bci);
2241 kill_all();
2242 }
2243
2244
2245 void GraphBuilder::monitorexit(Value x, int bci) {
2246 append_with_bci(new MonitorExit(x, state()->unlock()), bci);
2247 kill_all();
2248 }
2249
2250
2251 void GraphBuilder::new_multi_array(int dimensions) {
2252 ciKlass* klass = stream()->get_klass();
2253 ValueStack* state_before = !klass->is_loaded() || PatchALot ? copy_state_before() : copy_state_exhandling();
2254
2255 Values* dims = new Values(dimensions, dimensions, NULL);
2256 // fill in all dimensions
2257 int i = dimensions;
2258 while (i-- > 0) dims->at_put(i, ipop());
2259 // create array
|