summaryrefslogtreecommitdiffstats
path: root/generic/tclCompExpr.c
Commit message (Collapse)AuthorAgeFilesLines
* make some more internal tables constjan.nijtmans2012-04-181-1/+1
|\ | | | | a few CONST -> const changes
| * * generic/tclBasic.c: More replacements of Tcl_UtfBackslash() callsdgp2011-03-061-2/+2
| | | | | | | | | | | | * generic/tclCmdMZ.c: with TclParseBackslash() where possible. * generic/tclCompExpr.c: * generic/tclCompile.c: * generic/tclUtil.c:
* | missing 'break'dgp2011-09-071-0/+1
| |
* | Tidiness, comments, and tests.dgp_3401704dgp2011-09-071-5/+28
| |
* | Don't extend numbers with non-alphanumeric characters into barewords.dgp2011-09-061-0/+6
| |
* | 3401704 New patch to enable nancy(), influence(), 99bottles().dgp2011-09-061-43/+38
| |
* | Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-021-2/+0
|\ \ | |/ | | more harm than good. Purged them.
| * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-011-2/+0
| | | | | | more harm than good. Purged them.
| * style revisions to latest commitdgp2008-04-171-2/+2
| |
| * * generic/tclCompExpr.c (CompileMathFuncCall): Addedandreas_kupries2008-04-171-1/+2
| | | | | | | | | | | | | | * tests/compile.test (compile-16.0): Tcl_ResetResult before appending error message, to clear out possible sharing. Added test case demonstrating the crash (abort on shared object) without the fix.
| * * generic/tclBasic.c: TIP #280 implementation, conditional on the define ↵andreas_kupries2006-11-281-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TCL_TIP280. * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclCompCmds.c: * generic/tclCompExpr.c: * generic/tclCompile.c: * generic/tclCompile.h: * generic/tclExecute.c: * generic/tclIOUtil.c: * generic/tclInt.h: * generic/tclInterp.c: * generic/tclNamesp.c: * generic/tclObj.c: * generic/tclProc.c: * tests/compile.test: * tests/info.test: * tests/platform.test: * tests/safe.test:
| * * unix/tcl.m4 (Darwin): add 64bit support, check for Tiger copyfile(),das2005-11-271-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add CFLAGS to SHLIB_LD to support passing -isysroot in env(CFLAGS) to configure (flag can't be present twice, so can't be in both CFLAGS and LDFLAGS during configure), don't use -prebind when deploying on 10.4, define TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING (rdar://3171542). (SC_ENABLE_LANGINFO, SC_TIME_HANDLER): add/fix caching, fix obsolete autoconf macros. Sync with tk/unix/tcl.m4, sync whitespace with HEAD. * unix/configure.in: fix obsolete autoconf macros, sync gratuitous formatting/ordering differences with tk/unix/configure.in. * unix/Makefile.in: add CFLAGS to tclsh/tcltest link to make executable linking the same as during configure (needed to avoid loosing any linker relevant flags in CFLAGS, in particular flags that can't be in LDFLAGS). Avoid concurrent linking of tclsh and compiling of tclTestInit.o or xtTestInit.o during parallel make. (checkstubs, checkdoc, checkexports): dependency and Darwin fixes * unix/tclLoadDyld.c (TclpDlopen): use NSADDIMAGE_OPTION_WITH_SEARCHING on second NSAddImage only. [Bug 1204237] (TclGuessPackageName): should not be MODULE_SCOPE. (TclpLoadMemory): ppc64 and endian (i386) fixes, add support for loading universal (fat) bundles from memory. * unix/tclUnixPort.h: * unix/tclUnixFCmd.c: add support for new Tiger copyfile() API to enable copying of xattrs & ACLs by [file copy]. * generic/tcl.h: add Darwin specifc configure overrides for TCL_WIDE defines to support fat compiles of ppc and ppc64 at the same time, (replaces Darwin CVS fix by emoy, rdar://3693001). add/correct location of version numbers in macosx files. * generic/tclInt.h: clarify fat compile comment. * unix/tclUnixPort.h: add Darwin specifc configure overrides to support fat compiles, where configure runs only once for multiple architectures (replaces Darwin CVS fix by emoy, rdar://3693001). * macosx/tclMacOSXBundle.c: * macosx/tclMacOSXNotify.c: * unix/tclUnixNotfy.c: * unix/tclUnixPort.h: fix #include order to support compile time override of HAVE_COREFOUNDATION in tclUnixPort.h when building for ppc64 * macosx/Tcl.pbproj/default.pbxuser (new file): * macosx/Tcl.pbproj/jingham.pbxuser: * macosx/Tcl.pbproj/project.pbxproj: sync with HEAD. * macosx/README: clarification/cleanup, sync with HEAD, document universal (fat) builds via CFLAGS (i.e. all of ppc ppc64 i386 at once). * macosx/Makefile: add support for reusing configure cache, build target fixes, remove GENERIC_FLAGS override now handled by tcl.m4. * generic/tclIOUtil.c: * generic/tclRegexp.c: * generic/tclVar.c: declare globals used only in own file as static (sync with HEAD). * generic/rege_dfa.c (getvacant): * generic/regexec.c (cfind): * generic/tclCompExpr.c (CompileSubExpr): * unix/tclUnixChan.c (TclUnixWaitForFile): initialise variables to silence gcc 4 warnings. * generic/regguts.h: only #define NDEBUG if not already #defined. * macosx/tclMacOSXNotify.c: sync whitespace & comments with HEAD * unix/configure: regen.
| * * generic/tclCompExpr.c: Untangled some dependencies in thedgp2005-08-031-4/+2
| | | | | | | | | | | | * generic/tclEvent.c: order of finalization routines. * generic/tclInt.h: [Bug 1251399] * generic/tclObj.c:
* | Various mismatches between Tcl_Panic format string and its arguments,nijtmans2011-01-181-22/+22
| | | | | | | | discovered thanks to [Bug 3159920]
* | Various trivial fixes, discovered during CYGWIN porting attempt. All ↵nijtmans2010-01-061-2/+2
| | | | | | | | backported from trunk.
* | * generic/tclCompExpr.c (ParseExpr): Plug memory leak in errordgp2008-02-281-3/+3
| | | | | | | | message generation.
* | More stray trailing ","s.jenglish2008-02-261-2/+2
| |
* | * generic/tclInt.h: New macro TclGrowParseTokenArray() todgp2008-01-231-18/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCompCmds.c: simplify code that might need to grow * generic/tclCompExpr.c: an array of Tcl_Tokens in the parsePtr * generic/tclParse.c: field of a Tcl_Parse. Replaces the TclExpandTokenArray() routine via replacing: int needed = parsePtr->numTokens + growth; while (needed > parsePtr->tokensAvailable) { TclExpandTokenArray(parsePtr); } with: TclGrowParseTokenArray(parsePtr, growth); This revision merged over from dgp-refactor branch.
* | * generic/tclCompExpr.c: Revision to preserve parsed intrepsdgp2008-01-171-5/+42
| | | | | | | | | | of numeric and boolean literals when compiling expressions with (optimize == 1).
* | * generic/tclCompExpr.c: add an 'optimize' argument toMiguel Sofer2008-01-161-3/+4
| | | | | | | | | | | | * generic/tclCompile.c: TclCompileExpr() to profit from better * generic/tclCompile.h: literal management according to usage. * generic/tclExecute.c:
* | * generic/tclCompExpr.c: Fix literal leak in exprs [Bug 1869989]Miguel Sofer2008-01-161-40/+21
| | | | | | | | * generic/tclExecute.c: (dgp)
* | * generic/tclBasic.c: Replacing 'operator' by 'op' in the defMiguel Sofer2008-01-151-5/+4
| | | | | | | | | | * generic/tclCompExpr.c: of struct TclOpCmdClientData to * generic/tclCompile.h: accomodate C++ compilers [Bug 1855644]
* | merge stable branch onto HEADdgp2007-12-131-1/+1
| |
* | [Patch 1830038]: Increased usage of macros to detect and take advantage of ↵Miguel Sofer2007-11-111-5/+6
| | | | | | | | objTypes.
* | * generic/tclCompExpr.c: Moved a misplaced declaration that blockedKevin B Kenny2007-10-171-2/+3
| | | | | | | | | | | | compilation on VC++. * generic/tclExecute.c: Silenced several VC++ compiler warnings about converting 'long' to 'unsigned short'.
* | * generic/tclIOCmd.c: Revise [open] so that it interprets leadingdgp2007-10-151-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | zero strings passed as the "permissions" argument as octal numbers, even if Tcl itself no longer parses integers in that way. * unix/tclUnixFCmd.c: Revise the "-permissions" [file attribute] so that it interprets leading zero strings as octal numbers, even if Tcl itself no longer parses integers in that way. * generic/tclCompExpr.c: Corrections to code that produces * generic/tclUtil.c: extended "bad octal" error messages. * tests/cmdAH.test: Test revisions so that tests pass whether or * tests/cmdIL.test: not Tcl parses leading zero strings as octal. * tests/compExpr-old.test: * tests/compExpr.test: * tests/compile.test: * tests/expr-old.test: * tests/expr.test: * tests/incr.test: * tests/io.test: * tests/lindex.test: * tests/link.test: * tests/mathop.test: * tests/parseExpr.test: * tests/set.test: * tests/string.test: * tests/stringComp.test:
* | * 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-281-9/+7
| | | | | | | | | | * 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-271-23/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-271-4/+1
| | | | | | | | | | * 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.
* | * 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/tclCompExpr.c: Suppress the attempt to convert todgp2007-08-231-2/+2
| | | | | | | | numeric when pre-compiling a constant expresion indicates an error.
* | Missing init in ParseExpr().dgp2007-08-221-1/+2
| | | | | | | | Label needs debug build exposure in TEBC.
* | * 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].
* | comment correctionsdgp2007-08-141-8/+7
| |
* | 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.
* | * 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/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.
* | * 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.