Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add a debugging macro for c-m0

  • Loading branch information...
commit 07708ab2987293b8afb3d9a1e60dc4b13990ae34 1 parent 9d8bde2
@cotto cotto authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/m0/c/m0_ops.c
View
9 src/m0/c/m0_ops.c
@@ -11,7 +11,14 @@ Copyright (C) 2011-2012, Parrot Foundation.
#include "include/m0_interp_structures.h"
#include "include/m0_compiler_defines.h"
-#define M0_EXEC_OP(name, cf, ops, pc) m0_op_##name( cf, &ops[4*pc] )
+#define M0_DEBUG 0
+#define M0_ARG(n) (unsigned char)(ops[(4*pc)*(n)])
+#define M0_EXEC_OP(name, cf, ops, pc) { \
+ if (M0_DEBUG) { \
+ fprintf(stderr, "pc = %d, op: " #name "\n", (char)pc); \
+ } \
+ m0_op_##name( cf, &ops[4*pc] ); \
+ }
static void
m0_op_set_imm( M0_CallFrame *frame, const unsigned char *ops )
Please sign in to comment.
Something went wrong with that request. Please try again.