Index: src/heap.cc |
diff --git a/src/heap.cc b/src/heap.cc |
index 8737c574b2d1d83e13722bc3d1b614c2f04c88aa..5f9bd38f07d9ccaf29d81252a5d873f6fbf7bc08 100644 |
--- a/src/heap.cc |
+++ b/src/heap.cc |
@@ -4458,48 +4458,6 @@ MaybeObject* Heap::AllocateArgumentsObject(Object* callee, int length) { |
} |
-MaybeObject* Heap::AllocateInitialMap(JSFunction* fun) { |
- ASSERT(!fun->has_initial_map()); |
- |
- // First create a new map with the size and number of in-object properties |
- // suggested by the function. |
- InstanceType instance_type; |
- int instance_size; |
- int in_object_properties; |
- if (fun->shared()->is_generator()) { |
- instance_type = JS_GENERATOR_OBJECT_TYPE; |
- instance_size = JSGeneratorObject::kSize; |
- in_object_properties = 0; |
- } else { |
- instance_type = JS_OBJECT_TYPE; |
- instance_size = fun->shared()->CalculateInstanceSize(); |
- in_object_properties = fun->shared()->CalculateInObjectProperties(); |
- } |
- Map* map; |
- MaybeObject* maybe_map = AllocateMap(instance_type, instance_size); |
- if (!maybe_map->To(&map)) return maybe_map; |
- |
- // Fetch or allocate prototype. |
- Object* prototype; |
- if (fun->has_instance_prototype()) { |
- prototype = fun->instance_prototype(); |
- } else { |
- MaybeObject* maybe_prototype = AllocateFunctionPrototype(fun); |
- if (!maybe_prototype->To(&prototype)) return maybe_prototype; |
- } |
- map->set_inobject_properties(in_object_properties); |
- map->set_unused_property_fields(in_object_properties); |
- map->set_prototype(prototype); |
- ASSERT(map->has_fast_object_elements()); |
- |
- if (!fun->shared()->is_generator()) { |
- fun->shared()->StartInobjectSlackTracking(map); |
- } |
- |
- return map; |
-} |
- |
- |
void Heap::InitializeJSObjectFromMap(JSObject* obj, |
FixedArray* properties, |
Map* map) { |