summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
Commit message (Collapse)AuthorAgeFilesLines
* * 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:
* * generic/tclBasic.c (OldMathFuncProc): Same workaround protectiondgp2008-03-141-7/+6
| | | | from bad TclStackAlloc() alignment. Thanks George Peter Staplin.
* * generic/tclBasic.c (ExprAbsFunc): Revised so that the abs()dgp2008-03-101-3/+3
| | | | | | * tests/expr.test: function and the [::tcl::mathfunc::abs] command do not return the value of -0, or equivalent values with more alarming string reps like -1e-350. [Bug 1893815].
* * generic/tclBasic.c (Tcl_AppendObjToErrorInfo): Revised thedgp2008-02-291-1/+2
| | | | | | | | | | refcount management of Tcl_AppendObjToErrorInfo to become that of a conventional Consumer routine. This preserves the ease of use for the overwhelming common callers who pass in a 0-count value, but makes the proper call with a non-0-count value less surprising. * generic/tclEvent.c (TclDefaultBgErrorHandlerObjCmd): Revised the one caller within Tcl itself which passes a non-0-count value to Tcl_AppendObjToErrorInfo().
* * generic/tclBasic.c (TclEvalObjvInternal): Plug memory leak whendgp2008-02-281-1/+4
| | | | | | an enter trace deletes or changes the command, prompting a reparsing. Don't let the second pass lose commandPtr value allocated during the first pass.
* Reconcile coding style issues between branchesdgp2008-01-231-5/+4
|
* * generic/tclBasic.c: Replacing 'operator' by 'op' in the defMiguel Sofer2008-01-151-2/+2
| | | | | * generic/tclCompExpr.c: of struct TclOpCmdClientData to * generic/tclCompile.h: accomodate C++ compilers [Bug 1855644]
* merge stable branch onto HEADdgp2007-12-131-1/+1
|
* Match docs and reality. [Bug 1662436]dkf2007-12-081-2/+2
|
* Simplify code for setting up the [chan] ensemble now that we can leveragedkf2007-12-061-333/+313
| | | | TclMakeEnsemble to do most of the work.
* * generic/tclBasic.c: remove unneeded call in Tcl_CreateInterp,Miguel Sofer2007-11-281-8/+6
| | | | add comments
* * generic/tclBasic.c:Miguel Sofer2007-11-261-1/+8
| | | | | | | | | * 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.
* Remove #ifdef out accidentally left indkf2007-11-231-4/+1
|
* Turn the [string] command into a real compiled ensemble.dkf2007-11-231-5/+12
|
* Rebuild [dict] as a full compiled ensemble.dkf2007-11-221-2/+2
|
* RE: [Patch 1830184] TclResetResultMiguel Sofer2007-11-121-3/+2
| | | | | | 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-2/+3
| | | | | | | | | * 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-12/+12
| | | | objTypes.
* * generic/tclBasic.c: fix stack check failure case if stack grows up.das2007-11-111-2/+2
|
* * generic/tclBasic.c: fix stack check failure case if stack grows up.das2007-11-111-2/+2
|
* * generic/tclBasic.c:Miguel Sofer2007-11-101-8/+19
| | | | | | * unix/configure.in: * unix/tclUnixInit.c: detect stack grwoth direction at compile time, only fall to runtime detection when crosscompiling.
* Improved failure comments for stack checks (mistachkin).Miguel Sofer2007-11-101-10/+15
|
* * generic/tclBasic.c:Miguel Sofer2007-11-101-18/+9
| | | | | | | | | * 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-24/+20
| | | | | | | | | | | * 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.
* fix typos, formatting and non-unix breakage (due to undefined stackGrowsDown)das2007-11-101-6/+7
|
* * generic/tclAsync.c:Miguel Sofer2007-11-091-4/+49
| | | | | | | | | | | * 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]
* Add a new command, ::tcl::unsupported::disassembledkf2007-09-251-5/+12
|
* Only invalidate the namespace path once on command creation. [1519940]dkf2007-09-141-2/+1
|
* * generic/tclDTrace.d (new file): add DTrace provider for Tcl; allowsdas2007-09-131-1/+141
| | | | | | | | | | | | | | | | | | * 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/tclBasic.c: Removed support for the unmaintaineddgp2007-09-051-8/+1
| | | | | * generic/tclExecute.c: -DTCL_GENERIC_ONLY configuration. [Bug 1264623] * unix/Makefile.in:
* * generic/tclBasic.c: Used unions to better clarify overloading ofdgp2007-08-281-27/+54
| | | | | * generic/tclCompExpr.c: the fields of the OpCmdInfo and * generic/tclCompile.h: TclOpCmdClientData structs.
* * generic/tclBasic.c: Use fully qualified variable names fordgp2007-08-141-3/+3
| | | | | | * tests/thread.test: ::errorInfo and ::errorCode so that string * tests/trace.test: reported to variable traces are fully qualified in agreement with Tcl 8.4 operations.