From: tcl-commits <tcl...@tc...> - 2011-11-21 18:25:14
|
Commit by andreask (branch: trunk): Fix a bug where global precompiled code (A) called from a precompiled procedure causes the core to recompile (A), triggering the trap laid inside, i.e. 'error "called a copy of compiled code"'. Example ----------------------ex1.tcl proc init {} { source ex2.tcl } init ----------------------ex2.tcl puts a ---------------------- When run as precompiled code the 'puts a' is not executed, only the trap. Fixed by enclosing the offending code into a guard which prevents its execution for precompiled code. The change passes the entire testsuite. http://core.tcl.tk/tcl/info/51f9d8af1041fead7e5e896e16f2704c7d257a06 Changeset: generic/tclExecute.c |