tclCompile.h File Reference

#include "tclInt.h"

Go to the source code of this file.

Data Structures

struct  ExceptionRange
struct  CmdLocation
struct  ECL
struct  ExtCmdLoc
struct  AuxDataType
struct  AuxData
struct  CompileEnv
struct  ByteCode
struct  InstructionDesc
struct  JumpFixup
struct  JumpFixupArray
struct  ForeachVarList
struct  ForeachInfo
struct  JumptableInfo
struct  DictUpdateInfo
struct  TclOpCmdClientData

Defines

#define _TCLCOMPILATION   1
#define COMPILEENV_INIT_CODE_BYTES   250
#define COMPILEENV_INIT_NUM_OBJECTS   60
#define COMPILEENV_INIT_EXCEPT_RANGES   5
#define COMPILEENV_INIT_CMD_MAP_SIZE   40
#define COMPILEENV_INIT_AUX_DATA_SIZE   5
#define TCL_BYTECODE_PRECOMPILED   0x0001
#define TCL_BYTECODE_RESOLVE_VARS   0x0002
#define INST_DONE   0
#define INST_PUSH1   1
#define INST_PUSH4   2
#define INST_POP   3
#define INST_DUP   4
#define INST_CONCAT1   5
#define INST_INVOKE_STK1   6
#define INST_INVOKE_STK4   7
#define INST_EVAL_STK   8
#define INST_EXPR_STK   9
#define INST_LOAD_SCALAR1   10
#define INST_LOAD_SCALAR4   11
#define INST_LOAD_SCALAR_STK   12
#define INST_LOAD_ARRAY1   13
#define INST_LOAD_ARRAY4   14
#define INST_LOAD_ARRAY_STK   15
#define INST_LOAD_STK   16
#define INST_STORE_SCALAR1   17
#define INST_STORE_SCALAR4   18
#define INST_STORE_SCALAR_STK   19
#define INST_STORE_ARRAY1   20
#define INST_STORE_ARRAY4   21
#define INST_STORE_ARRAY_STK   22
#define INST_STORE_STK   23
#define INST_INCR_SCALAR1   24
#define INST_INCR_SCALAR_STK   25
#define INST_INCR_ARRAY1   26
#define INST_INCR_ARRAY_STK   27
#define INST_INCR_STK   28
#define INST_INCR_SCALAR1_IMM   29
#define INST_INCR_SCALAR_STK_IMM   30
#define INST_INCR_ARRAY1_IMM   31
#define INST_INCR_ARRAY_STK_IMM   32
#define INST_INCR_STK_IMM   33
#define INST_JUMP1   34
#define INST_JUMP4   35
#define INST_JUMP_TRUE1   36
#define INST_JUMP_TRUE4   37
#define INST_JUMP_FALSE1   38
#define INST_JUMP_FALSE4   39
#define INST_LOR   40
#define INST_LAND   41
#define INST_BITOR   42
#define INST_BITXOR   43
#define INST_BITAND   44
#define INST_EQ   45
#define INST_NEQ   46
#define INST_LT   47
#define INST_GT   48
#define INST_LE   49
#define INST_GE   50
#define INST_LSHIFT   51
#define INST_RSHIFT   52
#define INST_ADD   53
#define INST_SUB   54
#define INST_MULT   55
#define INST_DIV   56
#define INST_MOD   57
#define INST_UPLUS   58
#define INST_UMINUS   59
#define INST_BITNOT   60
#define INST_LNOT   61
#define INST_CALL_BUILTIN_FUNC1   62
#define INST_CALL_FUNC1   63
#define INST_TRY_CVT_TO_NUMERIC   64
#define INST_BREAK   65
#define INST_CONTINUE   66
#define INST_FOREACH_START4   67
#define INST_FOREACH_STEP4   68
#define INST_BEGIN_CATCH4   69
#define INST_END_CATCH   70
#define INST_PUSH_RESULT   71
#define INST_PUSH_RETURN_CODE   72
#define INST_STR_EQ   73
#define INST_STR_NEQ   74
#define INST_STR_CMP   75
#define INST_STR_LEN   76
#define INST_STR_INDEX   77
#define INST_STR_MATCH   78
#define INST_LIST   79
#define INST_LIST_INDEX   80
#define INST_LIST_LENGTH   81
#define INST_APPEND_SCALAR1   82
#define INST_APPEND_SCALAR4   83
#define INST_APPEND_ARRAY1   84
#define INST_APPEND_ARRAY4   85
#define INST_APPEND_ARRAY_STK   86
#define INST_APPEND_STK   87
#define INST_LAPPEND_SCALAR1   88
#define INST_LAPPEND_SCALAR4   89
#define INST_LAPPEND_ARRAY1   90
#define INST_LAPPEND_ARRAY4   91
#define INST_LAPPEND_ARRAY_STK   92
#define INST_LAPPEND_STK   93
#define INST_LIST_INDEX_MULTI   94
#define INST_OVER   95
#define INST_LSET_LIST   96
#define INST_LSET_FLAT   97
#define INST_RETURN_IMM   98
#define INST_EXPON   99
#define INST_EXPAND_START   100
#define INST_EXPAND_STKTOP   101
#define INST_INVOKE_EXPANDED   102
#define INST_LIST_INDEX_IMM   103
#define INST_LIST_RANGE_IMM   104
#define INST_START_CMD   105
#define INST_LIST_IN   106
#define INST_LIST_NOT_IN   107
#define INST_PUSH_RETURN_OPTIONS   108
#define INST_RETURN_STK   109
#define INST_DICT_GET   110
#define INST_DICT_SET   111
#define INST_DICT_UNSET   112
#define INST_DICT_INCR_IMM   113
#define INST_DICT_APPEND   114
#define INST_DICT_LAPPEND   115
#define INST_DICT_FIRST   116
#define INST_DICT_NEXT   117
#define INST_DICT_DONE   118
#define INST_DICT_UPDATE_START   119
#define INST_DICT_UPDATE_END   120
#define INST_JUMP_TABLE   121
#define INST_UPVAR   122
#define INST_NSUPVAR   123
#define INST_VARIABLE   124
#define INST_SYNTAX   125
#define INST_REVERSE   126
#define INST_REGEXP   127
#define INST_EXIST_SCALAR   128
#define INST_EXIST_ARRAY   129
#define INST_EXIST_ARRAY_STK   130
#define INST_EXIST_STK   131
#define LAST_INST_OPCODE   131
#define MAX_INSTRUCTION_OPERANDS   2
#define JUMPFIXUP_INIT_ENTRIES   10
#define LITERAL_ON_HEAP   0x01
#define LITERAL_NS_SCOPE   0x02
#define TclRegisterNewLiteral(envPtr, bytes, length)   TclRegisterLiteral(envPtr, (char *)(bytes), length, /*flags*/ 0)
#define TclRegisterNewNSLiteral(envPtr, bytes, length)
#define TclAdjustStackDepth(delta, envPtr)
#define TclUpdateStackReqs(op, i, envPtr)
#define TclEmitOpcode(op, envPtr)
#define TclEmitInt1(i, envPtr)
#define TclEmitInt4(i, envPtr)
#define TclEmitInstInt1(op, i, envPtr)
#define TclEmitInstInt4(op, i, envPtr)
#define TclEmitPush(objIndex, envPtr)
#define TclStoreInt1AtPtr(i, p)   *(p) = (unsigned char) ((unsigned int) (i))
#define TclStoreInt4AtPtr(i, p)
#define TclUpdateInstInt1AtPc(op, i, pc)
#define TclUpdateInstInt4AtPc(op, i, pc)
#define TclFixupForwardJumpToHere(envPtr, fixupPtr, threshold)
#define TclGetInt1AtPtr(p)   ((int) *((char *) p))
#define TclGetInt4AtPtr(p)
#define TclGetUInt1AtPtr(p)   ((unsigned int) *(p))
#define TclGetUInt4AtPtr(p)
#define TclMin(i, j)   ((((int) i) < ((int) j))? (i) : (j))
#define TclMax(i, j)   ((((int) i) > ((int) j))? (i) : (j))
#define TCL_DTRACE_PROC_ENTRY_ENABLED()   0
#define TCL_DTRACE_PROC_RETURN_ENABLED()   0
#define TCL_DTRACE_PROC_RESULT_ENABLED()   0
#define TCL_DTRACE_PROC_ARGS_ENABLED()   0
#define TCL_DTRACE_PROC_INFO_ENABLED()   0
#define TCL_DTRACE_PROC_ENTRY(a0, a1, a2)   {}
#define TCL_DTRACE_PROC_RETURN(a0, a1)   {}
#define TCL_DTRACE_PROC_RESULT(a0, a1, a2, a3)   {}
#define TCL_DTRACE_PROC_ARGS(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)   {}
#define TCL_DTRACE_PROC_INFO(a0, a1, a2, a3, a4, a5)   {}
#define TCL_DTRACE_CMD_ENTRY_ENABLED()   0
#define TCL_DTRACE_CMD_RETURN_ENABLED()   0
#define TCL_DTRACE_CMD_RESULT_ENABLED()   0
#define TCL_DTRACE_CMD_ARGS_ENABLED()   0
#define TCL_DTRACE_CMD_INFO_ENABLED()   0
#define TCL_DTRACE_CMD_ENTRY(a0, a1, a2)   {}
#define TCL_DTRACE_CMD_RETURN(a0, a1)   {}
#define TCL_DTRACE_CMD_RESULT(a0, a1, a2, a3)   {}
#define TCL_DTRACE_CMD_ARGS(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)   {}
#define TCL_DTRACE_CMD_INFO(a0, a1, a2, a3, a4, a5)   {}
#define TCL_DTRACE_INST_START_ENABLED()   0
#define TCL_DTRACE_INST_DONE_ENABLED()   0
#define TCL_DTRACE_INST_START(a0, a1, a2)   {}
#define TCL_DTRACE_INST_DONE(a0, a1, a2)   {}
#define TCL_DTRACE_TCL_PROBE_ENABLED()   0
#define TCL_DTRACE_TCL_PROBE(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)   {}
#define TclDTraceInfo(info, args, argsi)   {*args = ""; *argsi = 0;}

Typedefs

typedef ClientData( AuxDataDupProc )(ClientData clientData)
typedef void( AuxDataFreeProc )(ClientData clientData)
typedef void( AuxDataPrintProc )(ClientData clientData, Tcl_Obj *appendObj, struct ByteCode *codePtr, unsigned int pcOffset)

Enumerations

enum  ExceptionRangeType { LOOP_EXCEPTION_RANGE, CATCH_EXCEPTION_RANGE }
enum  InstOperandType {
  OPERAND_NONE, OPERAND_INT1, OPERAND_INT4, OPERAND_UINT1,
  OPERAND_UINT4, OPERAND_IDX4, OPERAND_LVT1, OPERAND_LVT4,
  OPERAND_AUX4
}
enum  TclJumpType { TCL_UNCONDITIONAL_JUMP, TCL_TRUE_JUMP, TCL_FALSE_JUMP }

Functions

MODULE_SCOPE int TclEvalObjvInternal (Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], CONST char *command, int length, int flags)
MODULE_SCOPE int TclCompEvalObj (Tcl_Interp *interp, Tcl_Obj *objPtr, const CmdFrame *invoker, int word)
MODULE_SCOPE void TclCleanupByteCode (ByteCode *codePtr)
MODULE_SCOPE void TclCompileCmdWord (Tcl_Interp *interp, Tcl_Token *tokenPtr, int count, CompileEnv *envPtr)
MODULE_SCOPE void TclCompileExpr (Tcl_Interp *interp, CONST char *script, int numBytes, CompileEnv *envPtr, int optimize)
MODULE_SCOPE void TclCompileExprWords (Tcl_Interp *interp, Tcl_Token *tokenPtr, int numWords, CompileEnv *envPtr)
MODULE_SCOPE void TclCompileScript (Tcl_Interp *interp, CONST char *script, int numBytes, CompileEnv *envPtr)
MODULE_SCOPE void TclCompileSyntaxError (Tcl_Interp *interp, CompileEnv *envPtr)
MODULE_SCOPE void TclCompileTokens (Tcl_Interp *interp, Tcl_Token *tokenPtr, int count, CompileEnv *envPtr)
MODULE_SCOPE int TclCreateAuxData (ClientData clientData, AuxDataType *typePtr, CompileEnv *envPtr)
MODULE_SCOPE int TclCreateExceptRange (ExceptionRangeType type, CompileEnv *envPtr)
MODULE_SCOPE ExecEnvTclCreateExecEnv (Tcl_Interp *interp)
MODULE_SCOPE Tcl_ObjTclCreateLiteral (Interp *iPtr, char *bytes, int length, unsigned int hash, int *newPtr, Namespace *nsPtr, int flags, LiteralEntry **globalPtrPtr)
MODULE_SCOPE void TclDeleteExecEnv (ExecEnv *eePtr)
MODULE_SCOPE void TclDeleteLiteralTable (Tcl_Interp *interp, LiteralTable *tablePtr)
MODULE_SCOPE void TclEmitForwardJump (CompileEnv *envPtr, TclJumpType jumpType, JumpFixup *jumpFixupPtr)
MODULE_SCOPE ExceptionRangeTclGetExceptionRangeForPc (unsigned char *pc, int catchOnly, ByteCode *codePtr)
MODULE_SCOPE void TclExpandJumpFixupArray (JumpFixupArray *fixupArrayPtr)
MODULE_SCOPE int TclExecuteByteCode (Tcl_Interp *interp, ByteCode *codePtr)
MODULE_SCOPE void TclFinalizeAuxDataTypeTable (void)
MODULE_SCOPE int TclFindCompiledLocal (CONST char *name, int nameChars, int create, Proc *procPtr)
MODULE_SCOPE LiteralEntryTclLookupLiteralEntry (Tcl_Interp *interp, Tcl_Obj *objPtr)
MODULE_SCOPE int TclFixupForwardJump (CompileEnv *envPtr, JumpFixup *jumpFixupPtr, int jumpDist, int distThreshold)
MODULE_SCOPE void TclFreeCompileEnv (CompileEnv *envPtr)
MODULE_SCOPE void TclFreeJumpFixupArray (JumpFixupArray *fixupArrayPtr)
MODULE_SCOPE void TclInitAuxDataTypeTable (void)
MODULE_SCOPE void TclInitByteCodeObj (Tcl_Obj *objPtr, CompileEnv *envPtr)
MODULE_SCOPE void TclInitCompilation (void)
MODULE_SCOPE void TclInitCompileEnv (Tcl_Interp *interp, CompileEnv *envPtr, const char *string, int numBytes, CONST CmdFrame *invoker, int word)
MODULE_SCOPE void TclInitJumpFixupArray (JumpFixupArray *fixupArrayPtr)
MODULE_SCOPE void TclInitLiteralTable (LiteralTable *tablePtr)
MODULE_SCOPE int TclPrintInstruction (ByteCode *codePtr, unsigned char *pc)
MODULE_SCOPE void TclPrintObject (FILE *outFile, Tcl_Obj *objPtr, int maxChars)
MODULE_SCOPE void TclPrintSource (FILE *outFile, CONST char *string, int maxChars)
MODULE_SCOPE void TclRegisterAuxDataType (AuxDataType *typePtr)
MODULE_SCOPE int TclRegisterLiteral (CompileEnv *envPtr, char *bytes, int length, int flags)
MODULE_SCOPE void TclReleaseLiteral (Tcl_Interp *interp, Tcl_Obj *objPtr)
MODULE_SCOPE int TclSingleOpCmd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
MODULE_SCOPE int TclSortingOpCmd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
MODULE_SCOPE int TclVariadicOpCmd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
MODULE_SCOPE int TclNoIdentOpCmd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
MODULE_SCOPE int TclWordKnownAtCompileTime (Tcl_Token *tokenPtr, Tcl_Obj *valuePtr)

Variables

MODULE_SCOPE InstructionDesc tclInstructionTable []
MODULE_SCOPE AuxDataType tclForeachInfoType
MODULE_SCOPE AuxDataType tclJumptableInfoType
MODULE_SCOPE AuxDataType tclDictUpdateInfoType


Define Documentation

#define _TCLCOMPILATION   1

Definition at line 16 of file tclCompile.h.

#define COMPILEENV_INIT_AUX_DATA_SIZE   5

Definition at line 213 of file tclCompile.h.

Referenced by TclInitCompileEnv().

#define COMPILEENV_INIT_CMD_MAP_SIZE   40

Definition at line 212 of file tclCompile.h.

Referenced by TclInitCompileEnv().

#define COMPILEENV_INIT_CODE_BYTES   250

Definition at line 209 of file tclCompile.h.

Referenced by TclInitCompileEnv().

#define COMPILEENV_INIT_EXCEPT_RANGES   5

Definition at line 211 of file tclCompile.h.

Referenced by TclInitCompileEnv().

#define COMPILEENV_INIT_NUM_OBJECTS   60

Definition at line 210 of file tclCompile.h.

Referenced by TclInitCompileEnv().

#define INST_ADD   53

Definition at line 500 of file tclCompile.h.

Referenced by TclCompileAddOpCmd(), and TclExecuteByteCode().

#define INST_APPEND_ARRAY1   84

Definition at line 543 of file tclCompile.h.

Referenced by TclCompileAppendCmd(), and TclExecuteByteCode().

#define INST_APPEND_ARRAY4   85

Definition at line 544 of file tclCompile.h.

Referenced by TclCompileAppendCmd(), and TclExecuteByteCode().

#define INST_APPEND_ARRAY_STK   86

Definition at line 545 of file tclCompile.h.

Referenced by TclCompileAppendCmd(), and TclExecuteByteCode().

#define INST_APPEND_SCALAR1   82

Definition at line 541 of file tclCompile.h.

Referenced by TclCompileAppendCmd(), and TclExecuteByteCode().

#define INST_APPEND_SCALAR4   83

Definition at line 542 of file tclCompile.h.

Referenced by TclCompileAppendCmd(), and TclExecuteByteCode().

#define INST_APPEND_STK   87

Definition at line 546 of file tclCompile.h.

Referenced by TclCompileAppendCmd(), and TclExecuteByteCode().

#define INST_BEGIN_CATCH4   69

#define INST_BITAND   44

Definition at line 491 of file tclCompile.h.

Referenced by TclCompileAndOpCmd(), and TclExecuteByteCode().

#define INST_BITNOT   60

Definition at line 507 of file tclCompile.h.

Referenced by TclCompileInvertOpCmd(), and TclExecuteByteCode().

#define INST_BITOR   42

Definition at line 489 of file tclCompile.h.

Referenced by TclCompileOrOpCmd(), and TclExecuteByteCode().

#define INST_BITXOR   43

Definition at line 490 of file tclCompile.h.

Referenced by TclCompileXorOpCmd(), and TclExecuteByteCode().

#define INST_BREAK   65

Definition at line 514 of file tclCompile.h.

Referenced by TclCompileBreakCmd(), and TclExecuteByteCode().

#define INST_CALL_BUILTIN_FUNC1   62

Definition at line 509 of file tclCompile.h.

Referenced by TclExecuteByteCode().

#define INST_CALL_FUNC1   63

Definition at line 510 of file tclCompile.h.

Referenced by TclExecuteByteCode().

#define INST_CONCAT1   5

Definition at line 444 of file tclCompile.h.

Referenced by TclCompileDictAppendCmd(), TclCompileExprWords(), and TclExecuteByteCode().

#define INST_CONTINUE   66

Definition at line 515 of file tclCompile.h.

Referenced by TclCompileContinueCmd(), and TclExecuteByteCode().

#define INST_DICT_APPEND   114

Definition at line 607 of file tclCompile.h.

Referenced by TclCompileDictAppendCmd(), and TclExecuteByteCode().

#define INST_DICT_DONE   118

Definition at line 611 of file tclCompile.h.

Referenced by TclCompileDictForCmd(), and TclExecuteByteCode().

#define INST_DICT_FIRST   116

Definition at line 609 of file tclCompile.h.

Referenced by TclCompileDictForCmd(), and TclExecuteByteCode().

#define INST_DICT_GET   110

Definition at line 603 of file tclCompile.h.

Referenced by TclCompileDictGetCmd(), and TclExecuteByteCode().

#define INST_DICT_INCR_IMM   113

Definition at line 606 of file tclCompile.h.

Referenced by TclCompileDictIncrCmd(), and TclExecuteByteCode().

#define INST_DICT_LAPPEND   115

Definition at line 608 of file tclCompile.h.

Referenced by TclCompileDictLappendCmd(), and TclExecuteByteCode().

#define INST_DICT_NEXT   117

Definition at line 610 of file tclCompile.h.

Referenced by TclCompileDictForCmd(), and TclExecuteByteCode().

#define INST_DICT_SET   111

Definition at line 604 of file tclCompile.h.

Referenced by TclCompileDictSetCmd(), and TclExecuteByteCode().

#define INST_DICT_UNSET   112

Definition at line 605 of file tclCompile.h.

Referenced by TclExecuteByteCode().

#define INST_DICT_UPDATE_END   120

Definition at line 613 of file tclCompile.h.

Referenced by TclCompileDictUpdateCmd(), and TclExecuteByteCode().

#define INST_DICT_UPDATE_START   119

Definition at line 612 of file tclCompile.h.

Referenced by TclCompileDictUpdateCmd(), and TclExecuteByteCode().

#define INST_DIV   56

Definition at line 503 of file tclCompile.h.

Referenced by TclCompileDivOpCmd(), and TclExecuteByteCode().

#define INST_DONE   0

#define INST_DUP   4

Definition at line 443 of file tclCompile.h.

Referenced by TclCompileLassignCmd(), and TclExecuteByteCode().

#define INST_END_CATCH   70

#define INST_EQ   45

Definition at line 492 of file tclCompile.h.

Referenced by TclCompileEqOpCmd(), and TclExecuteByteCode().

#define INST_EVAL_STK   8

Definition at line 447 of file tclCompile.h.

Referenced by TclCompileCatchCmd(), TclCompileCmdWord(), and TclExecuteByteCode().

#define INST_EXIST_ARRAY   129

Definition at line 645 of file tclCompile.h.

Referenced by TclCompileInfoExistsCmd(), and TclExecuteByteCode().

#define INST_EXIST_ARRAY_STK   130

Definition at line 646 of file tclCompile.h.

Referenced by TclCompileInfoExistsCmd(), and TclExecuteByteCode().

#define INST_EXIST_SCALAR   128

Definition at line 644 of file tclCompile.h.

Referenced by TclCompileInfoExistsCmd(), and TclExecuteByteCode().

#define INST_EXIST_STK   131

Definition at line 647 of file tclCompile.h.

Referenced by TclCompileInfoExistsCmd(), and TclExecuteByteCode().

#define INST_EXPAND_START   100

Definition at line 579 of file tclCompile.h.

Referenced by TclCompileScript(), and TclExecuteByteCode().

#define INST_EXPAND_STKTOP   101

Definition at line 580 of file tclCompile.h.

Referenced by TclCompileScript(), and TclExecuteByteCode().

#define INST_EXPON   99

Definition at line 575 of file tclCompile.h.

Referenced by TclCompilePowOpCmd(), and TclExecuteByteCode().

#define INST_EXPR_STK   9

Definition at line 448 of file tclCompile.h.

Referenced by TclCompileExprWords(), and TclExecuteByteCode().

#define INST_FOREACH_START4   67

Definition at line 518 of file tclCompile.h.

Referenced by TclCompileForeachCmd(), and TclExecuteByteCode().

#define INST_FOREACH_STEP4   68

Definition at line 519 of file tclCompile.h.

Referenced by TclCompileForeachCmd(), and TclExecuteByteCode().

#define INST_GE   50

Definition at line 497 of file tclCompile.h.

Referenced by TclCompileGeqOpCmd(), and TclExecuteByteCode().

#define INST_GT   48

Definition at line 495 of file tclCompile.h.

Referenced by TclCompileGreaterOpCmd(), and TclExecuteByteCode().

#define INST_INCR_ARRAY1   26

Definition at line 469 of file tclCompile.h.

Referenced by TclCompileIncrCmd(), and TclExecuteByteCode().

#define INST_INCR_ARRAY1_IMM   31

Definition at line 474 of file tclCompile.h.

Referenced by TclCompileIncrCmd(), and TclExecuteByteCode().

#define INST_INCR_ARRAY_STK   27

Definition at line 470 of file tclCompile.h.

Referenced by TclCompileIncrCmd(), and TclExecuteByteCode().

#define INST_INCR_ARRAY_STK_IMM   32

Definition at line 475 of file tclCompile.h.

Referenced by TclCompileIncrCmd(), and TclExecuteByteCode().

#define INST_INCR_SCALAR1   24

Definition at line 467 of file tclCompile.h.

Referenced by TclCompileIncrCmd(), and TclExecuteByteCode().

#define INST_INCR_SCALAR1_IMM   29

Definition at line 472 of file tclCompile.h.

Referenced by TclCompileIncrCmd(), and TclExecuteByteCode().

#define INST_INCR_SCALAR_STK   25

Definition at line 468 of file tclCompile.h.

Referenced by TclCompileIncrCmd(), and TclExecuteByteCode().

#define INST_INCR_SCALAR_STK_IMM   30

Definition at line 473 of file tclCompile.h.

Referenced by TclCompileIncrCmd(), and TclExecuteByteCode().

#define INST_INCR_STK   28

Definition at line 471 of file tclCompile.h.

Referenced by TclCompileIncrCmd(), and TclExecuteByteCode().

#define INST_INCR_STK_IMM   33

Definition at line 476 of file tclCompile.h.

Referenced by TclCompileIncrCmd(), and TclExecuteByteCode().

#define INST_INVOKE_EXPANDED   102

Definition at line 581 of file tclCompile.h.

Referenced by TclCompileScript(), and TclExecuteByteCode().

#define INST_INVOKE_STK1   6

Definition at line 445 of file tclCompile.h.

Referenced by TclCompileScript(), and TclExecuteByteCode().

#define INST_INVOKE_STK4   7

Definition at line 446 of file tclCompile.h.

Referenced by TclCompileScript(), and TclExecuteByteCode().

#define INST_JUMP1   34

#define INST_JUMP4   35

#define INST_JUMP_FALSE1   38

Definition at line 483 of file tclCompile.h.

Referenced by TclEmitForwardJump(), TclExecuteByteCode(), and TclFixupForwardJump().

#define INST_JUMP_FALSE4   39

Definition at line 484 of file tclCompile.h.

Referenced by TclCompileDictForCmd(), TclExecuteByteCode(), and TclFixupForwardJump().

#define INST_JUMP_TABLE   121

Definition at line 620 of file tclCompile.h.

Referenced by TclExecuteByteCode().

#define INST_JUMP_TRUE1   36

#define INST_JUMP_TRUE4   37

#define INST_LAND   41

Definition at line 488 of file tclCompile.h.

Referenced by TclExecuteByteCode().

#define INST_LAPPEND_ARRAY1   90

Definition at line 551 of file tclCompile.h.

Referenced by TclCompileLappendCmd(), and TclExecuteByteCode().

#define INST_LAPPEND_ARRAY4   91

Definition at line 552 of file tclCompile.h.

Referenced by TclCompileLappendCmd(), and TclExecuteByteCode().

#define INST_LAPPEND_ARRAY_STK   92

Definition at line 553 of file tclCompile.h.

Referenced by TclCompileLappendCmd(), and TclExecuteByteCode().

#define INST_LAPPEND_SCALAR1   88

Definition at line 549 of file tclCompile.h.

Referenced by TclCompileLappendCmd(), and TclExecuteByteCode().

#define INST_LAPPEND_SCALAR4   89

Definition at line 550 of file tclCompile.h.

Referenced by TclCompileLappendCmd(), and TclExecuteByteCode().

#define INST_LAPPEND_STK   93

Definition at line 554 of file tclCompile.h.

Referenced by TclCompileLappendCmd(), and TclExecuteByteCode().

#define INST_LE   49

Definition at line 496 of file tclCompile.h.

Referenced by TclCompileLeqOpCmd(), and TclExecuteByteCode().

#define INST_LIST   79

Definition at line 536 of file tclCompile.h.

Referenced by TclCompileDictUpdateCmd(), TclCompileListCmd(), and TclExecuteByteCode().

#define INST_LIST_IN   106

Definition at line 593 of file tclCompile.h.

Referenced by TclCompileInOpCmd(), and TclExecuteByteCode().

#define INST_LIST_INDEX   80

Definition at line 537 of file tclCompile.h.

Referenced by TclCompileLindexCmd(), and TclExecuteByteCode().

#define INST_LIST_INDEX_IMM   103

Definition at line 588 of file tclCompile.h.

Referenced by TclCompileLassignCmd(), TclCompileLindexCmd(), and TclExecuteByteCode().

#define INST_LIST_INDEX_MULTI   94

Definition at line 558 of file tclCompile.h.

Referenced by TclCompileLindexCmd(), and TclExecuteByteCode().

#define INST_LIST_LENGTH   81

Definition at line 538 of file tclCompile.h.

Referenced by TclCompileLlengthCmd(), and TclExecuteByteCode().

#define INST_LIST_NOT_IN   107

Definition at line 594 of file tclCompile.h.

Referenced by TclCompileNiOpCmd(), and TclExecuteByteCode().

#define INST_LIST_RANGE_IMM   104

Definition at line 589 of file tclCompile.h.

Referenced by TclCompileLassignCmd(), and TclExecuteByteCode().

#define INST_LNOT   61

Definition at line 508 of file tclCompile.h.

Referenced by TclCompileNotOpCmd(), and TclExecuteByteCode().

#define INST_LOAD_ARRAY1   13

Definition at line 454 of file tclCompile.h.

Referenced by TclCompileLsetCmd(), TclCompileSetCmd(), and TclExecuteByteCode().

#define INST_LOAD_ARRAY4   14

Definition at line 455 of file tclCompile.h.

Referenced by TclCompileLsetCmd(), TclCompileSetCmd(), and TclExecuteByteCode().

#define INST_LOAD_ARRAY_STK   15

Definition at line 456 of file tclCompile.h.

Referenced by TclCompileLsetCmd(), TclCompileSetCmd(), and TclExecuteByteCode().

#define INST_LOAD_SCALAR1   10

#define INST_LOAD_SCALAR4   11

#define INST_LOAD_SCALAR_STK   12

#define INST_LOAD_STK   16

Definition at line 457 of file tclCompile.h.

Referenced by TclCompileLsetCmd(), TclCompileSetCmd(), and TclExecuteByteCode().

#define INST_LOR   40

Definition at line 487 of file tclCompile.h.

Referenced by TclExecuteByteCode().

#define INST_LSET_FLAT   97

Definition at line 567 of file tclCompile.h.

Referenced by TclCompileLsetCmd(), and TclExecuteByteCode().

#define INST_LSET_LIST   96

Definition at line 566 of file tclCompile.h.

Referenced by TclCompileLsetCmd(), and TclExecuteByteCode().

#define INST_LSHIFT   51

Definition at line 498 of file tclCompile.h.

Referenced by TclCompileLshiftOpCmd(), and TclExecuteByteCode().

#define INST_LT   47

Definition at line 494 of file tclCompile.h.

Referenced by TclCompileLessOpCmd(), and TclExecuteByteCode().

#define INST_MOD   57

Definition at line 504 of file tclCompile.h.

Referenced by TclCompileModOpCmd(), and TclExecuteByteCode().

#define INST_MULT   55

Definition at line 502 of file tclCompile.h.

Referenced by TclCompileMulOpCmd(), and TclExecuteByteCode().

#define INST_NEQ   46

Definition at line 493 of file tclCompile.h.

Referenced by TclCompileNeqOpCmd(), and TclExecuteByteCode().

#define INST_NSUPVAR   123

Definition at line 628 of file tclCompile.h.

Referenced by TclCompileGlobalCmd(), TclCompileNamespaceCmd(), and TclExecuteByteCode().

#define INST_OVER   95

#define INST_PUSH1   1

Definition at line 440 of file tclCompile.h.

Referenced by TclExecuteByteCode().

#define INST_PUSH4   2

Definition at line 441 of file tclCompile.h.

Referenced by TclExecuteByteCode().

#define INST_PUSH_RESULT   71

#define INST_PUSH_RETURN_CODE   72

Definition at line 525 of file tclCompile.h.

Referenced by TclCompileCatchCmd(), and TclExecuteByteCode().

#define INST_PUSH_RETURN_OPTIONS   108

#define INST_REGEXP   127

Definition at line 641 of file tclCompile.h.

Referenced by TclExecuteByteCode().

#define INST_RETURN_IMM   98

Definition at line 571 of file tclCompile.h.

Referenced by TclCompileReturnCmd(), and TclExecuteByteCode().

#define INST_RETURN_STK   109

#define INST_REVERSE   126

#define INST_RSHIFT   52

Definition at line 499 of file tclCompile.h.

Referenced by TclCompileRshiftOpCmd(), and TclExecuteByteCode().

#define INST_START_CMD   105

Definition at line 591 of file tclCompile.h.

Referenced by TclCompileScript(), and TclExecuteByteCode().

#define INST_STORE_ARRAY1   20

#define INST_STORE_ARRAY4   21

#define INST_STORE_ARRAY_STK   22

#define INST_STORE_SCALAR1   17

#define INST_STORE_SCALAR_STK   19

#define INST_STORE_STK   23

#define INST_STR_CMP   75

Definition at line 530 of file tclCompile.h.

Referenced by TclCompileStringCmpCmd(), and TclExecuteByteCode().

#define INST_STR_EQ   73

#define INST_STR_INDEX   77

Definition at line 532 of file tclCompile.h.

Referenced by TclCompileStringIndexCmd(), and TclExecuteByteCode().

#define INST_STR_LEN   76

Definition at line 531 of file tclCompile.h.

Referenced by TclCompileStringLenCmd(), and TclExecuteByteCode().

#define INST_STR_MATCH   78

Definition at line 533 of file tclCompile.h.

Referenced by TclExecuteByteCode().

#define INST_STR_NEQ   74

Definition at line 529 of file tclCompile.h.

Referenced by TclCompileStrneqOpCmd(), and TclExecuteByteCode().

#define INST_SUB   54

Definition at line 501 of file tclCompile.h.

Referenced by TclCompileMinusOpCmd(), and TclExecuteByteCode().

#define INST_SYNTAX   125

Definition at line 633 of file tclCompile.h.

Referenced by TclCompileSyntaxError(), and TclExecuteByteCode().

#define INST_TRY_CVT_TO_NUMERIC   64

Definition at line 511 of file tclCompile.h.

Referenced by TclExecuteByteCode().

#define INST_UMINUS   59

Definition at line 506 of file tclCompile.h.

Referenced by TclCompileMinusOpCmd(), and TclExecuteByteCode().

#define INST_UPLUS   58

Definition at line 505 of file tclCompile.h.

Referenced by TclExecuteByteCode().

#define INST_UPVAR   122

Definition at line 627 of file tclCompile.h.

Referenced by TclCompileUpvarCmd(), and TclExecuteByteCode().

#define INST_VARIABLE   124

Definition at line 629 of file tclCompile.h.

Referenced by TclCompileVariableCmd(), and TclExecuteByteCode().

#define JUMPFIXUP_INIT_ENTRIES   10

Definition at line 730 of file tclCompile.h.

Referenced by TclInitJumpFixupArray().

#define LAST_INST_OPCODE   131

Definition at line 650 of file tclCompile.h.

#define LITERAL_NS_SCOPE   0x02

Definition at line 953 of file tclCompile.h.

Referenced by TclRegisterLiteral().

#define LITERAL_ON_HEAP   0x01

Definition at line 952 of file tclCompile.h.

Referenced by TclCreateLiteral(), and TclRegisterLiteral().

#define MAX_INSTRUCTION_OPERANDS   2

Definition at line 661 of file tclCompile.h.

#define TCL_BYTECODE_PRECOMPILED   0x0001

#define TCL_BYTECODE_RESOLVE_VARS   0x0002

Definition at line 324 of file tclCompile.h.

Referenced by TclInitByteCodeObj().

#define TCL_DTRACE_CMD_ARGS ( a0,
a1,
a2,
a3,
a4,
a5,
a6,
a7,
a8,
a9   )     {}

Definition at line 1286 of file tclCompile.h.

Referenced by TclEvalObjvInternal().

 
#define TCL_DTRACE_CMD_ARGS_ENABLED (  )     0

Definition at line 1281 of file tclCompile.h.

Referenced by TclEvalObjvInternal().

#define TCL_DTRACE_CMD_ENTRY ( a0,
a1,
a2   )     {}

Definition at line 1283 of file tclCompile.h.

Referenced by TclEvalObjvInternal().

 
#define TCL_DTRACE_CMD_ENTRY_ENABLED (  )     0

Definition at line 1278 of file tclCompile.h.

Referenced by TclEvalObjvInternal().

#define TCL_DTRACE_CMD_INFO ( a0,
a1,
a2,
a3,
a4,
a5   )     {}

Definition at line 1287 of file tclCompile.h.

Referenced by TclEvalObjvInternal().

 
#define TCL_DTRACE_CMD_INFO_ENABLED (  )     0

Definition at line 1282 of file tclCompile.h.

Referenced by TclEvalObjvInternal().

#define TCL_DTRACE_CMD_RESULT ( a0,
a1,
a2,
a3   )     {}

Definition at line 1285 of file tclCompile.h.

Referenced by TclEvalObjvInternal().

 
#define TCL_DTRACE_CMD_RESULT_ENABLED (  )     0

Definition at line 1280 of file tclCompile.h.

Referenced by TclEvalObjvInternal().

#define TCL_DTRACE_CMD_RETURN ( a0,
a1   )     {}

Definition at line 1284 of file tclCompile.h.

Referenced by TclEvalObjvInternal().

 
#define TCL_DTRACE_CMD_RETURN_ENABLED (  )     0

Definition at line 1279 of file tclCompile.h.

Referenced by TclEvalObjvInternal().

#define TCL_DTRACE_INST_DONE ( a0,
a1,
a2   )     {}

Definition at line 1292 of file tclCompile.h.

 
#define TCL_DTRACE_INST_DONE_ENABLED (  )     0

Definition at line 1290 of file tclCompile.h.

#define TCL_DTRACE_INST_START ( a0,
a1,
a2   )     {}

Definition at line 1291 of file tclCompile.h.

 
#define TCL_DTRACE_INST_START_ENABLED (  )     0

Definition at line 1289 of file tclCompile.h.

#define TCL_DTRACE_PROC_ARGS ( a0,
a1,
a2,
a3,
a4,
a5,
a6,
a7,
a8,
a9   )     {}

Definition at line 1275 of file tclCompile.h.

Referenced by TclObjInterpProcCore().

 
#define TCL_DTRACE_PROC_ARGS_ENABLED (  )     0

Definition at line 1270 of file tclCompile.h.

Referenced by TclObjInterpProcCore().

#define TCL_DTRACE_PROC_ENTRY ( a0,
a1,
a2   )     {}

Definition at line 1272 of file tclCompile.h.

Referenced by TclObjInterpProcCore().

 
#define TCL_DTRACE_PROC_ENTRY_ENABLED (  )     0

Definition at line 1267 of file tclCompile.h.

Referenced by TclObjInterpProcCore().

#define TCL_DTRACE_PROC_INFO ( a0,
a1,
a2,
a3,
a4,
a5   )     {}

Definition at line 1276 of file tclCompile.h.

Referenced by TclObjInterpProcCore().

 
#define TCL_DTRACE_PROC_INFO_ENABLED (  )     0

Definition at line 1271 of file tclCompile.h.

Referenced by TclObjInterpProcCore().

#define TCL_DTRACE_PROC_RESULT ( a0,
a1,
a2,
a3   )     {}

Definition at line 1274 of file tclCompile.h.

Referenced by TclObjInterpProcCore().

 
#define TCL_DTRACE_PROC_RESULT_ENABLED (  )     0

Definition at line 1269 of file tclCompile.h.

Referenced by TclObjInterpProcCore().

#define TCL_DTRACE_PROC_RETURN ( a0,
a1   )     {}

Definition at line 1273 of file tclCompile.h.

Referenced by TclObjInterpProcCore().

 
#define TCL_DTRACE_PROC_RETURN_ENABLED (  )     0

Definition at line 1268 of file tclCompile.h.

Referenced by TclObjInterpProcCore().

#define TCL_DTRACE_TCL_PROBE ( a0,
a1,
a2,
a3,
a4,
a5,
a6,
a7,
a8,
a9   )     {}

Definition at line 1295 of file tclCompile.h.

 
#define TCL_DTRACE_TCL_PROBE_ENABLED (  )     0

Definition at line 1294 of file tclCompile.h.

#define TclAdjustStackDepth ( delta,
envPtr   ) 

Value:

if ((delta) < 0) {\
        if((envPtr)->maxStackDepth < (envPtr)->currStackDepth) {\
            (envPtr)->maxStackDepth = (envPtr)->currStackDepth;\
        }\
    }\
    (envPtr)->currStackDepth += (delta)

Definition at line 986 of file tclCompile.h.

Referenced by TclCompileScript().

#define TclDTraceInfo ( info,
args,
argsi   )     {*args = ""; *argsi = 0;}

Definition at line 1297 of file tclCompile.h.

Referenced by TclEvalObjvInternal(), and TclObjInterpProcCore().

#define TclEmitInstInt1 ( op,
i,
envPtr   ) 

Value:

if (((envPtr)->codeNext + 2) > (envPtr)->codeEnd) { \
        TclExpandCodeArray(envPtr); \
    } \
    *(envPtr)->codeNext++ = (unsigned char) (op); \
    *(envPtr)->codeNext++ = (unsigned char) ((unsigned int) (i));\
    (envPtr)->atCmdStart = ((op) == INST_START_CMD); \
    TclUpdateStackReqs(op, i, envPtr)

Definition at line 1067 of file tclCompile.h.

Referenced by TclCompileAppendCmd(), TclCompileCatchCmd(), TclCompileDictAppendCmd(), TclCompileExprWords(), TclCompileForCmd(), TclCompileForeachCmd(), TclCompileIncrCmd(), TclCompileLappendCmd(), TclCompileLassignCmd(), TclCompileLsetCmd(), TclCompileScript(), TclCompileSetCmd(), TclCompileTokens(), TclCompileWhileCmd(), and TclEmitForwardJump().

