On May 20, 2013, at 6:43 PM, Frank Shearar <frank.shearar@gmail.com> wrote:
It's a compile-time transformation of #future and #future: messages. Depending on whether or not the result is used (through some basic semantic analysis) the messages are transformed into #futureDo:at:args or #futureSend:at:args. FutureNode to performs the necessary transformation through the usual emitCodeForFoo:value: messages. (Warning: I have limited knowledge of the inner workings of the Compiler, and so anything I say here might be nonsensical.)
Wow⦠I would have never implemented it like this. I even would argue that it is conceptually wrong. The AST has a one-to-one mapping to the grammar. What is a message send is a MessageNode, this is even true for ifTrue:, so why would one not keep it like that? Optimizations have to be done on another level. Destroying the AST while generating code is not a good idea! Marcus