summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2013-12-31 17:28:16 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2013-12-31 17:28:16 (GMT)
commitd7977520d36dfb4586c6ae79c3fa3e6fc33f3b26 (patch)
tree0a31e2e59e401cd4cfe99e0b0accadf5dc3ea928 /generic/tclExecute.c
parent92707f0299a4bc45fba4156347b0108924050010 (diff)
downloadtcl-d7977520d36dfb4586c6ae79c3fa3e6fc33f3b26.zip
tcl-d7977520d36dfb4586c6ae79c3fa3e6fc33f3b26.tar.gz
tcl-d7977520d36dfb4586c6ae79c3fa3e6fc33f3b26.tar.bz2
more cleaning up of error-case instruction tracing
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 82808f6..82daad7 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -4391,12 +4391,11 @@ TEBCresume(
register CallFrame *framePtr = iPtr->varFramePtr;
register CallFrame *rootFramePtr = iPtr->rootFramePtr;
+ TRACE(("\"%.30s\" => ", O2S(OBJ_AT_TOS)));
if (TclGetIntFromObj(interp, OBJ_AT_TOS, &level) != TCL_OK) {
- TRACE_WITH_OBJ(("\"%.30s\" => ERROR: ", O2S(OBJ_AT_TOS)),
- Tcl_GetObjResult(interp));
+ TRACE_ERROR(interp);
goto gotError;
}
- TRACE(("%d => ", level));
if (level <= 0) {
level += framePtr->level;
}
@@ -5204,6 +5203,7 @@ TEBCresume(
|| TclGetIntForIndexM(interp, OBJ_AT_TOS, length,
&toIdx) != TCL_OK) {
TclDecrRefCount(value3Ptr);
+ TRACE_ERROR(interp);
goto gotError;
}
TclDecrRefCount(OBJ_AT_TOS);
@@ -5587,6 +5587,7 @@ TEBCresume(
cflags = TclGetInt1AtPtr(pc+1); /* RE compile flages like NOCASE */
valuePtr = OBJ_AT_TOS; /* String */
value2Ptr = OBJ_UNDER_TOS; /* Pattern */
+ TRACE(("\"%.30s\" \"%.30s\" => ", O2S(valuePtr), O2S(value2Ptr)));
/*
* Compile and match the regular expression.
@@ -5597,23 +5598,17 @@ TEBCresume(
Tcl_GetRegExpFromObj(interp, value2Ptr, cflags);
if (regExpr == NULL) {
- goto regexpFailure;
+ TRACE_ERROR(interp);
+ goto gotError;
}
-
match = Tcl_RegExpExecObj(interp, regExpr, valuePtr, 0, 0, 0);
-
if (match < 0) {
- regexpFailure:
-#ifdef TCL_COMPILE_DEBUG
- objResultPtr = Tcl_GetObjResult(interp);
- TRACE_WITH_OBJ(("%.20s %.20s => ERROR: ",
- O2S(valuePtr), O2S(value2Ptr)), objResultPtr);
-#endif
+ TRACE_ERROR(interp);
goto gotError;
}
}
- TRACE(("%.20s %.20s => %d\n", O2S(valuePtr), O2S(value2Ptr), match));
+ TRACE_APPEND(("%d\n", match));
/*
* Peep-hole optimisation: if you're about to jump, do jump from here.