On Thu, Feb 17, 2011 at 5:19 PM, Scott Blum <[email protected]> wrote:
>
> Something like that, yep. Just need to figure out what to do if there
> aren't any super ctors (maybe they got inlined?).
> - Use ids after all?
> - Make a synthetic super ctor just for this purpose?
> - Just attach super symbols directly to concrete type.
>
> Actually, #3 might be a reasonable speed vs. size tradeoff, maybe we should
> get rid of even virtual proto chaining.
>
How strongly do you feel about this? This patch has been languishing for a
while, but it's capable of delivering 10-15% gains in Mtrx/AWFE which should
up their happiness. I'm all for potentially doing #3, but maybe we can do it
as a follow on patch?
>
>
> Will need to test and find out. It might actually be better than having to
> go through a multi-level lookup chain.
>
I will try a test with mobile. My concern is not really the chain lookups at
runtime, but the effect on load/parse time caused by all of the copying.
Obviously, I'd like to defer as much work as possible. Perhaps we can defer
vtable setup until first instantiation by rolling it into the initializer?
e.g.
function ctor() {
if (!this.method1) {
copySuperFields(this);
this.method1 = function () { ... }
this.method2 = function () { ... }
}
// regular init code
}
I'd be curious to see what effect this has on mobile startup.
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors