[svn:parrot] r46463 - trunk/compilers/imcc

plobsing at svn.parrot.org plobsing at svn.parrot.org
Mon May 10 06:47:42 UTC 2010


Author: plobsing
Date: Mon May 10 06:47:42 2010
New Revision: 46463
URL: https://trac.parrot.org/parrot/changeset/46463

Log:
Unconditionally generate debug information.  Before turning on optimization
would dissable debug info. This addresses TT #1209.

Modified:
   trunk/compilers/imcc/pbc.c

Modified: trunk/compilers/imcc/pbc.c
==============================================================================
--- trunk/compilers/imcc/pbc.c	Mon May 10 06:03:19 2010	(r46462)
+++ trunk/compilers/imcc/pbc.c	Mon May 10 06:47:42 2010	(r46463)
@@ -2180,21 +2180,13 @@
         IMCC_INFO(interp)->pc  = (opcode_t *)interp->code->base.data + oldsize;
         IMCC_INFO(interp)->npc = 0;
 
-        /* add debug if necessary */
-        if (IMCC_INFO(interp)->optimizer_level == 0
-        ||  IMCC_INFO(interp)->optimizer_level == OPT_PASM) {
-            const char * const sourcefile = unit->file;
-
-            /* FIXME length and multiple subs */
-            IMCC_INFO(interp)->debug_seg  = Parrot_new_debug_seg(interp,
-                interp->code,
-                (size_t)IMCC_INFO(interp)->ins_line + ins_size + 1);
+        /* FIXME length and multiple subs */
+        IMCC_INFO(interp)->debug_seg  = Parrot_new_debug_seg(interp,
+            interp->code,
+            (size_t)IMCC_INFO(interp)->ins_line + ins_size + 1);
 
-            Parrot_debug_add_mapping(interp, IMCC_INFO(interp)->debug_seg,
-                IMCC_INFO(interp)->ins_line, sourcefile);
-        }
-        else
-            IMCC_INFO(interp)->debug_seg = NULL;
+        Parrot_debug_add_mapping(interp, IMCC_INFO(interp)->debug_seg,
+            IMCC_INFO(interp)->ins_line, unit->file);
 
         /* if item is a PCC_SUB entry then store it constants */
         if (ins->symregs[0] && ins->symregs[0]->pcc_sub) {


More information about the parrot-commits mailing list