| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
variable names in
|
| |
|
|
|
|
|
|
|
| |
Not a direct copy
* Better use of Tcl object API
* More extensive test suite
* More extensive documentation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
such as [return -code error $msg] to be bytecompiled.
* generic/tclInt.h: Factored Tcl_ReturnObjCmd() into two pieces:
* generic/tclCmdMZ.c: TclMergeReturnOptions(), which can parse the
options to [return], check their validity, and create the
corresponding return options dictionary, and TclProcessReturn(),
which takes that return options dictionary and performs the
[return] operation.
* generic/tclCompCmds.c: Rewrote TclCompileReturnCmd() to
call TclMergeReturnOptions() at compile time so the return options
dictionary is computed at compile time (when it is fully known).
The dictionary is pushed on the stack along with the result, and
the code and level values are included in the bytecode as operands.
Also supports optimized compilation of un-[catch]ed [return]s from
procs with default options into the INST_DONE instruction.
* generic/tclExecute.c: Rewrote INST_RETURN instruction to retrieve
the code and level operands, pop the return options from the stack,
and call TclProcessReturn() to perform the [return] operation.
* generic/tclCompile.h: New utilities include TclEmitInt4 macro
* generic/tclCompile.c: and TclWordKnownAtCompileTime().
|
|
|
|
| |
TclAllocObjStorage macro.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that appends a Tcl_Obj to the errorInfo, saving the caller the trouble
of extracting the string rep.
* generic/tclStringObj.c (TclAppendLimitedToObj): New internal
routine that supports truncated appends with optional ellipsis marking.
This single routine supports UTF-8-safe truncated appends needed in
several places throughout the Tcl source code, mostly for error and
stack messages. Clean fix for [Bug 760872].
* generic/tclInt.h: Declarations for new internal routines.
* generic/tclCmdMZ.c: Updated callers to use the new routines.
* generic/tclCompExpr.c:
* generic/tclCompile.c:
* generic/tclExecute.c:
* generic/tclIOUtil.c:
* generic/tclNamesp.c:
* generic/tclObj.c:
* generic/tclParseExpr.c:
* generic/tclProc.c:
* generic/tclStringObj.c:
* mac/tclMacResource.c:
* library/init.tcl: Updated ::errorInfo cleanup in [unknown] to
reflect slight modifications to Tcl_LogCommandInfo(). Corrects
failing init-4.* tests.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* generic/tclInt.h: changed the evaluation-stack addressing mode,
from array-style to pointer-style; the catch stack and evaluation
stack are now contiguous in memory. [Patch 457449]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
since it made the sizeof(Tcl_Obj) different for
regular vs mem debug builds.
* generic/tclInt.h: Define TclDecrRefCount in terms
of Tcl_DbDecrRefCount which removes one layer of
inderection.
* generic/tclObj.c (TclDbInitNewObj, Tcl_DbIncrRefCount,
Tcl_DbDecrRefCount, Tcl_DbIsShared):
Define ThreadSpecificData that contains a hashtable.
The table is used to ensure that a Tcl_Obj is only
acted upon in the thread that allocated it. This
checking code is enabled only when mem debug and
threads are enabled.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the ref count of a Tcl_Obj is the thread that
originally allocated the thread. This fail fast
behavior will catch programming errors that
allow a single Tcl_Obj to be accessed from multiple
threads.
* generic/tcl.h (Tcl_Obj): Add allocThread member
to Tcl_Obj. This member records the thread id the
Tcl_Obj was allocated. It is used to check that
any future ref count incr or decr is done from
the same thread that allocated the Tcl_Obj.
This member is defined only when threads and
mem debug are enabled.
* generic/tclInt.h (TclNewObj, TclDbNewObj,
TclDecrRefCount):
Define TclNewObj and TclDbNewObj using TclDbInitNewObj
when mem debug is enabled. This fixes a problem where
TclNewObj calls did not work the same as TclDbNewObj
when mem debug was enabled.
* generic/tclObj.c (TclDbInitNewObj, Tcl_DbIncrRefCount,
Tcl_DbDecrRefCount): Add new helper to init Tcl_Obj
members when mem debug is enabled. Init the allocThread
member in TclDbInitNewObj and check it in
Tcl_DbIncrRefCount and Tcl_DbDecrRefCount to make sure
a Tcl_Obj allocated in one thread is not being acted
upon in another thread.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* generic/tcl.h: 'tip-59-implementation' branch into the CVS
* generic/tclBasic.c: head. Regenerated stub table. Regenerated
* generic/tclInt.h: the configure's scripts, with help from Joe
* generic/tclDecls.h English.
* generic/tclStubInit.c:
* generic/tclConfig.c:
* generic/tclPkgConfig.c:
* unix/Makefile.in:
* unix/configure.in: The changes in the windows section are not
* unix/tcl.m4: yet committed, they await feedback from
* unix/mkLinks: David Gravereaux.
* doc/RegConfig.3:
* mac/tclMacPkgConfig.c:
* tests/config.test:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclCmdAH.c: extends the [catch] and [return]
* generic/tclCompCmds.c: commands to enable creation of a
* generic/tclExecute.c: proc that is a replacement for
* generic/tclInt.h: [return]. [Patch 531640]
* generic/tclProc.c:
* generic/tclResult.c:
* tests/cmdAH.test:
* tests/cmdMZ.test:
* tests/error.test:
* tests/proc-old.test:
* library/tcltest/tcltest.tcl: The -returnCodes option to [test]
failed to recognize the symbolic name "ok" for return code 0.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclIO.c (Tcl_CutChannel, Tcl_SpliceChannel):
Invoke TclpCutSockChannel and TclpSpliceSockChannel.
* generic/tclInt.h: Declare TclpCutSockChannel and
TclpSpliceSockChannel.
* unix/tclUnixSock.c (TclpCutSockChannel, TclpSpliceSockChannel):
Dummy functions, on unix the sockets are _not_ handled
specially.
* mac/tclMacSock.c (TclpCutSockChannel, TclpSpliceSockChannel):
* win/tclWinSock.c (TclpCutSockChannel, TclpSpliceSockChannel):
New functions to handle socket specific cut/splice operations:
auto-initi of socket system for thread on splice, management of
the module internal per-thread list of sockets, management of
association of sockets with HWNDs for event notification.
* win/tclWinSock.c (NewSocketInfo): Extended initialization
assignments to cover all items of the structure. During
debugging of the new code mentioned above I found that two
fileds could contain bogus data.
* win/tclWinFile.c: Added #undef HAVE_NO_FINDEX_ENUMS before
definition because when compiling in debug mode the compiler
complains about a redefinition, and this warning is also treated
as an error.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclObj.c is defined on all platforms, even those where
* generic/tclPort.h TCL_WIDE_INT_IS_LONG is defined. Also made
the Tcl_Value struct have a wideValue field on all platforms. This is
a ***POTENTIAL INCOMPATIBILITY*** for TCL_WIDE_INT_IS_LONG platforms
because that struct changes size. This is the same TIP 72
incompatibility that was seen on other platforms at the 8.4.0 release,
when this change should have happened as well. [Bug 713562]
* generic/tclInt.h: New internal macros TclGetWide() and
TclGetLongFromWide() to deal with both forms of the "wideInt"
Tcl_ObjType, so that conditional TCL_WIDE_INT_IS_LONG code
is confined to the header file.
* generic/tclCmdAH.c: Replaced most coding that was conditional
* generic/tclCmdIL.c: on TCL_WIDE_INT_IS_LONG with code that
* generic/tclExecute.c: works across platforms, sometimes using
* generic/tclTest.c: the new macros above to do it.
* generic/tclUtil.c:
* generic/tclVar.c:
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclStubInit.c (tclOriginalNotifier):
* mac/tclMacNotify.c (Tcl_SetTimer,Tcl_WaitForEvent):
* unix/tclUnixNotfy.c (Tcl_SetTimer,Tcl_WaitForEvent,
Tcl_CreateFileHandler,Tcl_DeleteFileHandler):
* win/tclWinNotify.c (Tcl_SetTimer,Tcl_WaitForEvent): Some linkers
apparently use a different representation for a pointer to a function
within the same compilation unit and a pointer to a function in a
different compilation unit. This causes checks like those in the
original notifier procedures to fall into infinite loops. The fix
is to store pointers to the original notifier procedures in a struct
defined in the same compilation unit as the stubs tables, and compare
against those values. [Bug 707174]
|
|
|
|
| |
is no longer used.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclCmdMZ.c (Tcl_SubstObj):
* generic/tclCompCmds.c (TclCompileSwitchCmd):
* generic/tclCompExpr.c (CompileSubExpr):
* generic/tclCompile.c (TclSetByteCodeFromAny,TclCompileScript,
TclCompileTokens,TclCompileCmdWord):
* generic/tclCompile.h (TclCompileScript):
* generic/tclExecute.c (TclCompEvalObj):
* generic/tclInt.h (Interp,TCL_BRACKET_TERM,TclSubstTokens):
* generic/tclParse.c (ParseTokens,Tcl_SubstObj,TclSubstTokens):
* tests/subst.test (2.4, 8.7, 8.8, 11.4, 11.5):
Substantial refactoring of Tcl_SubstObj to make use of the same
parsing and substitution procedures as normal script evaluation.
Tcl_SubstObj() moved to tclParse.c. New routine TclSubstTokens()
created in tclParse.c which implements all substantial functioning
of Tcl_EvalTokensStandard(). TclCompileScript() loses its
"nested" argument, the Tcl_Interp struct loses its termOffset
field and the TCL_BRACKET_TERM flag in the evalFlags field, all
of which were only used (indirectly) by Tcl_SubstObj(). Tests
subst-8.7,8.8,11.4,11.5 modified to accomodate the only behavior
change: reporting of parse errors now takes precedence over
[return] and [continue] exceptions. All other behavior should
|
|
|
|
|
| |
case. There's room for improvement in the future, of course. [Patch #644819]
Also adds another macro to help with jump offset fixups.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Invoke TclpCutFileChannel and TclpSpliceFileChannel.
* generic/tclInt.h: Declare TclpCutFileChannel
and TclpSpliceFileChannel.
* unix/tclUnixChan.c (FileCloseProc, TclpOpenFileChannel,
Tcl_MakeFileChannel, TclpCutFileChannel,
TclpSpliceFileChannel): Implement thread load data
cut and splice for file channels. This avoids
an invalid memory ref when compiled with -DDEPRECATED.
* win/tclWinChan.c (FileCloseProc, TclpCutFileChannel,
TclpSpliceFileChannel): Implement thread load data
cut and splice for file channels. This avoids
an invalid memory ref that was showing up in the
thread extension.
|
| |
|
| |
|
|
|
|
|
|
| |
(TclUtfToUniChar) that does the one-byte utf-char check without
calling Tcl_UtfToUniChar, for use by the core. This brings
notable speedups for primarily ascii string handling.
|
| |
|
|
|
|
|
|
|
|
|
| |
* generic/tclObj.c: (code cleanup) factored the parts in the macros
TclNewObj() / TclDecrRefCount() into a common part for all
memory allocators and two new macros TclAllocObjStorage() /
TclFreeObjStorage() that are specific to each allocator and fully
describe the differences. Removed allocator-specific code from
tclObj.c by using the macros.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/Concat.3: all remaining public interfaces of Tcl.
* doc/CrtCommand.3: Notably, the parser no longer writes on
* doc/CrtSlave.3: the string it is parsing, so it is no
* doc/CrtTrace.3: longer necessary for Tcl_Eval() to be
* doc/Eval.3: given a writable string. Also, the
* doc/ExprLong.3: refactoring of the Tcl_*Var* routines
* doc/LinkVar.3: by Miguel Sofer is included, so that the
* doc/ParseCmd.3: "part1" argument for them no longer needs
* doc/SetVar.3: to be writable either.
* doc/TraceVar.3:
* doc/UpVar.3: Compatibility support has been enhanced so
* generic/tcl.decls that a #define of USE_NON_CONST will remove
* generic/tcl.h all possible source incompatibilities with
* generic/tclBasic.c the 8.3 version of the header file(s).
* generic/tclCmdMZ.c The new #define of USE_COMPAT_CONST now does
* generic/tclCompCmds.c what USE_NON_CONST used to do -- disable
* generic/tclCompExpr.c only those new CONST's that introduce
* generic/tclCompile.c irreconcilable incompatibilities.
* generic/tclCompile.h
* generic/tclDecls.h Several bugs are also fixed by this patch.
* generic/tclEnv.c [Bugs 584051,580433] [Patches 585105,582429]
* generic/tclEvent.c
* generic/tclInt.decls
* generic/tclInt.h
* generic/tclIntDecls.h
* generic/tclInterp.c
* generic/tclLink.c
* generic/tclObj.c
* generic/tclParse.c
* generic/tclParseExpr.c
* generic/tclProc.c
* generic/tclTest.c
* generic/tclUtf.c
* generic/tclUtil.c
* generic/tclVar.c
* mac/tclMacTest.c
* tests/expr-old.test
* tests/parseExpr.test
* unix/tclUnixTest.c
* unix/tclXtTest.c
* win/tclWinTest.c
|
|
|
|
| |
rep [Bug 524802]
|
| |
|
|
|
|
| |
have file-scope.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
results in (Tcl_AddObjErrorInfo) and (TclUpdateReturnInfo)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pointers; definition of three new Tcl_Obj types to cache variable
name parsing and lookup for later reuse; modification of internal
functions to profit from the caching.
* generic/tclInt.decls:
* generic/tclInt.h:
* generic/tclIntDecls.h:
* generic/tclNamesp.c: adding CONST qualifiers to variable names
passed to Tcl_FindNamespaceVar and to variable resolvers; adding
CONST qualifier to the 'msg' argument to TclLookupVar. Needed to
avoid code duplication in the new tclVar.c code.
* tests/set-old.test:
* tests/var.test: slight modification of error messages due to the
modifications in the tclVar.c code.
|
|
|
|
| |
stub table.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/trace.n: execution tracing [FR #462580] (lavana).
* generic/tcl.h: This includes enter/leave tracing as well
* generic/tclBasic.c: as inter-procedure stepping.
* generic/tclCmdMZ.c:
* generic/tclCompile.c:
* generic/tclExecute.c:
* generic/tclInt.decls:
* generic/tclInt.h:
* generic/tclIntDecls.h:
* generic/tclStubInit.c:
* generic/tclVar.c:
* tests/trace.test:
|