summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix for [Bug 988703, 1565466]Joe Mistachkin2009-10-181-3/+5
|
* * generic/tclAlloc.c: Cleaned up various routines in thedgp2009-09-291-1/+12
| | | | | | | * generic/tclCkalloc.c: call stacks for memory allocation to * generic/tclInt.h: guarantee that any size values computed * generic/tclThreadAlloc.c: are within the domains of the routines they get passed to. [Bugs 2557696 and 2557796].
* * generic/tclBasic.c (Tcl_CreateInterp, Tcl_EvalTokensStandard,andreas_kupries2009-08-251-5/+52
| | | | | | | | | | | | | | | | | | | | | | | | EvalTokensStandard, Tcl_EvalEx, EvalEx, TclAdvanceContinuations, TclEvalObjEx): * generic/tclCmdMZ.c (Tcl_SwitchObjCmd, TclListLines): * generic/tclCompCmds.c (*): * generic/tclCompile.c (TclSetByteCodeFromAny, TclInitCompileEnv, TclFreeCompileEnv, TclCompileScript): * generic/tclCompile.h (CompileEnv): * generic/tclInt.h (ContLineLoc, Interp): * generic/tclObj.c (ThreadSpecificData, ContLineLocFree, TclThreadFinalizeObjects, TclInitObjSubsystem, TclContinuationsEnter, TclContinuationsEnterDerived, TclContinuationsCopy, TclContinuationsGet, TclFreeObj): * generic/tclParse.c (TclSubstTokens, Tcl_SubstObj): * generic/tclProc.c (TclCreateProc): * generic/tclVar.c (TclPtrSetVar): * tests/info.test (info-30.0-24): Extended parser, compiler, and execution with code and attendant data structures tracking the positions of continuation lines which are not visible in script Tcl_Obj*'s, to properly account for them while counting lines for #280.
* * generic/tclBasic.c (DeleteInterpProc,TclArgumentBCEnter,andreas_kupries2009-07-141-12/+8
| | | | | | | | | | | | | | | | | | | | | | TclArgumentBCRelease, TclArgumentGet): * generic/tclCompile.c (EnterCmdWordIndex, TclCleanupByteCode, TclInitCompileEnv, TclCompileScript): * generic/tclCompile.h (ExtCmdLoc): * generic/tclExecute.c (TclExecuteByteCode): * generic/tclInt.h (ExtIndex, CFWordBC): * tests/info.test (info-39.0): Backport of some changes made to the Tcl head, to handle literal sharing better. The code here is much simpler (trimmed down) compared to the head as the 8.5 branch is not bytecode compiling whole files, and doesn't compile eval'd code either. Reworked the handling of literal command arguments in bytecode to be saved (compiler) and used (execution) per command (See the TCL_INVOKE_STK* instructions), and not per the whole bytecode. This removes the problems with location data caused by literal sharing in proc bodies. Simplified the associated datastructures (ExtIndex is gone, as is the function EnterCmdWordIndex).
* Backport fix for [Bug 1028264]: WSACleanup() too early. The fix introduces ↵ferrieux2009-04-271-1/+5
| | | | "late exit handlers" for similar late process-wide cleanups.
* Fixed [Bug 2269431]: load of shared objectsnijtmans2008-11-141-2/+3
| | | | leaves emporary files on windows
* * generic/tclInt.h: Correct the TclGetLongFromObj,dgp2008-09-171-4/+4
| | | | | | TclGetIntFromObj, and TclGetIntForIndexM macros so that they retrieve the internalRep.longValue field instead of casting the internalRep.otherValuePtr field to type long.
* * generic/tclBasic.c: Reworked the handling of bytecode literalsandreas_kupries2008-07-221-1/+19
| | | | | | | | | | * generic/tclCompile.c: for #280 to fix the abysmal performance * generic/tclCompile.h: for deep recursion, replaced the linear * generic/tclExecute.c: search through the whole stack with * generic/tclInt.h: another hashtable and simplified the data structure used by the compiler (array instead of hashtable). Incidentially this also fixes the memory leak reported via [Bug 2024937].
* * generic/tclBasic.c: Extended the existing TIP #280 system (infoandreas_kupries2008-07-211-3/+30
| | | | | | | | | | | * generic/tclCmdAH.c: frame), added the ability to track the * generic/tclCompCmds.c: absolute location of literal procedure * generic/tclCompile.c: arguments, and making this information * generic/tclCompile.h: available to uplevel, eval, and * generic/tclInterp.c: siblings. This allows proper tracking of * generic/tclInt.h: absolute location through custom (Tcl-coded) * generic/tclNamesp.c: control structures based on uplevel, etc. * generic/tclProc.c:
* merge updates from HEAD dgp2008-03-311-5/+9
|
* Reconcile coding style issues between branchesdgp2008-01-231-4/+4
|
* Reconcile coding style issues between branchesdgp2008-01-231-36/+36
|
* * generic/tclInt.h: New macro TclGrowParseTokenArray() todgp2008-01-231-2/+47
| | | | | | | | | | | | | | * generic/tclCompCmds.c: simplify code that might need to grow * generic/tclCompExpr.c: an array of Tcl_Tokens in the parsePtr * generic/tclParse.c: field of a Tcl_Parse. Replaces the TclExpandTokenArray() routine via replacing: int needed = parsePtr->numTokens + growth; while (needed > parsePtr->tokensAvailable) { TclExpandTokenArray(parsePtr); } with: TclGrowParseTokenArray(parsePtr, growth); This revision merged over from dgp-refactor branch.
* * generic/tclAlloc.c:Miguel Sofer2007-12-171-1/+12
| | | | | | | | * generic/tclExecute.c: * generic/tclInt.h: * generic/tclThreadAlloc.c: Fix alignment for memory returned by TclStackAlloc; insure that all memory allocators align to 16-byte boundaries on 64 bit platforms [Bug 1851832, 1851524]
* merge stable branch onto HEADdgp2007-12-131-1/+1
|
* * generic/tclInt.decls: move TclByteArrayMatch and TclReToGlobhobbs2007-12-111-1/+10
| | | | | | | | | | | | | * generic/tclIntDecls.h: to tclInt.h from stubs. * generic/tclStubInit.c: Add flags var to TclByteArrayMatch for * generic/tclInt.h: future extensibility * generic/tcl.h: define TCL_MATCH_EXACT doc for Tcl_StringCaseMatch. * doc/StrMatch.3: It is compatible with existing usage. * generic/tclExecute.c (INST_STR_MATCH): flag for TclByteArrayMatch * generic/tclUtil.c (TclByteArrayMatch, TclStringMatchObj): * generic/tclRegexp.c (Tcl_RegExpExecObj): * generic/tclCmdMZ.c (StringMatchCmd): Use TclStringMatchObj * tests/string.test (11.9.* 11.10.*): more tests
* (TclMatchIsTrivial): simplify TclMatchIsTrivial to remove ] checkhobbs2007-12-061-2/+2
|
* add TclGetChannelFromObj declhobbs2007-12-061-1/+4
|
* Simplify code for setting up the [chan] ensemble now that we can leveragedkf2007-12-061-11/+8
| | | | TclMakeEnsemble to do most of the work.
* * generic/tclBasic.c:Miguel Sofer2007-11-261-2/+2
| | | | | | | | | * generic/tclInt.h: * unix/tclUnixInit.c: * unix/tclUnixThrd.c: Fix stack checking via workaround for bug in glibc's pthread_attr_get_np, patch from [Bug 1815573]. Many thanks to Sergei Golovan (aka Teo) for detecting the bug and helping diagnose and develop the fix.
* Turn the [string] command into a real compiled ensemble.dkf2007-11-231-5/+15
|
* Rebuild [dict] as a full compiled ensemble.dkf2007-11-221-6/+22
|
* Factor out the core compiled-ensemble builder for simplicity.dkf2007-11-211-3/+15
|
* * generic/tclDictObj.c: Changed the underlying implementation of thedkf2007-11-201-1/+9
| | | | | | | | | hash table used in dictionaries to additionally keep all entries in the hash table in a linked list, which is only ever added to at the end. This makes iteration over all entries in the dictionary in key insertion order a trivial operation, and so cleans up a great deal of complexity relating to dictionary representation and stability of iteration order.
* More minor cleanupdkf2007-11-181-253/+253
|
* Greatly improved ensemble compiler. This one now can handle any ensemble.dkf2007-11-161-54/+114
| | | | | It is usually not enabled though; only worth it when a subcommand is actually expected to undergo bytecode compilation.
* Compile [info exists] into bytecode. Includes new instructions to support it.dkf2007-11-141-1/+5
|
* Strip an _ANSI_ARGS_ usage.dkf2007-11-141-2/+2
|
* RE: [Patch 1830184] TclResetResultMiguel Sofer2007-11-121-35/+1
| | | | | | THIS PATCH WAS REVERTED: initial (mis)measurements overstated the perfomance wins, which turn out to be tiny. Not worth the complication.
* * generic/tclBasic.c: New macro TclResetResult, new iPtr flagMiguel Sofer2007-11-121-1/+35
| | | | | | | | | * generic/tclExecute.c: bit INTERP_RESULT_UNCLEAN: shortcut for * generic/tclInt.h: Tcl_ResetResult for the "normal" case: * generic/tclProc.c: TCL_OK, no return options, no errorCode * generic/tclResult.c: nor errorInfo, return at normal level. * generic/tclStubLib.c: [Patch 1830184] * generic/tclUtil.c:
* [Patch 1830038]: Increased usage of macros to detect and take advantage of ↵Miguel Sofer2007-11-111-10/+55
| | | | objTypes.
* * unix/tclUnixTime.c (TclpWideClicksToNanoseconds): fix issues withdas2007-11-101-2/+2
| | | | * generic/tclInt.h: int64_t overflow.
* * generic/tclBasic.c:Miguel Sofer2007-11-101-3/+3
| | | | | | | | | * generic/tclInt.h: * unix/tclUnixInit.c: * win/tclWin32Dll.c: restore simpler behaviour for stack checking, not adaptive to stack size changes after a thread is launched. Consensus is that "nobody does that", and so it is not worth the cost.
* * generic/tclBasic.c:Miguel Sofer2007-11-101-3/+5
| | | | | | | | | | | * generic/tclInt.h: * unix/tclUnixInit.c: * unix/tclUnixPort.h: * win/tclWin32Dll.c: modify the stack checking algorithm to recheck in case of failure. The working assumptions are now that (a) a thread's stack is never moved, and (b) a thread's stack can grow but not shrink. Port to windows - could be more efficient, but is already cheaper than it was.
* * generic/tclAsync.c:Miguel Sofer2007-11-091-2/+37
| | | | | | | | | | | * generic/tclBasic.c: * generic/tclExecute.c: * generic/tclInt.h: * generic/tclUnixInit.c: * generic/tclUnixPort.h: new fields in interp (ekeko!) to cache TSD data that is accessed at each command invocation, access macros to replace Tcl_AsyncReady and TclpCheckStackSpace by much faster variants [Patch 1829248]
* * generic/tclCompile.h:Miguel Sofer2007-10-271-1/+3
| | | | | | * generic/tclInt.h: moved declaration of TclSetCmdNameObj from tclCompile.h to tclInt.h, reverting linker [Bug 1821159] caused by commit of 2007-10-11 (both I and gcc missed one dep).
* Add a new command, ::tcl::unsupported::disassembledkf2007-09-251-1/+5
|
* * generic/tclDTrace.d (new file): add DTrace provider for Tcl; allowsdas2007-09-131-6/+27
| | | | | | | | | | | | | | | | | | * generic/tclCompile.h: tracing of proc and command entry & * generic/tclBasic.c: return, bytecode execution, object * generic/tclExecute.c: allocation and more; with essentially * generic/tclInt.h: zero cost when tracing is inactive; * generic/tclObj.c: enable with --enable-dtrace configure * generic/tclProc.c: arg (disabled by default, will only * unix/Makefile.in: enable if DTrace is present). * unix/configure.in: [Patch 1793984] * macosx/GNUmakefile: enable DTrace support. * macosx/Tcl-Common.xcconfig: * macosx/Tcl.xcodeproj/project.pbxproj: * unix/configure: autoconf-2.59 * unix/tclConfig.h.in: autoheader-2.59
* * generic/tclInt.h: Removed the "nsName" Tcl_ObjType from thedgp2007-09-091-2/+1
| | | | | | | | | | | | | | | | | | | * generic/tclNamesp.c: registered set. Revised the management of * generic/tclObj.c: the intrep of that Tcl_ObjType. Revised the * tests/obj.test: TclGetNamespaceFromObj() routine to return TCL_ERROR and write a consistent error message when a namespace is not found. [Bug 1588842. Patch 1686862] ***POTENTIAL INCOMPATIBILITY*** For callers of Tcl_GetObjType() on the name "nsName". * generic/tclExecute.c: Update TclGetNamespaceFromObj() callers. * generic/tclProc.c: * tests/apply.test: Updated tests to expect new consistent * tests/namespace-old.test: error message when a namespace is not * tests/namespace.test: found. * tests/upvar.test:
* ensure WORDS_BIGENDIAN redefinition is consistent with autoconf definitiondas2007-08-231-2/+2
|
* * generic/tclInt.h: remove redundant ops in TclNewStringObj macroMiguel Sofer2007-08-111-3/+6
|
* * generic/tclInt.h: fix the TclSetVarNamespaceVar macro, wasMiguel Sofer2007-08-101-3/+5
| | | | causing a leak.
* * generic/tclInt.h: remove comments refering to VAR_SCALAR, asMiguel Sofer2007-08-081-4/+3
| | | | | | that flag bit does not exist any longer. * generic/tclProc.c (InitCompiledLocals): removed optimisation for non-resolved case, as the function is never called in that case.
* * generic/tclInt.decls: Exporting via stubs to helpMiguel Sofer2007-08-071-3/+1
| | | | | | * generic/tclInt.h: xotcl adapt to VarReform. * generic/tclIntDecls.h: * generic/tclStubInit.c:
* modifs to help itcl adapt to VarReformMiguel Sofer2007-08-041-7/+12
|
* Tidying up.dkf2007-08-031-37/+35
|
* Abstracted the 'offsetof' to a TclOffset macro as per Tk_Offset to permitpatthoyts2007-08-011-1/+13
| | | | compilation with MSVC6 and anything else that may not define this macro.
* VarReform [Patch 1750051]Miguel Sofer2007-07-311-95/+218
| | | | *** POTENTIAL INCOMPATIBILITY *** (tclInt.h and tclCompile.h)
* * generic/tclBasic.c (TEOvI, GetCommandSource):Miguel Sofer2007-07-241-1/+2
| | | | | | | | | | * generic/tclExecute.c (TEBC, TclGetSrcInfoForCmd): * generic/tclInt.h: * generic/tclTrace.c (TclCheck(Interp|Execution)Traces): Removed the need for TEBC to inspect the command before calling TEOvI, leveraging the TIP 282 infrastructure. Moved the generation of a correct nul-terminated command string away from the trace code, back into TEOvI/GetCommandSource.
* * generic/tclCompExpr.c: Removed dead code, old implementationsdgp2007-07-021-30/+1
| | | | | * generic/tclEvent.c: of expr parsing and compiling, including the * generic/tclInt.h: routine TclFinalizeCompilation().