summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Convert [info] into an ensemble command.dkf2007-06-121-4/+6
|
* * generic/tclBasic.c: Further TEOvI split, creating a newMiguel Sofer2007-06-101-60/+76
| | | | | | | * generic/tclCompile.h: TclEvalObjvKnownCommand() function to * generic/tclExecute.c: handle commands that are already known and are not traced. INST_INVOKE now calls into this function instead of inlining parts of TEOvI. Same perf, better isolation.
* fix Tcl_Panic error message typo [Bug 1712602]hobbs2007-06-101-2/+2
|
* * generic/tclBasic.c: Split TEOv in two, by separating aMiguel Sofer2007-06-091-107/+249
| | | | | | | | | | | | | | | | | | | | | | processor for non-TCL_OK returns. Also spli TEOvI in a full version that handles non-existing and traced commands, and a separate shorter version for the regular case. * generic/tclBasic.c: Moved the generation of command strings for * generic/tclTrace.c: traces: previously in Tcl_EvalObjv(), now in TclCheck[Interp|Execution]Traces(). Also insured that the strings are properly nul terminated at the correct length [Bug 1693986] * generic/tclBasic.c: Extend usage of TclLimitReady() and * generic/tclExecute.c: (new) TclLimitExceeded() macros. * generic/tclInt.h: * generic/tclInterp.c: * generic/tclInt.h: New TclCleanupCommandMacro for core usage. * generic/tclBasic.c: * generic/tclExecute.c: * generic/tclObj.c:
* * generic/tclBasic.c: Added interp flag value ERR_LEGACY_COPY todgp2007-06-051-1/+2
| | | | | | | | * generic/tclInt.h: control the timing with which the global * generic/tclNamesp.c: variables ::errorCode and ::errorInfo get * generic/tclProc.c: updated after an error. This keeps more * generic/tclResult.c: precise compatibility with Tcl 8.4. * tests/result.test (result-6.2): [Bug 1649062]
* * generic/tclBasic.c: Removed code that dealt withdgp2007-05-301-44/+4
| | | | | | | | | | | | | | | | * generic/tclCompile.c: TCL_TOKEN_EXPAND_WORD tokens representing * generic/tclCompile.h: expanded literal words. These sections were mostly in place to enable [info frame] to discover line information in expanded literals. Since the parser now generates a token for each post-expansion word referring to the right location in the original script string, [info frame] gets all the data it needs. * generic/tclInt.h: Revised the parser so that it never produces * generic/tclParse.c: TCL_TOKEN_EXPAND_WORD tokens when parsing an * tests/parse.test: expanded literal word; that is, something like {*}{x y z}. Instead, generate the series of TCL_TOKEN_SIMPLE_WORD tokens to represent the words that expansion of the literal string produces. [RFE 1725186]
* Whitespace policing, replacing commas in varargs with constant string ↵Kevin B Kenny2007-04-201-4/+4
| | | | catenation, and fixed an oversight in the fix for NZA time zones.
* Handle creation of Tcl_Objs from constant strings better (easier to use, moredkf2007-04-101-7/+8
| | | | efficient). After [Patch 1529526] (afredd)
* added commentsMiguel Sofer2007-04-041-1/+5
|
* * generic/tclBasic.c: Added bytecode compilers for theMiguel Sofer2007-04-031-5/+5
| | | | | | | | * generic/tclCompCmds.c: variable linking commands: 'global', * generic/tclCompile.h: 'variable', 'upvar', 'namespace upvar' * generic/tclExecute.c: [Patch 1688593] * generic/tclInt.h: * generic/tclVar.c:
* * generic/tclBasic.c: Replace arrays on the C stack and ckallocdgp2007-04-021-57/+11
| | | | | | | | | | | | * generic/tclExecute.c: calls with TclStackAlloc calls to use memory * generic/tclFCmd.c: on Tcl's evaluation stack. * generic/tclFileName.c: * generic/tclIOCmd.c: * generic/tclIndexObj.c: * generic/tclInterp.c: * generic/tclNamesp.c: * generic/tclTrace.c: * unix/tclUnixPipe.c:
* * generic/tclBasic.c (DeleteInterpProc): pop the root frameMiguel Sofer2007-03-231-3/+4
| | | | pointer before deleting the global namespace [Bug 1658572]
* * generic/tclBasic.c (Tcl_CreateMathFunc): Replaced somedgp2007-03-191-3/+2
| | | | | | | * generic/tclEvent.c (Tcl_CreateThread): calls to Tcl_Alloc() * generic/tclObj.c (UpdateStringOfBignum): with calls to * unix/tclUnixTime.c (SetTZIfNecessary): ckalloc(), which better * win/tclAppInit.c (setargv): supports memory debugging.
* Stop using C++ keywords...dkf2007-02-271-25/+25
|
* * generic/tclBasic.c: Use new interface in Tcl_EvalObjEx so thatdgp2007-02-241-29/+10
| | | | | | | | | | | | the recounting logic of the List internal rep need not be repeated there. Better encapsulation of internal details. * generic/tclInt.h: New internal routine TclListObjCopy() used * generic/tclListObj.c: to efficiently do the equivalent of [lrange $list 0 end]. After some experience with this, might be a good candidate for exposure as a public interface. It's useful for callers of Tcl_ListObjGetElements() who want to control the ongoing validity of the returned objv pointer.
* various "const" additions, in line with TIP #27nijtmans2007-02-201-101/+101
|
* Reapplied the Engineering Manual-ification, but this time without the (small) dkf2006-12-141-295/+311
| | | | changes that caused crashes in the test suite.
* Revert the commits that broke the HEAD.dgp2006-12-131-307/+293
| | | | I'm not searching through >300 lines of changes to find the bad one.
* Silly mistake correcteddkf2006-12-131-3/+3
|
* Cleanup to follow engineering manual guidelinesdkf2006-12-131-293/+307
|
* * generic/tclBasic.c: Final step routing all direct evaluation formsdgp2006-12-121-25/+25
| | | | | | * generic/tclCompExpr.c: of the operator commands through TEBC, * generic/tclCompile.h: dropping all the routines in tclMathOp.c. * generic/tclMathOp.c: Still needs Engineering Manual attention.
* * generic/tclBasic.c: Another step with all sorting operator commandsdgp2006-12-111-7/+7
| | | | | * generic/tclCompExpr.c: now routing through TEBC via * generic/tclCompile.h: TclSortingOpCmd().
* * generic/tclBasic.c: Another step down the path of re-usingdgp2006-12-081-32/+57
| | | | | | | | * generic/tclCompExpr.c: TclExecuteByteCode to implement the TIP 174 * generic/tclCompile.h: commands instead of using a mass of code * generic/tclMathOp.c: duplication. Now all operator commands that * tests/mathop.test: demand exactly one operation are implemented via TclSingleOpCmd and a call to TEBC.
* Handle the export of the commands from tcl::mathop more efficientlydkf2006-12-071-3/+3
|
* * generic/tclBasic.c: Biggest source of TIP 174 failures was thatdgp2006-12-071-28/+33
| | | | | the commands were not [namespace export]ed from the ::tcl::mathop namespace. More bits from [Patch 1578137] correct that.
* * generic/tclBasic.c: TIP #291. Define tcl_platform element forandreas_kupries2006-12-051-1/+5
| | | | | | | | | | | | | | | | * doc/tclvars.n: pointerSize. * win/Makefile.in: Added installation instructions for the platform * win/makefile.vc: package. Added the platform package. * win/makefile.bc: * unix/Makefile.in: * tests/platform.test: * tests/safe.test: * library/platform/platform.tcl: * library/platform/shell.tcl: * library/platform/pkgIndex.tcl:
* TIP#299 IMPLEMENTATIONKevin B Kenny2006-12-011-1/+119
|
* TIP#287 IMPLEMENTATIONdgp2006-12-011-1/+5
| | | | | | | | | | * doc/chan.n: New subcommand [chan pending]. * generic/tclBasic.c: Thanks to Michael Cleverly for proposal * generic/tclInt.h: and implementation. * generic/tclIOCmd.c: * library/init.tcl: * tests/chan.test: * tests/ioCmd.test:
* * generic/tclBasic.c (Tcl_AppendObjToErrorInfo): Addeddgp2006-11-291-1/+2
| | | | | Tcl_DecrRefCount() on the objPtr argument to plug memory leaks. This makes the routine a consumer, which makes it easiest to use.
* * generic/tclBasic.c: TIP #280 implementation.andreas_kupries2006-11-281-24/+463
| | | | | | | | | | | | | | | | | | | | | * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclCompCmds.c: * generic/tclCompExpr.c: * generic/tclCompile.c: * generic/tclCompile.h: * generic/tclExecute.c: * generic/tclIOUtil.c: * generic/tclInt.h: * generic/tclInterp.c: * generic/tclNamesp.c: * generic/tclObj.c: * generic/tclProc.c: * tests/compile.test: * tests/info.test: * tests/platform.test: * tests/safe.test:
* *Partial* implementation of TIP#174. Still needs non-compiled versions of mostdkf2006-11-231-2/+50
| | | | operators, plus docs and tests.
* Make the guts of [chan] more robust.dkf2006-11-201-17/+45
|
* TIP#270 IMPLEMENTATIONdgp2006-11-151-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tcl.decls: New public routines Tcl_ObjPrintf, * generic/tclStringObj.c: Tcl_AppendObjToErrorInfo, Tcl_Format, * generic/tclInt.h: Tcl_AppendLimitedToObj, Tcl_AppendFormatToObj and Tcl_AppendPrintfToObj. Former internal versions removed. * generic/tclDecls.h: make genstubs * generic/tclStubInit.c: * generic/tclBasic.c: Updated callers. * generic/tclCkalloc.c: * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclCompExpr.c: * generic/tclCompile.c: * generic/tclDictObj.c: * generic/tclExecute.c: * generic/tclIORChan.c: * generic/tclIOUtil.c: * generic/tclMain.c: * generic/tclNamesp.c: * generic/tclObj.c: * generic/tclPkg.c: * generic/tclProc.c: * generic/tclStrToD.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/tclUnixFCmd.c:
* Implemented [lreverse] from TIP#272dkf2006-11-091-1/+2
|
* * generic/tclBasic.c (TEOVI): fix por possible leak of a CommandMiguel Sofer2006-11-041-3/+5
| | | | in the presence of execution traces that delete it.
* * generic/tclBasic.c (TEOVI):Miguel Sofer2006-11-031-10/+14
| | | | | | * tests/trace.test (trace-21.11): fix for [Bug 1590232], execution traces may cause a second command resolution in the wrong namespace.
* Silence compiler grumbles.dkf2006-11-021-2/+2
|
* * generic/tclBasic.c: Further revised TclAppendPrintToObj() anddgp2006-11-021-4/+4
| | | | | | | | | | | | | | | | | | | | | * generic/tclCkalloc.c: TclObjPrintf() routines to panic when unable * generic/tclCmdAH.c: to complete their formatting operations, rather * generic/tclCmdIL.c: than report an error message. This means an * generic/tclCmdMZ.c: interp argument for error message recording is * generic/tclDictObj.c: no longer needed, further simplifying the * generic/tclExecute.c: interface for callers. * generic/tclIORChan.c: * generic/tclIOUtil.c: * generic/tclInt.h: * generic/tclMain.c: * generic/tclNamesp.c: * generic/tclParseExpr.c: * generic/tclPkg.c: * generic/tclProc.c: * generic/tclStringObj.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/tclUnixFCmd.c:
* More trivial formatting stuffdkf2006-11-021-17/+22
|
* Remove confusing line breakdkf2006-11-021-3/+2
|
* Rewrote comments in TEOVI for clarity and usefulness.dkf2006-11-021-26/+69
| | | | Switched to using TclStackAlloc for unknown handler scratch space.
* * generic/tclBasic.c: Refactored and renamed the routinesdgp2006-10-311-12/+7
| | | | | | | | | | | | | | | | | | | | | * generic/tclCkalloc.c: TclObjPrintf, TclFormatObj, and * generic/tclCmdAH.c: TclFormatToErrorInfo to a new set of * generic/tclCmdIL.c: routines TclAppendPrintfToObj, * generic/tclCmdMZ.c: TclAppendFormatToObj, TclObjPrintf, and * generic/tclDictObj.c: TclObjFormat, with the intent of making * generic/tclExecute.c: the latter list, plus TclAppendLimitedToObj * generic/tclIORChan.c: and TclAppendObjToErrorInfo, public via * generic/tclIOUtil.c: a revised TIP 270. * generic/tclInt.h: * generic/tclMain.c: * generic/tclNamesp.c: * generic/tclParseExpr.c: * generic/tclPkg.c: * generic/tclProc.c: * generic/tclStringObj.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/tclUnixFCmd.c:
* * generic/tclBasic.c:Miguel Sofer2006-10-311-2/+2
| | | | | | | | * generic/tcl.h: * generic/tclInterp.c: * generic/tclNamesp.c: removing the flag bit TCL_EVAL_NOREWRITE, the last remnant of the callObjc/v fiasco. It is not needed, as it is now always set and checked or'ed with TCL_EVAL_INVOKE.
* Fix [Bug 1587618], eliminating the callObjc and callObjv fields from the Interpdkf2006-10-311-29/+8
| | | | structure.
* boo - last commit did not compile :(Miguel Sofer2006-10-311-2/+2
|
* * generic/tclBasic.c (TEOVI): insured that the interp's callObjc/vMiguel Sofer2006-10-311-3/+13
| | | | | fields are restored after traces run, as they be spoiled. This was causing a segfault in tcllib's profiler tests.
* Fixed a spot where CONSTness had been forgotten.dkf2006-10-271-5/+4
|
* * generic/tclBasic.c (TclEvalObjvInternal): removed redundantMiguel Sofer2006-10-231-3/+2
| | | | check for ensembles [Bug 1577628].
* * library/clock.tcl (format, scan): corrected wrong # argsMiguel Sofer2006-10-231-1/+13
| | | | | | | | | | | | | | | | | * tests/clock.test (3.1, 34.1): messages to make use of the new rewrite capabilities of [info level] * generic/tcl.h: Lets TEOV update the iPtr->objc/objv * generic/tclBasic.c: fields, except when the (new) flag bit * generic/tclInt.h: TCL_EVAL_NOREWRITE is present. This * generic/tclNamesp.c: causes [info level] to know and use * generic/tclProc.c: ensemble rewrites [Bug 1577492] * tests/namespace.test: ***POTENTIAL INCOMPATIBILITY*** The return value from [info level 0] on interp alias calls is changed: previously returned the target command (including curried values), now returns the source - what was actually called.
* * generic/tcl.h: Modified the Tcl call stack soMiguel Sofer2006-10-231-26/+64
| | | | | | | | | | | | | * generic/tclBasic.c: there is always a valid CallFrame, even * generic/tclCmdIL.c: at level 0 [Patch 1577278]. Most of the * generic/tclInt.h: changes involve removing tests for * generic/tclNamesp.c: iPtr->(var)framePtr==NULL. There is now a * generic/tclObj.c: CallFrame pushed at interp creation * generic/tclProc.c: with a pointer to it stored in * generic/tclTrace.c: iPtr->rootFramePtr. A second unused * generic/tclVar.c: field in Interp is hijacked to enable further functionality, currently unused (but with several FRQs depending on it).