summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-07-09 15:47:28 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-07-09 15:47:28 (GMT)
commitda4f0a3cc9ce8134a629c12ce02572e0ee69bb3b (patch)
tree6ca06be4a2c871912e4d135a868e6ec1a96e9081 /generic/tclExecute.c
parent7332635af1609ad38fa7021022dd79996b75144c (diff)
parent39488ce3ef11fcbac48bd3c7e35b3ba3fb80c2de (diff)
downloadtcl-da4f0a3cc9ce8134a629c12ce02572e0ee69bb3b.zip
tcl-da4f0a3cc9ce8134a629c12ce02572e0ee69bb3b.tar.gz
tcl-da4f0a3cc9ce8134a629c12ce02572e0ee69bb3b.tar.bz2
merge 8.6
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index a9c5de5..5c7505b 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -3153,20 +3153,7 @@ TEBCresume(
fflush(stdout);
}
#endif /*TCL_COMPILE_DEBUG*/
- {
- Tcl_Obj *copyPtr = Tcl_NewListObj(objc - opnd + 1, NULL);
- register List *listRepPtr = copyPtr->internalRep.twoPtrValue.ptr1;
- Tcl_Obj **copyObjv = &listRepPtr->elements;
- int i;
- listRepPtr->elemCount = objc - opnd + 1;
- copyObjv[0] = objPtr;
- memcpy(copyObjv+1, objv+opnd, sizeof(Tcl_Obj *) * (objc - opnd));
- for (i=1 ; i<objc-opnd+1 ; i++) {
- Tcl_IncrRefCount(copyObjv[i]);
- }
- objPtr = copyPtr;
- }
bcFramePtr->data.tebc.pc = (char *) pc;
iPtr->cmdFramePtr = bcFramePtr;
if (iPtr->flags & INTERP_DEBUG_FRAME) {
@@ -3174,13 +3161,25 @@ TEBCresume(
}
TclInitRewriteEnsemble(interp, opnd, 1, objv);
+
+ {
+ Tcl_Obj *copyPtr = Tcl_NewListObj(objc - opnd + 1, NULL);
+
+ Tcl_ListObjAppendElement(NULL, copyPtr, objPtr);
+ Tcl_ListObjReplace(NULL, copyPtr, LIST_MAX, 0,
+ objc - opnd, objv + opnd);
+ objPtr = copyPtr;
+ }
+
DECACHE_STACK_INFO();
pc += 6;
TEBC_YIELD();
TclMarkTailcall(interp);
- TclNRAddCallback(interp, TclClearRootEnsemble, NULL,NULL,NULL,NULL);
- return TclNREvalObjEx(interp, objPtr, TCL_EVAL_INVOKE, NULL, INT_MIN);
+ TclNRAddCallback(interp, TclClearRootEnsemble, NULL, NULL, NULL, NULL);
+ Tcl_ListObjGetElements(NULL, objPtr, &objc, &objv);
+ TclNRAddCallback(interp, TclNRReleaseValues, objPtr, NULL, NULL, NULL);
+ return TclNREvalObjv(interp, objc, objv, TCL_EVAL_INVOKE, NULL);
/*
* -----------------------------------------------------------------
@@ -4413,8 +4412,8 @@ TEBCresume(
savedNsPtr = iPtr->varFramePtr->nsPtr;
iPtr->varFramePtr->nsPtr = (Namespace *) nsPtr;
otherPtr = TclObjLookupVarEx(interp, OBJ_AT_TOS, NULL,
- (TCL_NAMESPACE_ONLY | TCL_LEAVE_ERR_MSG), "access",
- /*createPart1*/ 1, /*createPart2*/ 1, &varPtr);
+ (TCL_NAMESPACE_ONLY|TCL_LEAVE_ERR_MSG|TCL_AVOID_RESOLVERS),
+ "access", /*createPart1*/ 1, /*createPart2*/ 1, &varPtr);
iPtr->varFramePtr->nsPtr = savedNsPtr;
if (!otherPtr) {
TRACE_ERROR(interp);