Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Implementing function inlining in shumway

159 views
Skip to first unread message

Hamid A. Toussi

unread,
Dec 26, 2012, 3:55:34 PM12/26/12
to dev-s...@lists.mozilla.org
Hi all,

I am thinking of implementing function inlining as a transformation is
Shumway. How much do you think it could be beneficial to the
performance of the produced program?
I am aware that some of the JavaScript VMs are doing function inlining
(like Chrome's V8), they are doing it on JavaScript code. In Shumway
it can be done on ActionScript bytecode, Could this introduce any
benefit?

Thanks,
Hamid

mbeb...@gmail.com

unread,
Jan 2, 2013, 10:30:59 PM1/2/13
to mozilla-d...@lists.mozilla.org, dev-s...@lists.mozilla.org
I think it would be beneficial. Inlining at the AVM2 level can help with optimizations, things that the JS engine cannot reason about. Getters, setters and construct super calls will benefit a lot from inlining. There are two ways to do this at the moment:

1. Currently, AVM2 bytecode is transformed into an IR that is consumed by the C4 compiler. The C4 compiler is meant to be used general purpose JIT (although it's not completely decoupled from Shumway, but it will be). Performing inlining at this phase means other applications that target this IR will benefit from inlining).

2. You can perform inlining when generating the C4 IR (in builder.js). There are some optimizations that happen at this stage that can benefit from inlining.

I would go with option 1.

- Michael

mbeb...@gmail.com

unread,
Jan 2, 2013, 10:30:59 PM1/2/13
to mozilla.d...@googlegroups.com, dev-s...@lists.mozilla.org
On Wednesday, December 26, 2012 12:55:34 PM UTC-8, Hamid A. Toussi wrote:
0 new messages