summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
Commit message (Collapse)AuthorAgeFilesLines
...
| | | * added commentsMiguel Sofer2005-02-101-1/+6
| | | |
| | | * * generic/tclBasic.c (Tcl_EvalObjEx):Miguel Sofer2005-02-101-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | * tests/basic.test (basic-26.2): preserve the arguments passed to TEOV in the pure-list branch, in case the list shimmers away. Fix for [Bug 1119369], reported by Peter MacDonald.
| | | * * generic/tclBasic.c (Tcl_ExprBoolean, Tcl_ExprDouble)hobbs2005-01-281-4/+46
| | | | | | | | | | | | | | | | (Tcl_ExprLong): Fix to recognize Tcl_WideInt type. [Bug 1109484]
| | | * fix for buffer overflow in [subst], [Bug 1036649]Miguel Sofer2004-09-291-1/+11
| | | |
| | | * * generic/tclMain.c (Tcl_Main, StdinProc): Append newline onlydgp2004-07-281-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | * tests/basic.test (basic-46.1): to incomplete scripts as part of multi-line script construction. Do not add an extra trailing newline to the complete script. [Bug 833150]
| | | * * generic/tclBasic.c: Save and restore the iPtr->flag bits thatdgp2003-10-081-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | control the state of errorCode and errorInfo management when calling "leave" execution traces, so that all error information of the traced command is still available whether traced or not. [Bug 760947] Thanks to Yahalom Emet.
| | | * * generic/tclBasic.c: Fixed error in ref count management of commanddgp2003-10-031-6/+4
| | | | | | | | | | | | | | | | | | | | * generic/tclCmdMZ.c: and execution traces that caused access to freed memory in trace-32.1. [Bug 811483].
| | | * * generic/tclBasic.c (CallCommandTraces): Added safety bitdgp2003-09-291-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/trace.test: masking to prevent any of the bit values TCL_TRACE_*_EXEC from leaking into the flags field of any Command struct. This does not fix [Bug 811483] but helps to contain some of its worst symptoms. Also backported the corrections to test trace-28.4 from Vince Darley.
| | | * * generic/tclBasic.c: Corrected several instances of unsafedgp2003-07-181-20/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCompile.c: truncation of UTF-8 strings that might * generic/tclProc.c: break apart a multi-byte character. * library/init.tcl: [Bug 760872] * tests/init.test:
| | | * * generic/tclBasic.c:Miguel Sofer2003-06-101-22/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclExecute.c: let TclExecuteObjvInternal call TclInterpReady instead of relying on its callers to do so; fix for the part of [Bug 495830] that is new in 8.4. * tests/interp.test: Added tests 18.9 (knownbug) and 18.10
| | | * * generic/tclBasic.c (TclInvokeObjectCommand): objv[argc] is nodgp2003-05-121-4/+3
| | | | | | | | | | | | | | | | | | | | longer set to NULL (Tcl_CreateObjCommand docs already say that it should not be accessed).
| | | * Corrected error message for grammar and spelling.dkf2003-05-051-3/+3
| | | |
| | | * * generic/tclBasic.c: Tcl_EvalObjv() failed to honor thedgp2003-04-251-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | TCL_EVAL_GLOBAL flag when resolving command names. Tcl_EvalEx passed a string rep including leading whitespace and comments to TclEvalObjvInternal().
| | * | Various mismatches between Tcl_Panic format string and its arguments,nijtmans2011-01-181-3/+3
| | | | | | | | | | | | | | | | discovered thanks to [Bug 3159920]
| | * | * doc/interp.n: [3081184] TIP #378.andreas_kupries2010-11-151-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/tclvars.n: Performance fix for TIP #280. * generic/tclBasic.c: * generic/tclExecute.c: * generic/tclInt.h: * generic/tclInterp.c: * tests/info.test: * tests/interp.test:
| | * | [Bug 3030870] make itcl 3.x built with pre-8.6 work in 8.6:nijtmans2010-07-251-3/+3
| | | | | | | | | | | | | | | | revert tclInt.h to what it was before, and relax the relation between Tcl_CallFrame and CallFrame.
| | * | Fix [Bug 2954959] expr abs(0.0) is -0.0nijtmans2010-02-211-19/+41
| | | | | | | | | | | | | | | | and added test cases for it.
| | * | * generic/tclBasic.c: Plug another leak in TCL_EVAL_DIRECTdgp2009-11-101-9/+9
| | | | | | | | | | | | | | | | evaluation.
| | * | * generic/tclBasic.c (TclEvalObjEx): Plug memory leak indgp2009-11-091-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | TCL_EVAL_DIRECT evaluation. * tests/info.test: Resolve ambiguous resolution of variable "res".
| | * | [Bug 2889593]: Make [expr round()] give the right error.dkf2009-10-311-2/+2
| | | |
| | * | * generic/tclBasic.c (Tcl_CreateInterp, Tcl_EvalTokensStandard,andreas_kupries2009-08-251-14/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * | fix SunCC warningdas2009-07-231-2/+2
| | | |
| | * | fix 64bit int <-> ptr cast warningsdas2009-07-151-5/+5
| | | |
| | * | * generic/tclBasic.c (DeleteInterpProc,TclArgumentBCEnter,andreas_kupries2009-07-141-51/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
| | * | * generic/tclCompile.h: add support for debug logging of DTracedas2008-08-141-1/+4
| | | | | | | | | | | | | | | | | | | | * generic/tclBasic.c: 'proc', 'cmd' and 'inst' probes (does _not_ require a platform with DTrace).
| | * | * generic/tclBasic.c: Corrected the timing of when the flagdgp2008-07-301-3/+3
| | | | | | | | | | | | | | | | TCL_ALLOW_EXCEPTIONS is tested.
| | * | * generic/tclBasic.c: Added missing ref count when creating anandreas_kupries2008-07-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | empty string as path (TclEvalEx). In 8.4 the missing code caused panics in the testsuite. It doesn't in 8.5. I am guessing that the code path with the missing the incr-refcount is not invoked any longer. Because the bug in itself is certainly the same.
| | * | backport casting fix from HEADdgp2008-07-281-2/+3
| | | |
| | * | * tests/info.test: Tests 38.* added, exactly testing the trackingandreas_kupries2008-07-251-63/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of location for uplevel scripts. * generic/tclCompile.c (TclInitCompileEnv): Reorganized the initialization of the #280 location information to match the flow in TclEvalObjEx to get more absolute contexts. * generic/tclBasic.c (TclEvalObjEx): Moved the pure-list optimization out of the eval-direct code path to be done always, i.e. even when a compile is requested. This way we do not loose the association between #280 location information and the list elements, if any.
| | * | * generic/tclBasic.c: Modified TclArgumentGet to reject pure listsandreas_kupries2008-07-231-19/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCmdIL.c: immediately, without search. Reworked setup * generic/tclCompile.c: of eoFramePtr, doesn't need the line * tests/info.test: information, more sensible to have everything on line 1 when eval'ing a pure list. Updated the users of the line information to special case this based on the frame type (i.e. TCL_LOCATION_EVAL_LIST). Added a testcase demonstrating the new behaviour.
| | * | * generic/tclBasic.c: Added missing function comments.andreas_kupries2008-07-221-1/+41
| | | |
| | * | * generic/tclBasic.c: Reworked the handling of bytecode literalsandreas_kupries2008-07-221-35/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-43/+255
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 trunk into dogeen-assembler-branchKevin B Kenny2011-03-021-42/+28
|\ \ \ \ \ | | |/ / /
| | * | | This is [Patch 3168398], Joe Mistachkin's optimisation of Tip #285mig2011-03-011-42/+28
| |/ / /
* | | | merge trunkKevin B Kenny2011-03-011-5/+12
|\ \ \ \ | |/ / /
| * | | remove unused variablesmig2011-03-011-2/+0
| | | |
| * | | * generic/tclBasic.c (TclNREvalObjv): dont do the trampoline dance for ↵mig2011-03-011-1/+10
| | | | | | | | | | | | | | | | commands that do not have an nreProc, [Patch 3168229]
* | | | merge trunkKevin B Kenny2011-03-011-7/+7
|\ \ \ \ | |/ / /
| * | | Various mismatches between Tcl_Panic format string and its arguments,nijtmans2011-01-181-4/+4
| | | | | | | | | | | | | | | | discovered thanks to [Bug 3159920]
| * | | * generic/tclCmdAH.c (TclInitFileCmd, TclMakeFileCommandSafe, ...):dkf2010-12-091-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Break up [file] into an ensemble. Note that the ensemble is safe in itself, but the majority of its subcommands are not. * generic/tclFCmd.c (FileCopyRename,TclFileDeleteCmd,TclFileAttrsCmd) (TclFileMakeDirsCmd): Adjust these subcommand implementations to work inside an ensemble. (TclFileLinkCmd, TclFileReadLinkCmd, TclFileTemporaryCmd): Move these subcommand implementations from tclCmdAH.c, where they didn't really belong. * generic/tclIOCmd.c (TclChannelNamesCmd): Move to more appropriate source file. * generic/tclEnsemble.c (TclMakeEnsemble): Start of code to make partially-safe ensembles. Currently does not function as expected due to various shortcomings in how safe interpreters are constructed. * tests/cmdAH.test, tests/fCmd.test, tests/interp.test: Test updates to take into account systematization of error messages.
| * | | fix gcc 64-bit warnings: cast from pointer to integer of different sizenijtmans2010-12-011-2/+2
| | | | | | | | | | | | | | | | fix gcc(-4.5.2) warning: 'static' is not at beginning of declaration
| * | | Patch by Miguel, providing a [::tcl::unsupported::inject coroname command ↵ferrieux2010-11-291-2/+51
| | | | | | | | | | | | | | | | args], which prepends ("injects") arbitrary code to a suspented coro's future resumption. Neat for debugging complex coros without heavy instrumentation.
| * | | * doc/interp.n: [3081184] TIP #378.andreas_kupries2010-11-151-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/tclvars.n: Performance fix for TIP #280. * generic/tclBasic.c: * generic/tclExecute.c: * generic/tclInt.h: * generic/tclInterp.c: * tests/info.test: * tests/interp.test:
| * | | [Patch 2995655] Report inner contexts in [info errorstack]ferrieux2010-10-201-1/+7
| | | |
| * | | * generic/tclBasic.c, generic/tclClock.c, generic/tclEncoding.c,dkf2010-10-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclEnv.c, generic/tclLoad.c, generic/tclNamesp.c, * generic/tclObj.c, generic/tclRegexp.c, generic/tclResolve.c, * generic/tclResult.c, generic/tclUtil.c, macosx/tclMacOSXFCmd.c: More purging of strcpy() from locations where we already know the length of the data being copied.
| * | | * generic/tclBasic.c: [Patch 3072080] (minus the itclMiguel Sofer2010-09-271-191/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCmdIL.c: update): a saner NRE. * generic/tclCompExpr.c: * generic/tclCompile.c: This makes TclNRExecuteByteCode * generic/tclCompile.h: (ex TEBC) to be a normal NRE * generic/tclExecute.c: citizen: it loses its special status. * generic/tclInt.decls: The logic flow within the BC engine is * generic/tclInt.h: simplified considerably. * generic/tclIntDecls.h: * generic/tclObj.c: * generic/tclProc.c: * generic/tclTest.c:
* | | | mergeKevin B Kenny2010-12-111-5/+7
| | | |
* | | | mergeKevin B Kenny2010-12-011-3/+61
| | | |
* | | | mergeKevin B Kenny2010-10-231-1/+7
| | | |