summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.h
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-12-22 20:27:14 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-12-22 20:27:14 (GMT)
commit2cbec4bf44fad8591fa06185d8cf3f28dd1526a2 (patch)
treec21abe18af5192fe68d7241c7e1215ee9474377c /generic/tclCompile.h
parent7ac39417f17cf6027ca26576c86d3cf9147ad1e7 (diff)
downloadtcl-2cbec4bf44fad8591fa06185d8cf3f28dd1526a2.zip
tcl-2cbec4bf44fad8591fa06185d8cf3f28dd1526a2.tar.gz
tcl-2cbec4bf44fad8591fa06185d8cf3f28dd1526a2.tar.bz2
Convert the LocalScalar*() macros to rest on TclPushVarName rather than on
TclIsLocalScalar().
Diffstat (limited to 'generic/tclCompile.h')
-rw-r--r--generic/tclCompile.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/generic/tclCompile.h b/generic/tclCompile.h
index 51f0b34..c6c7a7c 100644
--- a/generic/tclCompile.h
+++ b/generic/tclCompile.h
@@ -1151,6 +1151,10 @@ MODULE_SCOPE void TclFinalizeLoopExceptionRange(CompileEnv *envPtr,
MODULE_SCOPE char * TclLiteralStats(LiteralTable *tablePtr);
MODULE_SCOPE int TclLog2(int value);
#endif
+MODULE_SCOPE int TclLocalScalar(const char *bytes, int numBytes,
+ CompileEnv *envPtr);
+MODULE_SCOPE int TclLocalScalarFromToken(Tcl_Token *tokenPtr,
+ CompileEnv *envPtr);
MODULE_SCOPE void TclOptimizeBytecode(void *envPtr);
#ifdef TCL_COMPILE_DEBUG
MODULE_SCOPE void TclPrintByteCodeObj(Tcl_Interp *interp,
@@ -1678,11 +1682,9 @@ MODULE_SCOPE int TclPushProcCallFrame(ClientData clientData,
#define AnonymousLocal(envPtr) \
(TclFindCompiledLocal(NULL, /*nameChars*/ 0, /*create*/ 1, (envPtr)))
#define LocalScalar(chars,len,envPtr) \
- (!TclIsLocalScalar((chars), (len)) ? -1 : \
- TclFindCompiledLocal((chars), (len), /*create*/ 1, (envPtr)))
+ TclLocalScalar(chars, len, envPtr)
#define LocalScalarFromToken(tokenPtr,envPtr) \
- ((tokenPtr)->type != TCL_TOKEN_SIMPLE_WORD ? -1 : \
- LocalScalar((tokenPtr)[1].start, (tokenPtr)[1].size, (envPtr)))
+ TclLocalScalarFromToken(tokenPtr, envPtr)
/*
* Flags bits used by TclPushVarName.