diff options
author | mig <mig> | 2013-12-11 15:55:28 (GMT) |
---|---|---|
committer | mig <mig> | 2013-12-11 15:55:28 (GMT) |
commit | 51c5c21deee994f94d1885cda3634eb24af6291f (patch) | |
tree | 7a0e0950475a80bbee80e1208642952f2d27230e /generic/tclCompCmds.c | |
parent | 411f830f50ba7611bc80e0cd72c18647637a40c7 (diff) | |
download | tcl-51c5c21deee994f94d1885cda3634eb24af6291f.zip tcl-51c5c21deee994f94d1885cda3634eb24af6291f.tar.gz tcl-51c5c21deee994f94d1885cda3634eb24af6291f.tar.bz2 |
new test, and fix for bug
Diffstat (limited to 'generic/tclCompCmds.c')
-rw-r--r-- | generic/tclCompCmds.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index dbc876a..7997efa 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -645,14 +645,8 @@ TclCompileCatchCmd( (int)(CurrentOffset(envPtr) - jumpFixup.codeOffset)); } - /* - * Push the return options if the caller wants them. - */ - if (optsIndex != -1) { TclEmitOpcode( INST_PUSH_RETURN_OPTIONS, envPtr); - Emit14Inst( INST_STORE_SCALAR, optsIndex, envPtr); - TclEmitOpcode( INST_POP, envPtr); } /* @@ -662,6 +656,15 @@ TclCompileCatchCmd( TclEmitOpcode( INST_END_CATCH, envPtr); /* + * Push the return options if the caller wants them. + */ + + if (optsIndex != -1) { + Emit14Inst( INST_STORE_SCALAR, optsIndex, envPtr); + TclEmitOpcode( INST_POP, envPtr); + } + + /* * At this point, the top of the stack is inconveniently ordered: * result returnCode * Reverse the stack to store the result. |