summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
Commit message (Collapse)AuthorAgeFilesLines
* * generic/tclBasic.c: added new CompileProc invocations to basichobbs2001-05-171-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | command initialization. * generic/tclCompCmds.c: added new compile commands for append, lappend, lindex and llength. Refactored set and incr compile commands to use new TclPushVarName function for handling the varname component during compilation (also used by append and lappend). Changed string compile command to compile toplevel code as well (when possible). * generic/tclCompile.c: added new instruction enums * generic/tclCompile.h: added debug info for new instructions * generic/tclExecute.c (TclExecuteByteCode): moved elemPtr to toplevel var (oft-used). Added definitions for new bytecode instructions INST_LIST_INDEX, INST_LIST_LENGTH, INST_APPEND_SCALAR1, INST_APPEND_SCALAR4, INST_APPEND_ARRAY1, INST_APPEND_ARRAY4, INST_APPEND_ARRAY_STK, INST_APPEND_STK, INST_LAPPEND_SCALAR1, INST_LAPPEND_SCALAR4, INST_LAPPEND_ARRAY1, INST_LAPPEND_ARRAY4, INST_LAPPEND_ARRAY_STK, INST_LAPPEND_STK. Refactored repititious code for reuse with INST_LOAD_STK (same as INST_LOAD_SCALAR_STK), INST_STORE_STK (same as INST_STORE_SCALAR_STK). Updated INST_STR_CMP with style of fix of 2001-04-06 Fellows [Bug #219201] as that fix only affected the runtime eval'ed "string" (string compare is normally byte-compiled now). We may want to back these out for speed in the future, noting the problems with \x00 comparisons in the docs. * generic/tclInt.h: declarations for new compile commands. * generic/tclVar.c: change TclGetIndexedScalar, TclGetElementOfIndexedArray, TclSetElementOfIndexedArray and TclSetIndexedScalar to use flags. The Set functions now support TCL_APPEND_ELEMENT and TCL_LIST_ELEMENT as well. * generic/tclInt.decls: * generic/tclIntDecls.h: minor signature changes for above.
* Patch from [Bug: 231259]Miguel Sofer2001-05-151-6/+8
|
* Added several missing CONSTs in calls to TclGetNamespaceForQualNameKevin B Kenny2001-04-271-2/+2
|
* (TIP #27) Another round of CONST changes, thisKevin B Kenny2001-04-241-4/+4
| | | | | | | | | time adding CONST to the API's exported from tclBasic.c. [Patch #415179] ***POTENTIAL INCOMPATIBILITY*** from 8.4a2, in which Vince Darley's changes to command tracing were added. A const has been added to the type signature of one of the parameters to Tcl_CommandTraceProc.
* * doc/trace.n: Updated documentation for new syntax; flagged oldericm2000-08-251-5/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | syntax as deprecated; added documentation for command rename/delete traces and variable array traces. * tests/trace.test: Updated tests for new trace syntax; new tests for command rename/delete traces; new tests for array traces. * generic/tclVar.c: Support for new trace syntax; support for TCL_TRACE_ARRAY. * generic/tclStubInit.c: * generic/tclDecls.h: * generic/tcl.decls: Stub functions for command rename/delete traces. * generic/tcl.h: * generic/tclInt.h: * generic/tclBasic.c: Support for command traces. * generic/tclCmdMZ.c (TclTraceVariableObjCmd): Patched to support new [trace] syntax: trace {add|remove|list} {variable|command} name ops command Added support for command traces (rename, delete operations). Added support for TCL_TRACE_ARRAY at Tcl level (array operation for variable traces).
* 2000-08-10 David Gravereaux <davygrvy@ajubasolutions.com>davidg2000-08-101-1/+2
| | | | | * generic/tclObj.c: r1.15 accidentally changed a global mutex name tclObjMutex to ObjMutex. Put the correct name back.
* * generic/tclStubInit.c:ericm2000-07-221-1/+10
| | | | | | | | | | | * generic/tclObj.c: * generic/tclInt.h: * generic/tclHash.c: * generic/tclDecls.h: * generic/tcl.h: * generic/tcl.decls: * doc/Hash.3: Reapplied patch from Paul Duffin to extend hash tables to allow custom key types, such as Tcl_Obj *'s, and others.
* * generic/tclStubInit.c:ericm2000-07-201-10/+1
| | | | | | | | | | | | * generic/tclObj.c: * generic/tclInt.h: * generic/tclHash.c: * generic/tclDecls.h: * generic/tcl.h: * generic/tcl.decls: * doc/Hash.3: Reverted patch from Paul Duffin to extend hash tables to allow custom key types, such as Tcl_Obj *'s, and others; it seems to break Tk.
* * generic/tclStubInit.c:ericm2000-07-191-1/+10
| | | | | | | | | | | * generic/tclObj.c: * generic/tclInt.h: * generic/tclHash.c: * generic/tclDecls.h: * generic/tcl.h: * generic/tcl.decls: * doc/Hash.3: Applied patch from Paul Duffin to extend hash tables to allow custom key types, such as Tcl_Obj *'s, and others.
* * generic/tclInt.h:hobbs2000-05-261-1/+3
| | | | | * generic/tclObj.c (Tcl_DbIsShared): added support for checking result of Tcl_IsShared in evalstats (TCL_COMPILE_STATS).
* * generic/tclInt.h: Added function prototypes forericm2000-05-231-1/+5
| | | | | | | | | | | | | | | | | | | | | | TclCompileStringCmd and TclCompileReturnCmd. * generic/tclCompile.h: Added definition of INST_STRLEN opcode and updated LAST_INST_OPCODE value. * generic/tclBasic.c: Added information about TclCompileStringCmd and TclCompileReturnCmd to BuiltInCmds table. * generic/tclExecute.c (TclExecuteByteCode): Added support for the INST_STRLEN opcode. * generic/tclCompCmds.c (TclCompileStringCmd): Basic implementation of byte-compiled [string] command. Not all subcommands are implemented; those that are not an out-line compiled. (TclCompileReturnCmd): Byte-compiled implementation of [return] command. Only "simple" returns are byte-compiled; in particular, if the -code, -errorinfo or -errorcode flags are used, the command is not byte-compiled.
* 2000-05-02 Andreas Kupries <a.kupries@westend.com>kupries2000-05-021-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Overall changes: (1) Implementation of joinable threads for all platforms. (2) Additional API's for channels. Required to allow the thread extension to move channels between threads. * generic/tcl.decls (lines 1360f): Added Tcl_JoinThread, Tcl_IsChannelShared, Tcl_IsChannelRegistered, Tcl_CutChannel, Tcl_SpliceChannel, Tcl_IsChannelExisting and Tcl_ClearChannelHandlers (slots 394 to 400). * generic/tclIO.c: Implemented Tcl_IsChannelRegistered, Tcl_IsChannelShared, Tcl_CutChannel, Tcl_SpliceChannel, Tcl_IsChannelExisting and Tcl_ClearChannelHandlers. Tcl_CutChannel uses code from CloseChannel. Replaced this code by a call to Tcl_CutChannel. Replaced several code fragments adding channels to the channel list with calls to Tcl_SpliceChannel. Removed now unused variables from CloseChannel and Tcl_UnstackChannel. Tcl_ClearChannelHandlers uses code from Tcl_Close. Replaced this code by a call to Tcl_ClearChannelHandlers. Removed now unused variables from Tcl_Close. Added the subcommands 'cut', 'forgetch', 'splice' and 'isshared' to the test code (TclTestChannelCmd). * unix/tclUnixThread.c: Implemented Tcl_JoinThread using the pthread-functionality. * win/tclWinThrd.c: Fixed several small typos in comments. Implemented Tcl_JoinThread using a platform independent emulation layer (see generic/tclThreadJoin.c below). Added 'joinLock' to serialize Tcl_CreateThread and TclpExitThread to prevent a race for joinable threads. * mac/tclMacThrd.c: Implemented Tcl_JoinThread using a platform independent emulation layer (see generic/tclThreadJoin.c below). Due to the cooperative nature of threading on this platform the race mentioned above is not present. * generic/tclThreadJoin.c: New file. Contains a platform independent emulation layer helping in the implementation of joinable threads for the win and mac platforms. * generic/tclInt.h: Added declarations for TclJoinThread, TclRememberJoinableThread and TclSignalExitThread. These procedures define the API of the emulation layer for joinable threads (see generic/tclThreadJoin.c above). * win/Makefile.in: * win/makefile.vc: Added generic/tclTheadJoin.o to the rules. * mac/: I don't know to which file generic/tclTheadJoin.o has to be added to so that it compiles. Sorry. * unix/tclUnixChan.c: #ifdef'd the thread-local list of file channels as it prevents us from transfering channels. To restore this we may need an extended interface to drivers in the future. Target: 9.0. Found while testing the new transfer of channels. The information in this list for a channel was left behind and then crashed the system during finalization. * generic/tclThreadTest.c: Added -joinable flag to 'testthread create'. Added subcommand 'testthread join'. * doc/CrtChannel.3: Added documentation for Tcl_IsChannelRegistered, Tcl_IsChannelShared, Tcl_CutChannel, Tcl_SpliceChannel, Tcl_IsChannelExisting and Tcl_ClearChannelHandlers. * doc/Thread.3: Added documentation for Tcl_JoinThread. * tests/thread.test: Added tests for joining of threads.
* 2000-04-08 Andreas Kupries <a.kupries@westend.com>kupries2000-04-091-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Overall change: Definition of a public API for the creation of new threads. * generic/tclInt.h (line 1802f): Removed the definition of 'TclpThreadCreate'. (line 793f) Removed the definition of 'Tcl_ThreadCreateProc'. * generic/tcl.h (line 388f): Readded the definition of 'Tcl_ThreadCreateProc'. Added Win32 stuff send in by David Graveraux <davygrvy@bigfoot.com> to that too (__stdcall, ...). Added macros for the default stacksize and allowed flags. * generic/tcl.decls (line 1356f): Added definition of 'Tcl_CreateThread', slot 393 of the stub table. Two new arguments in the public API, for stacksize and flags. * win/tclWinThrd.c: * mac/tclMacThrd.c: Renamed TclpThreadCreate to Tcl_CreateThread, added handling of the stacksize. Flags are currently ignored. * unix/tclUnixThrd.c: See above, but handles joinable flag. Ignores the specified stacksize if the macro HAVE_PTHREAD_ATTR_SETSTACKSIZE is not defined. * generic/tclThreadTest.c (line 363): See below. * unix/tclUnixNotfy.c (line 210): Adapted to the changes above. Uses default stacksize and no flags now. * unic/tcl.m4 (line 382f): Added a check for 'pthread_attr_setstacksize' to detect platforms not implementing this feature of pthreads. If it is implemented, configure will define the macro HAVE_PTHREAD_ATTR_SETSTACKSIZE (See unix/tclUnixThrd.c too). * doc/Thread.3: Added Tcl_CreateThread and its arguments to the list of described functions. Removed stuff about not providing a public C-API for thread-creation.
* 2000-04-03 Andreas Kupries <a.kupries@westend.com>kupries2000-04-041-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Overall change: Definition of public API's for the finalization of conditions and mutexes. [Bug: 4199]. * generic/tclInt.h: Removed definitions of TclFinalizeMutex and TclFinalizeCondition. * generic/tcl.decls: Added declarations of Tcl_MutexFinalize and Tcl_ConditionFinalize. * generic/tclThread.c: Renamed TclFinalizeMutex to Tcl_MutexFinalize. Renamed TclFinalizeCondition to Tcl_ConditionFinalize. * generic/tclNotify.c: Changed usage of TclFinalizeMutex to Tcl_MutexFinalize. * unix/tclUnixNotfy.c: * generic/tclThreadTest.c: Changed usages of TclFinalizeCondition to Tcl_ConditionFinalize. * generic/tcl.h: Added empty macros for Tcl_MutexFinalize and Tcl_ConditionFinalize, to be used when the core is compiled without threads. * doc/Thread.3: Added description the new API's.
* * generic/tclInt.h:hobbs2000-01-241-3/+1
| | | | | | | | | * generic/tcl.decls: moved Tcl_ProcObjCmd to stubs table [Bug: 3827] and removed 'register' from stub definition of Tcl_AppendUnicodeToObj [Bug: 4038] * generic/tclFileName.c: improved guessing of path separator for the Mac. (Darley)
* * doc/glob.n:hobbs1999-12-121-3/+39
| | | | | | | | | | | | | | | | * tests/fileName.test: * generic/tclInt.decls: * generic/tclInt.h: * generic/tclIntDecls.h: * generic/tclStubInit.c: * generic/tclEncoding.c: * generic/tclFileName.c: * mac/tclMacFile.c: * unix/tclUnixFile.c: * win/tclWinFile.c: enhanced the glob command with the new options -types -path -directory and -join. Deprecated TclpMatchFiles with TclpMatchFilesTypes, extended TclGlob and TclDoGlob and added GlobTypeData structure.
* * tests/expr-old.test:hobbs1999-12-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/parseExpr.test: * tests/string.test: * generic/tclGet.c: * generic/tclInt.h: * generic/tclObj.c: * generic/tclParseExpr.c: * generic/tclUtil.c: * generic/tclExecute.c: added TclCheckBadOctal routine to enhance error message checking for when users use invalid octal numbers (like 08), as well as replumbed the Expr*Funcs with a new VerifyExprObjType to simplify type handling. * tests/expr.test: * generic/tclCompile.c: fixed 'bad code length' error for 'expr + {[incr]}' case, with new test case [Bug: 3736] and seg fault on 'expr + {[error]}' (different cause) that was caused by a correct optimization that didn't correctly track how it was modifying the source string in the opt. The optimization was removed, which means that: expr 1 + {[string length abc]} will be not be compiled inline as before, but this should be written: expr {1 + [string length abc]} which will be compiled inline for speed. This prevents expr 1 + {[mindless error]} from seg faulting, and only affects optimizations for degenerate cases [Bug: 3737]
* * generic/tclIOUtil.c: changed Tcl_Alloc to ckallochobbs1999-11-101-44/+47
| | | | | | | | | * generic/tclInt.h: * generic/tclObj.c: rolled back changes from 1999-10-29 Purify noted new leaks with that code * generic/tclParse.c: added code in Tcl_ParseBraces to test for possible unbalanced open brace in a comment
* Cleanup of the TclNewObj family of macros, and elimination of thewelch1999-10-301-47/+44
| | | | | special Tcl_Obj memory allocator for the TCL_THREADS case, because this only adds lock contention.
* * generic/tcl.h:redman1999-08-021-8/+1
| | | | | | | | | | | | | * generic/tcl.decls: * generic/tclDecls.h: * generic/tclInt.h: * generic/tclInt.decls: * generic/tclIntDecls.h: * generic/tclRegexp.h: * generic/tclStubInit.c: Move some exported public and internal functions to the stub tables. Removed functions that are in the stub tables (from this and previous changes) from the original header files.
* Export functions for TclHandleredman1999-06-261-5/+5
|
* Merged String and Unicode object types. Added new functions tohershey1999-06-151-17/+1
| | | | | | | | | the puplic API: Tcl_NewUnicodeObj, Tcl_SetUnicodeObj, Tcl_GetUnicode, Tcl_GetUniChar, Tcl_GetCharLength, Tcl_GetRange, Tcl_AppendUnicodeToObj. Note: some stringObj tests are still failing--the teststringobj command still needs to be updated.
* * generic/tclUnicodeObj.c: Lots of cleanup and simplification.stanton1999-06-101-1/+6
| | | | | | | | | | | | | | | | | | | | | | | Fixed several memory bugs. Added TclAppendUnicodeToObj. * generic/tclInt.h: Added declarations for various Unicode string functions. * generic/tclRegexp.c: * generic/tclCmdMZ.c: Changed to use new Unicode string interfaces for better performance. * generic/tclRegexp.h: * generic/tclRegexp.c: * generic/tcl.h: * generic/tcl.decls: Added Tcl_RegExpMatchObj and Tcl_RegExpGetInfo calls to access lower level regexp API. These features are needed by Expect. This is a preliminary implementation pending final review and cleanup. * generic/tclCmdMZ.c: * tests/string.test: Fixed bug where string map failed on null strings.
* added TclGetUnicodeFromObj function for use with regexphershey1999-06-081-1/+2
|
* * tests/string.test:hershey1999-06-081-1/+11
| | | | | | | | | | | | | | | | | | | | | | | * generic/tclVar.c (Tcl_SetVar2Ex): * generic/tclStringObj.c (Tcl_AppendObjToObj): * generic/tclCmdMZ.c (Tcl_StringObjCmd): optimized the string index, string length, string range, and append command in cases where the object's internal rep is a bytearray. Objects with other internal reps are converted to have the new unicode internal rep. * unix/Makefile.in: * win/Makefile.in: * win/Makefile.vc: * tests/unicode.test: * generic/tclInt.h: * generic/tclObj.c: * generic/tclUnicodeObj.c: added a new object type to store the unicode representation of a string. * generic/tclTestObj.c: added the objtype option to the testobj command. This option returns the name of the type of internal rep an object has.
* * tests/regexp.test:stanton1999-05-131-21/+1
| | | | | | | | | | | | * generic/tclInt.h: * generic/tclBasic.c: * generic/tclRegexp.h: * generic/tclRegexp.c: Replaced the per-interpreter regexp cache with a per-thread cache. Changed the Regexp object to take advantage of this extra cache. Added a reference count to the TclRegexp type so regexps can be shared by multiple objects. Removed the per-interp regexp cache from the interpreter. Now regexps can be used with no need for an interpreter. [Bug: 1063]
* * generic/tclInt.h:stanton1999-04-221-3/+10
| | | | | | | | | | | * generic/tclInt.decls: * generic/tclCompile.c: Added TclSetByteCodeFromAny that takes a hook procedure to invoke after compilation but before the byte codes are emitted. This makes it possible to do postprocessing on the compiled byte codes before the ByteCode is generated. * generic/tclLiteral.c: Added TclHideLiteral and TclAddLiteralObj to make it possible to create local unshared literal objects.
* Resynced with mainline.rjohnson1999-04-211-1/+1
|
* changes make Tcl_Access and Tcl_Stat public.hershey1999-04-171-4/+3
| | | | also one minor fix in tests/all.tcl to fix bug 1770.
* merged tcl 8.1 branch back into the main trunkstanton1999-04-161-299/+586
|
* Merged stubs changes into mainline for 8.0stanton1999-03-101-374/+124
|
* * generic/tclInt.h:stanton1999-02-031-66/+66
| | | | | | | | * generic/tclNamesp.c (TclGetNamespaceForQualName): Restored signature so that TclGetNamespaceForQualName returns an int, even though it is always TCL_OK. This is needed for forwards compatibility of tbcload. This should be removed at some point, when we are willing to break forward compatibility.
* * generic/tclProc.c:stanton1999-02-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | * generic/tclNamesp.c: * generic/tclInt.h: * generic/tclCmdIL.c: * generic/tclBasic.c: * generic/tclVar.c: Applied patch from Viktor Dukhovni to rationalize TCL_LEAVE_ERR_MSG behavior when creating variables. * generic/tclVar.c: Fixed bug in namespace tail computation. Fixed bug where upvar could resurrect a namespace variable whose namespace had been deleted. * generic/tclCompile.c (TclCompileExprCmd): Eliminated yet another bogus optimization in expression compilation. * generic/tclCompile.c (CompileExprWord): Fixed exception stack overflow bug caused by missing statement. [Bug: 928] * generic/tclIOCmd.c: * generic/tclBasic.c: Objectified the "open" command. [Bug: 1113]
* objectified open commandstanton1999-02-021-3/+3
|
* Fixed bug in Tcl_SetListObj - it used to create invalid Tcl_Obj if you passedrjohnson1998-10-131-1/+2
| | | | | | in 0 elements. Despite what docs said. Also updated a few copyright notices.
* Added a new Tcl object called "procbody"; this object's internalescoffon1998-10-051-1/+3
| | | | | | | representation contains both a Proc struct and its associated ByteCode. Updated tclProc.c::TclCreateProc to take procbody instances as the body argument, for future support of compiler extensions. Added the "procbodytest" package for testing all this stuff.
* Removed function declarations that were never used and not referencedrjohnson1998-09-291-14/+1
| | | | by any implementation.
* Replaced SCCS strings, fixed binary filescore_8_0_3stanton1998-09-141-1/+1
|
* Moved shared typedef herewelch1998-08-101-1/+16
|
* changed isArg/isTemp to flagsstanton1998-08-071-16/+54
| | | | made resolver api more object oriented
* EXPORT is now TCL_STORAGE_CLASSescoffon1998-08-041-5/+5
|
* - added setting of EXPORT to DLLEXPORT if we are building the Tcl lib.escoffon1998-07-291-1/+9
|
* Merged changes between child workspace "/home/escoffon/ws/tcl8.0" andescoffon1998-07-291-1/+8
| | | | parent workspace "/export/home/ws/tcl8.0".
* lintstanton1998-07-241-2/+2
|
* Updated core w/ Micheals latest changes.surles1998-07-241-2/+63
|
* Merged changes between child workspace "/home/welch/ws/tcl8.0.3i" andwelch1998-07-131-1/+71
| | | | parent workspace "/home/welch/ws/tcl8.0.3".
* Removed the extern delcaration of the variable 'tclPreInitScript'.suresh1998-07-091-9/+2
| | | | | | Added prototype for the routine "TclSetPreInitScript()'. Doing this allows for this functionality of setting the pre-init Tcl script to exist in the Tcl shared library.
* replaced the SCCS id string with %% keywordsescoffon1998-07-061-1/+1
|
* Exported {TclProc}CleanupProc, {Tcl}ProcDeleteProc, and {TclProc}InterpProcescoffon1998-07-061-0/+4
| | | | from tclProc.c, for use by the TclPro compiler.
* Changed variable name "tclAlternateInitScript" to "tclPreInitScript".suresh1998-07-011-5/+4
|