summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
Commit message (Collapse)AuthorAgeFilesLines
* TIP #356 IMPLEMENTATIONdgp2009-09-241-3/+1
| | | | | | | | | | * generic/tcl.decls: Promote internal routine TclNRSubstObj() * generic/tclCmdMZ.c: to public Tcl_NRSubstObj(). Still needs docs. * generic/tclCompile.c: * generic/tclInt.h: * generic/tclDecls.h: make genstubs * generic/tclStubInit.c:
* * generic/tclBasic.c: Completed the NR-enabling of [subst].dgp2009-09-111-1/+7
| | | | | | | | | * generic/tclCmdMZ.c: [Bug 2314561]. * generic/tclCompCmds.c: * generic/tclCompile.c: * generic/tclInt.h: * tests/coroutine.test: * tests/parse.test:
* make support for clang static analyzer safer & cleanerdas2009-09-071-7/+9
|
* * generic/tclCompCmds.c (TclCompileSubstCmd): Added a bytecodedgp2009-09-041-1/+9
| | | | | | | | | | | | | * generic/tclBasic.c: compiler routine for the [subst] command. * generic/tclCmdMZ.c: This is a partial solution to the need to * generic/tclCompile.c: NR-enable [subst] since bytecode execution is * generic/tclCompile.h: already NR-enabled. [Bug 2314561] Two new * generic/tclExecute.c: bytecode instructions, INST_NOP and * generic/tclInt.h: INST_RETURN_CODE_BRANCH were added to support * generic/tclParse.c: the new routine. INST_RETURN_CODE_BRANCH is * tests/basic.test: likely to be useful in any future effort to * tests/info.test: add a bytecode compiler routine for [try]. * tests/parse.test:
* Improve consistency of formatting of comments and function declsdkf2009-09-041-45/+47
|
* guard clang analyzer Tcl_Panic annotation with #ifndef USE_TCL_STUBSdas2009-08-251-2/+5
|
* * generic/tclBasic.c (Tcl_CreateInterp, Tcl_EvalTokensStandard,andreas_kupries2009-08-251-5/+52
| | | | | | | | | | | | | | | | | | | | | | | Tcl_EvalEx, TclEvalEx, TclAdvanceContinuations, TclNREvalObjEx): * generic/tclCmdMZ.c (Tcl_SwitchObjCmd, TclListLines): * generic/tclCompCmds.c (*): * generic/tclCompile.c (TclSetByteCodeFromAny, TclInitCompileEnv, TclFreeCompileEnv, TclCompileScript, TclCompileTokens): * 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 the parser, compiler, and execution engine with code and attendant data structures tracking the position of continuation lines which are not visible in the resulting script Tcl_Obj*'s, to properly account for them while counting lines for #280.
* * generic/tclInt.h: Annotate Tcl_Panic as noreturn for clang staticdas2009-08-241-4/+2
| | | | analyzer in PURIFY builds, replacing preprocessor/assert technique.
* Formatting correctionsdkf2009-08-191-8/+8
|
* Change ForIterData, make it const-safe.nijtmans2009-08-161-2/+2
|
* TIP #353 IMPLEMENTATIONdgp2009-08-121-1/+3
| | | | | | | | | | | | | | * doc/NRE.3: New public routine Tcl_NRExprObj() permits * generic/tcl.decls: extension commands to evaluate Tcl expressions * generic/tclBasic.c: in NR-enabled command procedures. * generic/tclCmdAH.c: * generic/tclExecute.c: * generic/tclInt.h: * generic/tclObj.c: * tests/expr.test: * generic/tclDecls.h: make genstubs * generic/tclStubInit.c:
* Added *unsupported* command to report an object's representation.dkf2009-08-021-1/+4
|
* Feature Request 2814786: remove TclpPanicnijtmans2009-07-221-2/+1
|
* Added code to save space in namespaces. Currently #ifdef'ed out for compat.dkf2009-07-151-2/+11
| | | | Also added code from itcl-ng for better separation of concerns.
* * generic/tclInt.h (TclNRSwitchObjCmd):Kevin B Kenny2009-07-141-1/+2
| | | | | | | * generic/tclBasic.c (builtInCmds): * generic/tclCmdMZ.c (Tcl_SwitchObjCmd): * tests/switch.test (switch-15.1): Make non-bytecoded [switch] command aware of NRE. [Bug 2821401]
* * generic/tclCompile.c (TclInitCompileEnv, EnterCmdWordIndex,andreas_kupries2009-07-141-14/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TclCleanupByteCode, TclCompileScript): * generic/tclExecute.c (TclCompileObj, TclExecuteByteCode): * tclCompile.h (ExtCmdLoc): * tclInt.h (ExtIndex, CFWordBC, CmdFrame): * tclBasic.c (DeleteInterpProc, TclArgumentBCEnter, TclArgumentBCRelease, TclArgumentGet, SAVE_CONTEXT, RESTORE_CONTEXT, NRCoroutineExitCallback, TclNRCoroutineObjCmd): * generic/tclCmdAH.c (TclNRForObjCmd, TclNRForIterCallback, ForNextCallback): * generic/tclCmdMZ.c (TclNRWhileObjCmd): Extended the bytecode compiler initialization to recognize the compilation of whole files (NRE enabled 'source' command) and switch to the counting of absolute lines in that case. Further extended the bytecode compiler to track the start line in the generated information, and modified the bytecode execution to recompile an object if the location as per the calling context doesn't match the location saved in the bytecode. This part could be optimized more by using more memory to keep all possibilities which occur around, or by just adjusting the location information instead of a total recompile. 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, and the previous change remove the problems with location data caused by literal sharing (across whole files, but also proc bodies). Simplified the associated datastructures (ExtIndex is gone, as is the function EnterCmdWordIndex). The last change causes the hashtable 'lineLABCPtr' to be state which has to be kept per coroutine, like the CmdFrame stack. Reworked the coroutine support code to create, delete and switch the information as needed. Further reworked the tailcall command as well, it has to pop its own arguments when run in a bytecode context to keep a proper stack in 'lineLABCPtr'. Fixed the mishandling of line information in the NRE-enabled 'for' and 'while' commands introduced when both were made to share their iteration callbacks without taking into account that the loop body is found in different words of the command. Introduced a separate data structure to hold all the callback information, as we went over the limit of 4 direct client-data values for NRE callbacks. The above fixes [Bug 1605269].
* Fix [Bug 2637173] by consolidating bytearray purity check.dkf2009-07-121-1/+25
|
* s/Tcl_PanicEx/TclPanic/; improve clang assert Tcl_Panic macrologydas2009-06-301-3/+3
|
* * generic/tclInt.h: add assert macros for clang staticdas2009-06-301-1/+15
| | | | | | | | | * generic/tclPanic.c: analyzer and redefine Tcl_Panic to * generic/tclStubInit.c: assert after panic in clang PURIFY builds. * generic/tclCmdIL.c: add clang assert for false positive from static analyzer.
* Apply patch from [Bug 988703]. Many thanks to Joe Mistachkin for development.dkf2009-06-181-3/+5
|
* Fix [Bug 2414858].dkf2009-05-081-1/+2
|
* * generic/tclBasic.c: fixed "leaks" in aliases, imports andMiguel Sofer2009-03-211-1/+2
| | | | | | | * generic/tclInt.h: ensembles. Only remaining known leak * generic/tclInterp.c: is in ensemble unknown dispatch (as it * generic/tclNamesp.c: not NR-enabled) * tests/tailcall.test:
* * tclInt.h: commentsMiguel Sofer2009-03-211-4/+2
| | | | | | * tests/tailcall.test: added tests to show that [tailcall] does not currently always execute in constant space: interp-alias, ns-imports and ensembles "leak" as of this commit.
* * generic/tclBasic.c: Fix for (among others) [Bug 2699087]Miguel Sofer2009-03-211-1/+5
| | | | | | | | | * generic/tclCmdAH.c: Tailcalls now perform properly even from * generic/tclExecute.c: within [eval]ed scripts. * generic/tclInt.h: More tests missing, as well as proper exploration and testing of the interaction with "redirectors" like interp-alias (suspect that it does not happen in constant space) and pure-eval commands.
* * generic/tcl.h:Miguel Sofer2009-03-191-6/+43
| | | | | | | | | | | | | | * generic/tclInt.h: * generic/tclBasic.c: * generic/tclExecute.c: * generic/tclNamesp.c (Tcl_PopCallFrame): Rewritten tailcall implementation, ::unsupported::atProcExit is (temporarily?) gone. The new approach is much simpler, and also closer to being correct. This commit fixes [Bug 2649975] and [Bug 2695587]. * tests/coroutine.test: Moved the tests to their own files, * tests/tailcall.test: removed the unsupported.test. Added * tests/unsupported.test: tests for the fixed bugs.
* Move the implementation of [try] from Tcl to C. Not yet bytecoded.dkf2009-03-091-1/+5
|
* * generic/tclStringObj.c: Rewrites of the routinesdgp2009-02-131-1/+26
| | | | | | | | | | | Tcl_GetCharLength, Tcl_GetUniChar, Tcl_GetUnicodeFromObj, Tcl_GetRange, and TclStringObjReverse to use the new macro, and to more simply and clearly split the cases depending on whether a valid unicode rep is present or needs to be created. * generic/tclInt.h: New macro TclNumUtfChars meant to be a faster replacement for a full Tcl_NumUtfChars() call when the string has all single-byte characters.
* Added missing declaration of tclCmdNameTypedkf2009-02-031-1/+2
|
* Fix [Bug 1028264]: WSACleanup() too early. The fix introduces "late exit ↵ferrieux2009-01-271-1/+5
| | | | handlers" for similar late process-wide cleanups.
* CONSTify TclPrintInstruction and TclpNativeJoinPath (TIP #27)nijtmans2009-01-221-2/+2
| | | | | {unix win} in *.decls is equivalent to {generic} tclGetDate.y, tclDate.c: single internal const decoration
* Move [throw] implementation into C.dkf2009-01-131-1/+3
|
* Comment formatting improvements.dkf2009-01-061-102/+113
|
* Make [source] NRE-aware to enable [yield]. [Bug 2412068]dkf2009-01-051-3/+5
|
* First hack at TIP#234dkf2008-12-111-1/+2
|
* TIP #343 IMPLEMENTATION - A Binary Specifier for [format/scan]ferrieux2008-12-101-1/+3
|
* Implement TIP#307.dkf2008-12-051-3/+1
|
* Implementation of TIP #210.dkf2008-11-291-1/+4
|
* rename static function FSUnloadTempFile tonijtmans2008-11-131-1/+2
| | | | | | TclFSUnloadTempFile, needed in tclLoad.c Fixed [Bug 2269431]: load of shared objects leaves temporary files on windows
* patch #2215022: clean up the binary ensemble initialization codepatthoyts2008-11-071-5/+6
| | | | | Applied a patch from Duoas which extends the TclMakeEnsemble command to handle sub-ensembles from tables. Cleaned up the original patch a bit.
* Add "const" to many internalnijtmans2008-10-151-29/+29
| | | | | | | | const tables, so those will be put by the C-compiler in the TEXT segment in stead of the DATA segment. This makes those table sharable in shared libraries.
* CONSTify char* DTrace probe argumentsdas2008-10-101-1/+4
|
* * generic/tclBasic.c: Move [tailcall], [coroutine] andMiguel Sofer2008-10-071-1/+3
| | | | | | * generic/tclCmdIL.c: [yield] out of ::tcl::unsupported * tests/info.test: and into global scope: TIPs #327 * tests/unsupported.test: and #328
* Implemented TIP#195 - tcl::prefix command. [Patch 1040206]dkf2008-10-031-1/+2
|
* * generic/tclBasic.c: Fix the numLevels computations onMiguel Sofer2008-09-281-1/+4
| | | | | * generic/tclInt.h: coroutine yield/resume * tests/unsupported.test:
* simplify TCL_CT_ASSERTMiguel Sofer2008-09-181-4/+2
|
* * generic/tclExecute.c (NEXT_INST_F):Miguel Sofer2008-09-181-18/+20
| | | | | * generic/tclInt.h (TCL_CT_ASSERT): new compile-time assertions, adapted from www.pixelbeat.org/programming/gcc/static_assert.html
* * 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.
* NRE-enable non-compiled [foreach]. [Bug 2017632]dkf2008-08-241-1/+2
|
* NRE-enable the ensemble creator (add extra field!)dkf2008-08-231-208/+198
| | | | Arrange for [dict for] to be NRE-enabled when not compiled. [Bug 2017632]
* * generic/tclBasic.c: Previous fix, now done right.Miguel Sofer2008-08-211-2/+1
| | | | | | * generic/tclCmdIL.c: * generic/tclInt.h: * tests/unsupported.test: