ELENA-LANG / elena-lang

ELENA is a general-purpose language with late binding. It is multi-paradigm, combining features of functional and object-oriented programming. Rich set of tools are provided to deal with message dispatching : multi-methods, message qualifying, generic message handlers, run-time interfaces
https://elena-lang.github.io/
MIT License
227 stars 23 forks source link

Build tape optimization #601

Open arakov opened 10 months ago

arakov commented 10 months ago

The output is:

>@function program.function:#invoke
       xflush       sp:0
       open           :4, :0
       store        fp:1
       xstore       sp:0, intconst:2
       set       class:sandbox'$private'A
       mov        mssg:function:#constructor[1]
       call       mssg:function:#constructor[1], class:sandbox'$private'A#class
       store        fp:3  // an extra save?
       store        fp:2   
       store        sp:0
       mov        mssg:prop:Value[1]
       call         vt:0
       store        fp:3
       peek         fp:1
Lab00:     nop
       close          :0
       quit           
@end