summaryrefslogtreecommitdiff
path: root/src/expr/node_builder.h
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2011-06-06 21:37:23 +0000
committerMorgan Deters <mdeters@gmail.com>2011-06-06 21:37:23 +0000
commite64686fed86068e977ac84c5776438935f446f00 (patch)
tree455592297e26e3ac84a8027db0e70e74dc3ecdc7 /src/expr/node_builder.h
parentdaa163e694d257ffe8ba7ae8ccb240bcbfb1c276 (diff)
Fix for Mac OS breakage (x86 didn't crash, but probably would, eventually, on some problems---valgrind gave many complaints): the problem was that calloc() (in the Backtracker) wasn't allocating enough space for the type located at the resulting address. Resolves bug #263.
Also, some debugging improvements.
Diffstat (limited to 'src/expr/node_builder.h')
-rw-r--r--src/expr/node_builder.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/expr/node_builder.h b/src/expr/node_builder.h
index cc7e89bc8..95f7c0437 100644
--- a/src/expr/node_builder.h
+++ b/src/expr/node_builder.h
@@ -900,8 +900,12 @@ expr::NodeValue* NodeBuilder<nchild_thresh>::constructNV() {
nv->d_id = expr::NodeValue::next_id++;// FIXME multithreading
nv->d_rc = 0;
setUsed();
- Debug("gc") << "creating node value " << nv
- << " [" << nv->d_id << "]: " << *nv << "\n";
+ if(Debug.isOn("gc")) {
+ Debug("gc") << "creating node value " << nv
+ << " [" << nv->d_id << "]: ";
+ nv->printAst(Debug("gc"));
+ Debug("gc") << std::endl;
+ }
return nv;
}
@@ -982,8 +986,12 @@ expr::NodeValue* NodeBuilder<nchild_thresh>::constructNV() {
//poolNv = nv;
d_nm->poolInsert(nv);
- Debug("gc") << "creating node value " << nv
- << " [" << nv->d_id << "]: " << *nv << "\n";
+ if(Debug.isOn("gc")) {
+ Debug("gc") << "creating node value " << nv
+ << " [" << nv->d_id << "]: ";
+ nv->printAst(Debug("gc"));
+ Debug("gc") << std::endl;
+ }
return nv;
}
} else {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback