summaryrefslogtreecommitdiffstats
path: root/generic
Commit message (Collapse)AuthorAgeFilesLines
* * 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().
* * generic/tclGetDate.y: Added a cast to the definition of YYFREE toKevin B Kenny2007-08-062-440/+725
| | | | | | | | silence compiler warnings. * generic/tclDate.c: Regenerated * win/tclWinTest.c: Added a cast to the call to GetSecurityDescriptorDacl to silence compiler warnings.
* fix breakage in TCL_COMPILE_DEBUG builddas2007-08-051-9/+11
|
* modifs to help itcl adapt to VarReformMiguel Sofer2007-08-046-13/+61
|
* Tidying up.dkf2007-08-033-275/+324
|
* Abstracted the 'offsetof' to a TclOffset macro as per Tk_Offset to permitpatthoyts2007-08-013-5/+17
| | | | compilation with MSVC6 and anything else that may not define this macro.
* * generic/tclVar.c (TclCleanupVar): fix [Bug 1765225], thx LarryMiguel Sofer2007-08-011-2/+2
| | | | Virden.
* VarReform [Patch 1750051]Miguel Sofer2007-07-3118-2152/+2754
| | | | *** POTENTIAL INCOMPATIBILITY *** (tclInt.h and tclCompile.h)
* comment fixMiguel Sofer2007-07-241-3/+2
|
* * generic/tclBasic.c (TEOvI, GetCommandSource):Miguel Sofer2007-07-244-73/+72
| | | | | | | | | | * generic/tclExecute.c (TEBC, TclGetSrcInfoForCmd): * generic/tclInt.h: * generic/tclTrace.c (TclCheck(Interp|Execution)Traces): Removed the need for TEBC to inspect the command before calling TEOvI, leveraging the TIP 282 infrastructure. Moved the generation of a correct nul-terminated command string away from the trace code, back into TEOvI/GetCommandSource.
* * generic/tclParse.c: In contexts where interp and parsePtr->interpdgp2007-07-191-20/+20
| | | | | | might be different, be sure to use the latter for error reporting. Also pulled the interp argument back out of ParseTokens() since we already had a parsePtr->interp to work with.
* * generic/tclCompExpr.c: Removed unused arguments and variables.dgp2007-07-181-43/+25
|
* typodgp2007-07-171-2/+2
|
* * generic/tclCompExpr.c (ParseExpr): While adding comments todgp2007-07-171-202/+251
| | | | | | explain the operations of ParseExpr(), made significant revisions to the code so it would be easier to explain, and in the process made the code simpler and clearer as well.
* * generic/tclCompExpr.c: More commentary.dgp2007-07-161-6/+27
| | | | | | * tests/parseExpr.test: Several tests of syntax error messages to check that when expression substrings are truncated they leave visible the context relevant to the reported error.
* additional commentarydgp2007-07-121-6/+25
|
* * generic/tclCompExpr.c: Factored out, corrected, and commenteddgp2007-07-121-44/+43
| | | | common code for reporting syntax errors in LEAF elements.
* 2007-07-11 Miguel Sofer <msofer@users.sf.net>Miguel Sofer2007-07-112-15/+28
| | | | | | | | * generic/tclCompCmds.c (TclCompileWhileCmd): * generic/tclCompile.c (TclCompileScript): Corrected faulty avoidance of INST_START_CMD when the first opcode in a script is within a loop (as produced by 'while 1'), so that the corresponding command is properly counted [Bug 1752146].
* * generic/tclCompExpr.c: Added a "parseOnly" flag argument todgp2007-07-111-49/+29
| | | | | | | | | | | ParseExpr() to indicate whether the caller is Tcl_ParseExpr(), with an end goal of filling a Tcl_Parse with Tcl_Tokens representing the parsed expression, or TclCompileExpr() with the goal of compiling and executing the expression. In the latter case, more aggressive conversion of QUOTED and BRACED lexeme to literals is done. In the former case, all such conversion is avoided, since Tcl_Token production would revert it anyway. This enables simplifications to the GenerateTokensForLiteral() routine as well.
* Renamed some variables fordgp2007-07-101-46/+115
| | | | clarity and replaced some cryptic logic with more readable macros.
* Removed some unused counter variables.dgp2007-07-101-6/+17
|
* * generic/tclCompExpr.c: Added a field for operator precedencedgp2007-07-101-40/+165
| | | | | | | | to be stored directly in the parse tree. There's no memory cost to this addition, since that memory would have been lost to alignment issues anyway. Also, converted precedence definitions and lookup tables to use symbolic constants instead of raw number for improved readability, and continued extending/improving/correcting comments.
* More extended commentary about the data structures of the expr parser.dgp2007-07-091-43/+85
|
* * generic/tclCompExpr.c: Revision so that the END lexeme neverdgp2007-07-091-4/+32
| | | | | | | gets inserted into the parse tree. Later tree traversal never reaches it since its location in the tree is not variable. Starting and stopping with the START lexeme (node 0) is sufficient. Also finished lexeme code commentary.
* * generic/tclCompExpr.c: Added missing creation and returndgp2007-07-091-2/+11
| | | | of the Tcl_Parse fields that indicate error conditions. [Bug 1749987]
* More work in progress commenting the expr parserdgp2007-07-051-10/+55
|