| Index: src/heap.cc
|
| diff --git a/src/heap.cc b/src/heap.cc
|
| index ba5b6903984c205a04417d7be075ac1e6f7ac860..5d4651631a209f2b3d0f8bfc2cf3f211256bc752 100644
|
| --- a/src/heap.cc
|
| +++ b/src/heap.cc
|
| @@ -3377,7 +3377,6 @@ MaybeObject* Heap::AllocateSharedFunctionInfo(Object* name) {
|
| share->set_debug_info(undefined_value(), SKIP_WRITE_BARRIER);
|
| share->set_inferred_name(empty_string(), SKIP_WRITE_BARRIER);
|
| share->set_initial_map(undefined_value(), SKIP_WRITE_BARRIER);
|
| - share->set_this_property_assignments(undefined_value(), SKIP_WRITE_BARRIER);
|
| share->set_ast_node_count(0);
|
| share->set_stress_deopt_counter(FLAG_deopt_every_n_times);
|
| share->set_counters(0);
|
| @@ -3392,7 +3391,6 @@ MaybeObject* Heap::AllocateSharedFunctionInfo(Object* name) {
|
| share->set_function_token_position(0);
|
| // All compiler hints default to false or 0.
|
| share->set_compiler_hints(0);
|
| - share->set_this_property_assignments_count(0);
|
| share->set_opt_count(0);
|
|
|
| return share;
|
| @@ -4161,20 +4159,6 @@ MaybeObject* Heap::AllocateArgumentsObject(Object* callee, int length) {
|
| }
|
|
|
|
|
| -static bool HasDuplicates(DescriptorArray* descriptors) {
|
| - int count = descriptors->number_of_descriptors();
|
| - if (count > 1) {
|
| - Name* prev_key = descriptors->GetKey(0);
|
| - for (int i = 1; i != count; i++) {
|
| - Name* current_key = descriptors->GetKey(i);
|
| - if (prev_key == current_key) return true;
|
| - prev_key = current_key;
|
| - }
|
| - }
|
| - return false;
|
| -}
|
| -
|
| -
|
| MaybeObject* Heap::AllocateInitialMap(JSFunction* fun) {
|
| ASSERT(!fun->has_initial_map());
|
|
|
| @@ -4209,48 +4193,6 @@ MaybeObject* Heap::AllocateInitialMap(JSFunction* fun) {
|
| map->set_prototype(prototype);
|
| ASSERT(map->has_fast_object_elements());
|
|
|
| - // If the function has only simple this property assignments add
|
| - // field descriptors for these to the initial map as the object
|
| - // cannot be constructed without having these properties. Guard by
|
| - // the inline_new flag so we only change the map if we generate a
|
| - // specialized construct stub.
|
| - ASSERT(in_object_properties <= Map::kMaxPreAllocatedPropertyFields);
|
| - if (!fun->shared()->is_generator() &&
|
| - fun->shared()->CanGenerateInlineConstructor(prototype)) {
|
| - int count = fun->shared()->this_property_assignments_count();
|
| - if (count > in_object_properties) {
|
| - // Inline constructor can only handle inobject properties.
|
| - fun->shared()->ForbidInlineConstructor();
|
| - } else {
|
| - DescriptorArray* descriptors;
|
| - MaybeObject* maybe_descriptors = DescriptorArray::Allocate(count);
|
| - if (!maybe_descriptors->To(&descriptors)) return maybe_descriptors;
|
| -
|
| - DescriptorArray::WhitenessWitness witness(descriptors);
|
| - for (int i = 0; i < count; i++) {
|
| - String* name = fun->shared()->GetThisPropertyAssignmentName(i);
|
| - ASSERT(name->IsInternalizedString());
|
| - // TODO(verwaest): Since we cannot update the boilerplate's map yet,
|
| - // initialize to the worst case.
|
| - FieldDescriptor field(name, i, NONE, Representation::Tagged());
|
| - descriptors->Set(i, &field, witness);
|
| - }
|
| - descriptors->Sort();
|
| -
|
| - // The descriptors may contain duplicates because the compiler does not
|
| - // guarantee the uniqueness of property names (it would have required
|
| - // quadratic time). Once the descriptors are sorted we can check for
|
| - // duplicates in linear time.
|
| - if (HasDuplicates(descriptors)) {
|
| - fun->shared()->ForbidInlineConstructor();
|
| - } else {
|
| - map->InitializeDescriptors(descriptors);
|
| - map->set_pre_allocated_property_fields(count);
|
| - map->set_unused_property_fields(in_object_properties - count);
|
| - }
|
| - }
|
| - }
|
| -
|
| if (!fun->shared()->is_generator()) {
|
| fun->shared()->StartInobjectSlackTracking(map);
|
| }
|
|
|