From a19c85b2b0c70db4e87efe129da38ea870f8971c Mon Sep 17 00:00:00 2001 From: Teddy Date: Fri, 11 Apr 2014 15:53:22 +0800 Subject: basic const precalculation --- ast.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'ast.c') diff --git a/ast.c b/ast.c index 44952d8..a126e6b 100644 --- a/ast.c +++ b/ast.c @@ -365,13 +365,15 @@ char *cnode_debug_type_repr(CNode *ast) { assert(type); } if (aptr == abuff) - sprintf(buffer, "%s(%d:%d)->(var:%lx, type:%lx)", type, - ast->loc.row, ast->loc.col, (size_t)ast->ext.var, (size_t)ast->ext.type); + sprintf(buffer, "%s(%d:%d)->(var:%lx|type:%lx|ic:%d|cv:%d)", type, + ast->loc.row, ast->loc.col, (size_t)ast->ext.var, (size_t)ast->ext.type, + ast->ext.is_const, ast->ext.const_val); else { *aptr = '\0'; - sprintf(buffer, "%s:%s(%d:%d)->(var:%lx, type:%lx)", type, abuff, - ast->loc.row, ast->loc.col, (size_t)ast->ext.var, (size_t)ast->ext.type); + sprintf(buffer, "%s:%s(%d:%d)->(var:%lx|type:%lx|ic:%d|cv:%d)", type, abuff, + ast->loc.row, ast->loc.col, (size_t)ast->ext.var, (size_t)ast->ext.type, + ast->ext.is_const, ast->ext.const_val); } return buffer; } -- cgit v1.2.3