summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmds.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2001-12-11 19:45:52 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2001-12-11 19:45:52 (GMT)
commit5f40c6221b5fef57dec3b1b96604a0391e831d23 (patch)
treec7ddaa8af8d33a33ffe0ec446a5781b058762e7b /generic/tclCompCmds.c
parent3b26635ef7f745eeaaf7d1ecc4f89c48b04cb1f5 (diff)
downloadtcl-5f40c6221b5fef57dec3b1b96604a0391e831d23.zip
tcl-5f40c6221b5fef57dec3b1b96604a0391e831d23.tar.gz
tcl-5f40c6221b5fef57dec3b1b96604a0391e831d23.tar.bz2
small change in bytecode instructionsINST_LIST_INDEX_MULTI and INST_LSET_FLAT
Diffstat (limited to 'generic/tclCompCmds.c')
-rw-r--r--generic/tclCompCmds.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 5ed7be0..01d4cea 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCompCmds.c,v 1.18 2001/12/11 14:29:40 msofer Exp $
+ * RCS: @(#) $Id: tclCompCmds.c,v 1.19 2001/12/11 19:45:52 msofer Exp $
*/
#include "tclInt.h"
@@ -1808,18 +1808,10 @@ TclCompileLindexCmd(interp, parsePtr, envPtr)
if ( numWords == 3 ) {
TclEmitOpcode( INST_LIST_INDEX, envPtr );
} else {
- /*
- * envPtr->currStackDepth has to be updated, as this instruction
- * does not conform to the convention that its stack balance is
- * (1-opnd): it is actually one less (-opnd).
- */
-
- TclEmitInstInt4( INST_LIST_INDEX_MULTI, numWords-2, envPtr );
- envPtr->currStackDepth--;
+ TclEmitInstInt4( INST_LIST_INDEX_MULTI, numWords-1, envPtr );
}
return TCL_OK;
-
}
/*
@@ -2123,7 +2115,7 @@ TclCompileLsetCmd( interp, parsePtr, envPtr )
if ( parsePtr->numWords == 4 ) {
TclEmitOpcode( INST_LSET_LIST, envPtr );
} else {
- TclEmitInstInt4( INST_LSET_FLAT, (parsePtr->numWords - 3), envPtr );
+ TclEmitInstInt4( INST_LSET_FLAT, (parsePtr->numWords - 1), envPtr );
}
/*