http://codereview.chromium.org/159587/diff/1001/11 File src/heap.cc (right):
http://codereview.chromium.org/159587/diff/1001/11#newcode2106 Line 2106: ASSERT(map->instance_type() != JS_FUNCTION_TYPE); On 2009/07/29 14:00:51, Kasper Lund wrote: > Maybe avoid using this for allocating global objects and extend the assert to > check that we don't? Good point, JS_GLOBAL_OBJECT_TYPE and JS_BUILTINS_OBJECT_TYPE is now also asserted to be not allocated this way. Also removed the initial_properties parameter again as it has no use when the global objects are not allocated this way. http://codereview.chromium.org/159587/diff/1001/11#newcode2165 Line 2165: StringDictionary::Allocate(map->NumberOfDescribedProperties() * 2 + 4); On 2009/07/29 14:00:51, Kasper Lund wrote: > I think you're right: A bigger size would be good here. Maybe you should try to > count the number of resizes we do when running the bootstrapping code (maybe try > to use Date too to get that lazy loaded). After measuring the sizes after bootstrapping is complete the initial size of JS_GLOBAL_OBJECT_TYPE and JS_BUILTINS_OBJECT_TYPE is 64 and 512 respectively. http://codereview.chromium.org/159587/diff/1001/11#newcode2171 Line 2171: Object* result = AllocateJSObjectFromMap(map, TENURED, dictionary); On 2009/07/29 14:00:51, Kasper Lund wrote: > Have you considered not using AlloacteJSObjectFromMap, but just call Allocate > and InitializeJSObjectFromMap directly from here? That way, you wouldn't have to > pass the initial_properties all the time... Done. http://codereview.chromium.org/159587 --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
