Diff
Not logged in

Differences From Artifact [50471fe2bb]:

To Artifact [939cb0f39d]:


1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
    /*
     * Make sure that the local cache of variable names and initial values has
     * been initialised properly .
     */

    if (localCt) {
	if (!codePtr->localCachePtr) {
	    InitLocalCache(procPtr) ;
	}
	framePtr->localCachePtr = codePtr->localCachePtr;
	framePtr->localCachePtr->refCount++;
	defPtr = (Var *) (&framePtr->localCachePtr->varName0 + localCt);
    } else {
	defPtr = NULL;
    }







|







1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
    /*
     * Make sure that the local cache of variable names and initial values has
     * been initialised properly .
     */

    if (localCt) {
	if (!codePtr->localCachePtr) {
	    InitLocalCache(procPtr);
	}
	framePtr->localCachePtr = codePtr->localCachePtr;
	framePtr->localCachePtr->refCount++;
	defPtr = (Var *) (&framePtr->localCachePtr->varName0 + localCt);
    } else {
	defPtr = NULL;
    }
1693
1694
1695
1696
1697
1698
1699




























1700
1701
1702
1703
1704
1705

1706
1707
1708
1709
1710
1711
1712
				 * interpreted. */
    register Tcl_Interp *interp,/* Interpreter in which procedure was
				 * invoked. */
    int objc,			/* Count of number of arguments to this
				 * procedure. */
    Tcl_Obj *const objv[])	/* Argument value objects. */
{




























    int result = TclPushProcCallFrame(clientData, interp, objc, objv,
	    /*isLambda*/ 0);

    if (result != TCL_OK) {
	return TCL_ERROR;
    }

    return TclNRInterpProcCore(interp, objv[0], 1, &MakeProcError);
}

/*
 *----------------------------------------------------------------------
 *
 * TclNRInterpProcCore --







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|





>







1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
				 * interpreted. */
    register Tcl_Interp *interp,/* Interpreter in which procedure was
				 * invoked. */
    int objc,			/* Count of number of arguments to this
				 * procedure. */
    Tcl_Obj *const objv[])	/* Argument value objects. */
{
    Proc *procPtr = clientData;
    Interp *iPtr = (Interp *) interp;
    int result;
    Tcl_Obj *bodyPtr = procPtr->bodyPtr;
    
    /*
     * Shortcut for empty bodies. Note that this also avoids compiling and
     * shimmering the empty string, as well as pushing/popping a CallFrame and
     * invoking TEBC. 
     */

    if (bodyPtr->bytes && (*bodyPtr->bytes == '\0')) {
	/* empty body ... */
	ByteCode *codePtr = (ByteCode *) bodyPtr->internalRep.twoPtrValue.ptr1;
	if ((bodyPtr->typePtr != &tclByteCodeType) ||
		!(codePtr->flags & TCL_BYTECODE_PRECOMPILED)) {
	    /* ... and not precompiled ... */
	    if (objc == procPtr->numArgs + 1) {
		/* ... and correct number of arguments; we will still be
		 * compiling empty bodies that have default values or args
		 * for simplicity sake - to avoid having to go through the
		 * linked list of compiled locals to determine the nature of
		 * the last formal argument(s). */
		return TCL_OK;
	    }
	}
    }

    result = TclPushProcCallFrame(procPtr, interp, objc, objv,
	    /*isLambda*/ 0);

    if (result != TCL_OK) {
	return TCL_ERROR;
    }
    
    return TclNRInterpProcCore(interp, objv[0], 1, &MakeProcError);
}

/*
 *----------------------------------------------------------------------
 *
 * TclNRInterpProcCore --