As we discussed, this probably needs a bit more work. Mads is still on
it - stay tuned!

On Thu, Jan 8, 2009 at 4:06 PM,  <[email protected]> wrote:
> Reviewers: Kasper Lund,
>
> Description:
> Use inobject properties for small object literals.
>
> Please review this at http://codereview.chromium.org/17418
>
> SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/
>
> Affected files:
>  M     src/factory.cc
>
>
> Index: src/factory.cc
> ===================================================================
> --- src/factory.cc      (revision 1036)
> +++ src/factory.cc      (working copy)
> @@ -818,6 +818,12 @@
>   Handle<Map> map =
>       CopyMap(Handle<Map>(context->object_function()->initial_map()));
>   AddToMapCache(context, keys, map);
> +  // Use inobject properties for the properties of small object
> +  // literals.
> +  int num_keys = keys->length();
> +  map->set_unused_property_fields(map->unused_property_fields() +
> num_keys);
> +  map->set_inobject_properties(map->inobject_properties() + num_keys);
> +  map->set_instance_size(map->instance_size() + num_keys * kPointerSize);
>   return Handle<Map>(map);
>  }
>
>
>
>

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to