diff options
author | dgp <dgp@users.sourceforge.net> | 2016-04-29 18:02:55 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2016-04-29 18:02:55 (GMT) |
commit | 100542f06740e0120d51ef844f61d47b10ce39ef (patch) | |
tree | facf9bcde61423b2025c72ceaeab4de8fda1bf10 | |
parent | 44deb5c463cd7905f01f7cb74ac29d0e9d90972a (diff) | |
download | tcl-100542f06740e0120d51ef844f61d47b10ce39ef.zip tcl-100542f06740e0120d51ef844f61d47b10ce39ef.tar.gz tcl-100542f06740e0120d51ef844f61d47b10ce39ef.tar.bz2 |
No longer need to create Tcl_Obj just to make some bytecode.
-rw-r--r-- | generic/tclCompExpr.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c index 4390282..654666a 100644 --- a/generic/tclCompExpr.c +++ b/generic/tclCompExpr.c @@ -2181,7 +2181,6 @@ ExecConstantExprTree( CompileEnv *envPtr; ByteCode *byteCodePtr; int code; - Tcl_Obj *byteCodeObj = Tcl_NewObj(); NRE_callback *rootPtr = TOP_CB(interp); /* @@ -2195,14 +2194,12 @@ ExecConstantExprTree( CompileExprTree(interp, nodes, index, litObjvPtr, NULL, NULL, envPtr, 0 /* optimize */); TclEmitOpcode(INST_DONE, envPtr); - Tcl_IncrRefCount(byteCodeObj); - TclInitByteCodeObj(byteCodeObj, envPtr); + byteCodePtr = TclInitByteCode(envPtr); TclFreeCompileEnv(envPtr); TclStackFree(interp, envPtr); - byteCodePtr = byteCodeObj->internalRep.twoPtrValue.ptr1; TclNRExecuteByteCode(interp, byteCodePtr); code = TclNRRunCallbacks(interp, TCL_OK, rootPtr); - Tcl_DecrRefCount(byteCodeObj); + TclReleaseByteCode(byteCodePtr); return code; } |