< prev index next >

src/hotspot/share/c1/c1_LinearScan.cpp

Print this page




2490 
2491     if (info->_oop_map == NULL) {
2492       info->_oop_map = oop_map;
2493     } else {
2494       // a CodeEmitInfo can not be shared between different LIR-instructions
2495       // because interval splitting can occur anywhere between two instructions
2496       // and so the oop maps must be different
2497       // -> check if the already set oop_map is exactly the one calculated for this operation
2498       assert(info->_oop_map == oop_map, "same CodeEmitInfo used for multiple LIR instructions");
2499     }
2500   }
2501 }
2502 
2503 
2504 // frequently used constants
2505 // Allocate them with new so they are never destroyed (otherwise, a
2506 // forced exit could destroy these objects while they are still in
2507 // use).
2508 ConstantOopWriteValue* LinearScan::_oop_null_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantOopWriteValue(NULL);
2509 ConstantIntValue*      LinearScan::_int_m1_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(-1);
2510 ConstantIntValue*      LinearScan::_int_0_scope_value =  new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(0);
2511 ConstantIntValue*      LinearScan::_int_1_scope_value =  new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(1);
2512 ConstantIntValue*      LinearScan::_int_2_scope_value =  new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(2);
2513 LocationValue*         _illegal_value = new (ResourceObj::C_HEAP, mtCompiler) LocationValue(Location());
2514 
2515 void LinearScan::init_compute_debug_info() {
2516   // cache for frequently used scope values
2517   // (cpu registers and stack slots)
2518   int cache_size = (LinearScan::nof_cpu_regs + frame_map()->argcount() + max_spills()) * 2;
2519   _scope_value_cache = ScopeValueArray(cache_size, cache_size, NULL);
2520 }
2521 
2522 MonitorValue* LinearScan::location_for_monitor_index(int monitor_index) {
2523   Location loc;
2524   if (!frame_map()->location_for_monitor_object(monitor_index, &loc)) {
2525     bailout("too large frame");
2526   }
2527   ScopeValue* object_scope_value = new LocationValue(loc);
2528 
2529   if (!frame_map()->location_for_monitor_lock(monitor_index, &loc)) {
2530     bailout("too large frame");




2490 
2491     if (info->_oop_map == NULL) {
2492       info->_oop_map = oop_map;
2493     } else {
2494       // a CodeEmitInfo can not be shared between different LIR-instructions
2495       // because interval splitting can occur anywhere between two instructions
2496       // and so the oop maps must be different
2497       // -> check if the already set oop_map is exactly the one calculated for this operation
2498       assert(info->_oop_map == oop_map, "same CodeEmitInfo used for multiple LIR instructions");
2499     }
2500   }
2501 }
2502 
2503 
2504 // frequently used constants
2505 // Allocate them with new so they are never destroyed (otherwise, a
2506 // forced exit could destroy these objects while they are still in
2507 // use).
2508 ConstantOopWriteValue* LinearScan::_oop_null_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantOopWriteValue(NULL);
2509 ConstantIntValue*      LinearScan::_int_m1_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(-1);
2510 ConstantIntValue*      LinearScan::_int_0_scope_value =  new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue((jint)0);
2511 ConstantIntValue*      LinearScan::_int_1_scope_value =  new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(1);
2512 ConstantIntValue*      LinearScan::_int_2_scope_value =  new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(2);
2513 LocationValue*         _illegal_value = new (ResourceObj::C_HEAP, mtCompiler) LocationValue(Location());
2514 
2515 void LinearScan::init_compute_debug_info() {
2516   // cache for frequently used scope values
2517   // (cpu registers and stack slots)
2518   int cache_size = (LinearScan::nof_cpu_regs + frame_map()->argcount() + max_spills()) * 2;
2519   _scope_value_cache = ScopeValueArray(cache_size, cache_size, NULL);
2520 }
2521 
2522 MonitorValue* LinearScan::location_for_monitor_index(int monitor_index) {
2523   Location loc;
2524   if (!frame_map()->location_for_monitor_object(monitor_index, &loc)) {
2525     bailout("too large frame");
2526   }
2527   ScopeValue* object_scope_value = new LocationValue(loc);
2528 
2529   if (!frame_map()->location_for_monitor_lock(monitor_index, &loc)) {
2530     bailout("too large frame");


< prev index next >