From: SourceForge.net <no...@so...> - 2007-03-26 17:58:25
|
Patches item #1688593, was opened at 2007-03-26 10:43 Message generated for change (Comment added) made by andreas_kupries You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=310894&aid=1688593&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 46. Bytecode Compiler Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: miguel sofer (msofer) Assigned to: miguel sofer (msofer) Summary: compiling variable links Initial Comment: Attached a patch that compiles [global], [variable], [upvar] and [namespace upvar] to bytecodes. Comments are still somewhat sparse, and new tests might yet be required. ---------------------------------------------------------------------- >Comment By: Andreas Kupries (andreas_kupries) Date: 2007-03-26 10:58 Message: Logged In: YES user_id=75003 Originator: NO Quick review ... In the compilers for (namespace) upvar, what you return ERROR to force outline execution if the 'thisVar' is not local. However I see no code to remove the instructions for var pairs which were ok and came before the variable which forced the outline compile. I.e. a command like "upvar 1 $vara here $varb <NOT_LOCAL_VAR>" (*) causes compilation of the vara/here pair, and then aborts for varb. But the instructions for vara are still in the result, are they not ? (*) I used <NOT_LOCAL_VAR> as placeholder because I have currently no idea how a variable name cannot be local. Shrug. Oh, I just saw that the code seems to assume that the 'local token' is a always varname, i.e. constant. It does not seem to handle the case of a the token being a command, or varr reference, i.e. ([...], $xxx), like in upvar 1 $external [ourvar] upvar 1 $external $myvar Both of these are cases which should force outline compile. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=310894&aid=1688593&group_id=10894 |