Subject: Have TclMakeEnsemble() set ENSEMBLE_COMPILE at creation, not as a separate epoch-bumping step.

From: dgp <[email-masked]>
Date: Thu, 11 Jul 2013 17:06:35 +0000

---
 generic/tclEnsemble.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c
index 0bb7cb6..680ab45d 100644
--- a/generic/tclEnsemble.c
+++ b/generic/tclEnsemble.c
@@ -1527,6 +1527,14 @@ TclMakeEnsemble(
 	    cmdName = nameParts[nameCount - 1];
 	}
     }
+
+    /*
+     * Switch on compilation always for core ensembles now that we can do
+     * nice bytecode things with them.  Do it now.  Waiting until later will
+     * just cause pointless epoch bumps.
+     */
+
+    ensembleFlags |= ENSEMBLE_COMPILE;
     ensemble = Tcl_CreateEnsemble(interp, cmdName, ns, ensembleFlags);
 
     /*
@@ -1578,14 +1586,6 @@ TclMakeEnsemble(
 	    }
 	}
 	Tcl_SetEnsembleMappingDict(interp, ensemble, mapDict);
-
-	/*
-	 * Switch on compilation always for core ensembles now that we can do
-	 * nice bytecode things with them.
-	 */
-
-	Tcl_SetEnsembleFlags(interp, ensemble,
-		ensembleFlags | ENSEMBLE_COMPILE);
     }
 
     Tcl_DStringFree(&buf);
-- 
cgit v0.12