Mads, may you have another look? Note that includes http://codereview.chromium.org/762001 (slightly modify variant with InstallFunction renamed to InstallBuiltin).
I decided to drop support for the cases where argc > 1---we could implement it later if need be. On Tue, Mar 9, 2010 at 2:51 PM, <[email protected]> wrote: > I see why you need to preserved ebx, sorry about that. Playing with > eliminating > some of the pushes and pops by freeing registers earlier still might make > sense. I think it should be rather feasible feed another scratch into RecordWrite (minor key permits and there should be enough registers at calling side given that clobberring is an option). But that's not necessary for the current variant. > http://codereview.chromium.org/669061/diff/1009/16 > File src/bootstrapper.cc (right): > > http://codereview.chromium.org/669061/diff/1009/16#newcode1465 > src/bootstrapper.cc:1465: if (function_data->IsUndefined()) { > On 2010/03/09 10:39:12, antonm wrote: >> >> On 2010/03/08 12:39:28, Mads Ager wrote: >> > I wonder if this can have interesting side-effects? >> > >> > Using function template info for this new pointer means that this > > function >> >> will >> > be seen as an API function (because the function_data field will be > > different >> >> > from undefined). We need to make sure that this is ok. Even if it > > is ok I >> >> > think it would be nice to find a less intrusive way to do this. It > > is >> >> confusing >> > that function_data can be different from undefined for two very > > different >> >> > reasons now. > >> Mads, any recommendations are most appreciated. I put it into the > > template for >> >> the only reason---I didn't want to make all functions to pay > > additional pointer >> >> overhead. If you could recommend me some other place, that'd be cool. > > You are definitely right that we should not waste a word extra for all > functions for this. > >> One, but somewhat nasty approach, might be to overload function_data > > to hold >> >> either API stuff or custom call generator, but that is somewhat > > smelly. > > It does smell, but I think it is better than the current approach > because with the current approach we cannot distinguish API functions > from functions that just have a custom call generator. If we change the > name of the field to something like template_info_or_call_generator and > add has_template_info and has_call_generator methods to test which one > is present (if any) it will not be so bad and we should be able to avoid > nasty side-effects. Sure. Here comes my take. yours, anton. -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