#define TclEmitInstInt4 ( op,
i,
envPtr   ) 

Value:

if (((envPtr)->codeNext + 5) > (envPtr)->codeEnd) { \
        TclExpandCodeArray(envPtr); \
    } \
    *(envPtr)->codeNext++ = (unsigned char) (op); \
    *(envPtr)->codeNext++ = \
        (unsigned char) ((unsigned int) (i) >> 24); \
    *(envPtr)->codeNext++ = \
        (unsigned char) ((unsigned int) (i) >> 16); \
    *(envPtr)->codeNext++ = \
        (unsigned char) ((unsigned int) (i) >>  8); \
    *(envPtr)->codeNext++ = \
        (unsigned char) ((unsigned int) (i)      );\
    (envPtr)->atCmdStart = ((op) == INST_START_CMD); \
    TclUpdateStackReqs(op, i, envPtr)

Definition at line 1076 of file tclCompile.h.

Referenced by TclCompileAppendCmd(), TclCompileCatchCmd(), TclCompileDictAppendCmd(), TclCompileDictForCmd(), TclCompileDictGetCmd(), TclCompileDictIncrCmd(), TclCompileDictLappendCmd(), TclCompileDictSetCmd(), TclCompileDictUpdateCmd(), TclCompileDivOpCmd(), TclCompileForCmd(), TclCompileForeachCmd(), TclCompileGlobalCmd(), TclCompileInfoExistsCmd(), TclCompileLappendCmd(), TclCompileLassignCmd(), TclCompileLindexCmd(), TclCompileListCmd(), TclCompileLsetCmd(), TclCompileMinusOpCmd(), TclCompileNamespaceCmd(), TclCompileScript(), TclCompileSetCmd(), TclCompileTokens(), TclCompileUpvarCmd(), TclCompileVariableCmd(), and TclCompileWhileCmd().

#define TclEmitInt1 ( i,
envPtr   ) 

Value:

if ((envPtr)->codeNext == (envPtr)->codeEnd) { \
        TclExpandCodeArray(envPtr); \
    } \
    *(envPtr)->codeNext++ = (unsigned char) ((unsigned int) (i))

Definition at line 1038 of file tclCompile.h.

Referenced by TclCompileIncrCmd().

#define TclEmitInt4 ( i,
envPtr   ) 

Value:

if (((envPtr)->codeNext + 4) > (envPtr)->codeEnd) { \
        TclExpandCodeArray(envPtr); \
    } \
    *(envPtr)->codeNext++ = \
        (unsigned char) ((unsigned int) (i) >> 24); \
    *(envPtr)->codeNext++ = \
        (unsigned char) ((unsigned int) (i) >> 16); \
    *(envPtr)->codeNext++ = \
        (unsigned char) ((unsigned int) (i) >>  8); \
    *(envPtr)->codeNext++ = \
        (unsigned char) ((unsigned int) (i)      )

Definition at line 1044 of file tclCompile.h.

Referenced by TclCompileDictIncrCmd(), TclCompileDictSetCmd(), TclCompileDictUpdateCmd(), TclCompileLassignCmd(), and TclCompileScript().

#define TclEmitPush ( objIndex,
envPtr   ) 

Value:

{\
        register int objIndexCopy = (objIndex);\
        if (objIndexCopy <= 255) { \
            TclEmitInstInt1(INST_PUSH1, objIndexCopy, (envPtr)); \
        } else { \
            TclEmitInstInt4(INST_PUSH4, objIndexCopy, (envPtr)); \
        }\
    }

Definition at line 1101 of file tclCompile.h.

Referenced by Tcl_ExprObj(), TclCompileExprWords(), TclCompileScript(), TclCompileSyntaxError(), and TclCompileTokens().

#define TclFixupForwardJumpToHere ( envPtr,
fixupPtr,
threshold   ) 

Value:

TclFixupForwardJump((envPtr), (fixupPtr), \
            (envPtr)->codeNext-(envPtr)->codeStart-(fixupPtr)->codeOffset, \
            (threshold))

Definition at line 1155 of file tclCompile.h.

Referenced by TclCompileCatchCmd(), TclCompileDictUpdateCmd(), and TclCompileForeachCmd().

#define TclGetInt1AtPtr (  )     ((int) *((char *) p))

Definition at line 1181 of file tclCompile.h.

Referenced by TclExecuteByteCode().

#define TclGetInt4AtPtr (  ) 

Value:

(((int) TclGetInt1AtPtr(p) << 24) | \
                                            (*((p)+1) << 16) | \
                                            (*((p)+2) <<  8) | \
                                            (*((p)+3)))

Definition at line 1191 of file tclCompile.h.

Referenced by TclExecuteByteCode().

#define TclGetUInt1AtPtr (  )     ((unsigned int) *(p))

Definition at line 1196 of file tclCompile.h.

Referenced by TclExecuteByteCode().

#define TclGetUInt4AtPtr (  ) 

Value:

((unsigned int) (*(p)     << 24) | \
                                            (*((p)+1) << 16) | \
                                            (*((p)+2) <<  8) | \
                                            (*((p)+3)))

Definition at line 1197 of file tclCompile.h.

Referenced by TclCompileScript(), and TclExecuteByteCode().

#define TclMax ( i,
 )     ((((int) i) > ((int) j))? (i) : (j))

Definition at line 1211 of file tclCompile.h.

#define TclMin ( i,
 )     ((((int) i) < ((int) j))? (i) : (j))

Definition at line 1210 of file tclCompile.h.

Referenced by TclCompileScript(), and TclDisassembleByteCodeObj().

#define TclRegisterNewLiteral ( envPtr,
bytes,
length   )     TclRegisterLiteral(envPtr, (char *)(bytes), length, /*flags*/ 0)

#define TclRegisterNewNSLiteral ( envPtr,
bytes,
length   ) 

Value:

TclRegisterLiteral(envPtr, (char *)(bytes), length, \
                /*flags*/ LITERAL_NS_SCOPE)

Definition at line 974 of file tclCompile.h.

Referenced by TclCompileScript().

#define TclStoreInt1AtPtr ( i,
 )     *(p) = (unsigned char) ((unsigned int) (i))

Definition at line 1120 of file tclCompile.h.

#define TclStoreInt4AtPtr ( i,
 ) 

Value:

*(p)   = (unsigned char) ((unsigned int) (i) >> 24); \
    *(p+1) = (unsigned char) ((unsigned int) (i) >> 16); \
    *(p+2) = (unsigned char) ((unsigned int) (i) >>  8); \
    *(p+3) = (unsigned char) ((unsigned int) (i)      )

Definition at line 1123 of file tclCompile.h.

Referenced by TclCompileScript().

#define TclUpdateInstInt1AtPc ( op,
i,
pc   ) 

Value:

*(pc) = (unsigned char) (op); \
    TclStoreInt1AtPtr((i), ((pc)+1))

Definition at line 1138 of file tclCompile.h.

Referenced by TclCompileForeachCmd(), and TclFixupForwardJump().

#define TclUpdateInstInt4AtPc ( op,
i,
pc   ) 

Value:

*(pc) = (unsigned char) (op); \
    TclStoreInt4AtPtr((i), ((pc)+1))

Definition at line 1142 of file tclCompile.h.

Referenced by TclCompileDictForCmd(), TclCompileForeachCmd(), and TclFixupForwardJump().

#define TclUpdateStackReqs ( op,
i,
envPtr   ) 

Value:

{\
        int delta = tclInstructionTable[(op)].stackEffect;\
        if (delta) {\
            if (delta == INT_MIN) {\
                delta = 1 - (i);\
            }\
            TclAdjustStackDepth(delta, envPtr);\
        }\
    }

Definition at line 1004 of file tclCompile.h.


Typedef Documentation

typedef ClientData( AuxDataDupProc)(ClientData clientData)

Definition at line 161 of file tclCompile.h.

typedef void( AuxDataFreeProc)(ClientData clientData)

Definition at line 162 of file tclCompile.h.

typedef void( AuxDataPrintProc)(ClientData clientData, Tcl_Obj *appendObj, struct ByteCode *codePtr, unsigned int pcOffset)

Definition at line 163 of file tclCompile.h.


Enumeration Type Documentation

Enumerator:
LOOP_EXCEPTION_RANGE 
CATCH_EXCEPTION_RANGE 

Definition at line 76 of file tclCompile.h.

Enumerator:
OPERAND_NONE 
OPERAND_INT1 
OPERAND_INT4 
OPERAND_UINT1 
OPERAND_UINT4 
OPERAND_IDX4 
OPERAND_LVT1 
OPERAND_LVT4 
OPERAND_AUX4 

