P T Withington wrote:
If you grep through the sources of the LFC, you will see

  if ($flasm) {
    ... assembly ...
  } else {
    ... javascript ...
  }

Thanks for this info - we will check it out!

[Using top stack element as alternative to register]
That's interesting to know. That is an optimization the compiler does not attempt yet.

It is very hard to do this optimisation automatically - especially since you have no way to access elements further down the stack. All you have is access to the top element, and swap.

And since most stuff requires using the stack, it might be very costly to promote the wrong variable to the top-stack element. In particular, it will be pretty difficult to implement a robust optimisation that does this automatically.

My suggestion would be an annotation: This variable should be allocated as the top-stack element. Alternatively, provide a specially named variable, which is the top-stack element. But maybe inline assembly is to prefer to such extensions.

[8.5 flash]
Very much so! We are actively working on re-modularizing the compiler chain to permit alternate target runtimes. This seems like the better direction to follow since it will improve the efficiency of all code.

The problem with 8.5 is that it will not be out for a long time, so we would like to pursue both directions at the same time.

And regardless of new runtimes, the ABI and inline assembly stuff is still relevant in terms of allowing interoperability with other technologies.

Regards,
Asger
_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

Reply via email to