diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2013-06-19 22:46:10 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2013-06-19 22:46:10 (GMT) |
commit | ccccb754c0f55dc8e8250ab8c3a2019c96c6add2 (patch) | |
tree | 46d515be0b19875b9fe6bfe2fbb50571dbc9c2fc /generic/tclCompile.c | |
parent | 60c48207275926d160a50ab91108f28ae7475040 (diff) | |
parent | 5539977620b9c358a365280e4d0db6a816537b71 (diff) | |
download | tcl-ccccb754c0f55dc8e8250ab8c3a2019c96c6add2.zip tcl-ccccb754c0f55dc8e8250ab8c3a2019c96c6add2.tar.gz tcl-ccccb754c0f55dc8e8250ab8c3a2019c96c6add2.tar.bz2 |
merge trunk
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r-- | generic/tclCompile.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c index da0e63e..65fc218 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -1744,7 +1744,7 @@ TclCompileScript( /* TIP #280 */ ExtCmdLoc *eclPtr = envPtr->extCmdMapPtr; int *wlines, wlineat, cmdLine, *clNext; - Tcl_Parse *parsePtr = TclStackAlloc(interp, sizeof(Tcl_Parse)); + Tcl_Parse parse, *parsePtr = &parse; if (envPtr->iPtr == NULL) { Tcl_Panic("TclCompileScript() called on uninitialized CompileEnv"); @@ -2172,11 +2172,10 @@ TclCompileScript( */ if (envPtr->codeNext == entryCodeNext) { - TclEmitPush(TclRegisterNewLiteral(envPtr, "", 0), envPtr); + PushStringLiteral(envPtr, ""); } envPtr->numSrcBytes = p - script; - TclStackFree(interp, parsePtr); } /* @@ -2240,7 +2239,7 @@ TclCompileVarSubst( localVar = TclFindCompiledLocal(name, nameBytes, localVarName, envPtr); } if (localVar < 0) { - TclEmitPush(TclRegisterNewLiteral(envPtr, name, nameBytes), envPtr); + PushLiteral(envPtr, name, nameBytes); } /* @@ -2448,7 +2447,7 @@ TclCompileTokens( */ if (envPtr->codeNext == entryCodeNext) { - TclEmitPush(TclRegisterNewLiteral(envPtr, "", 0), envPtr); + PushStringLiteral(envPtr, ""); } Tcl_DStringFree(&textBuffer); @@ -2565,7 +2564,7 @@ TclCompileExprWords( for (i = 0; i < numWords; i++) { TclCompileTokens(interp, wordPtr+1, wordPtr->numComponents, envPtr); if (i < (numWords - 1)) { - TclEmitPush(TclRegisterNewLiteral(envPtr, " ", 1), envPtr); + PushStringLiteral(envPtr, " "); } wordPtr += wordPtr->numComponents + 1; } @@ -2620,7 +2619,7 @@ TclCompileNoOp( TclEmitOpcode(INST_POP, envPtr); } } - TclEmitPush(TclRegisterNewLiteral(envPtr, "", 0), envPtr); + PushStringLiteral(envPtr, ""); return TCL_OK; } |