summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2013-10-22 17:34:55 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2013-10-22 17:34:55 (GMT)
commit1356c7f642888ace1fe24f64ea003567fc6a8fdd (patch)
treeb5553579b33be30325e4d205746facc0702a8dab
parent545698c7c06b1e3d1956d77508ecaf251163fb22 (diff)
downloadtcl-1356c7f642888ace1fe24f64ea003567fc6a8fdd.zip
tcl-1356c7f642888ace1fe24f64ea003567fc6a8fdd.tar.gz
tcl-1356c7f642888ace1fe24f64ea003567fc6a8fdd.tar.bz2
Fix for assemble.test; problem was a total assumption failure caused by way that the assembler works.
-rw-r--r--generic/tclAssembly.c34
1 files changed, 3 insertions, 31 deletions
diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c
index fc51457..03177b9 100644
--- a/generic/tclAssembly.c
+++ b/generic/tclAssembly.c
@@ -246,8 +246,6 @@ static void BBEmitInstInt4(AssemblyEnv* assemEnvPtr, int tblIdx,
int opnd, int count);
static void BBEmitInst1or4(AssemblyEnv* assemEnvPtr, int tblIdx,
int param, int count);
-static void BBEmitInvoke1or4(AssemblyEnv* assemEnvPtr, int tblIdx,
- int param, int count);
static void BBEmitOpcode(AssemblyEnv* assemEnvPtr, int tblIdx,
int count);
static int BuildExceptionRanges(AssemblyEnv* assemEnvPtr);
@@ -681,13 +679,10 @@ BBEmitInstInt4(
/*
*-----------------------------------------------------------------------------
*
- * BBEmitInst1or4, BBEmitInvoke1or4 --
+ * BBEmitInst1or4 --
*
* Emits a 1- or 4-byte operation according to the magnitude of the
- * operand. The Invoke variant generates wrapping stack-balance
- * management if necessary (which is not normally required in assembled
- * code, as loop exception ranges, expansions, breaks and continues can't
- * be issued currently).
+ * operand.
*
*-----------------------------------------------------------------------------
*/
@@ -719,29 +714,6 @@ BBEmitInst1or4(
TclUpdateAtCmdStart(op, envPtr);
BBUpdateStackReqs(bbPtr, tblIdx, count);
}
-
-static void
-BBEmitInvoke1or4(
- AssemblyEnv* assemEnvPtr, /* Assembly environment */
- int tblIdx, /* Index in TalInstructionTable of op */
- int param, /* Variable-length parameter */
- int count) /* Arity if variadic */
-{
- CompileEnv* envPtr = assemEnvPtr->envPtr;
- /* Compilation environment */
- BasicBlock* bbPtr = assemEnvPtr->curr_bb;
- /* Current basic block */
- int op = TalInstructionTable[tblIdx].tclInstCode;
-
- if (param <= 0xff) {
- op >>= 8;
- } else {
- op &= 0xff;
- }
- TclEmitInvoke(envPtr, op, param);
- TclUpdateAtCmdStart(op, envPtr);
- BBUpdateStackReqs(bbPtr, tblIdx, count);
-}
/*
*-----------------------------------------------------------------------------
@@ -1478,7 +1450,7 @@ AssembleOneLine(
goto cleanup;
}
- BBEmitInvoke1or4(assemEnvPtr, tblIdx, opnd, opnd);
+ BBEmitInst1or4(assemEnvPtr, tblIdx, opnd, opnd);
break;
case ASSEM_JUMP: