Diff
Not logged in

Differences From Artifact [d1b0f9b42b]:

To Artifact [6a0546bfff]:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * tclCompExpr.c --
 *
 *	This file contains the code to parse and compile Tcl expressions
 *	and implementations of the Tcl commands corresponding to expression
 *	operators, such as the command ::tcl::mathop::+ .
 *
 * Contributions from Don Porter, NIST, 2006-2007. (not subject to US copyright)
 *
 * See the file "license.terms" for information on usage and redistribution of
 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tclCompExpr.c,v 1.83 2007/08/27 19:56:51 dgp Exp $
 */

#include "tclInt.h"
#include "tclCompile.h"		/* CompileEnv */

/*
 * Expression parsing takes place in the routine ParseExpr().  It takes a












|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * tclCompExpr.c --
 *
 *	This file contains the code to parse and compile Tcl expressions
 *	and implementations of the Tcl commands corresponding to expression
 *	operators, such as the command ::tcl::mathop::+ .
 *
 * Contributions from Don Porter, NIST, 2006-2007. (not subject to US copyright)
 *
 * See the file "license.terms" for information on usage and redistribution of
 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tclCompExpr.c,v 1.84 2007/08/27 23:30:28 das Exp $
 */

#include "tclInt.h"
#include "tclCompile.h"		/* CompileEnv */

/*
 * Expression parsing takes place in the routine ParseExpr().  It takes a
774
775
776
777
778
779
780
781

782
783
784
785
786
787
788
			/*
			 * What we would like to do is this:
			 *
			 * lePtr->objPtr = literal;
			 * Tcl_IncrRefCount(literal);
			 * Tcl_DecrRefCount(objPtr);
			 *
			 * However, the design of the "global" and "local"				 * LiteralTable does not permit the value of

			 * lePtr->objPtr to be changed.  So rather than
			 * replace lePtr->objPtr, we do surgery to transfer
			 * the intrep of literal into it.  Ugly stuff here
			 * that's generally unsafe, but ok here since we know
			 * the Tcl_ObjTypes literal might possibly have.
			 */
			Tcl_Obj *toFree = literal;







|
>







774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
			/*
			 * What we would like to do is this:
			 *
			 * lePtr->objPtr = literal;
			 * Tcl_IncrRefCount(literal);
			 * Tcl_DecrRefCount(objPtr);
			 *
			 * However, the design of the "global" and "local"
			 * LiteralTable does not permit the value of
			 * lePtr->objPtr to be changed.  So rather than
			 * replace lePtr->objPtr, we do surgery to transfer
			 * the intrep of literal into it.  Ugly stuff here
			 * that's generally unsafe, but ok here since we know
			 * the Tcl_ObjTypes literal might possibly have.
			 */
			Tcl_Obj *toFree = literal;