diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2013-10-18 07:08:46 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2013-10-18 07:08:46 (GMT) |
commit | c00bdffb6aa0fca3575ef0ab1a07813f696f1839 (patch) | |
tree | f8d33120c8c5b9c348641830fbb900eff86cd578 /generic | |
parent | 21e6601f4971f249f7681508432b98605729fb9d (diff) | |
download | tcl-c00bdffb6aa0fca3575ef0ab1a07813f696f1839.zip tcl-c00bdffb6aa0fca3575ef0ab1a07813f696f1839.tar.gz tcl-c00bdffb6aa0fca3575ef0ab1a07813f696f1839.tar.bz2 |
Tackle evalStk by reusing existing machinery.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclCompCmds.c | 2 | ||||
-rw-r--r-- | generic/tclCompile.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 942d74c..25201eb 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -620,7 +620,7 @@ TclCompileCatchCmd( TclEmitInstInt4( INST_BEGIN_CATCH4, range, envPtr); ExceptionRangeStarts(envPtr, range); TclEmitOpcode( INST_DUP, envPtr); - TclEmitOpcode( INST_EVAL_STK, envPtr); + TclEmitInvoke(envPtr, INST_EVAL_STK); } /* Stack at this point: * nonsimple: script <mark> result diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 427ccab..f91c2fd 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -2458,7 +2458,7 @@ TclCompileCmdWord( */ TclCompileTokens(interp, tokenPtr, count, envPtr); - TclEmitOpcode(INST_EVAL_STK, envPtr); + TclEmitInvoke(envPtr, INST_EVAL_STK); } } @@ -3954,6 +3954,7 @@ TclEmitInvoke( break; default: Tcl_Panic("unexpected opcode"); + case INST_EVAL_STK: case INST_INVOKE_EXPANDED: wordCount = arg1 = arg2 = 0; break; @@ -4009,6 +4010,9 @@ TclEmitInvoke( case INST_INVOKE_EXPANDED: TclEmitOpcode(INST_INVOKE_EXPANDED, envPtr); break; + case INST_EVAL_STK: + TclEmitOpcode(INST_EVAL_STK, envPtr); + break; case INST_INVOKE_REPLACE: TclEmitInstInt4(INST_INVOKE_REPLACE, arg1, envPtr); TclEmitInt1(arg2, envPtr); |