summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
Commit message (Collapse)AuthorAgeFilesLines
* TIP #173 and #209 implementation - see ChangeLog for detailsKevin B Kenny2004-08-181-5/+50
|
* TIP#207 IMPLEMENTATIONdgp2004-08-021-5/+62
| | | | | | | | | | * doc/interp.n: Added support for a -namespace option to the * generic/tclBasic.c: [interp invokehidden] command. Also added an * generic/tclInt.h: internal routine TclObjInvokeNamespace() and * generic/tclInterp.c: corrected the flag names TCL_FIND_ONLY_NS and * generic/tclNamesp.c: TCL_CREATE_NS_IF_UNKNOWN that are passed to the * generic/tclTrace.c: internal routine TclGetNamespaceForQualName(). * tests/interp.test: [Patch 981841]
* 2004-07-21 Kevin Kenny <kennykb@acm.org>Kevin B Kenny2004-07-211-1/+2
| | | | | | | | | | | | | * generic/tclBasic.c (DeleteInterpProc): * generic/tclLiteral.c (TclCleanupLiteralTable): * generic/tclInt.h: added a TclCleanupLiteralTable function, called from DeleteInterpProc, that frees internal representations of shared literals early when an interpreter is being deleted. This change corrects a number of memory mismanagement issues in the cases where the internal representation of one literal contains a reference to another, and avoids conditions such as resolved variable names referring to procedure and namespace contexts that no longer exist. [Bug 994838]
* * generic/tclBasic.c (Tcl_EvalEx): leak fix by dgp, releaseMiguel Sofer2004-07-121-1/+2
| | | | objv[objectsUsed] on error.
* Modified the logic of literal table cleanup at interp deletion time,Miguel Sofer2004-07-081-4/+5
| | | | | insuring that the fix of [Bug 983660] does not have a negative perf impact.
* * generic/tclBasic.c (DeleteInterpProc): fix for [Bug 983660],Miguel Sofer2004-07-051-3/+5
| | | | | | | | | found by pspjuth. Tear down the global namespace before freeing the interp handle, to allow the bytecodes to free their non-shared literals. * generic/tclLiteral.c (TclReleaseLiteral): moved special code for self-ref so that it is also used for non-shared literals. Possible bug found by inspection.
* * win/Makefile.in: Corrected compilation flags for tclPkgConfig.cKevin B Kenny2004-06-141-4/+2
| | | | | | | so that it doesn't require Stubs. * generic/tclBasic.c (Tcl_CreateInterp): Removed comment stating that TclInitEmbeddedConfigurationInformation needs Stubs; with the change above, the comment is now erroneous.
* * unix/configure.in: Updated TCL_PACKAGE_PATH value todgp2004-06-111-9/+10
| | | | | | | | | | | | * win/configure.in: handle --libdir configuration. * unix/configure.in: autoconf-2.57 * win/configure.in: * generic/tclBasic.c (Tcl_CreateInterp): Moved call to TclInitEmbeddedConfigurationInformation() earlier in Tcl_CreateInterp() so that other parts of interp creation and initialization may access and use the config values.
* Limits documentation and style improvementsdkf2004-05-301-2/+2
| | | | Added C docs, cleaned up C code, added note on behaviour of limited master interps
* Finish fixing comments for [Bug 848440]dkf2004-05-251-3/+3
|
* Delete limit callbacks properly when the interpreters involved are deleted.dkf2004-05-201-1/+10
|
* * generic/tclBasic.c (Tcl_DeleteInterp):Miguel Sofer2004-05-161-1/+4
| | | | | | * generic/tclExecute.c (INST_START_CMD): interp deletion now modifies the compileEpoch, eliminating the need for the check for interp deletion in INST_START_CMD.
* TIP#143 implementation; still needs docs and more tests...dkf2004-05-131-4/+12
|
* Patch 922727 committed. Implements three changes:dgp2004-04-061-4/+1
| | | | | | | | | | | | | | | | | | | | | | | * generic/tclInt.h: Reworked the Tcl header files into a clean * unix/tclUnixPort.h: hierarchy where tcl.h < tclPort.h < tclInt.h * win/tclWinInt.h: and every C source file should #include * win/tclWinPort.h: at most one of those files to satisfy its declaration needs. tclWinInt.h and tclWinPort.h also better organized so that tclWinPort.h includes the Windows implementation of cross-platform declarations, while tclWinInt.h makes declarations that are available on Windows only. * generic/tclBinary.c (TCL_NO_MATH): Deleted the generic/tclMath.h * generic/tclMath.h (removed): header file. The internal Tcl * macosx/Makefile (PRIVATE_HEADERS): header, tclInt.h, has a * win/tcl.dsp: #include <math.h> directly, and file external to Tcl needing libm should do the same. * win/Makefile.in (WIN_OBJS): Deleted the win/tclWinMtherr.c file. * win/makefile.bc (TCLOBJS): It's a vestige from matherr() days * win/makefile.vc (TCLOBJS): gone by. * win/tcl.dsp: * win/tclWinMtherr.c (removed):
* Removed support for Mac OS Classic platform [Patch 918142]das2004-03-171-16/+1
|
* TIP#100 implementation largely based on work by Georgios Petasis.dkf2004-02-241-1/+3
|
* Full bytecode compilation for [lassign]dkf2004-01-181-2/+2
|
* Basic implementation of TIP#57 - TclX's [lassign] command into Tcl coredkf2004-01-171-1/+3
| | | | | | | Not a direct copy * Better use of Tcl object API * More extensive test suite * More extensive documentation
* All uses of 'panic' (the macro) changeddavygrvy2003-12-241-8/+8
| | | | | | | to 'Tcl_Panic' (the function). The #define of panic in tcl.h clearly states it is deprecated in the comments. [Patch 865264]
* * doc/ParseCmd.3: Implementation of TIP 157. Adds recognitiondgp2003-11-141-17/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/Tcl.n: of the new leading {expand} syntax on words. * generic/tcl.h: Parses such words as the new Tcl_Token type * generic/tclBasic.c: TCL_TOKEN_EXPAND_WORD. Updated Tcl_EvalEx * generic/tclCompile.c: and the bytecode compiler/execution engine * generic/tclCompile.h: to recognize the new token type. New opcodes * generic/tclExecute.c: INST_LIST_VERIFY and INST_INVOKE_EXP and a new * generic/tclParse.c: operand type OPERAND_ULIST1 are defined. Docs * generic/tclTest.c: and tests are included. * tests/basic.test: * tests/compile.test: * tests/parse.test: * library/auto.tcl: Replaced several [eval]s used to perform * library/package.tcl: argument expansion with the new syntax. * library/safe.tcl: In the test files lindex.test and lset.test, * tests/cmdInfo.test: replaced use of [eval] to force direct * tests/encoding.test: string evaluation with use of [testevalex] * tests/execute.test: which more directly and robustly serves the * tests/fCmd.test: same purpose. * tests/http.test: * tests/init.test: * tests/interp.test: * tests/io.test: * tests/ioUtil.test: * tests/iogt.test: * tests/lindex.test: * tests/lset.test: * tests/namespace-old.test: * tests/namespace.test: * tests/pkg.test: * tests/pkgMkIndex.test: * tests/proc.test: * tests/reg.test: * tests/trace.test: * tests/upvar.test: * tests/winConsole.test: * tests/winFCmd.test:
* * generic/tclBasic.c (TclAppendObjToErrorInfo): New internal routinedgp2003-10-141-42/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | that appends a Tcl_Obj to the errorInfo, saving the caller the trouble of extracting the string rep. * generic/tclStringObj.c (TclAppendLimitedToObj): New internal routine that supports truncated appends with optional ellipsis marking. This single routine supports UTF-8-safe truncated appends needed in several places throughout the Tcl source code, mostly for error and stack messages. Clean fix for [Bug 760872]. * generic/tclInt.h: Declarations for new internal routines. * generic/tclCmdMZ.c: Updated callers to use the new routines. * generic/tclCompExpr.c: * generic/tclCompile.c: * generic/tclExecute.c: * generic/tclIOUtil.c: * generic/tclNamesp.c: * generic/tclObj.c: * generic/tclParseExpr.c: * generic/tclProc.c: * generic/tclStringObj.c: * mac/tclMacResource.c: * library/init.tcl: Updated ::errorInfo cleanup in [unknown] to reflect slight modifications to Tcl_LogCommandInfo(). Corrects failing init-4.* tests.
* * generic/tclBasic.c: Save and restore the iPtr->flag bits thatdgp2003-10-081-1/+12
| | | | | | | 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].
* Remove unintentional check-in of work-in-progressdkf2003-09-291-35/+1
|
* TIP#121 (app exit proc API) implementation from Joe Mistachkindkf2003-09-291-1/+35
|
* TIP#112 ([namespace ensemble] command) implementation.dkf2003-09-291-2/+52
|
* TIP#136 IMPLEMENTATION. We now have an [lrepeat] command!dkf2003-08-111-1/+3
|
* Factored out the trace code - it's big enough to be its own maintenance areadkf2003-06-251-338/+1
| | | | and tricky enough to discourage non-specialists...
* * 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/tcl.decls: Ported the changes from theandreas_kupries2003-06-091-1/+9
| | | | | | | | | | | | | | | | | * generic/tcl.h: 'tip-59-implementation' branch into the CVS * generic/tclBasic.c: head. Regenerated stub table. Regenerated * generic/tclInt.h: the configure's scripts, with help from Joe * generic/tclDecls.h English. * generic/tclStubInit.c: * generic/tclConfig.c: * generic/tclPkgConfig.c: * unix/Makefile.in: * unix/configure.in: The changes in the windows section are not * unix/tcl.m4: yet committed, they await feedback from * unix/mkLinks: David Gravereaux. * doc/RegConfig.3: * mac/tclMacPkgConfig.c: * tests/config.test:
* * 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). * tests/cmdMZ.test: Forgot to import [temporaryDirectory].
* * generic/tclBasic.c: Implementation of TIP 90, whichdgp2003-05-051-12/+30
| | | | | | | | | | | | | | | | * generic/tclCmdAH.c: extends the [catch] and [return] * generic/tclCompCmds.c: commands to enable creation of a * generic/tclExecute.c: proc that is a replacement for * generic/tclInt.h: [return]. [Patch 531640] * generic/tclProc.c: * generic/tclResult.c: * tests/cmdAH.test: * tests/cmdMZ.test: * tests/error.test: * tests/proc-old.test: * library/tcltest/tcltest.tcl: The -returnCodes option to [test] failed to recognize the symbolic name "ok" for return code 0.
* 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().
* Final stage of getting dictionaries into the core. Test suite should work now!dkf2003-04-051-1/+3
|
* * generic/tclBasic.c (Tcl_EvalTokensStandard):dgp2003-03-131-255/+6
| | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCmdMZ.c (Tcl_SubstObj): * generic/tclCompCmds.c (TclCompileSwitchCmd): * generic/tclCompExpr.c (CompileSubExpr): * generic/tclCompile.c (TclSetByteCodeFromAny,TclCompileScript, TclCompileTokens,TclCompileCmdWord): * generic/tclCompile.h (TclCompileScript): * generic/tclExecute.c (TclCompEvalObj): * generic/tclInt.h (Interp,TCL_BRACKET_TERM,TclSubstTokens): * generic/tclParse.c (ParseTokens,Tcl_SubstObj,TclSubstTokens): * tests/subst.test (2.4, 8.7, 8.8, 11.4, 11.5): Substantial refactoring of Tcl_SubstObj to make use of the same parsing and substitution procedures as normal script evaluation. Tcl_SubstObj() moved to tclParse.c. New routine TclSubstTokens() created in tclParse.c which implements all substantial functioning of Tcl_EvalTokensStandard(). TclCompileScript() loses its "nested" argument, the Tcl_Interp struct loses its termOffset field and the TCL_BRACKET_TERM flag in the evalFlags field, all of which were only used (indirectly) by Tcl_SubstObj(). Tests subst-8.7,8.8,11.4,11.5 modified to accomodate the only behavior change: reporting of parse errors now takes precedence over [return] and [continue] exceptions. All other behavior should
* The [switch] command is now bytecode compiled, at least in the most commondkf2003-03-051-2/+2
| | | | | case. There's room for improvement in the future, of course. [Patch #644819] Also adds another macro to help with jump offset fixups.
* * generic/tclBasic.c (TclRenameCommand): fixing error in previousMiguel Sofer2003-02-181-2/+1
| | | | commit.
* * generic/tclBasic.c (TclRenameCommand): 'oldFullName' object wasMiguel Sofer2003-02-181-7/+13
| | | | | not being freed on all function exits, causing a memory leak [Bug 684756]
* Don Porter's fix for bad parsing of nested scripts [Bug 681841].Miguel Sofer2003-02-161-68/+92
|
* * generic/tclBasic.c: Changed [trace add command] so that 'rename' Kevin B Kenny2003-02-031-4/+25
| | | | | | | | | | callbacks get fully qualified names of the command. [Bug 651271]. ***POTENTIAL INCOMPATIBILITY*** * tests/trace.test: Modified the test cases for [trace add command] to expect fully qualified names on the 'rename' callbacks. Added a case for renaming a proc within a namespace. * doc/trace.n: Added language about use of fully qualified names in trace callbacks.
* execution trace, command trace and stringObj bug fixesvincentdarley2003-01-171-21/+27
|
* * generic/tclBasic.c (TclRenameCommand,CallCommandTraces):dgp2002-09-061-6/+21
| | | | | | * tests/trace.test (trace-27.1): Corrected memory leak when a rename trace deleted the command being traced. Test added. Thanks to Hemang Lavana for the fix. [Bug 604609]
* * generic/tclBasic.c:Miguel Sofer2002-08-221-3/+2
| | | | | * generic/tclCmdMZ.c: fix for freed memory r/w in delete traces [Bug 589863], patch by Hemang Lavana.
* * doc/CmdCmplt.3: Applied Patch 585105 to fully CONST-ifydgp2002-08-051-19/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/Concat.3: all remaining public interfaces of Tcl. * doc/CrtCommand.3: Notably, the parser no longer writes on * doc/CrtSlave.3: the string it is parsing, so it is no * doc/CrtTrace.3: longer necessary for Tcl_Eval() to be * doc/Eval.3: given a writable string. Also, the * doc/ExprLong.3: refactoring of the Tcl_*Var* routines * doc/LinkVar.3: by Miguel Sofer is included, so that the * doc/ParseCmd.3: "part1" argument for them no longer needs * doc/SetVar.3: to be writable either. * doc/TraceVar.3: * doc/UpVar.3: Compatibility support has been enhanced so * generic/tcl.decls that a #define of USE_NON_CONST will remove * generic/tcl.h all possible source incompatibilities with * generic/tclBasic.c the 8.3 version of the header file(s). * generic/tclCmdMZ.c The new #define of USE_COMPAT_CONST now does * generic/tclCompCmds.c what USE_NON_CONST used to do -- disable * generic/tclCompExpr.c only those new CONST's that introduce * generic/tclCompile.c irreconcilable incompatibilities. * generic/tclCompile.h * generic/tclDecls.h Several bugs are also fixed by this patch. * generic/tclEnv.c [Bugs 584051,580433] [Patches 585105,582429] * generic/tclEvent.c * generic/tclInt.decls * generic/tclInt.h * generic/tclIntDecls.h * generic/tclInterp.c * generic/tclLink.c * generic/tclObj.c * generic/tclParse.c * generic/tclParseExpr.c * generic/tclProc.c * generic/tclTest.c * generic/tclUtf.c * generic/tclUtil.c * generic/tclVar.c * mac/tclMacTest.c * tests/expr-old.test * tests/parseExpr.test * unix/tclUnixTest.c * unix/tclXtTest.c * win/tclWinTest.c
* bugfix, new tests for new [interp alias] codeMiguel Sofer2002-07-291-6/+12
|
* Fix for [Bug 582522] - aliases now fire execution traces on the targetMiguel Sofer2002-07-291-5/+5
| | | | command. Optimisation of alias invocation.
* Global symbols are now all either prefixed with 'tcl' (or 'Tcl' or ...) or ↵dkf2002-07-191-2/+2
| | | | have file-scope.
* * generic/tclBasic.c (CallCommandTraces): delete traces now receiveMiguel Sofer2002-07-181-3/+17
| | | | the FQ old name of the command. [Bug 582532] (Don Porter)
* using the new variable name caching possibilities when setting errorMiguel Sofer2002-07-161-9/+9
| | | | results in (Tcl_AddObjErrorInfo) and (TclUpdateReturnInfo)