ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> tcl-core
tcl-core
Re: [TCLCORE] Tcl through X rays
by Donal K. Fellows other posts by this author
May 28 2007 2:26PM messages near this date
Re: [TCLCORE] Tcl through X rays | Re: [TCLCORE] Tcl through X rays
Mo DeJong wrote:
>  The short answer is that you can't really scan a Tcl proc to figure out 
>  if it does not make use of upvar or
>  other linked variables. You can write a compiler that assumes that a 
>  proc does not deal with linked variables,
>  but it is trivial to create a test case that breaks this optimization.

You can do it, but it's not at all easy. It depends on collecting
information on each procedure to find out if it uses tricky commands.
Initially, you only get to determine what "leaf" procedures are up to,
but with the leaves figured out, you'll be able to go further up the
call tree and optimize things further (a procedure is non-tricky if it
does not call anything tricky). I suspect that much code will do quite
well from this technique, and everything else will be right where we are
now. (Getting rid of the current strategy is likely to be impossible,
even if we add new ones on top.)

Donal.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Tcl-Core mailing list
Tcl-Core@[...].net
https://lists.sourceforge.net/lists/listinfo/tcl-core
Thread:
Alexandre Ferrieux
Donal K. Fellows
Alexandre Ferrieux
Mo DeJong
Alexandre Ferrieux
Mo DeJong
Jeff Hobbs
Andreas Leitgeb
Donal K. Fellows
Alexandre Ferrieux
Larry McVoy
Donal K. Fellows
Donal K. Fellows
Alexandre Ferrieux
Miguel Sofer
Rna020
Donal K. Fellows
Donal K. Fellows
Gerald W. Lester
Donal K. Fellows

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved