summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authormsofer <msofer@noemail.net>2014-09-27 21:36:06 (GMT)
committermsofer <msofer@noemail.net>2014-09-27 21:36:06 (GMT)
commitc7d4062a096a02626a7763ddc62cf106c102d906 (patch)
treeb8f14582f3a6519166ca20510d67e68b8c75b590 /generic
parentf9fc1062bf70608db5e1843243bafd42fb010783 (diff)
downloadtcl-c7d4062a096a02626a7763ddc62cf106c102d906.zip
tcl-c7d4062a096a02626a7763ddc62cf106c102d906.tar.gz
tcl-c7d4062a096a02626a7763ddc62cf106c102d906.tar.bz2
Backing out commit [cddbfc3081], fix for bug [82521bfb6734f891dd]
The "optimisation" in that commit assumes that the last byte in the generated bytecodes is an INST_TRY_CONVERT if it equals 64. This is an invalid assumption, it could be 64 and not be an instruction. FossilOrigin-Name: 956d1be41ba7e5229efdbe931b8f92945cb11b26
Diffstat (limited to 'generic')
-rw-r--r--generic/tclCompCmds.c1
-rw-r--r--generic/tclCompCmdsGR.c2
-rw-r--r--generic/tclCompCmdsSZ.c1
-rw-r--r--generic/tclCompile.h12
4 files changed, 0 insertions, 16 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 431f0af..496d44f 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -2401,7 +2401,6 @@ TclCompileForCmd(
SetLineInformation(2);
TclCompileExprWords(interp, testTokenPtr, 1, envPtr);
- TclClearNumConversion(envPtr);
jumpDist = CurrentOffset(envPtr) - bodyCodeOffset;
if (jumpDist > 127) {
diff --git a/generic/tclCompCmdsGR.c b/generic/tclCompCmdsGR.c
index 603c51d..9d258fc 100644
--- a/generic/tclCompCmdsGR.c
+++ b/generic/tclCompCmdsGR.c
@@ -281,7 +281,6 @@ TclCompileIfCmd(
SetLineInformation(wordIdx);
Tcl_ResetResult(interp);
TclCompileExprWords(interp, testTokenPtr, 1, envPtr);
- TclClearNumConversion(envPtr);
if (jumpFalseFixupArray.next >= jumpFalseFixupArray.end) {
TclExpandJumpFixupArray(&jumpFalseFixupArray);
}
@@ -531,7 +530,6 @@ TclCompileIncrCmd(
} else {
SetLineInformation(2);
CompileTokens(envPtr, incrTokenPtr, interp);
- TclClearNumConversion(envPtr);
}
} else { /* No incr amount given so use 1. */
haveImmValue = 1;
diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c
index 617a520..382d2d1 100644
--- a/generic/tclCompCmdsSZ.c
+++ b/generic/tclCompCmdsSZ.c
@@ -3782,7 +3782,6 @@ TclCompileWhileCmd(
}
SetLineInformation(1);
TclCompileExprWords(interp, testTokenPtr, 1, envPtr);
- TclClearNumConversion(envPtr);
jumpDist = CurrentOffset(envPtr) - bodyCodeOffset;
if (jumpDist > 127) {
diff --git a/generic/tclCompile.h b/generic/tclCompile.h
index 01b78d9..51f0b34 100644
--- a/generic/tclCompile.h
+++ b/generic/tclCompile.h
@@ -1414,18 +1414,6 @@ MODULE_SCOPE int TclPushProcCallFrame(ClientData clientData,
} while (0)
/*
- * If the expr compiler finished with TRY_CONVERT, macro to remove it when the
- * job is done by the following instruction.
- */
-
-#define TclClearNumConversion(envPtr) \
- do { \
- if (*(envPtr->codeNext - 1) == INST_TRY_CVT_TO_NUMERIC) { \
- envPtr->codeNext--; \
- } \
- } while (0)
-
-/*
* Macros to update a (signed or unsigned) integer starting at a pointer. The
* two variants depend on the number of bytes. The ANSI C "prototypes" for
* these macros are: