Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch dkf-bytecode-8.6/eval Excluding Merge-Ins
This is equivalent to a diff from fc4df9d199 to e3f27bdbd1
|
2014-08-30
| ||
| 08:35 | merge trunk Closed-Leaf check-in: dd6f0b70de user: dkf tags: unwanted, dkf-bytecode-8.6-main | |
|
2014-02-02
| ||
| 16:01 | add compilation of [string is] check-in: f74647ceeb user: dkf tags: trunk | |
| 15:09 | merge main working branch Closed-Leaf check-in: b3a938ddc0 user: dkf tags: dkf-bytecode-8.6/join, dkf-bytecode-8.6-main | |
| 15:08 | merge main working branch Closed-Leaf check-in: e3f27bdbd1 user: dkf tags: dkf-bytecode-8.6/eval, dkf-bytecode-8.6-main | |
| 14:43 | compilation of [string is] Closed-Leaf check-in: fc4df9d199 user: dkf tags: dkf-bytecode-8.6-main | |
| 14:42 | improve the disassembly Closed-Leaf check-in: d1f2d16fd2 user: dkf tags: dkf-bytecode-8.6/string-is, dkf-bytecode-8.6-main | |
|
2014-01-22
| ||
| 09:14 | minor tidying up check-in: 039b02fa79 user: dkf tags: dkf-bytecode-8.6-main | |
|
2014-01-02
| ||
| 09:35 | merge main working branch check-in: 1c324ae77e user: dkf tags: dkf-bytecode-8.6/eval, dkf-bytecode-8.6-main | |
Changes to generic/tclBasic.c.
| ︙ | |||
211 212 213 214 215 216 217 | 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | - + |
{"case", Tcl_CaseObjCmd, NULL, NULL, CMD_IS_SAFE},
#endif
{"catch", Tcl_CatchObjCmd, TclCompileCatchCmd, TclNRCatchObjCmd, CMD_IS_SAFE},
{"concat", Tcl_ConcatObjCmd, TclCompileConcatCmd, NULL, CMD_IS_SAFE},
{"continue", Tcl_ContinueObjCmd, TclCompileContinueCmd, NULL, CMD_IS_SAFE},
{"coroutine", NULL, NULL, TclNRCoroutineObjCmd, CMD_IS_SAFE},
{"error", Tcl_ErrorObjCmd, TclCompileErrorCmd, NULL, CMD_IS_SAFE},
|
| ︙ |
Changes to generic/tclCompCmds.c.
| ︙ | |||
2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 | 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + |
/*
* Issue the error via 'returnImm error 0'.
*/
TclEmitInstInt4( INST_RETURN_IMM, TCL_ERROR, envPtr);
TclEmitInt4( 0, envPtr);
return TCL_OK;
}
/*
*----------------------------------------------------------------------
*
* TclCompileEvalCmd --
*
* Procedure called to compile the "eval" command.
*
* Results:
* Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
* evaluation to runtime.
*
* Side effects:
* Instructions are added to envPtr to execute the "eval" command at
* runtime.
*
*----------------------------------------------------------------------
*/
int
TclCompileEvalCmd(
Tcl_Interp *interp, /* Used for context. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
Tcl_Token *tokenPtr;
DefineLineInformation; /* TIP #280 */
int i;
/*
* Error case: no arguments at all.
*/
if (parsePtr->numWords < 2) {
return TCL_ERROR;
}
tokenPtr = TokenAfter(parsePtr->tokenPtr);
/*
* Must push, concatenate (when more than one word) and eval. Note that
* when we evaluate, we must first duplicate to ensure that a reference to
* the script is kept for the duration of the evaluation.
*/
for (i=1 ; i<parsePtr->numWords ; i++) {
CompileWord(envPtr, tokenPtr, interp, i);
tokenPtr = TokenAfter(tokenPtr);
}
if (i > 2) {
TclEmitInstInt4( INST_CONCAT_STK, i-1, envPtr);
}
TclEmitOpcode( INST_DUP, envPtr);
TclEmitOpcode( INST_EVAL_STK, envPtr);
TclEmitInstInt4( INST_REVERSE, 2, envPtr);
TclEmitOpcode( INST_POP, envPtr);
return TCL_OK;
}
/*
*----------------------------------------------------------------------
*
* TclCompileExprCmd --
|
| ︙ |
Changes to generic/tclCompCmdsSZ.c.
| ︙ | |||
1084 1085 1086 1087 1088 1089 1090 | 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 | - + |
tokenPtr = TokenAfter(parsePtr->tokenPtr);
CompileWord(envPtr, tokenPtr, interp, 1);
if (parsePtr->numWords == 3) {
tokenPtr = TokenAfter(tokenPtr);
CompileWord(envPtr, tokenPtr, interp, 2);
} else {
|
| ︙ | |||
1112 1113 1114 1115 1116 1117 1118 | 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 | - + |
tokenPtr = TokenAfter(parsePtr->tokenPtr);
CompileWord(envPtr, tokenPtr, interp, 1);
if (parsePtr->numWords == 3) {
tokenPtr = TokenAfter(tokenPtr);
CompileWord(envPtr, tokenPtr, interp, 2);
} else {
|
| ︙ | |||
1140 1141 1142 1143 1144 1145 1146 | 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 | - + |
tokenPtr = TokenAfter(parsePtr->tokenPtr);
CompileWord(envPtr, tokenPtr, interp, 1);
if (parsePtr->numWords == 3) {
tokenPtr = TokenAfter(tokenPtr);
CompileWord(envPtr, tokenPtr, interp, 2);
} else {
|
| ︙ |
Changes to generic/tclExecute.c.
| ︙ | |||
173 174 175 176 177 178 179 | 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | - + - - - - + + + + + - - + + + |
typedef struct TEBCdata {
ByteCode *codePtr; /* Constant until the BC returns */
/* -----------------------------------------*/
ptrdiff_t *catchTop; /* These fields are used on return TO this */
Tcl_Obj *auxObjList; /* this level: they record the state when a */
CmdFrame cmdFrame; /* new codePtr was received for NR */
|
| ︙ | |||
2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 | 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 | + |
TD = (TEBCdata *) GrowEvaluationStack(iPtr->execEnvPtr, numWords, 0);
esPtr->tosPtr = initTosPtr;
TD->codePtr = codePtr;
TD->catchTop = initCatchTop;
TD->auxObjList = NULL;
TD->numLevels = ((Interp *) interp)->numLevels;
/*
* TIP #280: Initialize the frame. Do not push it yet: it will be pushed
* every time that we call out from this TD, popped when we return to it.
*/
bcFramePtr->type = ((codePtr->flags & TCL_BYTECODE_PRECOMPILED)
|
| ︙ | |||
2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 | 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 | + + |
iPtr->cmdFramePtr = bcFramePtr;
DECACHE_STACK_INFO();
newCodePtr = CompileExprObj(interp, OBJ_AT_TOS);
CACHE_STACK_INFO();
cleanup = 1;
pc++;
TEBC_YIELD();
((Interp *) interp)->numLevels++;
return TclNRExecuteByteCode(interp, newCodePtr);
}
/*
* INVOCATION BLOCK
*/
instEvalStk:
case INST_EVAL_STK:
bcFramePtr->data.tebc.pc = (char *) pc;
iPtr->cmdFramePtr = bcFramePtr;
cleanup = 1;
pc += 1;
TEBC_YIELD();
((Interp *) interp)->numLevels++;
return TclNREvalObjEx(interp, OBJ_AT_TOS, 0, NULL, 0);
case INST_INVOKE_EXPANDED:
CLANG_ASSERT(auxObjList);
objc = CURR_DEPTH - auxObjList->internalRep.ptrAndLongRep.value;
POP_TAUX_OBJ();
if (objc) {
|
| ︙ |
Changes to generic/tclInt.h.
| ︙ | |||
3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 | 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 | + + + | Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); MODULE_SCOPE int TclCompileEnsemble(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); MODULE_SCOPE int TclCompileErrorCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); MODULE_SCOPE int TclCompileEvalCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); MODULE_SCOPE int TclCompileExprCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); MODULE_SCOPE int TclCompileForCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); |
| ︙ |