P T Withington wrote:
Not approved: I think the stretches issue needs a different solution. See comments below.
<snip>
Good catch. I wonder if there are other setters in components? Also, consider following the pattern in LzView#setResource: move the body into $lzc$set_... and make the old setter method a deprecated trampoline, to encourage people to use setAttribute (which will be in-lined, and will call the $lzc$set_... directly). We want the 'normal' path to be the fast path.
I'm working on an updated patch that applies this transformation to the most commonly called methods.
I'm concerned about application size if we inline the entire setAttribute() method in user code. The compiler could certainly inline calls to known setters by transforming setAttribute('foo', ...) -> $lzc_set_foo(...).
If this is the plan, then changing the trampoline order and deprecating the original setter methods (with warnings) makes sense. If not, we should probably leave the original methods in place because they'll be faster for user code.
The more aggressive inlining of the entire setAttribute() method should probably be restricted to the LFC for now...
-- Regards, Max Carlson OpenLaszlo.org
