summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Avoid panic when there are extra items in the tcl stackMiguel Sofer2001-04-071-3/+7
| | | | [Bug #406709, Patch #414470]
* Added some casts to ClientData that are apparently needed on somedkf2001-03-131-5/+5
| | | | architectures for a clean compile.
* Fixed bug that could leave saved data for [info level] pointing intodkf2001-03-021-10/+34
| | | | unallocated memory.
* 2000-12-14 Don Porter <dgp@users.sourceforge.net>dgp2000-12-141-21/+33
| | | | | | | | | | * generic/tclExecute.c: * tests/expr-old.test: Re-wrote Tcl's [expr rand()] and [expr srand($seed)] implementations, fixing a range error on some 64-bit platforms. Added tests that detect the bug. The rewrite changes the seed -> sequence map on 64-bit platforms, only for seed >= 2^31, a slight incompatibility. [Bug 121072, Patch 102781]
* * docs/scan.n:hobbs2000-12-101-10/+12
| | | | | | | * tests/scan.test: * generic/tclScan.c (Tcl_ScanObjCmd): changed %o and %x to use strtoul instead of strtol to correctly preserve scan<>format conversion of large integers. [Patch #102663, Bug #124600]
* Logical negation "!" can now handle string booleans, provided thosedkf2000-11-241-1/+7
| | | | | values are placed in variables. Resolves bug #119153 as most people will experience it.
* * generic/tclExecute.c (TclExecuteByteCode): INST_STR_INDEX fixedhobbs2000-09-061-13/+32
| | | | | | pedantic cast warning. Corrected support for building with -DTCL_COMPILE_STATS. Added efficiency check of object equality.
* * generic/tclExecute.c (TclExecuteByteCode INST_STR_CMP): addedhobbs2000-06-061-1/+5
| | | | | test of iResult return from memcmp, as memcmp isn't required to return only -1,0,1.
* * generic/tclCompExpr.c: changed INST_STREQ -> INST_STR_EQ,hobbs2000-05-261-40/+168
| | | | | | | | | | | | | | | INST_STRNEQ -> INST_STR_NEQ * generic/tclCompile.c: added streq, strneq, strcmp, strlen & strmatch to the compiled stats instructionTable * generic/tclCompile.h: added instructions INST_STR_CMP, INST_STR_INDEX, INST_STR_MATCH * generic/tclCompCmds.c: added byte compiler support for [string compare|match|index]. * generic/tclExecute.c: Changed INST_STR_(N)EQ to return an Int object and not bother trying to reuse the top stack object. Added INST_STR_CMP, INST_STR_INDEX, INST_STR_MATCH bytecode ops. Extended evalstats output info with Tcl_IsShared stat info.
* * generic/tclInt.h: Added function prototypes forericm2000-05-231-1/+20
| | | | | | | | | | | | | | | | | | | | | | 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.
* * doc/expr.n:hobbs2000-05-091-2/+53
| | | | | | | | | | | | * tests/expr.test: * tests/expr-old.test: added tests for 'eq' and 'ne' * generic/tclExecute.c: * generic/tclCompile.h: added INST_STREQ and INST_STRNEQ opcodes that do strict string comparisons. * generic/tclCompExpr.c: added 'eq' and 'ne' string comparison operators. * generic/tclParseExpr.c (GetLexeme): added 'eq' and 'ne' expr parse terms (string (in)equality check).
* * tests/namespace.test:hobbs2000-03-271-22/+31
| | | | | | | | | * generic/tclNamesp.c (Tcl_Export): added a uniq'ing test to the export list so only one instance of each export pattern would exist in the list. * generic/tclExecute.c (TclExecuteByteCode): optimized case for the empty string in ==/!= comparisons
* * tests/var.test:hobbs1999-12-121-35/+52
| | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCompile.c: fixed problem where setting to {} array would intermittently not work. (Fontaine) [Bug: 3339] * generic/tclCmdMZ.c: * generic/tclExecute.c: optimized INST_TRY_CVT_TO_NUMERIC to recognize boolean objects. (Spjuth) [Bug: 2815] * tests/info.test: * tests/parseOld.test: * generic/tclCmdAH.c: * generic/tclProc.c: changed Tcl_UplevelObjCmd (uplevel) and Tcl_EvalObjCmd (eval) to use TCL_EVAL_DIRECT in the single arg case as well, to take advantage of potential pure list input optimization. This means that it won't get byte compiled though, which should be acceptable. * generic/tclBasic.c: made Tcl_EvalObjEx pure list object aware in the TCL_EVAL_DIRECT case for efficiency. * generic/tclUtil.c: made Tcl_ConcatObj pure list object aware, and return a list object in that case [Bug: 2098 2257] * generic/tclMain.c: changed Tcl_Main to not constantly reuse the commandPtr object (interactive case) as it could be shared. (Fellows)
* * tests/expr-old.test:hobbs1999-12-041-228/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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]
* * tests/execute.test:stanton1999-06-161-4/+4
| | | | | | * generic/tclExecute.c (TclExecuteByteCode): Fixed crash caused by a bug in INST_LOAD_SCALAR1 where the scalar index was read as a signed 1 byte value instead of unsigned. [Bug: 2243]
* merged tcl 8.1 branch back into the main trunkstanton1999-04-161-922/+1125
|
* eliminated purify warning and other lintstanton1998-11-191-2/+7
|
* Replaced SCCS strings, fixed binary filescore_8_0_3stanton1998-09-141-1/+1
|
* - modified to use the AuxDataType setup.escoffon1998-07-011-3/+5
|
* removed dead codestanton1998-06-181-3/+0
|
* Initial revisionrjohnson1998-03-261-0/+4929