krfkeith / slate-language

Automatically exported from code.google.com/p/slate-language
MIT License
1 stars 0 forks source link

conditions:otherwise: deserves Compiler inlining treatment very similar to caseOf:otherwise: #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
conditions:otherwise: works like caseOf:otherwise: except that it has an array 
of associated test blocks and execution blocks. It therefore creates an array 
and associations on every invocation, making it have poor performance.

The Compiler has suitable logic for inlining case-statements which should be 
adapted to provide inlining of the common case of cond-statements where all 
the blocks and array are literals. The user cannot implement a similar 
optimization at the source level without creating the array and associations 
outside the method body scope and then populating the blocks within the 
method so that they close over the method's bindings.

Original issue reported on code.google.com by BrianTRice on 25 Dec 2009 at 12:20

GoogleCodeExporter commented 9 years ago
This is implemented now using a macro. A compiler-transform may come later but 
doesn't seem necessary for one backtick removal.

Original comment by BrianTRice on 18 Nov 2010 at 12:25