tclCompCmds.c File Reference

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

Go to the source code of this file.

Defines

#define CompileWord(envPtr, tokenPtr, interp, word)
#define DefineLineInformation
#define CompileBody(envPtr, tokenPtr, interp)
#define CompileTokens(envPtr, tokenPtr, interp)
#define PushLiteral(envPtr, string, length)   TclEmitPush(TclRegisterNewLiteral((envPtr), (string), (length)), (envPtr))
#define TokenAfter(tokenPtr)   ((tokenPtr) + ((tokenPtr)->numComponents + 1))
#define CurrentOffset(envPtr)   ((envPtr)->codeNext - (envPtr)->codeStart)
#define DeclareExceptionRange(envPtr, type)   (TclCreateExceptRange((type), (envPtr)))
#define ExceptionRangeStarts(envPtr, index)
#define ExceptionRangeEnds(envPtr, index)
#define ExceptionRangeTarget(envPtr, index, targetType)   ((envPtr)->exceptArrayPtr[(index)].targetType = CurrentOffset(envPtr))
#define TCL_CREATE_VAR   1
#define TCL_NO_LARGE_INDEX   2

Functions

int TclCompileAppendCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileBreakCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileCatchCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileContinueCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileDictSetCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileDictIncrCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileDictGetCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileDictForCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileDictUpdateCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileDictAppendCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileDictLappendCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileExprCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileForCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileForeachCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileIfCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileIncrCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileLappendCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileLassignCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileLindexCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileListCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileLlengthCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileLsetCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileRegexpCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileReturnCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
void TclCompileSyntaxError (Tcl_Interp *interp, CompileEnv *envPtr)
int TclCompileSetCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileStringCmpCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileStringEqualCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileStringIndexCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileStringMatchCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileStringLenCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileSwitchCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileWhileCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileInvertOpCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileNotOpCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileAddOpCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileMulOpCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileAndOpCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileOrOpCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileXorOpCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompilePowOpCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileLshiftOpCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileRshiftOpCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileModOpCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileNeqOpCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileStrneqOpCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileInOpCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileNiOpCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileLessOpCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileLeqOpCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileGreaterOpCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileGeqOpCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileEqOpCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileStreqOpCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileMinusOpCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileDivOpCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileUpvarCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileNamespaceCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileGlobalCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileVariableCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileEnsemble (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)
int TclCompileInfoExistsCmd (Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, CompileEnv *envPtr)

Variables

AuxDataType tclForeachInfoType
AuxDataType tclJumptableInfoType
AuxDataType tclDictUpdateInfoType


Define Documentation

#define CompileBody ( envPtr,
tokenPtr,
interp   ) 

Value:

TclCompileCmdWord((interp), (tokenPtr)+1, (tokenPtr)->numComponents, \
            (envPtr))

Definition at line 60 of file tclCompCmds.c.

Referenced by TclCompileCatchCmd(), TclCompileDictForCmd(), TclCompileDictUpdateCmd(), TclCompileForCmd(), TclCompileForeachCmd(), and TclCompileWhileCmd().

#define CompileTokens ( envPtr,
tokenPtr,
interp   ) 

Value:

TclCompileTokens((interp), (tokenPtr)+1, (tokenPtr)->numComponents, \
            (envPtr));

Definition at line 72 of file tclCompCmds.c.

Referenced by TclCompileCatchCmd(), TclCompileForeachCmd(), TclCompileIncrCmd(), TclCompileStringLenCmd(), and TclCompileStringMatchCmd().

#define CurrentOffset ( envPtr   )     ((envPtr)->codeNext - (envPtr)->codeStart)

#define DeclareExceptionRange ( envPtr,
type   )     (TclCreateExceptRange((type), (envPtr)))

#define ExceptionRangeEnds ( envPtr,
index   ) 

Value:

(((envPtr)->exceptDepth--), \
    ((envPtr)->exceptArrayPtr[(index)].numCodeBytes = \
        CurrentOffset(envPtr) - (envPtr)->exceptArrayPtr[(index)].codeOffset))

Definition at line 126 of file tclCompCmds.c.

Referenced by TclCompileCatchCmd(), TclCompileDictForCmd(), TclCompileDictUpdateCmd(), TclCompileForCmd(), TclCompileForeachCmd(), and TclCompileWhileCmd().

#define ExceptionRangeStarts ( envPtr,
index   ) 

Value:

(((envPtr)->exceptDepth++), \
    ((envPtr)->maxExceptDepth = \
            TclMax((envPtr)->exceptDepth, (envPtr)->maxExceptDepth)), \
    ((envPtr)->exceptArrayPtr[(index)].codeOffset = CurrentOffset(envPtr)))

Definition at line 121 of file tclCompCmds.c.

