summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index b10af65..ff1da8b 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -2034,6 +2034,15 @@ TclNRExecuteByteCode(
* sizeof(void *);
int numWords = (size + sizeof(Tcl_Obj *) - 1) / sizeof(Tcl_Obj *);
+ /*
+ * Shortcut for compiled empty scripts
+ */
+
+ if (codePtr->source && (*codePtr->source == '\0')
+ && !(codePtr->flags & TCL_BYTECODE_PRECOMPILED)) {
+ return TCL_OK;
+ }
+
codePtr->refCount++;
/*