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
boxing an array, assigning to the local variable - get rid of double assigning
dirty_ptr := dirty_ptr + int
copy a sub array to another array - starting
copy a sub array to another array
tuple / array unboxing
optimization single dispatching
String.prop:Length[1]
optimization sealed dispatching
optimization xstore sp:0, 0 and xstore sp:1, 0 - should be replaced with xor operation
comparing Handle with WindowHandle should be native
optimize Amicable pairs
getting / setting a prop field - should be done directly if it is trivial getter / setter
unused allocated variable should be removed to spare stack
BuildKey::CopyingAccField, 0
get rid of extra assigning here:
class A
{
object field;
object Value
= field;
constructor(value)
{
field := value;
}
}
public program()
{
A a := new A(2);
var val := *a;
}
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
get rid of extra assigning here:
class A { object field;
}
public program() { A a := new A(2);
}
The output is: