On 6-Jan-07, at 7:08 AM, Chris Double wrote: > On 1/7/07, Eduardo Cavazos <[EMAIL PROTECTED]> wrote: >> Is the compiler powerful enough to pick a method to run at compile >> time, in >> cases where it knows the enough about the stack signature? > > Is there ever a case where this could happen? The only time I can > think of is with literals on the stack. And many literals can be > modified so even then it may not happen very often that it could do > anything at compile time. > > Something more akin to strongtalk or self's dynamic optimisations > might be possible though.
TUPLE: foo bar ; GENERIC: quux M: foo quux foo-bar 3 * ; In this code, the compiler knows that the foo-bar word is being applied to an instance of foo, and it compiles as a two-instruction indirect load without a type check or jump. There are other cases, too. Slava ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Factor-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/factor-talk
