diff options
| author | griffin <briang42@easystreet.net> | 2022-08-30 19:09:17 (GMT) |
|---|---|---|
| committer | griffin <briang42@easystreet.net> | 2022-08-30 19:09:17 (GMT) |
| commit | 1e381fd90df4a9962fbb81c1d3709a03b7e6fda8 (patch) | |
| tree | 4f28269b043a2e8f5a26fbf4019f8f0ef47344a3 | |
| parent | d06b33cd9433fa01e505824932e316301348a970 (diff) | |
| parent | b3500c7657421cc9309d8b22a9e40b8d70bd2d00 (diff) | |
| download | tcl-1e381fd90df4a9962fbb81c1d3709a03b7e6fda8.zip tcl-1e381fd90df4a9962fbb81c1d3709a03b7e6fda8.tar.gz tcl-1e381fd90df4a9962fbb81c1d3709a03b7e6fda8.tar.bz2 | |
Sync with core-8-branch
| -rw-r--r-- | generic/tclExecute.c | 18 | ||||
| -rw-r--r-- | generic/tclInt.decls | 6 | ||||
| -rw-r--r-- | generic/tclIntDecls.h | 8 | ||||
| -rw-r--r-- | generic/tclStubInit.c | 2 |
4 files changed, 14 insertions, 20 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c index d56b994..3eca1fc 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -170,11 +170,11 @@ static BuiltinFunc const tclBuiltinFuncTable[] = { typedef struct TEBCdata { ByteCode *codePtr; /* Constant until the BC returns */ /* -----------------------------------------*/ - ptrdiff_t *catchTop; /* These fields are used on return TO this */ + Tcl_Obj **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 */ /* execution. */ - void *stack[1]; /* Start of the actual combined catch and obj + Tcl_Obj *stack[1]; /* Start of the actual combined catch and obj * stacks; the struct will be expanded as * necessary */ } TEBCdata; @@ -1936,8 +1936,8 @@ ArgumentBCEnter( *---------------------------------------------------------------------- */ #define bcFramePtr (&TD->cmdFrame) -#define initCatchTop ((ptrdiff_t *) (TD->stack-1)) -#define initTosPtr ((Tcl_Obj **) (initCatchTop+codePtr->maxExceptDepth)) +#define initCatchTop (TD->stack-1) +#define initTosPtr (initCatchTop+codePtr->maxExceptDepth) #define esPtr (iPtr->execEnvPtr->execStackPtr) int @@ -6856,7 +6856,7 @@ TEBCresume( * stack. */ - *(++catchTop) = CURR_DEPTH; + *(++catchTop) = (Tcl_Obj *)INT2PTR(CURR_DEPTH); TRACE(("%u => catchTop=%d, stackTop=%d\n", TclGetUInt4AtPtr(pc+1), (int) (catchTop - initCatchTop - 1), (int) CURR_DEPTH)); @@ -7768,8 +7768,8 @@ TEBCresume( while (auxObjList) { if ((catchTop != initCatchTop) - && (*catchTop > (ptrdiff_t) - auxObjList->internalRep.twoPtrValue.ptr2)) { + && (PTR2INT(*catchTop) > + PTR2INT(auxObjList->internalRep.twoPtrValue.ptr2))) { break; } POP_TAUX_OBJ(); @@ -7844,7 +7844,7 @@ TEBCresume( */ processCatch: - while (CURR_DEPTH > *catchTop) { + while (CURR_DEPTH > PTR2INT(*catchTop)) { valuePtr = POP_OBJECT(); TclDecrRefCount(valuePtr); } @@ -7853,7 +7853,7 @@ TEBCresume( fprintf(stdout, " ... found catch at %d, catchTop=%d, " "unwound to %ld, new pc %u\n", rangePtr->codeOffset, (int) (catchTop - initCatchTop - 1), - (long)*catchTop, (unsigned) rangePtr->catchOffset); + (long)PTR2INT(*catchTop), (unsigned) rangePtr->catchOffset); } #endif pc = (codePtr->codeStart + rangePtr->catchOffset); diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 7828872..8d9ef6c 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -1025,6 +1025,7 @@ declare 256 { int TclPtrUnsetVar(Tcl_Interp *interp, Tcl_Var varPtr, Tcl_Var arrayPtr, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, int flags) } + declare 257 { void TclStaticLibrary(Tcl_Interp *interp, const char *prefix, Tcl_LibraryInitProc *initProc, Tcl_LibraryInitProc *safeInitProc) @@ -1036,10 +1037,6 @@ declare 258 { Tcl_Obj *basenameObj) } -declare 259 { - void TclUnusedStubEntry(void) -} - # TIP 625: for unit testing - create list objects with span declare 260 { Tcl_Obj *TclListTestObj(int length, int leadingSpace, int endSpace) @@ -1049,7 +1046,6 @@ declare 260 { declare 261 { void TclListObjValidate(Tcl_Interp *interp, Tcl_Obj *listObj) } - ############################################################################## diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index 5d728a0..69aee7c 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -656,8 +656,7 @@ EXTERN void TclStaticLibrary(Tcl_Interp *interp, /* 258 */ EXTERN Tcl_Obj * TclpCreateTemporaryDirectory(Tcl_Obj *dirObj, Tcl_Obj *basenameObj); -/* 259 */ -EXTERN void TclUnusedStubEntry(void); +/* Slot 259 is reserved */ /* 260 */ EXTERN Tcl_Obj * TclListTestObj(int length, int leadingSpace, int endSpace); @@ -928,7 +927,7 @@ typedef struct TclIntStubs { int (*tclPtrUnsetVar) (Tcl_Interp *interp, Tcl_Var varPtr, Tcl_Var arrayPtr, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, int flags); /* 256 */ void (*tclStaticLibrary) (Tcl_Interp *interp, const char *prefix, Tcl_LibraryInitProc *initProc, Tcl_LibraryInitProc *safeInitProc); /* 257 */ Tcl_Obj * (*tclpCreateTemporaryDirectory) (Tcl_Obj *dirObj, Tcl_Obj *basenameObj); /* 258 */ - void (*tclUnusedStubEntry) (void); /* 259 */ + void (*reserved259)(void); Tcl_Obj * (*tclListTestObj) (int length, int leadingSpace, int endSpace); /* 260 */ void (*tclListObjValidate) (Tcl_Interp *interp, Tcl_Obj *listObj); /* 261 */ } TclIntStubs; @@ -1376,8 +1375,7 @@ extern const TclIntStubs *tclIntStubsPtr; (tclIntStubsPtr->tclStaticLibrary) /* 257 */ #define TclpCreateTemporaryDirectory \ (tclIntStubsPtr->tclpCreateTemporaryDirectory) /* 258 */ -#define TclUnusedStubEntry \ - (tclIntStubsPtr->tclUnusedStubEntry) /* 259 */ +/* Slot 259 is reserved */ #define TclListTestObj \ (tclIntStubsPtr->tclListTestObj) /* 260 */ #define TclListObjValidate \ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index a067668..87c9d0a 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -1118,7 +1118,7 @@ static const TclIntStubs tclIntStubs = { TclPtrUnsetVar, /* 256 */ TclStaticLibrary, /* 257 */ TclpCreateTemporaryDirectory, /* 258 */ - TclUnusedStubEntry, /* 259 */ + 0, /* 259 */ TclListTestObj, /* 260 */ TclListObjValidate, /* 261 */ }; |
