| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| | |
Label needs debug build exposure in TEBC.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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].
|
| | |
|
| |
| |
| |
| | |
eliminate duplication.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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/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().
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
* 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.
|
| | |
|
| |
| |
| |
| | |
common code for reporting syntax errors in LEAF elements.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
clarity and replaced some cryptic logic with more readable macros.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
of the Tcl_Parse fields that indicate error conditions. [Bug 1749987]
|
| | |
|
| | |
|
| |
| |
| |
| | |
is now more expansion room to define more BINARY operators.
|
| |
| |
| |
| |
| | |
* generic/tclEvent.c: of expr parsing and compiling, including the
* generic/tclInt.h: routine TclFinalizeCompilation().
|
| |
| |
| |
| |
| |
| | |
* generic/tclCompExpr.c: off the C stack and onto the Tcl stack.
* generic/tclCompile.c: This is a rather large struct (> 3kB).
* generic/tclParse.c:
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* generic/tclExecute.c: TclStackAlloc and TclStackFree to make them
easier for callers to use (or more precisely, harder to misuse).
TclStackFree now takes a (void *) argument which is the pointer
intended to be freed. TclStackFree will panic if that's not actually
the memory the call will free. TSA/TSF also now tolerate receiving
(interp == NULL), in which case they simply fall back to be calls to
Tcl_Alloc/Tcl_Free.
* generic/tclIntDecls.h: make genstubs
* generic/tclBasic.c: Updated callers
* generic/tclCmdAH.c:
* generic/tclCmdIL.c:
* generic/tclCompCmds.c:
* generic/tclCompExpr.c:
* generic/tclCompile.c:
* generic/tclFCmd.c:
* generic/tclFileName.c:
* generic/tclIOCmd.c:
* generic/tclIndexObj.c:
* generic/tclInterp.c:
* generic/tclNamesp.c:
* generic/tclProc.c:
* generic/tclTrace.c:
* unix/tclUnixPipe.c:
|
| |
| |
| |
| |
| |
| | |
an error return doesn't prevent all literals getting placed on the
litList to be returned to the caller for freeing. Corrects some
memleaks. [Bug 1705778, leak K23]
|
| |
| |
| |
| | |
literal Tcl_Obj was not getting freed. [Bug 1705778, leak #1 (new)]
|
| |
| |
| |
| |
| |
| |
| |
| | |
leak in 'upvar' when compiling (a) upvar outside a proc, (b)
upvar with a syntax error, or (c) upvar where the frame index
is not known at compile time.
* generic/tclParseExpr.c (ParseExpr): Plugged a memory leak
when parsing expressions that contain syntax errors.
|
| | |
|
| |
| |
| |
| | |
efficient). After [Patch 1529526] (afredd)
|
| |
| |
| |
| |
| |
| | |
* generic/tclCompCmds.c: Replace arrays on the C stack and
ckalloc calls with TclStackAlloc calls to use memory on Tcl's
evaluation stack
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
are in use to support operator commands, might as well make them
the default for [expr] as well and avoid passing every parsed
expression through the inefficient Tcl_Token array format. This
addresses most issues in [RFE 1517602] Assuming no performance
disasters result from this, much dead code supporting the other
implementation might now be removed.
|
| |
| |
| |
| |
| |
| | |
* generic/tclCompExpr.c: of the operator commands through TEBC,
* generic/tclCompile.h: dropping all the routines in tclMathOp.c.
* generic/tclMathOp.c: Still needs Engineering Manual attention.
|
| |
| |
| |
| |
| | |
* generic/tclCompExpr.c: now routing through TEBC via
* generic/tclCompile.h: TclSortingOpCmd().
|
| |
| |
| |
| |
| |
| |
| |
| | |
* generic/tclCompExpr.c: TclExecuteByteCode to implement the TIP 174
* generic/tclCompile.h: commands instead of using a mass of code
* generic/tclMathOp.c: duplication. Now all operator commands that
* tests/mathop.test: demand exactly one operation are implemented
via TclSingleOpCmd and a call to TEBC.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* generic/tclMathOp.c: to perform a bytecode compile / execute
sequence. This demonstrates a path toward avoiding mountains of
code duplication in tclMathOp.c and tclExecute.c.
* generic/tclCompile.h: Change TclExecuteByteCode() from static to
* generic/tclExecute.c: MODULE_SCOPE so all files including
tclCompile.h may call it.
|
| |
| |
| |
| |
| |
| |
| | |
CompileExprTree() routine that can produce expression bytecode
directly from internal structures with no need to pass through
the Tcl_Token array representation. Still disabled by default.
#undef USE_EXPR_TOKENS to try it out.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
produce a different set of internal structures representing the parsed
expression, as well as routines that go on to convert those structures
into the traditional Tcl_Token array format. Use of these routines
is currently disabled. #undef PARSE_DIRECT_EXPR_TOKENS to enable
them. These routines will only become really useful when more
routines that compile directly from the new internal structures are
completed.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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:
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* generic/tcl.decls: New public routines Tcl_ObjPrintf,
* generic/tclStringObj.c: Tcl_AppendObjToErrorInfo, Tcl_Format,
* generic/tclInt.h: Tcl_AppendLimitedToObj,
Tcl_AppendFormatToObj and Tcl_AppendPrintfToObj. Former internal
versions removed.
* generic/tclDecls.h: make genstubs
* generic/tclStubInit.c:
* generic/tclBasic.c: Updated callers.
* generic/tclCkalloc.c:
* generic/tclCmdAH.c:
* generic/tclCmdIL.c:
* generic/tclCmdMZ.c:
* generic/tclCompExpr.c:
* generic/tclCompile.c:
* generic/tclDictObj.c:
* generic/tclExecute.c:
* generic/tclIORChan.c:
* generic/tclIOUtil.c:
* generic/tclMain.c:
* generic/tclNamesp.c:
* generic/tclObj.c:
* generic/tclPkg.c:
* generic/tclProc.c:
* generic/tclStrToD.c:
* generic/tclTimer.c:
* generic/tclUtil.c:
* unix/tclUnixFCmd.c:
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* generic/tclEncoding.c: pointer from/to integer of different
* generic/tclEvent.c: size' on 64-bit platforms by casting to
* generic/tclExecute.c: intermediate types intptr_t/uintptr_t
* generic/tclHash.c: via new PTR2INT(), INT2PTR(),
* generic/tclIO.c: PTR2UINT() and UINT2PTR() macros.
* generic/tclInt.h: [Patch 1592791]
* generic/tclProc.c:
* generic/tclTest.c:
* generic/tclThreadStorage.c:
* generic/tclTimer.c:
* generic/tclUtil.c:
* unix/configure.in:
* unix/tclUnixChan.c:
* unix/tclUnixPipe.c:
* unix/tclUnixPort.h:
* unix/tclUnixTest.c:
* unix/tclUnixThrd.c:
* unix/configure: autoconf-2.59
* unix/tclConfig.h.in: autoheader-2.59
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* generic/tclCompExpr.c: tclParseExpr.c into tclCompExpr.c.
* unix/Makefile.in: This sets the stage for expr compiling to
* win/Makefile.in: work directly with the full parse tree
* win/makefile.bc: structures, and not have to pass through
* win/makefile.vc: the information lossy format of an array
* win/tcl.dsp: of Tcl_Tokens.
|
| |
| |
| |
| | |
no longer needed.
|
| |
| |
| |
| |
| |
| | |
disabling the INST_TRY_CVT_TO_NUMERIC instruction at the end
of an expression when function arguments contain operators.
[Bug 1541274]
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
* 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
(dist): add new macosx files.
* 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/tclUnixFCmd.c:
* macosx/tclMacOSXFCmd.c: ppc64 and endian (i386) fixes.
(TclMacOSXCopyFileAttributes): 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:
* macosx/Tcl.xcode/default.pbxuser (new file):
* macosx/Tcl.xcode/project.pbxproj (new file):
* macosx/Tcl.xcodeproj/default.pbxuser (new file):
* macosx/Tcl.xcodeproj/project.pbxproj (new file): new/updated projects
for Xcode 2.2 on 10.4, Xcode 1.5 on 10.3 & ProjectBuilder on 10.2, with
native tcltest targets and support for universal (fat) compiles.
* macosx/README: clarification/cleanup, document new Xcode projects and
universal (fat) builds via CFLAGS (i.e. all of ppc ppc64 i386 at once).
* unix/Makefile.in:
* unix/aclocal.m4:
* unix/configure.in:
* unix/dltest/Makefile.in:
* macosx/configure.ac (new file): add support for inclusion of
unix/configure.in by macosx/configure.ac, allows generation of a config
headers enabled configure script in macosx (required by Xcode projects).
* macosx/GNUmakefile: rename from Makefile to avoid overwriting by
configure run in tcl/macosx, add support for reusing configure cache,
build target fixes, remove GENERIC_FLAGS override now handled by tcl.m4.
* generic/tcl.decls: add Tcl_Main declaration as comment to avoid
'checkstubs' target complaining about it missing from stubs.
* generic/regex.h:
* generic/tclDate.c:
* generic/tclEnv.c:
* generic/tclGetDate.y:
* generic/tclIOUtil.c:
* generic/tclObj.c:
* generic/tclStubInit.c:
* generic/tclStubLib.c:
* generic/tclPathObj.c:
* generic/tclThreadAlloc.c:
* generic/tclThreadStorage.c:
* generic/tclTrace.c:
* generic/tclVar.c:
* generic/tommath.h:
* tools/fix_tommath_h.tcl:
* unix/tclUnixFCmd.c: ensure externally visible symbols not contained in
stubs table are declared as MODULE_SCOPE (or as static if not used
outside of own source file). These changes allow 'make checkstubs' to
complete without error on Darwin with gcc 4.
* generic/rege_dfa.c (getvacant):
* generic/regexec.c (cfind):
* generic/tclCompExpr.c (CompileSubExpr):
* generic/tclNamesp.c (NamespaceEnsembleCmd):
* unix/tclUnixChan.c (TclUnixWaitForFile): initialise variables to
silence gcc 4 warnings.
* generic/tclExecute.c (TclExecuteByteCode): fix unused variable warning
when NO_WIDE_TYPE is defined.
* generic/regguts.h: only #define NDEBUG if not already #defined.
* unix/tclUnixNotfy.c:
* macosx/tclMacOSXNotify.c: sync whitespace & comments.
* unix/tclUnixPort.h:
* win/tclWinPort.h: remove declaration of obsolete&unused TclpMutex API.
* unix/configure:
* unix/tclConfig.h.in: regen.
|
| | |
|
| |
| |
| |
| |
| |
| | |
[kennykb-numerics-branch] Resynchronized with the HEAD; at this
checkpoint [-rkennykb-numerics-branch-20051008], the HEAD and
kennykb-numerics-branch contain identical code.
|