void LIR_Assembler::process_debug_info(LIR_Op* op) {
    Instruction* src = op->source();
    if (src == NULL)  return;
    int pc_offset = code_offset();
    if (_pending_non_safepoint == src) {
        _pending_non_safepoint_offset = pc_offset;
        return;
    }
    ValueStack* vstack = debug_info(src);
    if (vstack == NULL)  return;
    if (_pending_non_safepoint != NULL) {
        // Got some old debug info.  Get rid of it.
        if (debug_info(_pending_non_safepoint) == vstack) {
            _pending_non_safepoint_offset = pc_offset;
            return;
        }
        if (_pending_non_safepoint_offset < pc_offset) {
            record_non_safepoint_debug_info();
        }
        _pending_non_safepoint = NULL;
    }
    // Remember the debug info.
    if (pc_offset > compilation()->debug_info_recorder()->last_pc_offset()) {
        _pending_non_safepoint = src;
        _pending_non_safepoint_offset = pc_offset;
    }
}
예제 #2
0
 // non-safepoint debug info management
 void flush_debug_info(int before_pc_offset) {
   if (_pending_non_safepoint != NULL) {
     if (_pending_non_safepoint_offset < before_pc_offset)
       record_non_safepoint_debug_info();
     _pending_non_safepoint = NULL;
   }
 }