summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c35
1 files changed, 33 insertions, 2 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 8bc83cc..aa049dc 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -317,12 +317,16 @@ VarHashCreateVar(
switch (*pc) { \
case INST_JUMP_FALSE1: \
NEXT_INST_F(((condition)? 2 : TclGetInt1AtPtr(pc+1)), (cleanup), 0); \
+ break; \
case INST_JUMP_TRUE1: \
NEXT_INST_F(((condition)? TclGetInt1AtPtr(pc+1) : 2), (cleanup), 0); \
+ break; \
case INST_JUMP_FALSE4: \
NEXT_INST_F(((condition)? 5 : TclGetInt4AtPtr(pc+1)), (cleanup), 0); \
+ break; \
case INST_JUMP_TRUE4: \
NEXT_INST_F(((condition)? TclGetInt4AtPtr(pc+1) : 5), (cleanup), 0); \
+ break; \
default: \
if ((condition) < 0) { \
TclNewIntObj(objResultPtr, -1); \
@@ -330,6 +334,7 @@ VarHashCreateVar(
objResultPtr = TCONST((condition) > 0); \
} \
NEXT_INST_F(0, (cleanup), 1); \
+ break; \
} \
} while (0)
#define JUMP_PEEPHOLE_V(condition, pcAdjustment, cleanup) \
@@ -338,12 +343,16 @@ VarHashCreateVar(
switch (*pc) { \
case INST_JUMP_FALSE1: \
NEXT_INST_V(((condition)? 2 : TclGetInt1AtPtr(pc+1)), (cleanup), 0); \
+ break; \
case INST_JUMP_TRUE1: \
NEXT_INST_V(((condition)? TclGetInt1AtPtr(pc+1) : 2), (cleanup), 0); \
+ break; \
case INST_JUMP_FALSE4: \
NEXT_INST_V(((condition)? 5 : TclGetInt4AtPtr(pc+1)), (cleanup), 0); \
+ break; \
case INST_JUMP_TRUE4: \
NEXT_INST_V(((condition)? TclGetInt4AtPtr(pc+1) : 5), (cleanup), 0); \
+ break; \
default: \
if ((condition) < 0) { \
TclNewIntObj(objResultPtr, -1); \
@@ -351,6 +360,7 @@ VarHashCreateVar(
objResultPtr = TCONST((condition) > 0); \
} \
NEXT_INST_V(0, (cleanup), 1); \
+ break; \
} \
} while (0)
#else /* TCL_COMPILE_DEBUG */
@@ -2576,23 +2586,27 @@ TEBCresume(
objResultPtr = codePtr->objArrayPtr[TclGetUInt4AtPtr(pc+1)];
TRACE_WITH_OBJ(("%u => ", TclGetUInt4AtPtr(pc+1)), objResultPtr);
NEXT_INST_F(5, 0, 1);
+ break;
case INST_POP:
TRACE_WITH_OBJ(("=> discarding "), OBJ_AT_TOS);
objPtr = POP_OBJECT();
TclDecrRefCount(objPtr);
NEXT_INST_F(1, 0, 0);
+ break;
case INST_DUP:
objResultPtr = OBJ_AT_TOS;
TRACE_WITH_OBJ(("=> "), objResultPtr);
NEXT_INST_F(1, 0, 1);
+ break;
case INST_OVER:
opnd = TclGetUInt4AtPtr(pc+1);
objResultPtr = OBJ_AT_DEPTH(opnd);
TRACE_WITH_OBJ(("%u => ", opnd), objResultPtr);
NEXT_INST_F(5, 0, 1);
+ break;
case INST_REVERSE: {
Tcl_Obj **a, **b;
@@ -2623,6 +2637,7 @@ TEBCresume(
TRACE_WITH_OBJ(("%u => ", opnd), objResultPtr);
NEXT_INST_V(2, opnd, 1);
+ break;
case INST_CONCAT_STK:
/*
@@ -2634,6 +2649,7 @@ TEBCresume(
objResultPtr = Tcl_ConcatObj(opnd, &OBJ_AT_DEPTH(opnd-1));
TRACE_WITH_OBJ(("%u => ", opnd), objResultPtr);
NEXT_INST_V(5, opnd, 1);
+ break;
case INST_EXPAND_START:
/*
@@ -2655,6 +2671,7 @@ TEBCresume(
PUSH_TAUX_OBJ(objPtr);
TRACE(("=> mark depth as %d\n", (int) CURR_DEPTH));
NEXT_INST_F(1, 0, 0);
+ break;
case INST_EXPAND_DROP:
/*
@@ -2781,6 +2798,7 @@ TEBCresume(
TclNewObj(objResultPtr);
NEXT_INST_F(1, 0, 1);
+ break;
case INST_INVOKE_STK4:
objc = TclGetUInt4AtPtr(pc+1);
@@ -4262,6 +4280,7 @@ TEBCresume(
TRACE(("%d => new pc %u\n", opnd,
(unsigned)(pc + opnd - codePtr->codeStart)));
NEXT_INST_F(opnd, 0, 0);
+ break;
case INST_JUMP4:
opnd = TclGetInt4AtPtr(pc+1);
@@ -4431,6 +4450,7 @@ TEBCresume(
TclNewIntObj(objResultPtr, iPtr->varFramePtr->level);
TRACE_WITH_OBJ(("=> "), objResultPtr);
NEXT_INST_F(1, 0, 1);
+ break;
case INST_INFO_LEVEL_ARGS: {
int level;
CallFrame *framePtr = iPtr->varFramePtr;
@@ -5662,7 +5682,6 @@ TEBCresume(
JUMP_PEEPHOLE_F(match, 2, 2);
}
- break;
/*
* End of string-related instructions.
@@ -6092,6 +6111,7 @@ TEBCresume(
TclSetIntObj(valuePtr, wResult);
TRACE(("%s\n", O2S(valuePtr)));
NEXT_INST_F(1, 1, 0);
+ break;
case INST_DIV:
if (w2 == 0) {
@@ -6231,6 +6251,7 @@ TEBCresume(
/* -NaN => NaN */
TRACE_APPEND(("%s\n", O2S(valuePtr)));
NEXT_INST_F(1, 0, 0);
+ break;
case TCL_NUMBER_INT:
w1 = *((const Tcl_WideInt *) ptr1);
if (w1 != WIDE_MIN) {
@@ -6356,6 +6377,7 @@ TEBCresume(
}
TRACE_WITH_OBJ(("\"%.30s\" => ", O2S(valuePtr)), objResultPtr);
NEXT_INST_F(1, 0, 1);
+ break;
case INST_BREAK:
/*
@@ -6751,6 +6773,7 @@ TEBCresume(
TclGetUInt4AtPtr(pc+1), (int) (catchTop - initCatchTop - 1),
(int) CURR_DEPTH));
NEXT_INST_F(5, 0, 0);
+ break;
case INST_END_CATCH:
catchTop--;
@@ -6760,6 +6783,7 @@ TEBCresume(
result = TCL_OK;
TRACE(("=> catchTop=%d\n", (int) (catchTop - initCatchTop - 1)));
NEXT_INST_F(1, 0, 0);
+ break;
case INST_PUSH_RESULT:
objResultPtr = Tcl_GetObjResult(interp);
@@ -6773,11 +6797,13 @@ TEBCresume(
Tcl_IncrRefCount(objPtr);
iPtr->objResultPtr = objPtr;
NEXT_INST_F(1, 0, -1);
+ break;
case INST_PUSH_RETURN_CODE:
TclNewIntObj(objResultPtr, result);
TRACE(("=> %u\n", result));
NEXT_INST_F(1, 0, 1);
+ break;
case INST_PUSH_RETURN_OPTIONS:
DECACHE_STACK_INFO();
@@ -6785,6 +6811,7 @@ TEBCresume(
CACHE_STACK_INFO();
TRACE_WITH_OBJ(("=> "), objResultPtr);
NEXT_INST_F(1, 0, 1);
+ break;
case INST_RETURN_CODE_BRANCH: {
int code;
@@ -6824,6 +6851,7 @@ TEBCresume(
}
TRACE_APPEND(("OK\n"));
NEXT_INST_F(1, 1, 0);
+ break;
case INST_DICT_EXISTS: {
int found;
@@ -8823,6 +8851,7 @@ TclCompareTwoNumbers(
mp_clear(&big2);
return compare;
}
+ break;
case TCL_NUMBER_DOUBLE:
d1 = *((const double *)ptr1);
@@ -8869,6 +8898,7 @@ TclCompareTwoNumbers(
Tcl_InitBignumFromDouble(NULL, d1, &big1);
goto bigCompare;
}
+ break;
case TCL_NUMBER_BIG:
Tcl_TakeBignumFromObj(NULL, valuePtr, &big1);
@@ -8905,10 +8935,11 @@ TclCompareTwoNumbers(
mp_clear(&big2);
return compare;
}
+ break;
default:
Tcl_Panic("unexpected number type");
- return TCL_ERROR;
}
+ return TCL_ERROR;
}
#ifdef TCL_COMPILE_DEBUG