summaryrefslogtreecommitdiffstats
path: root/generic/tclNamesp.c
Commit message (Collapse)AuthorAgeFilesLines
* Reduce cast count.dkf2007-11-191-118/+116
|
* Simplification+comments for ensemble dispatch enginedkf2007-11-181-128/+175
|
* Greatly improved ensemble compiler. This one now can handle any ensemble.dkf2007-11-161-9/+27
| | | | | It is usually not enabled though; only worth it when a subcommand is actually expected to undergo bytecode compilation.
* Must pass non-NULL interp to Tcl_SetEnsemble* functions.dkf2007-11-151-17/+11
|
* Compile [info exists] into bytecode. Includes new instructions to support it.dkf2007-11-141-1/+25
|
* [Patch 1830038]: Increased usage of macros to detect and take advantage of ↵Miguel Sofer2007-11-111-17/+17
| | | | objTypes.
* * generic/tclNamesp.c (Tcl_FindCommand): insure that FQ commandMiguel Sofer2007-10-271-2/+2
| | | | | names are searched from the global namespace, ie, bypassing resolvers of the current namespace [Bug 1114355].
* Generate literal values more efficiently using TclNewLiteralStringObj macro.dkf2007-09-171-6/+6
|
* * generic/tclInt.h: Removed the "nsName" Tcl_ObjType from thedgp2007-09-091-217/+106
| | | | | | | | | | | | | | | | | | | * generic/tclNamesp.c: registered set. Revised the management of * generic/tclObj.c: the intrep of that Tcl_ObjType. Revised the * tests/obj.test: TclGetNamespaceFromObj() routine to return TCL_ERROR and write a consistent error message when a namespace is not found. [Bug 1588842. Patch 1686862] ***POTENTIAL INCOMPATIBILITY*** For callers of Tcl_GetObjType() on the name "nsName". * generic/tclExecute.c: Update TclGetNamespaceFromObj() callers. * generic/tclProc.c: * tests/apply.test: Updated tests to expect new consistent * tests/namespace-old.test: error message when a namespace is not * tests/namespace.test: found. * tests/upvar.test:
* Tidying up.dkf2007-08-031-31/+31
|
* VarReform [Patch 1750051]Miguel Sofer2007-07-311-150/+37
| | | | *** POTENTIAL INCOMPATIBILITY *** (tclInt.h and tclCompile.h)
* clarify comments for last commitMiguel Sofer2007-07-051-2/+2
|
* * generic/tclNamesp.c (SetNsNameFromAny):Miguel Sofer2007-07-051-21/+28
| | | | | * generic/tclObj.c (SetCmdNameFromAny): Avoid unnecessary ckfree/ckalloc when the old structs can be reused.
* * generic/tclNamesp.c: Fix case where a FQ cmd or ns was beingMiguel Sofer2007-07-041-1/+2
| | | | | * generic/tclObj.c: cached in a different interp, tkcon [Bug 1747512]
* * generic/tclCmdIL.c: More conversions to use TclStackAlloc.dgp2007-06-221-9/+2
| | | | * generic/tclScan.c:
* * generic/tclExecute.c: Revised TclStackRealloc() signature to betterdgp2007-06-221-29/+6
| | | | | | | * generic/tclInt.h: parallel (and fall back on) Tcl_Realloc. * generic/tclNamesp.c (TclResetShadowesCmdRefs): Replaced ckrealloc based allocations with TclStackRealloc allocations.
* correct pointer type mismatch in latest commitdgp2007-06-201-2/+2
|
* * generic/tclInt.decls: Revised the interfaces of the routinesdgp2007-06-201-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclExecute.c: TclStackAlloc and TclStackFree to make them easier for callers to use (or more precisely, harder to misuse). TclStackFree now takes a (void *) argument which is the pointer intended to be freed. TclStackFree will panic if that's not actually the memory the call will free. TSA/TSF also now tolerate receiving (interp == NULL), in which case they simply fall back to be calls to Tcl_Alloc/Tcl_Free. * generic/tclIntDecls.h: make genstubs * generic/tclBasic.c: Updated callers * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCompCmds.c: * generic/tclCompExpr.c: * generic/tclCompile.c: * generic/tclFCmd.c: * generic/tclFileName.c: * generic/tclIOCmd.c: * generic/tclIndexObj.c: * generic/tclInterp.c: * generic/tclNamesp.c: * generic/tclProc.c: * generic/tclTrace.c: * unix/tclUnixPipe.c:
* Improve the argument substitution behaviour of Tcl_WrongNumArgs when faced withdkf2007-06-121-40/+26
| | | | ensemble and interp-alias rewrites.
* * generic/tclNamesp.c: tweaks to Tcl_GetCommandFromObj andMiguel Sofer2007-06-111-33/+16
| | | | | | * generic/tclObj.c: TclGetNamespaceFromObj; modified the usage of structs ResolvedCmdName and ResolvedNsname so that the field refNsPtr is NULL for fully qualified names.
* * generic/tclNamesp.c: tweaks to Tcl_GetCommandFromObj andMiguel Sofer2007-06-111-5/+3
| | | | * generic/tclObj.c: TclGetNamespaceFromObj
* * generic/tclInt.h:Miguel Sofer2007-06-101-78/+63
| | | | | | | | | * generic/tclNamesp.c: * generic/tclObj.c: * generic/tclvar.c: new macros TclGetCurrentNamespace() and TclGetGlobalNamespace(); Tcl_GetCommandFromObj and TclGetNamespaceFromObj rewritten to make the logic clearer; slightly faster too.
* * generic/tclBasic.c: Added interp flag value ERR_LEGACY_COPY todgp2007-06-051-3/+3
| | | | | | | | * 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]
* [Tcl Bug 1706140]dgp2007-05-071-3/+3
| | | | | | | | | | | | | | | | | * generic/tclLink.c (LinkTraceProc): Update Tcl_VarTraceProcs so that * generic/tclNamesp.c (Error*Read): they call Tcl_InterpDeleted() * generic/tclTrace.c (Trace*Proc): for themselves, and do not rely * generic/tclUtil.c (TclPrecTraceProc): on (frequently buggy) setting of the TCL_INTERP_DESTROYED flag by the trace core. * generic/tclVar.c: Update callers of TclCallVarTraces to not pass in the TCL_INTERP_DESTROYED flag. Also apply filters so that public routines only pass documented flag values down to lower level routines. * generic/tclTrace.c (TclCallVarTraces): The setting of the TCL_INTERP_DESTROYED flag is now done entirely within the TclCallVarTraces routine, the only place it can be done right.
* * generic/tclNamesp.c (Tcl_DeleteNamespace): Corrected flaw in thedgp2007-04-241-1/+8
| | | | | flag marking scheme to be sure that global namespaces are freed when their interp is deleted. [Bug 1705778].
* Replaced commas in varargs with string concatenation where possible [Patch ↵Kevin B Kenny2007-04-201-2/+2
| | | | 1515234]
* Handle creation of Tcl_Objs from constant strings better (easier to use, moredkf2007-04-101-4/+4
| | | | efficient). After [Patch 1529526] (afredd)
* * generic/tclExecute.c (TEBC):Miguel Sofer2007-04-061-80/+82
| | | | | | | | * generic/tclNamespace.c (NsEnsembleImplementationCmd): * generic/tclProc.c (InitCompiledLocals, ObjInterpProcEx, TclObjInterpProcCore, ProcCompileProc): code reordering to reduce branching and improve branch prediction (assume that forward branches are typically not taken).
* * generic/tclNamesp.c: Revised ErrorCodeRead and ErrorInfoReaddgp2007-04-031-7/+21
| | | | | trace routines so they guarantee the ::errorCode and ::errorInfo variable always appear to exist. [Bug 1693252].
* * generic/tclBasic.c: Replace arrays on the C stack and ckallocdgp2007-04-021-10/+6
| | | | | | | | | | | | * 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/tclExecute.c: More ckalloc -> ckrealloc conversions.dgp2007-03-211-20/+13
| | | | | | | | | * generic/tclLiteral.c: * generic/tclNamesp.c: * generic/tclParse.c: * generic/tclPreserve.c: * generic/tclStringObj.c: * generic/tclUtil.c:
* * generic/tclNamesp.c (NsEnsembleImplementationCmd): Make efficientdgp2007-03-121-2/+4
| | | | | | | * tests/namespace.test (namespace-42.8): private copy of the command prefix as we invoke the command appropriate to a particular subcommand of a particular ensemble to avoid panic due to shimmering of the List intrep. [Bug 1670091]
* * generic/tclNamesp.c: Corrected broken logic in Tcl_DeleteNamespace()dgp2007-02-081-4/+4
| | | | | | * tests/namespace.test: introduced in Patch 1577278 that caused [namespace delete ::] to be effective only at level #0. New test namespace-7.7 should prevent similar error in the future. [Bug 1655305]
* Minor syntax/efficiency stuffdkf2007-02-061-22/+35
|
* Silence a trivial warningdkf2007-02-061-2/+3
|
* * generic/tclNamesp.c: Corrected broken implementation of thedgp2007-02-061-2/+6
| | | | | * tests/namespace.test: TclMatchIsTrivial optimization on [namespace children $namespace $pattern].
* Fix [Bug 1571056] and silence a GCC warningdkf2006-12-081-2/+5
|
* * generic/tclBasic.c: TIP #280 implementation.andreas_kupries2006-11-281-3/+6
| | | | | | | | | | | | | | | | | | | | | * 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:
* TIP#270 IMPLEMENTATIONdgp2006-11-151-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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:
* TIP#261 IMPLEMENTATIONdgp2006-11-141-1/+23
| | | | | * generic/tclNamesp.c: [namespace import] with 0 arguments introspects the list of imported commands.
* * generic/tclCmdAH.c: Further revisions to produce the routinesdgp2006-11-021-3/+3
| | | | | | * generic/tclInt.h: TclFormat() and TclAppendFormatToObj() that * generic/tclNamesp.c: accept (objc, objv) arguments rather than * generic/tclStringObj.c: any varargs stuff.
* * 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:
* Indentation policingdkf2006-11-021-20/+24
|
* * generic/tclBasic.c: Refactored and renamed the routinesdgp2006-10-311-14/+10
| | | | | | | | | | | | | | | | | | | | | * 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-12/+9
| | | | structure.
* D'oh! Updated the wrong thing.dkf2006-10-301-13/+15
|
* Add missing initialization.dkf2006-10-301-1/+2
|
* * generic/tclNamesp.c (EnsembleImplementationCmd):Miguel Sofer2006-10-291-2/+2
| | | | | * tests/namespace.test (47.7-8): reverted a wrong "optimisation" that completely broke snit; added two tests.
* Make a comment look nicer. :-)dkf2006-10-281-3/+3
|