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)
commitd860a2c3a49e049350838d0ee2e259e7f8b4c3e6 (patch)
tree4de2dd1c77a23d0b972d4e40b212d5a830f33aa2 /generic/tclBasic.c
parent009f2adf3dad0d3eb86598f988fc93c8a64f6f2a (diff)
downloadtcl-d860a2c3a49e049350838d0ee2e259e7f8b4c3e6.zip
tcl-d860a2c3a49e049350838d0ee2e259e7f8b4c3e6.tar.gz
tcl-d860a2c3a49e049350838d0ee2e259e7f8b4c3e6.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;