Diff
Not logged in

Differences From Artifact [ad924c763b]:

To Artifact [4f0b9cd64f]:


1
2
3
4
5
6
7
8
9
10
11
12
13
14

15
16
17
18
19
20
21
1
2
3
4
5
6
7
8
9
10
11
12
13

14
15
16
17
18
19
20
21













-
+







/*
 * tclProc.c --
 *
 *	This file contains routines that implement Tcl procedures, including
 *	the "proc" and "uplevel" commands.
 *
 * Copyright (c) 1987-1993 The Regents of the University of California.
 * Copyright (c) 1994-1998 Sun Microsystems, Inc.
 * Copyright (c) 2004-2006 Miguel Sofer
 *
 * See the file "license.terms" for information on usage and redistribution of
 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tclProc.c,v 1.108 2006/11/28 22:20:29 andreas_kupries Exp $
 * RCS: @(#) $Id: tclProc.c,v 1.109 2007/03/29 19:22:07 msofer Exp $
 */

#include "tclInt.h"
#include "tclCompile.h"

/*
 * Prototypes for static functions in this file
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2379
2380
2381
2382
2383
2384
2385

2386
2387
2388
2389
2390
2391
2392







-







     * Using cmd.clientData to remember the 'lambdaPtr' for 'info frame'.  The
     * InfoFrameCmd will detect this case by testing cmd.hPtr for NULL. This
     * condition holds here because of the 'memset' above, and nowhere
     * else. Regular commands always have a valid 'hPtr', and lambda's never.
     */

    cmd.clientData = (ClientData) lambdaPtr;
    Tcl_IncrRefCount (lambdaPtr);
 
    /*
     * Find the namespace where this lambda should run, and push a call frame
     * for that namespace. Note that TclObjInterpProc() will pop it.
     */

    nsObjPtr = lambdaPtr->internalRep.twoPtrValue.ptr2;
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2419
2420
2421
2422
2423
2424
2425



2426
2427
2428
2429
2430
2431
2432







-
-
-








    if (isRootEnsemble) {
	iPtr->ensembleRewrite.sourceObjs = NULL;
	iPtr->ensembleRewrite.numRemovedObjs = 0;
	iPtr->ensembleRewrite.numInsertedObjs = 0;
    }

    /* TIP #280 Undo the reference held inside of 'cmd, see HACK above. */
    Tcl_DecrRefCount (lambdaPtr);

    return result;    
}

/*
 *----------------------------------------------------------------------
 *
 * MakeLambdaError --