[svn] r7488: nemerle/trunk/ncc/generation/ILEmitter.n

IT svnadmin at nemerle.org
Sun Feb 25 07:56:57 CET 2007


Log:
Working on debug locations.

Author: IT
Date: Sun Feb 25 07:56:55 2007
New Revision: 7488

Modified:
   nemerle/trunk/ncc/generation/ILEmitter.n

Modified: nemerle/trunk/ncc/generation/ILEmitter.n
==============================================================================
--- nemerle/trunk/ncc/generation/ILEmitter.n	(original)
+++ nemerle/trunk/ncc/generation/ILEmitter.n	Sun Feb 25 07:56:55 2007
@@ -192,7 +192,7 @@
       }
     }
 
-    Mark (loc : Location, ignoreMultiline : bool) : void
+    _Mark (loc : Location, ignoreMultiline : bool) : void
     {
       when (!ignoreMultiline || loc.Line == loc.EndLine)
         Mark(loc);
@@ -585,7 +585,7 @@
         /* emits the if/then/else construction */
         | If (cond_expr, then_expr, else_expr) =>
           def emit_branch (expr : TExpr, else_label : Label) {
-            Mark (expr.loc);
+            MaybeMark (expr.loc);
             match (expr) {
               | Call (OpCode ("=="), [nested_cond,
                  Parm where (expr = TExpr.TypeConversion(TExpr.Literal(Literal.Bool(true)), _, _, _))], _) =>
@@ -658,7 +658,11 @@
 
           def label_condition_else = _ilg.DefineLabel ();
           def label_condition_fi = _ilg.DefineLabel ();
+
+          MaybeMark (cond_expr.loc);
+          limited_debug_nesting++;
           emit_branch (cond_expr, label_condition_else);
+          limited_debug_nesting--;
 
           emit (then_expr);
           unless (then_expr.Throws)
@@ -1156,7 +1160,7 @@
 
         /* emit an operator */
         | Call (OpCode (opcode), parms, _) =>
-          Mark (expr.loc);        
+          MaybeMark (expr.loc);
           // FIXME: seperate out
           emit_parms (parms);
           match (opcode) {



More information about the svn mailing list