summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-07-15 20:16:11 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-07-15 20:16:11 (GMT)
commit59d8c6ba4b9cc7f77258e0cdae09b6d786f19fc4 (patch)
tree4de2dd1c77a23d0b972d4e40b212d5a830f33aa2 /generic/tclBasic.c
parentcb0803df0cdcda3e486b73757f4522b467d90a83 (diff)
downloadtcl-59d8c6ba4b9cc7f77258e0cdae09b6d786f19fc4.zip
tcl-59d8c6ba4b9cc7f77258e0cdae09b6d786f19fc4.tar.gz
tcl-59d8c6ba4b9cc7f77258e0cdae09b6d786f19fc4.tar.bz2
Build CompileBasicNArgCommand on top of TclCompileInvocation.
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index b2a505a..963b53a 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -5633,6 +5633,24 @@ TclArgumentBCEnter(
CFWordBC *lastPtr = NULL;
/*
+ * ePtr->nline is the number of words originally parsed.
+ *
+ * objc is the number of elements getting invoked.
+ *
+ * If they are not the same, we arrived here by compiling an
+ * ensemble dispatch. Ensemble subcommands that lead to script
+ * evaluation are not supposed to get compiled, because a command
+ * such as [info level] in the script can expose some of the dispatch
+ * shenanigans. This means that we don't have to tend to the
+ * housekeeping, and can escape now.
+ */
+
+ if (ePtr->nline != objc) {
+ return;
+ }
+
+ /*
+ * Having disposed of the ensemble cases, we can state...
* A few truths ...
* (1) ePtr->nline == objc
* (2) (ePtr->line[word] < 0) => !literal, for all words
@@ -5642,10 +5660,6 @@ TclArgumentBCEnter(
* have to save them at compile time.
*/
- if (ePtr->nline != objc) {
- Tcl_Panic ("TIP 280 data structure inconsistency");
- }
-
for (word = 1; word < objc; word++) {
if (ePtr->line[word] >= 0) {
int isnew;