summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
Commit message (Collapse)AuthorAgeFilesLines
* generic/tclExecute.c (TEBC, INST_DONE): small bug in the panic codeMiguel Sofer2002-06-181-1/+2
| | | | for tcl-stack corruption.
* * doc/CrtTrace.3: Added TIP#62 implementation of commandhobbs2002-06-171-3/+10
| | | | | | | | | | | | | | | * doc/trace.n: execution tracing [FR #462580] (lavana). * generic/tcl.h: This includes enter/leave tracing as well * generic/tclBasic.c: as inter-procedure stepping. * generic/tclCmdMZ.c: * generic/tclCompile.c: * generic/tclExecute.c: * generic/tclInt.decls: * generic/tclInt.h: * generic/tclIntDecls.h: * generic/tclStubInit.c: * generic/tclVar.c: * tests/trace.test:
* bug in the consolidation of the INCR_..._STK instructionsMiguel Sofer2002-06-161-2/+3
|
* runtime peep-hole optimisation of variables (INST_STORE, INST_INCR)Miguel Sofer2002-06-141-10/+45
| | | | and commands (INST_INVOKE); faster check for the existence of a catch.
* runtime peep-hole optimisation of comparisons.Miguel Sofer2002-06-141-17/+43
|
* BC-engine: runtime peep-hole optimisation of INST_FOREACHMiguel Sofer2002-06-141-10/+21
|
* consolidated code for the conditional branch instructions.Miguel Sofer2002-06-131-53/+34
|
* fixed the previous patch - wouldn't compile with TCL_COMPILE_DEBUG set.Miguel Sofer2002-06-131-13/+13
|
* TclExecuteByteCode: consolidated exception handling of INST_INVOKE,Miguel Sofer2002-06-131-201/+260
| | | | INST_EVAL, INST_BREAK and INST_CONTINUE.
* consolidated opcodes in the bytecode engine, eliminating duplicatedMiguel Sofer2002-06-131-474/+200
| | | | | code. Added the new (but pre-existent in tcl.h) possible flag bit TCL_TRACE_READS to Tcl_(Obj)?SetVar.*
* generic/tclExecute.c: optimised algorithm for exception range lookupMiguel Sofer2002-06-111-15/+24
|
* Cleaned up inclusion of float.h; that's really tcl<platform>Port.h's jobdkf2002-06-071-25/+38
|
* reverting an accidental modification in the last commit.Miguel Sofer2002-06-031-61/+1
|
* clarify the empty variable name issue ([Bug 549285])Miguel Sofer2002-06-031-1/+61
|
* * Removed internal routinedgp2002-05-311-61/+1
| | | | | | | | TclMathInProgress and Unix implementation of matherr(). These are now obsolete, dealing with very old versions of the C math library. Windows version is retained in case Borland compilers require it, but it is inactive. Thanks to Joe English. [Bug 474335, Patch 555635].
* * generic/tclExecute.c (TclExecuteByteCode INST_STR_CMP):hobbs2002-05-301-6/+6
| | | | | | | * generic/tclCmdMZ.c (Tcl_StringObjCmd): changed the case for choosing the Tcl_UniCharNcmp compare to when both objs are of StringType, as benchmarks show that is the optimal check (both bigendian and littleendian systems).
* Made Tcl_UniCharNcmp faster on big-endian machines; the system memcmp()isdkf2002-05-291-2/+2
| | | | | probably optimized far in excess of anything we could do! Little-endian just use the old code...
* * generic/tclInt.decls:hobbs2002-05-291-32/+59
| | | | | | | | | | | | | | | | | | | | | | | * generic/tclIntDecls.h: * generic/tclStubInit.c: * generic/tclUtf.c: added TclpUtfNcmp2 private command that mirrors Tcl_UtfNcmp, but takes n in bytes, not utf-8 chars. This provides a faster alternative for comparing utf strings internally. (Tcl_UniCharNcmp, Tcl_UniCharNcasecmp): removed the explicit end of string check as it wasn't correct for the function (by doc and logic). * generic/tclCmdMZ.c (Tcl_StringObjCmd): reworked the string equal comparison code to use TclpUtfNcmp2 as well as short-circuit for equal objects or unequal length strings in the equal case. Removed the use of goto and streamlined the other parts. * generic/tclExecute.c (TclExecuteByteCode): added check for object equality in the comparison instructions. Added short-circuit for != length strings in INST_EQ, INST_NEQ and INST_STR_CMP. Reworked INST_STR_CMP to use TclpUtfNcmp2 where appropriate, and only use Tcl_UniCharNcmp when at least one of the objects is a Unicode obj with no utf bytes.
* fix for [Bug #542588], where "too large integers" were reported asMiguel Sofer2002-04-181-12/+20
| | | | "floating-point value" in [expr] error messages.
* made bytecodes check for a catch before returning; the compiled [return] is ↵Miguel Sofer2002-04-151-10/+12
| | | | otherwise non-catchable. [Bug 542588]
* * Corrected problems with Tcl_AllowExceptionsdgp2002-03-291-30/+16
| | | | | having influence over the wrong scope of Tcl_*Eval* calls. Patch from Miguel Sofer. Report from Jean-Claude Wippler. [Bug 219181]
* fixed the errorInfo for return codes other than (TCL_OK, TCL_ERROR) toMiguel Sofer2002-03-221-62/+4
| | | | | runLevel 0 [Bug 533758]. Removed the static RecordTracebackInfo(), as its functionality is easily replicated by Tcl_LogCommandInfo.
* Replaced a few direct stack accesses with the POP_OBJECT() macro [Bug 507181]Miguel Sofer2002-02-281-15/+13
|
* * tclExecute.c:andreas_kupries2002-02-151-2/+2
| | | | | | | * tclIOGT.c: * tclIndexObj.c: Touchups to the TIP 72 patch to make it compileable under Windows again. The changes are not complete, there is one nasty regarding _stati64
* TIP#72 implementation. See ChangeLog for details.dkf2002-02-151-357/+942
| | | | | This version builds clean on Solaris/SPARC, with GCC and CC, both with and without threads and both in 32-bit and 64-bit mode.
* * generic/tclExecute.c (TclExecuteByteCode:INST_LIST): correcthobbs2002-01-291-3/+3
| | | | possibly dangerous decr in macro call.
* small change in bytecode instructionsINST_LIST_INDEX_MULTI and INST_LSET_FLATMiguel Sofer2001-12-111-11/+16
|
* fix debug messages in INST_LSET_LIST.Miguel Sofer2001-12-111-3/+3
|
* fixed the calculation of the maximal stack depth required by bytecodes [Bug ↵Miguel Sofer2001-12-101-11/+9
| | | | 483611].
* moving all code relative to bytecodes from tclBasic.c to tclExecute.cMiguel Sofer2001-11-201-3/+464
|
* code reorganisation and factorisation.Miguel Sofer2001-11-201-1/+2
|
* a better variant of the previous-to-last commit (restoring numLevels ↵Miguel Sofer2001-11-201-12/+3
| | | | computations)
* missing variable declaration under TCL_COMPILE_DEBUG.Miguel Sofer2001-11-201-2/+4
|
* restoring the computations of iPtr->numLevels to the original logic ↵Miguel Sofer2001-11-201-2/+5
| | | | (previous to buggy modifs on 2001-11-16).
* Moved Tcl_GetCommandFromObj and all defining code for tclCmdNameType objects ↵Miguel Sofer2001-11-161-387/+3
| | | | to tclObj.c
* Code reordering; execution levels made consistent [Bug 480896].Miguel Sofer2001-11-161-186/+51
|
* Reference implementation of TIP's #22, #33 and #45. Adds thehobbs2001-11-141-44/+191
| | | | | | ability of the [lindex] command to have multiple index arguments, and adds the [lset] command. Both commands are byte-code compiled. [Patch #471874] (work by Kenny, commited by Hobbs)
* * generic/tclExecute.c (TclExecuteByteCode): correctedhobbs2001-09-211-1/+6
| | | | | INST_STR_CMP else case for strings to pass true utf char length to Tcl_UtfNCmp.
* * generic/tclExecute.c (TclExecuteByteCode): fixed invalid usagehobbs2001-09-191-30/+39
| | | | | | of valuePtr in TRACE_WITH_OBJ in INST_EVAL_STK case. [Bug #462594] Changed INST_STR_CMP instruction to promote to Unicode strings only when one of the strings is already of Unicode type.
* insured that execution stack errors are also detected at abnormal returns.Miguel Sofer2001-09-191-12/+11
|
* corrected small bug in [Patch 456668] - the varFramePtr was not restored in ↵Miguel Sofer2001-09-171-1/+2
| | | | one possible exit.
* Disabled all compile and execution tracing functionality in standardMiguel Sofer2001-09-171-10/+9
| | | | builds [Bug 451858].
* * generic/tclExecute.c (TclExecuteByteCode): fixed missing commahobbs2001-09-031-2/+2
| | | | in debug macro.
* * generic/tcl.h: added TclCompileListCmd headerhobbs2001-09-011-2/+20
| | | | | | | | * generic/tclBasic.c: added TclCompileListCmd compile proc * generic/tclCompCmds.c (TclCompileListCmd): function to compile the 'list' command at parse time. * generic/tclExecute.c (TclExecuteByteCode): definition of INST_LIST bytecode.
* allow cached fully-qualified command names to be usable from differentMiguel Sofer2001-08-301-1/+19
| | | | namespaces within the same interpreter without forcing a new lookup. This speeds up scripts that pass command names in variables ("this" in some OO packages). [Patch 456668].
* * generic/tclExecute.c (TclExecuteByteCode): added TCL_TRACE_READShobbs2001-07-031-15/+9
| | | | | | flag to INST_LAPPEND(_ARRAY)_STK case to trigger read traces for newly created arrays. Removed unnecessary #ifdef for TCL_COMPILE_DEBUG in INST_LOAD_SCALAR1 case.
* Added casts to stop warnings with SUNWspro cc on Solaris8.dkf2001-05-311-3/+3
|
* removed unnecessary Tcl_DuplicateObj in generic/tclExecute.cMiguel Sofer2001-05-221-2/+2
|
* * generic/tclBasic.c: added new CompileProc invocations to basichobbs2001-05-171-231/+547
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* rand() gets != seeds in != threads [Bug 416643]Miguel Sofer2001-05-071-2/+8
|