Diff
Not logged in

Differences From Artifact [bb308da4bf]:

To Artifact [b45eb57432]:


11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 * See the file "license.terms" for information on usage and redistribution of
 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
 */

#include "tclInt.h"
#define ALLOW_DEPRECATED_OPCODES
#include "tclCompile.h"
#include <assert.h>

/*
 * Variable that controls whether compilation tracing is enabled and, if so,
 * what level of tracing is desired:
 *    0: no compilation tracing
 *    1: summarize compilation of top level cmds and proc bodies
 *    2: display all instructions of each ByteCode compiled







<







11
12
13
14
15
16
17

18
19
20
21
22
23
24
 * See the file "license.terms" for information on usage and redistribution of
 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
 */

#include "tclInt.h"
#define ALLOW_DEPRECATED_OPCODES
#include "tclCompile.h"


/*
 * Variable that controls whether compilation tracing is enabled and, if so,
 * what level of tracing is desired:
 *    0: no compilation tracing
 *    1: summarize compilation of top level cmds and proc bodies
 *    2: display all instructions of each ByteCode compiled
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
    ExtCmdLoc *eclPtr = envPtr->extCmdMapPtr;
    Tcl_Obj *cmdObj;
    Command *cmdPtr = NULL;
    int code = TCL_ERROR, expand = -1;
    int cmdKnown;
    int *wlines;
    Tcl_Size wlineat, numWords = parsePtr->numWords;
    Tcl_Size cmdLine = envPtr->line;
    Tcl_Size *clNext = envPtr->clNext;
    Tcl_Size cmdIdx = envPtr->numCommands;
    Tcl_Size startCodeOffset = CurrentOffset(envPtr);
    Tcl_Size depth = TclGetStackDepth(envPtr);

    assert (numWords > 0);








|







2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
    ExtCmdLoc *eclPtr = envPtr->extCmdMapPtr;
    Tcl_Obj *cmdObj;
    Command *cmdPtr = NULL;
    int code = TCL_ERROR, expand = -1;
    int cmdKnown;
    int *wlines;
    Tcl_Size wlineat, numWords = parsePtr->numWords;
    int cmdLine = envPtr->line;
    Tcl_Size *clNext = envPtr->clNext;
    Tcl_Size cmdIdx = envPtr->numCommands;
    Tcl_Size startCodeOffset = CurrentOffset(envPtr);
    Tcl_Size depth = TclGetStackDepth(envPtr);

    assert (numWords > 0);

4817
4818
4819
4820
4821
4822
4823
4824

4825
4826
4827
4828
4829
4830
4831
 *----------------------------------------------------------------------
 */
int
TclIsEmptyToken(
    const Tcl_Token *tokenPtr)
{
    const char *ptr, *end;
    int ucs4, chLen = 0;


    end = tokenPtr[1].start + tokenPtr[1].size;
    for (ptr = tokenPtr[1].start; ptr < end; ptr += chLen) {
	chLen = TclUtfToUniChar(ptr, &ucs4);
	// Can't use Tcl_UniCharIsSpace; see test dict-22.24
	if (!TclIsSpaceProcM((unsigned) ucs4)) {
	    return 0;







|
>







4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
 *----------------------------------------------------------------------
 */
int
TclIsEmptyToken(
    const Tcl_Token *tokenPtr)
{
    const char *ptr, *end;
    int ucs4;
    Tcl_Size chLen = 0;

    end = tokenPtr[1].start + tokenPtr[1].size;
    for (ptr = tokenPtr[1].start; ptr < end; ptr += chLen) {
	chLen = TclUtfToUniChar(ptr, &ucs4);
	// Can't use Tcl_UniCharIsSpace; see test dict-22.24
	if (!TclIsSpaceProcM((unsigned) ucs4)) {
	    return 0;