Referenced by TclCompileCatchCmd(), TclCompileDictForCmd(), TclCompileDictUpdateCmd(), TclCompileForCmd(), TclCompileForeachCmd(), and TclCompileWhileCmd().

#define ExceptionRangeTarget ( envPtr,
index,
targetType   )     ((envPtr)->exceptArrayPtr[(index)].targetType = CurrentOffset(envPtr))

#define TCL_NO_LARGE_INDEX   2

Definition at line 177 of file tclCompCmds.c.

Referenced by TclCompileIncrCmd().


Function Documentation

int TclCompileAddOpCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

Definition at line 5346 of file tclCompCmds.c.

References INST_ADD.

int TclCompileAndOpCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

Definition at line 5370 of file tclCompCmds.c.

References INST_BITAND.

int TclCompileBreakCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

Definition at line 325 of file tclCompCmds.c.

References INST_BREAK, Tcl_Parse::numWords, TCL_ERROR, TCL_OK, and TclEmitOpcode.

int TclCompileContinueCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

Definition at line 564 of file tclCompCmds.c.

References INST_CONTINUE, Tcl_Parse::numWords, TCL_ERROR, TCL_OK, and TclEmitOpcode.

int TclCompileDictGetCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

int TclCompileDivOpCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

int TclCompileEqOpCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

Definition at line 5558 of file tclCompCmds.c.

References INST_EQ.

int TclCompileExprCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

int TclCompileGeqOpCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

Definition at line 5547 of file tclCompCmds.c.

References INST_GE.

int TclCompileGlobalCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

int TclCompileGreaterOpCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

Definition at line 5536 of file tclCompCmds.c.

References INST_GT.

int TclCompileIfCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

int TclCompileInOpCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

Definition at line 5491 of file tclCompCmds.c.

References INST_LIST_IN.

int TclCompileInvertOpCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

Definition at line 5324 of file tclCompCmds.c.

References INST_BITNOT.

int TclCompileLeqOpCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

Definition at line 5525 of file tclCompCmds.c.

References INST_LE.

int TclCompileLessOpCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

Definition at line 5514 of file tclCompCmds.c.

References INST_LT.

int TclCompileListCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

int TclCompileLlengthCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

int TclCompileLshiftOpCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

Definition at line 5436 of file tclCompCmds.c.

References INST_LSHIFT.

int TclCompileMinusOpCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

int TclCompileModOpCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

Definition at line 5458 of file tclCompCmds.c.

References INST_MOD.

int TclCompileMulOpCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

Definition at line 5358 of file tclCompCmds.c.

References INST_MULT.

int TclCompileNeqOpCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

Definition at line 5469 of file tclCompCmds.c.

References INST_NEQ.

int TclCompileNiOpCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

Definition at line 5502 of file tclCompCmds.c.

References INST_LIST_NOT_IN.

int TclCompileNotOpCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

Definition at line 5335 of file tclCompCmds.c.

References INST_LNOT.

int TclCompileOrOpCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

Definition at line 5382 of file tclCompCmds.c.

References INST_BITOR.

int TclCompilePowOpCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

int TclCompileRegexpCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

int TclCompileRshiftOpCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

Definition at line 5447 of file tclCompCmds.c.

References INST_RSHIFT.

int TclCompileStreqOpCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

Definition at line 5569 of file tclCompCmds.c.

References INST_STR_EQ.

int TclCompileStringCmpCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

int TclCompileStringEqualCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

int TclCompileStringIndexCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

int TclCompileStrneqOpCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

Definition at line 5480 of file tclCompCmds.c.

References INST_STR_NEQ.

void TclCompileSyntaxError ( Tcl_Interp interp,
CompileEnv envPtr 
)

int TclCompileXorOpCmd ( Tcl_Interp interp,
Tcl_Parse parsePtr,
Command cmdPtr,
CompileEnv envPtr 
)

Definition at line 5394 of file tclCompCmds.c.

References INST_BITXOR.


Variable Documentation

Initial value:

 {
    "DictUpdateInfo",           
    DupDictUpdateInfo,          
    FreeDictUpdateInfo,         
    PrintDictUpdateInfo         
}

Definition at line 197 of file tclCompCmds.c.

Referenced by TclCompileDictUpdateCmd().

Initial value:

 {
    "ForeachInfo",              
    DupForeachInfo,             
    FreeForeachInfo,            
    PrintForeachInfo            
}

Definition at line 183 of file tclCompCmds.c.

Referenced by TclCompileForeachCmd(), and TclInitAuxDataTypeTable().

Initial value:

 {
    "JumptableInfo",            
    DupJumptableInfo,           
    FreeJumptableInfo,          
    PrintJumptableInfo          
}

Definition at line 190 of file tclCompCmds.c.

Referenced by TclInitAuxDataTypeTable().



Generated on Wed Mar 12 12:18:28 2008 by  doxygen 1.5.1