< prev index next >

src/hotspot/share/c1/c1_LinearScan.cpp

Print this page

2515 ConstantIntValue*      LinearScan::_int_m1_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(-1);
2516 ConstantIntValue*      LinearScan::_int_0_scope_value =  new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue((jint)0);
2517 ConstantIntValue*      LinearScan::_int_1_scope_value =  new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(1);
2518 ConstantIntValue*      LinearScan::_int_2_scope_value =  new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(2);
2519 LocationValue*         _illegal_value = new (ResourceObj::C_HEAP, mtCompiler) LocationValue(Location());
2520 
2521 void LinearScan::init_compute_debug_info() {
2522   // cache for frequently used scope values
2523   // (cpu registers and stack slots)
2524   int cache_size = (LinearScan::nof_cpu_regs + frame_map()->argcount() + max_spills()) * 2;
2525   _scope_value_cache = ScopeValueArray(cache_size, cache_size, NULL);
2526 }
2527 
2528 MonitorValue* LinearScan::location_for_monitor_index(int monitor_index) {
2529   Location loc;
2530   if (!frame_map()->location_for_monitor_object(monitor_index, &loc)) {
2531     bailout("too large frame");
2532   }
2533   ScopeValue* object_scope_value = new LocationValue(loc);
2534 
2535   if (!frame_map()->location_for_monitor_lock(monitor_index, &loc)) {
2536     bailout("too large frame");
2537   }
2538   return new MonitorValue(object_scope_value, loc);
2539 }
2540 
2541 LocationValue* LinearScan::location_for_name(int name, Location::Type loc_type) {
2542   Location loc;
2543   if (!frame_map()->locations_for_slot(name, loc_type, &loc)) {
2544     bailout("too large frame");
2545   }
2546   return new LocationValue(loc);
2547 }
2548 
2549 
2550 int LinearScan::append_scope_value_for_constant(LIR_Opr opr, GrowableArray<ScopeValue*>* scope_values) {
2551   assert(opr->is_constant(), "should not be called otherwise");
2552 
2553   LIR_Const* c = opr->as_constant_ptr();
2554   BasicType t = c->type();
2555   switch (t) {
2556     case T_OBJECT: {
2557       jobject value = c->as_jobject();

2515 ConstantIntValue*      LinearScan::_int_m1_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(-1);
2516 ConstantIntValue*      LinearScan::_int_0_scope_value =  new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue((jint)0);
2517 ConstantIntValue*      LinearScan::_int_1_scope_value =  new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(1);
2518 ConstantIntValue*      LinearScan::_int_2_scope_value =  new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(2);
2519 LocationValue*         _illegal_value = new (ResourceObj::C_HEAP, mtCompiler) LocationValue(Location());
2520 
2521 void LinearScan::init_compute_debug_info() {
2522   // cache for frequently used scope values
2523   // (cpu registers and stack slots)
2524   int cache_size = (LinearScan::nof_cpu_regs + frame_map()->argcount() + max_spills()) * 2;
2525   _scope_value_cache = ScopeValueArray(cache_size, cache_size, NULL);
2526 }
2527 
2528 MonitorValue* LinearScan::location_for_monitor_index(int monitor_index) {
2529   Location loc;
2530   if (!frame_map()->location_for_monitor_object(monitor_index, &loc)) {
2531     bailout("too large frame");
2532   }
2533   ScopeValue* object_scope_value = new LocationValue(loc);
2534 



2535   return new MonitorValue(object_scope_value, loc);
2536 }
2537 
2538 LocationValue* LinearScan::location_for_name(int name, Location::Type loc_type) {
2539   Location loc;
2540   if (!frame_map()->locations_for_slot(name, loc_type, &loc)) {
2541     bailout("too large frame");
2542   }
2543   return new LocationValue(loc);
2544 }
2545 
2546 
2547 int LinearScan::append_scope_value_for_constant(LIR_Opr opr, GrowableArray<ScopeValue*>* scope_values) {
2548   assert(opr->is_constant(), "should not be called otherwise");
2549 
2550   LIR_Const* c = opr->as_constant_ptr();
2551   BasicType t = c->type();
2552   switch (t) {
2553     case T_OBJECT: {
2554       jobject value = c->as_jobject();
< prev index next >