diff options
-rw-r--r-- | .github/workflows/linux-build.yml | 9 | ||||
-rw-r--r-- | .github/workflows/mac-build.yml | 9 | ||||
-rw-r--r-- | .github/workflows/onefiledist.yml | 9 | ||||
-rw-r--r-- | .github/workflows/win-build.yml | 9 | ||||
-rw-r--r-- | doc/CrtObjCmd.3 | 2 | ||||
-rw-r--r-- | doc/CrtTrace.3 | 4 | ||||
-rw-r--r-- | generic/tcl.h | 6 | ||||
-rw-r--r-- | generic/tclIO.c | 2 | ||||
-rw-r--r-- | generic/tclListObj.c | 87 | ||||
-rw-r--r-- | generic/tclOO.h | 2 | ||||
-rw-r--r-- | generic/tclStringObj.c | 45 | ||||
-rw-r--r-- | generic/tclStringRep.h | 48 | ||||
-rw-r--r-- | generic/tclTest.c | 8 | ||||
-rw-r--r-- | tests/bigdata.test | 12 | ||||
-rw-r--r-- | tests/tailcall.test | 2 |
15 files changed, 129 insertions, 125 deletions
diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index 7ba9e89..52cec15 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -1,5 +1,12 @@ name: Linux -on: [push] +on: + push: + branches: + - "main" + - "trunk" + - "core-8-branch" + tags: + - "core-**" permissions: contents: read jobs: diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml index a9345a1..c576390 100644 --- a/.github/workflows/mac-build.yml +++ b/.github/workflows/mac-build.yml @@ -1,5 +1,12 @@ name: macOS -on: [push] +on: + push: + branches: + - "main" + - "trunk" + - "core-8-branch" + tags: + - "core-**" permissions: contents: read jobs: diff --git a/.github/workflows/onefiledist.yml b/.github/workflows/onefiledist.yml index 1f75762..f1cee16 100644 --- a/.github/workflows/onefiledist.yml +++ b/.github/workflows/onefiledist.yml @@ -1,5 +1,12 @@ name: Build Binaries -on: [push] +on: + push: + branches: + - "main" + - "trunk" + - "core-8-branch" + tags: + - "core-**" permissions: contents: read jobs: diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml index 2c32e36..3b55c41 100644 --- a/.github/workflows/win-build.yml +++ b/.github/workflows/win-build.yml @@ -1,5 +1,12 @@ name: Windows -on: [push] +on: + push: + branches: + - "main" + - "trunk" + - "core-8-branch" + tags: + - "core-**" permissions: contents: read env: diff --git a/doc/CrtObjCmd.3 b/doc/CrtObjCmd.3 index 7ba71eb..4bdde44 100644 --- a/doc/CrtObjCmd.3 +++ b/doc/CrtObjCmd.3 @@ -187,7 +187,7 @@ except its \fIproc2\fR argument is of type \fBTcl_ObjCmdProc2\fR. typedef int \fBTcl_ObjCmdProc2\fR( void *\fIclientData\fR, Tcl_Interp *\fIinterp\fR, - ptrdiff_t \fIobjc\fR, + Tcl_Size \fIobjc\fR, Tcl_Obj *const \fIobjv\fR[]); .CE .PP diff --git a/doc/CrtTrace.3 b/doc/CrtTrace.3 index cfd3303..9f74cbf 100644 --- a/doc/CrtTrace.3 +++ b/doc/CrtTrace.3 @@ -88,10 +88,10 @@ typedef int \fBTcl_CmdObjTraceProc\fR( typedef int \fBTcl_CmdObjTraceProc2\fR( \fBvoid *\fR \fIclientData\fR, \fBTcl_Interp\fR* \fIinterp\fR, - ptrdiff_t \fIlevel\fR, + Tcl_Size \fIlevel\fR, const char *\fIcommand\fR, \fBTcl_Command\fR \fIcommandToken\fR, - ptrdiff_t \fIobjc\fR, + Tcl_Size \fIobjc\fR, \fBTcl_Obj\fR *const \fIobjv\fR[]); .CE .PP diff --git a/generic/tcl.h b/generic/tcl.h index 2fb258c..2fab849 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -563,7 +563,7 @@ typedef int (Tcl_CmdObjTraceProc) (void *clientData, Tcl_Interp *interp, struct Tcl_Obj *const *objv); #endif /* TCL_NO_DEPRECATED */ typedef int (Tcl_CmdObjTraceProc2) (void *clientData, Tcl_Interp *interp, - ptrdiff_t level, const char *command, Tcl_Command commandInfo, ptrdiff_t objc, + Tcl_Size level, const char *command, Tcl_Command commandInfo, Tcl_Size objc, struct Tcl_Obj *const *objv); typedef void (Tcl_CmdObjTraceDeleteProc) (void *clientData); typedef void (Tcl_DupInternalRepProc) (struct Tcl_Obj *srcPtr, @@ -590,7 +590,7 @@ typedef int (Tcl_ObjCmdProc) (void *clientData, Tcl_Interp *interp, int objc, struct Tcl_Obj *const *objv); #endif /* TCL_NO_DEPRECATED */ typedef int (Tcl_ObjCmdProc2) (void *clientData, Tcl_Interp *interp, - ptrdiff_t objc, struct Tcl_Obj *const *objv); + Tcl_Size objc, struct Tcl_Obj *const *objv); typedef int (Tcl_LibraryInitProc) (Tcl_Interp *interp); typedef int (Tcl_LibraryUnloadProc) (Tcl_Interp *interp, int flags); typedef void (Tcl_PanicProc) (const char *format, ...); @@ -1978,7 +1978,7 @@ typedef struct Tcl_EncodingType { #define TCL_ENCODING_CHAR_LIMIT 0x10 /* Internal use bits, do not define bits in this space. See above comment */ #define TCL_ENCODING_INTERNAL_USE_MASK 0xFF00 -/* +/* * Reserve top byte for profile values (disjoint, not a mask). In case of * changes, ensure ENCODING_PROFILE_* macros in tclInt.h are modified if * necessary. diff --git a/generic/tclIO.c b/generic/tclIO.c index 3fefb88..65e327d 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -4347,7 +4347,7 @@ Write( Tcl_Size saved = 0, total = 0, flushed = 0; char safe[BUFFER_PADDING]; int encodingError = 0; - + if (srcLen) { WillWrite(chanPtr); } diff --git a/generic/tclListObj.c b/generic/tclListObj.c index 87530be..726b8dd 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -40,7 +40,7 @@ #ifdef ENABLE_LIST_ASSERTS -#define LIST_ASSERT(cond_) assert(cond_) /* TODO - is there a Tcl-specific one? */ +#define LIST_ASSERT(cond_) assert(cond_) /* * LIST_INDEX_ASSERT is to catch errors with negative indices and counts * being passed AFTER validation. On Tcl9 length types are unsigned hence @@ -69,8 +69,7 @@ /* Checks for when caller should have already converted to internal list type */ #define LIST_ASSERT_TYPE(listObj_) \ - LIST_ASSERT((listObj_)->typePtr == &tclListType.objType); - + LIST_ASSERT(TclHasInternalRep((listObj_), &tclListType.objType)) /* * If ENABLE_LIST_INVARIANTS is enabled (-DENABLE_LIST_INVARIANTS from the @@ -305,12 +304,12 @@ ListSpanMerited( Tcl_Size allocatedStorageLength) /* Length of the currently allocation */ { /* - TODO - - heuristics thresholds need to be determined - - currently, information about the sharing (ref count) of existing - storage is not passed. Perhaps it should be. For example if the - existing storage has a "large" ref count, then it might make sense - to do even a small span. + * Possible optimizations for future consideration + * - heuristic LIST_SPAN_THRESHOLD + * - currently, information about the sharing (ref count) of existing + * storage is not passed. Perhaps it should be. For example if the + * existing storage has a "large" ref count, then it might make sense + * to do even a small span. */ if (length < LIST_SPAN_THRESHOLD) { @@ -771,14 +770,16 @@ ListStoreNew( } if (flags & LISTREP_SPACE_FLAGS) { + /* Caller requests extra space front, back or both */ capacity = ListStoreUpSize(objc); } else { capacity = objc; } storePtr = (ListStore *)Tcl_AttemptAlloc(LIST_SIZE(capacity)); - if (storePtr == NULL && capacity != objc) { - capacity = objc; /* Try allocating exact size */ + while (storePtr == NULL && (capacity > (objc+1))) { + /* Because of loop condition capacity won't overflow */ + capacity = objc + ((capacity - objc) / 2); storePtr = (ListStore *)Tcl_AttemptAlloc(LIST_SIZE(capacity)); } if (storePtr == NULL) { @@ -827,7 +828,8 @@ ListStoreNew( * * ListStoreReallocate -- * - * Reallocates the memory for a ListStore. + * Reallocates the memory for a ListStore allocating extra for + * possible future growth. * * Results: * Pointer to the ListStore which may be the same as storePtr or pointer @@ -856,7 +858,7 @@ ListStoreReallocate (ListStore *storePtr, Tcl_Size numSlots) * by half every time. */ while (newStorePtr == NULL && (newCapacity > (numSlots+1))) { - /* Because of loop condition newCapacity can't overflow */ + /* Because of loop condition newCapacity won't overflow */ newCapacity = numSlots + ((newCapacity - numSlots) / 2); newStorePtr = (ListStore *)Tcl_AttemptRealloc(storePtr, LIST_SIZE(newCapacity)); @@ -1960,19 +1962,18 @@ int Tcl_ListObjIndex( Tcl_Interp *interp, /* Used to report errors if not NULL. */ Tcl_Obj *listObj, /* List object to index into. */ - Tcl_Size index, /* Index of element to return. */ + Tcl_Size index, /* Index of element to return. */ Tcl_Obj **objPtrPtr) /* The resulting Tcl_Obj* is stored here. */ { Tcl_Obj **elemObjs; Tcl_Size numElems; - /* - * TODO - * Unlike the original list code, this does not optimize for lindex'ing - * an empty string when the internal rep is not already a list. On the - * other hand, this code will be faster for the case where the object - * is currently a dict. Benchmark the two cases. - */ + /* Empty string => empty list. Avoid unnecessary shimmering */ + if (listObj->bytes == &tclEmptyString) { + *objPtrPtr = NULL; + return TCL_OK; + } + if (TclListObjGetElementsM(interp, listObj, &numElems, &elemObjs) != TCL_OK) { return TCL_ERROR; @@ -2017,19 +2018,19 @@ Tcl_ListObjLength( { ListRep listRep; + /* Empty string => empty list. Avoid unnecessary shimmering */ + if (listObj->bytes == &tclEmptyString) { + *lenPtr = 0; + return TCL_OK; + } + Tcl_Size (*lengthProc)(Tcl_Obj *obj) = ABSTRACTLIST_PROC(listObj, lengthProc); if (lengthProc) { *lenPtr = lengthProc(listObj); return TCL_OK; } - /* - * TODO - * Unlike the original list code, this does not optimize for lindex'ing - * an empty string when the internal rep is not already a list. On the - * other hand, this code will be faster for the case where the object - * is currently a dict. Benchmark the two cases. - */ + if (TclListObjGetRep(interp, listObj, &listRep) != TCL_OK) { return TCL_ERROR; } @@ -2094,12 +2095,12 @@ Tcl_ListObjReplace( { ListRep listRep; Tcl_Size origListLen; - ptrdiff_t lenChange; - ptrdiff_t leadSegmentLen; - ptrdiff_t tailSegmentLen; + Tcl_Size lenChange; + Tcl_Size leadSegmentLen; + Tcl_Size tailSegmentLen; Tcl_Size numFreeSlots; - ptrdiff_t leadShift; - ptrdiff_t tailShift; + Tcl_Size leadShift; + Tcl_Size tailShift; Tcl_Obj **listObjs; int favor; @@ -2110,8 +2111,6 @@ Tcl_ListObjReplace( if (TclListObjGetRep(interp, listObj, &listRep) != TCL_OK) return TCL_ERROR; /* Cannot be converted to a list */ - /* TODO - will need modification if Tcl9 sticks to unsigned indices */ - /* Make limits sane */ origListLen = ListRepLength(&listRep); if (first < 0) { @@ -2260,7 +2259,7 @@ Tcl_ListObjReplace( * be an explicit alloc and memmove which would let us redistribute * free space. */ - if ((ptrdiff_t)numFreeSlots < lenChange && !ListRepIsShared(&listRep)) { + if (numFreeSlots < lenChange && !ListRepIsShared(&listRep)) { /* T:listrep-1.{1,3,14,18,21},3.{3,10,11,14,27,32,41} */ ListStore *newStorePtr = ListStoreReallocate(listRep.storePtr, origListLen + lenChange); @@ -2287,7 +2286,7 @@ Tcl_ListObjReplace( * TODO - for unshared case ONLY, consider a "move" based implementation */ if (ListRepIsShared(&listRep) || /* 3a */ - (ptrdiff_t)numFreeSlots < lenChange || /* 3b */ + numFreeSlots < lenChange || /* 3b */ (origListLen + lenChange) < (listRep.storePtr->numAllocated / 4) /* 3c */ ) { ListRep newRep; @@ -2402,9 +2401,9 @@ Tcl_ListObjReplace( * or need to shift both. In the former case, favor shifting the * smaller segment. */ - ptrdiff_t leadSpace = ListRepNumFreeHead(&listRep); - ptrdiff_t tailSpace = ListRepNumFreeTail(&listRep); - ptrdiff_t finalFreeSpace = leadSpace + tailSpace - lenChange; + Tcl_Size leadSpace = ListRepNumFreeHead(&listRep); + Tcl_Size tailSpace = ListRepNumFreeTail(&listRep); + Tcl_Size finalFreeSpace = leadSpace + tailSpace - lenChange; LIST_ASSERT((leadSpace + tailSpace) >= lenChange); if (leadSpace >= lenChange @@ -2421,7 +2420,7 @@ Tcl_ListObjReplace( * insertions. */ if (finalFreeSpace > 1 && (tailSpace == 0 || tailSegmentLen == 0)) { - ptrdiff_t postShiftLeadSpace = leadSpace - lenChange; + Tcl_Size postShiftLeadSpace = leadSpace - lenChange; if (postShiftLeadSpace > (finalFreeSpace/2)) { Tcl_Size extraShift = postShiftLeadSpace - (finalFreeSpace / 2); leadShift -= extraShift; @@ -2438,7 +2437,7 @@ Tcl_ListObjReplace( * See comments above. This is analogous. */ if (finalFreeSpace > 1 && (leadSpace == 0 || leadSegmentLen == 0)) { - ptrdiff_t postShiftTailSpace = tailSpace - lenChange; + Tcl_Size postShiftTailSpace = tailSpace - lenChange; if (postShiftTailSpace > (finalFreeSpace/2)) { /* T:listrep-1.{1,3,14,18,21},3.{2,3,26,27} */ Tcl_Size extraShift = postShiftTailSpace - (finalFreeSpace / 2); @@ -2613,7 +2612,7 @@ TclLindexList( /* * The argument is neither an index nor a well-formed list. * Report the error via TclLindexFlat. - * TODO - This is as original. why not directly return an error? + * TODO - This is as original code. why not directly return an error? */ return TclLindexFlat(interp, listObj, 1, &argObj); } @@ -3557,7 +3556,7 @@ TclListTestObj(size_t length, size_t leadingSpace, size_t endSpace) return NULL; } - ListRepInit(capacity, NULL, 0, &listRep); + ListRepInit(capacity, NULL, LISTREP_PANIC_ON_FAIL, &listRep); ListStore *storePtr = listRep.storePtr; size_t i; diff --git a/generic/tclOO.h b/generic/tclOO.h index fe036e2..a70a018 100644 --- a/generic/tclOO.h +++ b/generic/tclOO.h @@ -65,7 +65,7 @@ typedef int (Tcl_MethodCallProc)(void *clientData, Tcl_Interp *interp, Tcl_ObjectContext objectContext, int objc, Tcl_Obj *const *objv); #endif /* TCL_NO_DEPRECATED */ typedef int (Tcl_MethodCallProc2)(void *clientData, Tcl_Interp *interp, - Tcl_ObjectContext objectContext, ptrdiff_t objc, Tcl_Obj *const *objv); + Tcl_ObjectContext objectContext, Tcl_Size objc, Tcl_Obj *const *objv); typedef void (Tcl_MethodDeleteProc)(void *clientData); typedef int (Tcl_CloneProc)(Tcl_Interp *interp, void *oldClientData, void **newClientData); diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 63e38bb..d0703b3 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -1,29 +1,27 @@ /* * tclStringObj.c -- * - * This file contains functions that implement string operations on Tcl - * objects. Some string operations work with UTF strings and others - * require Unicode format. Functions that require knowledge of the width - * of each character, such as indexing, operate on Unicode data. - * - * A Unicode string is an internationalized string. Conceptually, a - * Unicode string is an array of 16-bit quantities organized as a - * sequence of properly formed UTF-8 characters. There is a one-to-one - * map between Unicode and UTF characters. Because Unicode characters - * have a fixed width, operations such as indexing operate on Unicode - * data. The String object is optimized for the case where each UTF char + * This file contains functions that implement string operations on Tcl + * objects. Some string operations work with UTF-8 encoding forms. + * Functions that require knowledge of the width of each character, + * such as indexing, operate on fixed width encoding forms such as UTF-32. + * + * Conceptually, a string is a sequence of Unicode code points. Internally + * it may be stored in an encoding form such as a modified version of + * UTF-8 or UTF-16 (when TCL_UTF_MAX=3) or UTF-32. + * + * The String object is optimized for the case where each UTF char * in a string is only one byte. In this case, we store the value of - * numChars, but we don't store the Unicode data (unless Tcl_GetUnicode - * is explicitly called). + * numChars, but we don't store the fixed form encoding (unless + * Tcl_GetUnicode is explicitly called). * - * The String object type stores one or both formats. The default - * behavior is to store UTF. Once Unicode is calculated by a function, it - * is stored in the internal rep for future access (without an additional - * O(n) cost). + * The String object type stores one or both formats. The default + * behavior is to store UTF-8. Once UTF-16/UTF32 is calculated, it is + * stored in the internal rep for future access (without an additional + * O(n) cost). * * To allow many appends to be done to an object without constantly - * reallocating the space for the string or Unicode representation, we - * allocate double the space for the string or Unicode and use the + * reallocating space, we allocate double the space and use the * internal representation to keep track of how much space is used vs. * allocated. * @@ -2753,12 +2751,16 @@ AppendPrintfToObjVA( break; } + case 'p': + if (sizeof(size_t) == sizeof(Tcl_WideInt)) { + size = 2; + } + /* FALLTHRU */ case 'c': case 'i': case 'u': case 'd': case 'o': - case 'p': case 'x': case 'X': seekingConversion = 0; @@ -3139,8 +3141,7 @@ TclStringCat( { Tcl_Obj *objResultPtr, * const *ov; int binary = 1; - Tcl_Size oc; - Tcl_Size length = 0; + Tcl_Size oc, length = 0; int allowUniChar = 1, requestUniChar = 0, forceUniChar = 0; Tcl_Size first = objc - 1; /* Index of first value possibly not empty */ Tcl_Size last = 0; /* Index of last value possibly not empty */ diff --git a/generic/tclStringRep.h b/generic/tclStringRep.h index d0c76cb..768c1ee 100644 --- a/generic/tclStringRep.h +++ b/generic/tclStringRep.h @@ -1,29 +1,12 @@ /* * tclStringRep.h -- * - * This file contains the definition of the Unicode string internal - * representation and macros to access it. + * This file contains the definition of internal representations of a string + * and macros to access it. * - * A Unicode string is an internationalized string. Conceptually, a - * Unicode string is an array of 16-bit quantities organized as a - * sequence of properly formed UTF-8 characters. There is a one-to-one - * map between Unicode and UTF characters. Because Unicode characters - * have a fixed width, operations such as indexing operate on Unicode - * data. The String object is optimized for the case where each UTF char - * in a string is only one byte. In this case, we store the value of - * numChars, but we don't store the Unicode data (unless Tcl_GetUnicode - * is explicitly called). - * - * The String object type stores one or both formats. The default - * behavior is to store UTF. Once Unicode is calculated by a function, it - * is stored in the internal rep for future access (without an additional - * O(n) cost). - * - * To allow many appends to be done to an object without constantly - * reallocating the space for the string or Unicode representation, we - * allocate double the space for the string or Unicode and use the - * internal representation to keep track of how much space is used vs. - * allocated. + * Conceptually, a string is a sequence of Unicode code points. Internally + * it may be stored in an encoding form such as a modified version of UTF-8 + * or UTF-16 (when TCL_UTF_MAX=3) or UTF-32. * * Copyright (c) 1995-1997 Sun Microsystems, Inc. * Copyright (c) 1999 by Scriptics Corporation. @@ -39,15 +22,10 @@ /* * The following structure is the internal rep for a String object. It keeps * track of how much memory has been used and how much has been allocated for - * the Unicode and UTF string to enable growing and shrinking of the UTF and - * Unicode reps of the String object with fewer mallocs. To optimize string + * the various representations to enable growing and shrinking of + * the String object with fewer mallocs. To optimize string * length and indexing operations, this structure also stores the number of - * characters (same of UTF and Unicode!) once that value has been computed. - * - * Under normal configurations, what Tcl calls "Unicode" is actually UTF-16 - * restricted to the Basic Multilingual Plane (i.e. U+00000 to U+0FFFF). This - * can be officially modified by altering the definition of Tcl_UniChar in - * tcl.h, but do not do that unless you are sure what you're doing! + * code points (independent of encoding form) once that value has been computed. */ typedef struct { @@ -57,15 +35,15 @@ typedef struct { * Unicode rep, or that the number of UTF bytes == * the number of chars. */ Tcl_Size allocated; /* The amount of space actually allocated for - * the UTF string (minus 1 byte for the + * the UTF-8 string (minus 1 byte for the * termination char). */ Tcl_Size maxChars; /* Max number of chars that can fit in the * space allocated for the Unicode array. */ int hasUnicode; /* Boolean determining whether the string has - * a Unicode representation. */ - Tcl_UniChar unicode[TCLFLEXARRAY]; /* The array of Unicode chars. The actual size - * of this field depends on the 'maxChars' - * field above. */ + * a Tcl_UniChar representation. */ + Tcl_UniChar unicode[TCLFLEXARRAY]; /* The array of Tcl_UniChar units. + * The actual size of this field depends on + * the maxChars field above. */ } String; /* Limit on string lengths. The -1 because limit does not include the nul */ diff --git a/generic/tclTest.c b/generic/tclTest.c index 0480601..4e332a2 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -222,7 +222,7 @@ static void MainLoop(void); static Tcl_CmdProc NoopCmd; static Tcl_ObjCmdProc2 NoopObjCmd; static int ObjTraceProc(void *clientData, - Tcl_Interp *interp, int level, const char *command, + Tcl_Interp *interp, TclSizeT level, const char *command, Tcl_Command commandToken, TclSizeT objc, Tcl_Obj *const objv[]); static void ObjTraceDeleteProc(void *clientData); @@ -1163,8 +1163,8 @@ TestcmdinfoObjCmd( case CMDINFO_MODIFY: info.proc = CmdProc2; info.clientData = (void *) "new_command_data"; - info.objProc = NULL; - info.objClientData = NULL; + info.objProc2 = NULL; + info.objClientData2 = NULL; info.deleteProc = CmdDelProc2; info.deleteData = (void *) "new_delete_data"; if (Tcl_SetCommandInfo(interp, Tcl_GetString(objv[2]), &info) == 0) { @@ -1493,7 +1493,7 @@ static int ObjTraceProc( TCL_UNUSED(void *), Tcl_Interp *interp, /* Tcl interpreter */ - TCL_UNUSED(int) /*level*/, + TCL_UNUSED(TclSizeT) /*level*/, const char *command, TCL_UNUSED(Tcl_Command), TCL_UNUSED(TclSizeT) /*objc*/, diff --git a/tests/bigdata.test b/tests/bigdata.test index 08556dd..5eb7b89 100644 --- a/tests/bigdata.test +++ b/tests/bigdata.test @@ -394,7 +394,7 @@ bigtestRO string-replace-bigdata-1 "string replace" {789012345 012345678 XYZ7890 } -cleanup { bigClean } -# TODO - +# TODO - # - replacements string is large # - replace in the middle - string length grows, shrinks # - last < first @@ -720,7 +720,7 @@ bigtestRO binary-format-bigdata-1 "binary format aN" [list 4294967296 X\0\0\0 \ list [string length $bin] [string range $bin 0 3] [string range $bin end-3 end] } -cleanup { bigClean -} +} # TODO - do string compare and add other format specifiers bigtestRO binary-format-bigdata-2 "binary format a*" 1 -body { @@ -1114,10 +1114,9 @@ bigtestRO concat-bigdata-1 "concat" {4294967296 {0 1 2 3 4} {6 7 0 1 2} {3 4 5 6 test puts-bigdata-1 "puts" -setup { set fpath [makeFile {} bug-0306a5563.data] } -constraints { - bug0306a5563 bigdata } -body { - set fd [open $fpath w] + set fd [open $fpath w] puts -nonewline $fd [testbigdata string 0x80000001] close $fd set fd [open $fpath] @@ -1130,13 +1129,12 @@ test puts-bigdata-1 "puts" -setup { test puts-bigdata-2 "puts" -setup { set fpath [tcltest::makeFile {} bug-0306a5563.data] } -constraints { - bug0306a5563 bigdata } -body { set fd [open $fpath w] set s [testbigdata string 0x7FFFFFFE] - # The character to append in the next line is —, EM DASH, - # code point 0x2014 (decimal 8212, UTF-8 #xE2 #x80 #x94) + # The character to append in the next line is —, EM DASH, + # code point 0x2014 (decimal 8212, UTF-8 #xE2 #x80 #x94) append s \u2014 puts -nonewline $fd $s close $fd diff --git a/tests/tailcall.test b/tests/tailcall.test index c9ec674..0016845 100644 --- a/tests/tailcall.test +++ b/tests/tailcall.test @@ -709,7 +709,7 @@ test tailcall-14.1-bc {{in a deleted namespace} {byte compiled}} -body { } -returnCodes 1 -result {namespace "::ns" not found} test tailcall-bug-784befb0ba {tailcall crash with 254 args} -body { - proc tccrash args {llength $args} + proc tccrash args {llength $args} # Must be EXACTLY 254 for crash proc p {} [list tailcall tccrash {*}[lrepeat 254 x]] p |