summaryrefslogtreecommitdiffstats
path: root/generic
Commit message (Collapse)AuthorAgeFilesLines
* * tests/lindex.test (lindex-17.[01]): Added code to detect theKevin B Kenny2007-09-031-2/+9
| | | | | | error when a script does [lindex {} end foo]; an overaggressive optimisation caused this call to return an empty object rather than an error.
* * generic/tclObj.c (TclInitObjSubsystem): restore registration of thedas2007-09-031-2/+35
| | | | | "wideInt" Tcl_ObjType for compatibility with 8.4 extensions that access the tclWideIntType Tcl_ObjType; add setFromAnyProc for tclWideIntType.
* make tclVarHashKeyType definition staticdas2007-09-031-2/+2
|
* fix warnings about 64bit signed vs unsigned comparisondas2007-09-031-3/+3
|
* * generic/tclCompile.c: Added fflush() calls following all callers ofdgp2007-08-302-2/+4
| | | | | | * generic/tclExecute.c: TclPrintByteCodeObj() so that tcl_traceCompile output is less likely to get mangled when writes to stdout interleave with other code.
* * generic/tclCompExpr.c: Use a table lookup in ParseLexeme()dgp2007-08-281-63/+55
| | | | to determine lexemes with single-byte representations.
* * generic/tclBasic.c: Used unions to better clarify overloading ofdgp2007-08-283-38/+66
| | | | | * generic/tclCompExpr.c: the fields of the OpCmdInfo and * generic/tclCompile.h: TclOpCmdClientData structs.
* typodas2007-08-271-2/+3
|
* * generic/tclCompExpr.c: Call TclCompileSyntaxError() whendgp2007-08-275-189/+72
| | | | | | | | | | | | | | | | expression syntax errors are found when compiling expressions. With this in place, convert TclCompileExpr to return void, since there's no longer any need to report TCL_ERROR. * generic/tclCompile.c: Update callers. * generic/tclExecute.c: * generic/tclCompCmds.c: New routine TclCompileSyntaxError() * generic/tclCompile.h: to directly compile bytecodes that report a * generic/tclCompile.c: syntax error, rather than (ab)use a call to TclCompileReturnCmd. Also, undo the most recent commit that papered over some issues with that (ab)use. New routine produces a new opcode INST_SYNTAX, which is a minor variation of INST_RETURN_IMM. Also a bit of constification.
* * generic/tclCompile.c: Move the deallocation of local LiteralTabledgp2007-08-273-24/+7
| | | | | * generic/tclCompExpr.c: entries into TclFreeCompileEnv(). * generic/tclExecute.c: Update callers.
* * generic/tclCompExpr.c: Force numeric and boolean literalsdgp2007-08-271-7/+26
| | | | | in expressions to register with their intreps intact, even if that means overwriting existing intreps in already registered literals.
* fix warnings about signed vs unsigned comparison (type of sizeof() is size_t ↵das2007-08-271-7/+7
| | | | i.e. unsigned!)
* * generic/tclExecute.c (TclExecuteByteCode): Added code to handleKevin B Kenny2007-08-251-3/+425
| | | | | | | * tests/expr.test (expr-23.48-53) integer exponentiation that results in 32- and 64-bit integer results, avoiding calls to wide integer exponentiation routines in this common case. [Bug 1767293]
* * generic/tclCompExpr.c: Register literals found in expressionsdgp2007-08-241-5/+29
| | | | | | * tests/compExpr.test: to restore literal sharing. Preserve numeric intreps when literals are created for the first time. Correct memleak in ExecConstantExprTree() and add test for the leak.
* * generic/tclCompile.c: replaced copy loop that tripped someMiguel Sofer2007-08-241-5/+5
| | | | compilers with memmove [Bug 1780870]
* * generic/tclCompCmds.c (TclCompileReturnCmd): Added crash protectiondgp2007-08-231-2/+29
| | | | | to handle callers other than TclCompileScript() failing to meet the initialization assumptions of the TIP 280 code in CompileWord().
* * generic/tclCompExpr.c: Suppress the attempt to convert todgp2007-08-231-2/+2
| | | | numeric when pre-compiling a constant expresion indicates an error.
* ensure WORDS_BIGENDIAN redefinition is consistent with autoconf definitiondas2007-08-231-2/+2
|
* * generic/tclExecute.c (TEBC): disable the new shortcut to frequentMiguel Sofer2007-08-221-3/+1
| | | | INSTs for debug builds. REVERTED (collision with alternative fix)
* Missing init in ParseExpr().dgp2007-08-222-4/+3
| | | | Label needs debug build exposure in TEBC.
* * generic/tclExecute.c (TEBC): disable the new shortcut to frequentMiguel Sofer2007-08-221-2/+4
| | | | INSTs for debug builds.
* * generic/tclMain.c: Corrected the logic of dropping the lastdgp2007-08-211-17/+27
| | | | | * tests/main.test: newline from an interactively typed command. [Bug 1775878].
* * generic/tclExecute.c (INST_SUB): fix usage of the new macro forMiguel Sofer2007-08-201-3/+10
| | | | | overflow detection in sums, adapt to subtraction. Lenghty comment added.
* Swapped the order in the Overflowing macro (created in the last commit byMiguel Sofer2007-08-191-2/+5
| | | | Donal): check first the condition most likely to fail in its usage by [incr].
* Make Miguel's overflow-detection more mnemonic with a macro.dkf2007-08-191-73/+86
|
* * generic/tclExecute.c: changed the check for overflow in sums,Miguel Sofer2007-08-191-18/+12
| | | | | | | | | | | reducing objsize, number of branches and cache misses (according to cachegrind). Non-overflow for s=a+b: previous ((a >= 0 || b >= 0 || s < 0) && (s >= 0 || b < 0 || a < 0)) now (((a^s) >= 0) || ((a^b) < 0)) This expresses: "a and s have the same sign or else a and b have different sign".
* * generic/tclVar.c: improved localVarNameType caching to leverageMiguel Sofer2007-08-171-9/+42
| | | | | the new availability of Tcl_Obj in variable names, avoiding string comparisons to verify that the cached value is usable.
* * generic/tclExecute.c: check the two most frequent instructionsMiguel Sofer2007-08-161-1/+17
| | | | before the switch. Reduces both runtime and obj size a tiny bit.
* * generic/tclCompExpr.c: Added a "constant" field to the OpNodedgp2007-08-161-90/+296
| | | | | | | | struct (again "free" due to alignment requirements) to mark those subexpressions that are completely known at compile time. Enhanced CompileExprTree() and its callers to precompute these constant subexpressions at compile time. This resolves the issue raised in [Bug 1564517].
* Fix [Bug 1773127]dkf2007-08-151-13/+21
|
* * generic/tclExecute.c (INST_INVOKE*): peephole opt, do not getMiguel Sofer2007-08-141-1/+6
| | | | the interp's result if it will be pushed/popped.
* comment correctionsdgp2007-08-141-8/+7
|
* * generic/tclBasic.c: Use fully qualified variable names fordgp2007-08-141-3/+3
| | | | | | * tests/thread.test: ::errorInfo and ::errorCode so that string * tests/trace.test: reported to variable traces are fully qualified in agreement with Tcl 8.4 operations.
* * generic/tclExecute.c: Provide DECACHE/CACHE protection to thedgp2007-08-131-1/+3
| | | | * tests/trace.test: Tcl_LogCommandInfo() call. [Bug 1773040]
* * generic/tclCmdMZ.c (Tcl_SplitObjCmd): use TclNewStringObj macroMiguel Sofer2007-08-121-5/+5
| | | | instead of calling the function.
* * generic/tcl_Obj.c (TclAllocateFreeObjects): remove unneededMiguel Sofer2007-08-121-2/+1
| | | | memset to 0 of all allocated objects.
* * generic/tclInt.h: remove redundant ops in TclNewStringObj macroMiguel Sofer2007-08-111-3/+6
|
* * generic/tclInt.h: fix the TclSetVarNamespaceVar macro, wasMiguel Sofer2007-08-101-3/+5
| | | | causing a leak.
* Then reorder code todgp2007-08-101-219/+174
| | | | eliminate duplication.
* * generic/tclCompExpr.c: Revise CompileExprTree() to use thedgp2007-08-101-65/+117
| | | | | | | | OpNode mark field scheme of tree traversal. This eliminates the need to use magic values in the left and right fields for that purpose. Also stop abusing the left field within ParseExpr() to store the number of arguments in a parsed function call. CompileExprTree() now determines that for itself at compile time.
* * generic/tclProc.c (TclCreateProc): better comments on theMiguel Sofer2007-08-101-10/+9
| | | | required varflag values when loading precompiled procs.
* * generic/tclExecute.c (INST_STORE_ARRAY):Miguel Sofer2007-08-091-24/+13
| | | | | * tests/trace.test (trace-2.6): whole array write traces on compiled local variables were not firing [Bug 1770591]
* * generic/tclProc.c (InitLocalCache): reference firstLocalPtr viahobbs2007-08-081-8/+7
| | | | procPtr. codePtr->procPtr == NULL exposed by tbcload.
* * generic/tclExecute.c: Corrected failure to compile/linkdgp2007-08-081-2/+2
| | | | in the -DNO_WIDE_TYPE configuration.
* * generic/tclExecute.c: Corrected improper use of bignum argumentsdgp2007-08-081-7/+14
| | | | * tests/expr.test: to *SHIFT operations. [Bug 1770224].
* renamed InitCompiledLocals to InitResolvedLocals to make it clearer that itMiguel Sofer2007-08-081-8/+8
| | | | is not called in the normal case.
* * generic/tclInt.h: remove comments refering to VAR_SCALAR, asMiguel Sofer2007-08-082-80/+62
| | | | | | that flag bit does not exist any longer. * generic/tclProc.c (InitCompiledLocals): removed optimisation for non-resolved case, as the function is never called in that case.
* * generic/tclInt.decls: Exporting via stubs to helpMiguel Sofer2007-08-074-7/+20
| | | | | | * generic/tclInt.h: xotcl adapt to VarReform. * generic/tclIntDecls.h: * generic/tclStubInit.c:
* * generic/tclEnv.c: improve environ handling on Mac OS X (adapteddas2007-08-071-31/+1
| | | | * unix/tclUnixPort.h: from Apple changes in Darwin tcl-64).
* * tests/parseExpr.test: Update source file name of expr parser code.dgp2007-08-061-262/+285
| | | | | | | | | * generic/tclCompExpr.c: Added a "mark" field to the OpNode struct, which is used to guide tree traversal. This field costs nothing since alignement requirements used the memory already. Rewrote ConvertTreeToTokens() to use the new field, which permitted consolidation of utility routines CopyTokens() and GenerateTokensForLiteral().