compile: C comments for each compiled stmt/expr
authorJean Privat <jean@pryen.org>
Wed, 3 Jun 2009 17:22:24 +0000 (13:22 -0400)
committerJean Privat <jean@pryen.org>
Wed, 10 Jun 2009 14:04:40 +0000 (10:04 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/compiling/compiling_methods.nit

index 6f8bd60..2c60c33 100644 (file)
@@ -24,6 +24,7 @@ redef class CompilerVisitor
        # Compile a statment node
        meth compile_stmt(n: PExpr)
        do
+               add_instr("/* Compile stmt {n.locate} */")
                n.prepare_compile_stmt(self)
                var i = cfc._variable_index
                n.compile_stmt(self)
@@ -33,6 +34,7 @@ redef class CompilerVisitor
        # Compile is expression node
        meth compile_expr(n: PExpr): String
        do
+               add_instr("/* Compile expr {n.locate} */")
                var i = cfc._variable_index
                var s = n.compile_expr(self)
                cfc._variable_index = i