summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
Commit message (Collapse)AuthorAgeFilesLines
* CONSTify various useful internal functionsnijtmans2010-05-031-4/+4
| | | | | (TclBignumToDouble, TclCeil, TclFloor), and related tommath functions.
* * generic/tclBinary.c (TclAppendBytesToByteArray): Add commentsdgp2010-04-301-2/+2
| | | | | | | | | | | * generic/tclInt.h (TclAppendBytesToByteArray): placing overflow protection responsibility on caller. Convert "len" argument to signed int which any value already vetted for overflow issues will fit into. * generic/tclStringObj.c: Update caller; standardize panic msg. * generic/tclBinary.c (UpdateStringOfByteArray): Add panic when the generated string representation would grow beyond Tcl's size limits. [Bug 2994924]
* * generic/tclBinary.c (TclAppendBytesToByteArray): [Bug 2992970]: Makedkf2010-04-291-1/+3
| | | | | | * generic/tclStringObj.c (Tcl_AppendObjToObj): an append of a byte array to another into an efficent operation. The problem was the (lack of) a proper growth management strategy for the byte array.
* Remove unused @MAN2TCLFLAGS@nijtmans2010-04-281-6/+1
| | | | | | | | | | | Move <limits.h> include from tclInt.h to tclWinPort.h, and eliminate unneeded <stdlib.h>, <stdio.h> and <string.h>, which are already in tclInt.h Move "tclInt.h" from regcustom.h up to regex.h. tclAlloc.c: Unneeded <stdio.h> include tclExecute.c: Fix gcc warning: comparison between signed and unsigned
* * generic/tclInt.h (TclIsVarDirectUnsettable): Corrected flags so thatdkf2010-04-281-2/+2
| | | | | | | | | | | | | deletion of traces is not optimized out... * generic/tclExecute.c (ExecuteExtendedBinaryMathOp) (TclCompareTwoNumbers,ExecuteExtendedUnaryMathOp,TclExecuteByteCode): [Patch 2981677]: Move the less common arithmetic operations (i.e., exponentiation and operations on non-longs) out of TEBC for a big drop in the overall size of the stack frame for most code. Net effect on speed is minimal (slightly faster overall in tclbench). Also extended the number of places where TRESULT handling is replaced with a jump to dedicated code.
* * generic/tclBasic.c: add unsupported [yieldm] command.Miguel Sofer2010-04-251-1/+5
| | | | * generic/tclInt.h:
* * generic/tclBasic.test: modify api of TclSpliceTailcall()Miguel Sofer2010-04-241-2/+3
| | | | | | * generic/tclExecute.c: to fix yieldTo, which had not survived * generic/tclInt.h: the latest mods to tailcall. Thanks kbk for detecting the problem.
* Move TCHAR fallback typedef from tcl.h to tclPlatDecls.h (as suggested by dgp)nijtmans2010-04-221-2/+2
| | | | Eliminate various unnecessary type casts.
* TIP #348 IMPLEMENTATION - Substituted error stackferrieux2010-04-051-1/+5
|
* * generic/tcl.decls: [TIP #357]: First round of changesKevin B Kenny2010-04-021-10/+21
| | | | | | | | | | | | | | | | | | | | * generic/tclDecls.h: to export Tcl_LoadFile, Tcl_FindSymbol, * generic/tclIOUtil.c: and Tcl_FSUnloadFile to the public API. * generic/tclInt.h: * generic/tclLoad.c: * generic/tclLoadNone.c: * generic/tclStubInit.c: * tests/fileSystem.test: * tests/load.test: * tests/unload.test: * unix/tclLoadDl.c: * unix/tclLoadDyld.c: * unix/tclLoadNext.c: * unix/tclLoadOSF.c: * unix/tclLoadShl.c: * unix/tclUnixPipe.c: * win/Makefile.in: * win/tclWinLoad.c:
* [Freq 2974744] share exception codes (ObjType?)nijtmans2010-03-271-1/+3
|
* Compile the [throw] command.dkf2010-03-191-1/+4
|
* Code Audit results:dkf2010-03-051-107/+135
| | | | | | | | * use do { ... } while (0) in macros * avoid shadowing one local variable with another * use clearer 'foo.bar++;' instead of '++foo.bar;' where result not required (i.e., semantically equivalent) * follow Engineering Manual rules on spacing and declarations
* Change order of various struct members,nijtmans2010-02-161-63/+55
| | | | restoring potential binary incompatibility with Tcl 8.5
* Fix [Bug 2950259] so that deleting an object by killing its namespace willdkf2010-02-151-1/+7
| | | | reliably call the object's destructor.
* Hive off the ensemble code into its own file.dkf2010-02-131-3/+88
| | | | Split the [switch] compiler for sanity's sake.
* Compilation of [try] now enabled!dkf2010-02-091-1/+4
|
* Added basic compilation of [error] (the most common case only).dkf2010-02-051-1/+4
|
* Follow-up to [2010-01-29] commit:nijtmans2010-02-051-2/+2
| | | | | | | | | | prevent space within stub table function parameters if the parameter type is a pointer. Minor formatting, and VOID -> void. Change signature of TclNRInterpProcCore, and TclOONewProc(Instance|)MethodEx, indicating that errorProc is a function pointer tclVar.c: fixed two gcc warnings
* Turned the [array] command into a true ensemble. Test changes indicate somedkf2010-02-021-4/+2
| | | | alteration to error messages, otherwise no change.
* Make the [unset] command be bytecode compiled.dkf2010-01-301-1/+11
|
* - genStubs.tcl: No longer generate a space after "*" andnijtmans2010-01-291-6/+6
| | | | | | | | | | immediately after a function name, so the format of function definitions in tcl*Decls.h matches all other tcl*.h header files. - Change Tcl_ArgvFuncProc, Tcl_ArgvGenFuncProc and GetFrameInfoValueProc to be function definitions, not pointers, for consistency with all other Tcl function definitions.
* Fix TCL_LL_MODIFIER for Cygwinnijtmans2010-01-131-3/+2
| | | | | and various other minor CYGWIN compilation problems
* simplify the coroutine BP-chain monkey-patching; tclBasic does not need toMiguel Sofer2009-12-111-4/+5
| | | | know about bottomPtr, tebc does not need to behave differently on exit for coros
* * generic/tclBasic.c: Partial nre-enabling of coroutines.Miguel Sofer2009-12-081-1/+4
| | | | | | * generic/tclExecute.c: The initial call still requires its * generic/tclInt.h: own instance of tebc, but on resume coros can execute in the caller's tebc.
* * generic/tclExecute.c: Start cleaning the TEBC stablesMiguel Sofer2009-12-081-2/+2
| | | | * generic/tclInt.h:
* * generic/tclBasic.c: add ::tcl::unsupported::yieldToMiguel Sofer2009-12-071-1/+2
| | | | * generic/tclInt.h: [Patch 2910056]
* factoring TclSpliceTailcall out of TclPopStackFrameMiguel Sofer2009-12-061-1/+3
|
* Fix [Bug 2883850]: pkgIndex.tcl doesn'tnijtmans2009-11-181-1/+17
| | | | get created with static Tcl build
* Revert mistaken commitdgp2009-11-161-3/+1
|
* (forward port) Fix [Bug 2891556] and improve test to detect similar ↵ferrieux2009-11-161-1/+3
| | | | manifestations in the future. Add tcltest support for finalization.
* * generic/tclDictObj.c: Updated freeIntRepProc routines sodgp2009-09-301-1/+2
| | | | | | | | | | | | | | | * generic/tclExecute.c: that they set the typePtr field to * generic/tclIO.c: NULL so that the Tcl_Obj is not left * generic/tclIndexObj.c: in an inconsistent state. * generic/tclInt.h: [Bug 2857044] * generic/tclListObj.c: * generic/tclNamesp.c: * generic/tclOOCall.c: * generic/tclObj.c: * generic/tclPathObj.c: * generic/tclProc.c: * generic/tclRegexp.c: * generic/tclStringObj.c:
* * generic/tclAlloc.c: Cleaned up various routines in thedgp2009-09-291-3/+14
| | | | | | | * 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].
* 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
|