aboutsummaryrefslogtreecommitdiffhomepage
path: root/goto.cpp
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-11 01:59:48 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-11 01:59:48 +0100
commitd6593762d97bf44f3a398dc4fae714a9e20a24b2 (patch)
tree93af722d9f9a49e548df130de308d33e1f4e750a /goto.cpp
parent345521105a14102d4dd62788d5d3971270009760 (diff)
downloadsciteco-d6593762d97bf44f3a398dc4fae714a9e20a24b2.tar.gz
dump goto table only in DEBUG mode
Diffstat (limited to 'goto.cpp')
-rw-r--r--goto.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/goto.cpp b/goto.cpp
index 6deac96..ddbc69f 100644
--- a/goto.cpp
+++ b/goto.cpp
@@ -37,7 +37,9 @@ class GotoTable : public RBTree {
g_free(name);
name = NULL;
+#ifdef DEBUG
table->dump();
+#endif
}
};
@@ -112,7 +114,9 @@ public:
RBTree::insert(label);
}
+#ifdef DEBUG
dump();
+#endif
return existing_pc;
}
@@ -134,6 +138,7 @@ public:
}
}
+#ifdef DEBUG
void
dump(void)
{
@@ -143,6 +148,7 @@ public:
g_printf("table[\"%s\"] = %d\n", cur->name, cur->pc);
g_printf("---END---\n");
}
+#endif
};
static GotoTable table;