Definition at line 663 of file tclCompile.h.

Enumerator:
TCL_UNCONDITIONAL_JUMP 
TCL_TRUE_JUMP 
TCL_FALSE_JUMP 

Definition at line 707 of file tclCompile.h.


Function Documentation

MODULE_SCOPE void TclCleanupByteCode ( ByteCode codePtr  ) 

MODULE_SCOPE void TclCompileCmdWord ( Tcl_Interp interp,
Tcl_Token tokenPtr,
int  count,
CompileEnv envPtr 
)

MODULE_SCOPE void TclCompileExpr ( Tcl_Interp interp,
CONST char *  script,
int  numBytes,
CompileEnv envPtr,
int  optimize 
)

MODULE_SCOPE void TclCompileExprWords ( Tcl_Interp interp,
Tcl_Token tokenPtr,
int  numWords,
CompileEnv envPtr 
)

MODULE_SCOPE void TclCompileScript ( Tcl_Interp interp,
CONST char *  script,
int  numBytes,
CompileEnv envPtr 
)

MODULE_SCOPE void TclCompileSyntaxError ( Tcl_Interp interp,
CompileEnv envPtr 
)

MODULE_SCOPE int TclCreateAuxData ( ClientData  clientData,
AuxDataType typePtr,
CompileEnv envPtr 
)

MODULE_SCOPE int TclCreateExceptRange ( ExceptionRangeType  type,
CompileEnv envPtr 
)

MODULE_SCOPE void TclDeleteExecEnv ( ExecEnv eePtr  ) 

MODULE_SCOPE void TclDeleteLiteralTable ( Tcl_Interp interp,
LiteralTable tablePtr 
)

MODULE_SCOPE int TclEvalObjvInternal ( Tcl_Interp interp,
int  objc,
Tcl_Obj *const   objv[],
CONST char *  command,
int  length,
int  flags 
)

MODULE_SCOPE int TclExecuteByteCode ( Tcl_Interp interp,
ByteCode codePtr 
)

Definition at line 1578 of file tclExecute.c.

References ASYNC_CHECK_COUNT_MASK, ByteCode::auxDataArrayPtr, ExceptionRange::breakOffset, Tcl_Obj::bytes, CACHE_STACK_INFO, CATCH_EXCEPTION_RANGE, ExceptionRange::catchOffset, ckalloc, ckfree, ckrealloc, AuxData::clientData, CmdFrame::cmd, ExceptionRange::codeOffset, ByteCode::codeStart, ByteCode::compileEpoch, ExceptionRange::continueOffset, CURR_DEPTH, CmdFrame::data, DECACHE_STACK_INFO, DICT_PATH_READ, mp_int::dp, ERR_ALREADY_LOGGED, ForeachInfo::firstValueTemp, ByteCode::flags, CmdFrame::framePtr, GetNumberFromObj, JumptableInfo::hashTable, INST_ADD, INST_APPEND_ARRAY1, INST_APPEND_ARRAY4, INST_APPEND_ARRAY_STK, INST_APPEND_SCALAR1, INST_APPEND_SCALAR4, INST_APPEND_STK, INST_BEGIN_CATCH4, INST_BITAND, INST_BITNOT, INST_BITOR, INST_BITXOR, INST_BREAK, INST_CALL_BUILTIN_FUNC1, INST_CALL_FUNC1, INST_CONCAT1, INST_CONTINUE, INST_DICT_APPEND, INST_DICT_DONE, INST_DICT_FIRST, INST_DICT_GET, INST_DICT_INCR_IMM, INST_DICT_LAPPEND, INST_DICT_NEXT, INST_DICT_SET, INST_DICT_UNSET, INST_DICT_UPDATE_END, INST_DICT_UPDATE_START, INST_DIV, INST_DONE, INST_DUP, INST_END_CATCH, INST_EQ, INST_EVAL_STK, INST_EXIST_ARRAY, INST_EXIST_ARRAY_STK, INST_EXIST_SCALAR, INST_EXIST_STK, INST_EXPAND_START, INST_EXPAND_STKTOP, INST_EXPON, INST_EXPR_STK, INST_FOREACH_START4, INST_FOREACH_STEP4, INST_GE, INST_GT, INST_INCR_ARRAY1, INST_INCR_ARRAY1_IMM, INST_INCR_ARRAY_STK, INST_INCR_ARRAY_STK_IMM, INST_INCR_SCALAR1, INST_INCR_SCALAR1_IMM, INST_INCR_SCALAR_STK, INST_INCR_SCALAR_STK_IMM, INST_INCR_STK, INST_INCR_STK_IMM, INST_INVOKE_EXPANDED, INST_INVOKE_STK1, INST_INVOKE_STK4, INST_JUMP1, INST_JUMP4, INST_JUMP_FALSE1, INST_JUMP_FALSE4, INST_JUMP_TABLE, INST_JUMP_TRUE1, INST_JUMP_TRUE4, INST_LAND, INST_LAPPEND_ARRAY1, INST_LAPPEND_ARRAY4, INST_LAPPEND_ARRAY_STK, INST_LAPPEND_SCALAR1, INST_LAPPEND_SCALAR4, INST_LAPPEND_STK, INST_LE, INST_LIST, INST_LIST_IN, INST_LIST_INDEX, INST_LIST_INDEX_IMM, INST_LIST_INDEX_MULTI, INST_LIST_LENGTH, INST_LIST_NOT_IN, INST_LIST_RANGE_IMM, INST_LNOT, INST_LOAD_ARRAY1, INST_LOAD_ARRAY4, INST_LOAD_ARRAY_STK, INST_LOAD_SCALAR1, INST_LOAD_SCALAR4, INST_LOAD_SCALAR_STK, INST_LOAD_STK, INST_LOR, INST_LSET_FLAT, INST_LSET_LIST, INST_LSHIFT, INST_LT, INST_MOD, INST_MULT, INST_NEQ, INST_NSUPVAR, INST_OVER, INST_POP, INST_PUSH1, INST_PUSH4, INST_PUSH_RESULT, INST_PUSH_RETURN_CODE, INST_PUSH_RETURN_OPTIONS, INST_REGEXP, INST_RETURN_IMM, INST_RETURN_STK, INST_REVERSE, INST_RSHIFT, INST_START_CMD, INST_STORE_ARRAY1, INST_STORE_ARRAY4, INST_STORE_ARRAY_STK, INST_STORE_SCALAR1, INST_STORE_SCALAR4, INST_STORE_SCALAR_STK, INST_STORE_STK, INST_STR_CMP, INST_STR_EQ, INST_STR_INDEX, INST_STR_LEN, INST_STR_MATCH, INST_STR_NEQ, INST_SUB, INST_SYNTAX, INST_TRY_CVT_TO_NUMERIC, INST_UMINUS, INST_UPLUS, INST_UPVAR, INST_VARIABLE, Tcl_Obj::internalRep, iPtr, LAST_BUILTIN_FUNC, Tcl_Obj::length, DictUpdateInfo::length, CmdFrame::level, CmdFrame::line, Var::linkPtr, LLONG_MIN, localName, Tcl_Obj::longValue, ForeachInfo::loopCtTemp, ByteCode::maxExceptDepth, ByteCode::maxStackDepth, mp_add, mp_and, mp_clear, mp_cmp, mp_cmp_d, mp_copy, mp_div, mp_div_2d, MP_EQ, mp_expt_d, MP_GT, mp_init, mp_iszero, MP_LT, mp_mod_2d, mp_mul, mp_mul_2d, mp_neg, mp_or, mp_sub, mp_sub_d, mp_xor, MP_ZPOS, Tcl_ObjType::name, NEXT_INST_F, NEXT_INST_V, CmdFrame::nextPtr, CmdFrame::nline, ByteCode::nsEpoch, BuiltinFunc::numArgs, ForeachInfo::numLists, ForeachVarList::numVars, O2S, OBJ_AT_DEPTH, OBJ_AT_TOS, OBJ_UNDER_TOS, ByteCode::objArrayPtr, Var::objPtr, Overflowing, POP_OBJECT, PTR2INT, PUSH_OBJECT, ReadTraced, Tcl_Obj::refCount, Namespace::resolverEpoch, mp_int::sign, ByteCode::source, Var::tablePtr, Tcl_AddObjErrorInfo(), TCL_APPEND_VALUE, Tcl_AppendObjToObj(), Tcl_AppendResult(), Tcl_AppendToObj(), Tcl_AsyncInvoke(), TCL_BREAK, TCL_BYTECODE_PRECOMPILED, TCL_CONTINUE, Tcl_DecrRefCount, Tcl_DictObjDone(), Tcl_DictObjFirst(), Tcl_DictObjGet(), Tcl_DictObjNext(), Tcl_DictObjPut(), Tcl_DictObjPutKeyList(), Tcl_DictObjRemove(), Tcl_DictObjRemoveKeyList(), Tcl_DictObjSize(), TCL_DTRACE_INST_LAST, TCL_DTRACE_INST_NEXT, Tcl_DuplicateObj(), TCL_ERROR, Tcl_EvalEx(), Tcl_ExprObj(), Tcl_FindHashEntry, Tcl_GetBignumFromObj(), Tcl_GetByteArrayFromObj(), Tcl_GetCharLength(), Tcl_GetDoubleFromObj(), Tcl_GetHashValue, Tcl_GetObjResult(), Tcl_GetRegExpFromObj(), Tcl_GetReturnOptions(), Tcl_GetUniChar(), Tcl_GetUnicode(), Tcl_GetUnicodeFromObj(), Tcl_GetWideIntFromObj(), Tcl_IncrRefCount, Tcl_InitBignumFromDouble(), Tcl_InvalidateStringRep(), Tcl_IsShared, TCL_LEAVE_ERR_MSG, Tcl_LimitCheck(), TCL_LIST_ELEMENT, Tcl_ListObjAppendElement(), Tcl_ListObjIndex(), TCL_LOCATION_BC, TCL_LOCATION_PREBC, Tcl_LogCommandInfo(), TCL_NAMESPACE_ONLY, Tcl_NewBignumObj(), Tcl_NewByteArrayObj(), Tcl_NewIntObj(), Tcl_NewListObj(), Tcl_NewStringObj(), Tcl_NewWideIntObj(), TCL_NUMBER_BIG, TCL_NUMBER_DOUBLE, TCL_NUMBER_LONG, TCL_NUMBER_NAN, TCL_NUMBER_WIDE, TCL_OK, Tcl_Panic(), Tcl_RegExpExecObj(), Tcl_ResetResult(), TCL_RETURN, Tcl_SetBignumObj(), Tcl_SetErrorCode(), Tcl_SetLongObj(), Tcl_SetObjResult(), Tcl_SetReturnOptions(), Tcl_SetWideIntObj(), Tcl_StringCaseMatch(), Tcl_TakeBignumFromObj(), TCL_TRACE_READS, Tcl_UniCharToUtf(), TCL_UTF_MAX, TclAsyncReady, TclBignumToDouble(), TclBNInitBignumFromLong(), TclBNInitBignumFromWideInt(), TclByteArrayMatch(), tclByteArrayType, TclCleanupVar(), TclCompEvalObj(), TclDecrRefCount, tclEmptyStringRep, TclEvalObjvInternal(), TclExprFloatError(), TclFreeIntRep, TclGetBooleanFromObj, TclGetInt1AtPtr, TclGetInt4AtPtr, TclGetIntForIndexM, TclGetNamespaceFromObj(), TclGetString, TclGetStringFromObj, TclGetUInt1AtPtr, TclGetUInt4AtPtr, TclGetWideIntFromObj, TclIncrObj(), TclInvalidateStringRep, TclIsInfinite, TclIsNaN, TclIsVarArray, TclIsVarDirectModifyable, TclIsVarDirectModifyable2, TclIsVarDirectReadable, TclIsVarDirectReadable2, TclIsVarDirectWritable, TclIsVarInHash, TclIsVarLink, TclIsVarTraced, TclIsVarUndefined, TclLimitExceeded, TclLimitReady, TclLindexFlat(), TclLindexList(), TclListObjCopy(), TclListObjGetElements, TclListObjLength, tclListType, TclLookupArrayElement(), TclLsetFlat(), TclLsetList(), TclNewDoubleObj, TclNewIntObj, TclNewLongObj, TclNewObj, TclObjCallVarTraces(), TclObjGetFrame(), TclObjLookupVarEx(), TclObjUnsetVar2(), TclPrintInstruction(), TclPrintObject(), TclProcessReturn(), TclPtrGetVar(), TclPtrIncrObjVar(), TclPtrObjMakeUpvar(), TclPtrSetVar(), TclpUtfNcmp2(), TclSetDoubleObj, TclSetLongObj, TclSetVarLink, TclSetVarNamespaceVar, TclSetWideIntObj, TclStackFree(), tclStringType, TclTraceDictPath(), TclUniCharMatch(), TclUniCharNcmp, CmdFrame::tebc, TRACE, TRACE_APPEND, TRACE_WITH_OBJ, Tcl_Obj::twoPtrValue, CmdFrame::type, ExceptionRange::type, Tcl_Obj::typePtr, mp_int::used, Var::value, Tcl_Obj::value, VarHashFindVar, VarHashRefCount, ForeachVarList::varIndexes, DictUpdateInfo::varIndices, ForeachInfo::varLists, VOID, and WriteTraced.

