diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2014-02-02 15:09:34 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2014-02-02 15:09:34 (GMT) |
commit | c7842a2e5fb0cd05d5e184ec56f13e22853d22fb (patch) | |
tree | 74523a3ed1ecf0a23d371df17fc2c6818ecda403 /generic/tclCompCmdsGR.c | |
parent | 11780db2cc0c9f2960937e2a95da7510ee316a17 (diff) | |
parent | 89b7e244580eb2f40d062a73485bff16682d8027 (diff) | |
download | tcl-dkf_bytecode_8_6_join.zip tcl-dkf_bytecode_8_6_join.tar.gz tcl-dkf_bytecode_8_6_join.tar.bz2 |
merge main working branchdkf_bytecode_8_6_join
Diffstat (limited to 'generic/tclCompCmdsGR.c')
-rw-r--r-- | generic/tclCompCmdsGR.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/generic/tclCompCmdsGR.c b/generic/tclCompCmdsGR.c index 3de773d..539f934 100644 --- a/generic/tclCompCmdsGR.c +++ b/generic/tclCompCmdsGR.c @@ -3197,6 +3197,31 @@ TclCompileObjectNextCmd( } int +TclCompileObjectNextToCmd( + Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Parse *parsePtr, /* Points to a parse structure for the command + * created by Tcl_ParseCommand. */ + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) /* Holds resulting instructions. */ +{ + DefineLineInformation; /* TIP #280 */ + Tcl_Token *tokenPtr = parsePtr->tokenPtr; + int i; + + if (parsePtr->numWords < 2 || parsePtr->numWords > 255) { + return TCL_ERROR; + } + + for (i=0 ; i<parsePtr->numWords ; i++) { + CompileWord(envPtr, tokenPtr, interp, i); + tokenPtr = TokenAfter(tokenPtr); + } + TclEmitInstInt1( INST_TCLOO_NEXT_CLASS, i, envPtr); + return TCL_OK; +} + +int TclCompileObjectSelfCmd( Tcl_Interp *interp, /* Used for error reporting. */ Tcl_Parse *parsePtr, /* Points to a parse structure for the command |