Referenced by Tcl_ExprObj(), TclCompEvalObj(), and TclObjInterpProcCore().

MODULE_SCOPE void TclExpandJumpFixupArray ( JumpFixupArray fixupArrayPtr  ) 

MODULE_SCOPE void TclFinalizeAuxDataTypeTable ( void   ) 

Definition at line 3017 of file tclCompile.c.

References Tcl_DeleteHashTable(), Tcl_MutexLock, and Tcl_MutexUnlock.

Referenced by TclFinalizeExecution().

MODULE_SCOPE int TclFindCompiledLocal ( CONST char *  name,
int  nameChars,
int  create,
Proc procPtr 
)

MODULE_SCOPE void TclFreeCompileEnv ( CompileEnv envPtr  ) 

MODULE_SCOPE void TclFreeJumpFixupArray ( JumpFixupArray fixupArrayPtr  ) 

MODULE_SCOPE ExceptionRange* TclGetExceptionRangeForPc ( unsigned char *  pc,
int  catchOnly,
ByteCode codePtr 
)

MODULE_SCOPE void TclInitAuxDataTypeTable ( void   ) 

MODULE_SCOPE void TclInitByteCodeObj ( Tcl_Obj objPtr,
CompileEnv envPtr 
)

MODULE_SCOPE void TclInitCompilation ( void   ) 

MODULE_SCOPE void TclInitCompileEnv ( Tcl_Interp interp,
CompileEnv envPtr,
const char *  string,
int  numBytes,
CONST CmdFrame invoker,
int  word 
)

MODULE_SCOPE void TclInitJumpFixupArray ( JumpFixupArray fixupArrayPtr  ) 

MODULE_SCOPE void TclInitLiteralTable ( LiteralTable tablePtr  ) 

MODULE_SCOPE LiteralEntry* TclLookupLiteralEntry ( Tcl_Interp interp,
Tcl_Obj objPtr 
)

Referenced by TclCreateLiteral().

MODULE_SCOPE int TclNoIdentOpCmd ( ClientData  clientData,
Tcl_Interp interp,
int  objc,
Tcl_Obj *CONST  objv[] 
)

MODULE_SCOPE int TclPrintInstruction ( ByteCode codePtr,
unsigned char *  pc 
)

Referenced by TclExecuteByteCode().

MODULE_SCOPE void TclPrintObject ( FILE *  outFile,
Tcl_Obj objPtr,
int  maxChars 
)

MODULE_SCOPE void TclPrintSource ( FILE *  outFile,
CONST char *  string,
int  maxChars 
)

Referenced by TclCompileScript().

MODULE_SCOPE void TclRegisterAuxDataType ( AuxDataType typePtr  ) 

MODULE_SCOPE int TclRegisterLiteral ( CompileEnv envPtr,
char *  bytes,
int  length,
int  flags 
)

MODULE_SCOPE void TclReleaseLiteral ( Tcl_Interp interp,
Tcl_Obj objPtr 
)

MODULE_SCOPE int TclSingleOpCmd ( ClientData  clientData,
Tcl_Interp interp,
int  objc,
Tcl_Obj *CONST  objv[] 
)

MODULE_SCOPE int TclSortingOpCmd ( ClientData  clientData,
Tcl_Interp interp,
int  objc,
Tcl_Obj *CONST  objv[] 
)

MODULE_SCOPE int TclVariadicOpCmd ( ClientData  clientData,
Tcl_Interp interp,
int  objc,
Tcl_Obj *CONST  objv[] 
)


Variable Documentation

Definition at line 813 of file tclCompile.h.

Definition at line 782 of file tclCompile.h.

Definition at line 692 of file tclCompile.h.

Definition at line 795 of file tclCompile.h.



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