Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/objects.cc

Issue 10802034: Moved lastadded from DescriptorArray to Map. Renamed kLastAdded to kEnumCache. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments. Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2753 matching lines...) Expand 10 before | Expand all | Expand 10 after
2764 result->holder(), 2764 result->holder(),
2765 strict_mode); 2765 strict_mode);
2766 } 2766 }
2767 case INTERCEPTOR: 2767 case INTERCEPTOR:
2768 return self->SetPropertyWithInterceptor(*name, 2768 return self->SetPropertyWithInterceptor(*name,
2769 *value, 2769 *value,
2770 attributes, 2770 attributes,
2771 strict_mode); 2771 strict_mode);
2772 case TRANSITION: { 2772 case TRANSITION: {
2773 Map* transition_map = result->GetTransitionTarget(); 2773 Map* transition_map = result->GetTransitionTarget();
2774 int descriptor = transition_map->LastAdded();
2774 2775
2775 DescriptorArray* descriptors = transition_map->instance_descriptors(); 2776 DescriptorArray* descriptors = transition_map->instance_descriptors();
2776 int descriptor = descriptors->LastAdded();
2777 PropertyDetails details = descriptors->GetDetails(descriptor); 2777 PropertyDetails details = descriptors->GetDetails(descriptor);
2778 2778
2779 if (details.type() == FIELD) { 2779 if (details.type() == FIELD) {
2780 if (attributes == details.attributes()) { 2780 if (attributes == details.attributes()) {
2781 int field_index = descriptors->GetFieldIndex(descriptor); 2781 int field_index = descriptors->GetFieldIndex(descriptor);
2782 return self->AddFastPropertyUsingMap(transition_map, 2782 return self->AddFastPropertyUsingMap(transition_map,
2783 *name, 2783 *name,
2784 *value, 2784 *value,
2785 field_index); 2785 field_index);
2786 } 2786 }
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
2885 if (value == result.GetConstantFunction()) return value; 2885 if (value == result.GetConstantFunction()) return value;
2886 // Preserve the attributes of this existing property. 2886 // Preserve the attributes of this existing property.
2887 attributes = result.GetAttributes(); 2887 attributes = result.GetAttributes();
2888 return ConvertDescriptorToField(name, value, attributes); 2888 return ConvertDescriptorToField(name, value, attributes);
2889 case CALLBACKS: 2889 case CALLBACKS:
2890 case INTERCEPTOR: 2890 case INTERCEPTOR:
2891 // Override callback in clone 2891 // Override callback in clone
2892 return ConvertDescriptorToField(name, value, attributes); 2892 return ConvertDescriptorToField(name, value, attributes);
2893 case TRANSITION: { 2893 case TRANSITION: {
2894 Map* transition_map = result.GetTransitionTarget(); 2894 Map* transition_map = result.GetTransitionTarget();
2895 int descriptor = transition_map->LastAdded();
2895 2896
2896 DescriptorArray* descriptors = transition_map->instance_descriptors(); 2897 DescriptorArray* descriptors = transition_map->instance_descriptors();
2897 int descriptor = descriptors->LastAdded();
2898 PropertyDetails details = descriptors->GetDetails(descriptor); 2898 PropertyDetails details = descriptors->GetDetails(descriptor);
2899 2899
2900 if (details.type() == FIELD) { 2900 if (details.type() == FIELD) {
2901 if (attributes == details.attributes()) { 2901 if (attributes == details.attributes()) {
2902 int field_index = descriptors->GetFieldIndex(descriptor); 2902 int field_index = descriptors->GetFieldIndex(descriptor);
2903 return AddFastPropertyUsingMap(transition_map, 2903 return AddFastPropertyUsingMap(transition_map,
2904 name, 2904 name,
2905 value, 2905 value,
2906 field_index); 2906 field_index);
2907 } 2907 }
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
3073 Map::cast(result)->EquivalentToForNormalization(fast, mode)) { 3073 Map::cast(result)->EquivalentToForNormalization(fast, mode)) {
3074 #ifdef DEBUG 3074 #ifdef DEBUG
3075 if (FLAG_verify_heap) { 3075 if (FLAG_verify_heap) {
3076 Map::cast(result)->SharedMapVerify(); 3076 Map::cast(result)->SharedMapVerify();
3077 } 3077 }
3078 if (FLAG_enable_slow_asserts) { 3078 if (FLAG_enable_slow_asserts) {
3079 // The cached map should match newly created normalized map bit-by-bit, 3079 // The cached map should match newly created normalized map bit-by-bit,
3080 // except for the code cache, which can contain some ics which can be 3080 // except for the code cache, which can contain some ics which can be
3081 // applied to the shared map. 3081 // applied to the shared map.
3082 Object* fresh; 3082 Object* fresh;
3083 { MaybeObject* maybe_fresh = 3083 MaybeObject* maybe_fresh =
3084 fast->CopyNormalized(mode, SHARED_NORMALIZED_MAP); 3084 fast->CopyNormalized(mode, SHARED_NORMALIZED_MAP);
3085 if (maybe_fresh->ToObject(&fresh)) { 3085 if (maybe_fresh->ToObject(&fresh)) {
3086 ASSERT(memcmp(Map::cast(fresh)->address(), 3086 ASSERT(memcmp(Map::cast(fresh)->address(),
3087 Map::cast(result)->address(), 3087 Map::cast(result)->address(),
3088 Map::kCodeCacheOffset) == 0); 3088 Map::kCodeCacheOffset) == 0);
3089 int offset = Map::kCodeCacheOffset + kPointerSize; 3089 int offset = Map::kCodeCacheOffset + kPointerSize;
3090 ASSERT(memcmp(Map::cast(fresh)->address() + offset, 3090 ASSERT(memcmp(Map::cast(fresh)->address() + offset,
3091 Map::cast(result)->address() + offset, 3091 Map::cast(result)->address() + offset,
3092 Map::kSize - offset) == 0); 3092 Map::kSize - offset) == 0);
3093 }
3094 } 3093 }
3095 } 3094 }
3096 #endif 3095 #endif
3097 return result; 3096 return result;
3098 } 3097 }
3099 3098
3100 { MaybeObject* maybe_result = 3099 { MaybeObject* maybe_result =
3101 fast->CopyNormalized(mode, SHARED_NORMALIZED_MAP); 3100 fast->CopyNormalized(mode, SHARED_NORMALIZED_MAP);
3102 if (!maybe_result->ToObject(&result)) return maybe_result; 3101 if (!maybe_result->ToObject(&result)) return maybe_result;
3103 } 3102 }
(...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after
4489 return TryAccessorTransition( 4488 return TryAccessorTransition(
4490 this, target, descriptor_number, component, accessor, attributes); 4489 this, target, descriptor_number, component, accessor, attributes);
4491 } 4490 }
4492 } else { 4491 } else {
4493 // If not, lookup a transition. 4492 // If not, lookup a transition.
4494 map()->LookupTransition(this, name, &result); 4493 map()->LookupTransition(this, name, &result);
4495 4494
4496 // If there is a transition, try to follow it. 4495 // If there is a transition, try to follow it.
4497 if (result.IsFound()) { 4496 if (result.IsFound()) {
4498 Map* target = result.GetTransitionTarget(); 4497 Map* target = result.GetTransitionTarget();
4499 int descriptor_number = target->instance_descriptors()->LastAdded(); 4498 int descriptor_number = target->LastAdded();
4500 ASSERT(target->instance_descriptors()->GetKey(descriptor_number) == name); 4499 ASSERT(target->instance_descriptors()->GetKey(descriptor_number) == name);
4501 return TryAccessorTransition( 4500 return TryAccessorTransition(
4502 this, target, descriptor_number, component, accessor, attributes); 4501 this, target, descriptor_number, component, accessor, attributes);
4503 } 4502 }
4504 } 4503 }
4505 4504
4506 // If there is no transition yet, add a transition to the a new accessor pair 4505 // If there is no transition yet, add a transition to the a new accessor pair
4507 // containing the accessor. 4506 // containing the accessor.
4508 AccessorPair* accessors; 4507 AccessorPair* accessors;
4509 MaybeObject* maybe_accessors; 4508 MaybeObject* maybe_accessors;
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
4704 4703
4705 4704
4706 MaybeObject* Map::CopyNormalized(PropertyNormalizationMode mode, 4705 MaybeObject* Map::CopyNormalized(PropertyNormalizationMode mode,
4707 NormalizedMapSharingMode sharing) { 4706 NormalizedMapSharingMode sharing) {
4708 int new_instance_size = instance_size(); 4707 int new_instance_size = instance_size();
4709 if (mode == CLEAR_INOBJECT_PROPERTIES) { 4708 if (mode == CLEAR_INOBJECT_PROPERTIES) {
4710 new_instance_size -= inobject_properties() * kPointerSize; 4709 new_instance_size -= inobject_properties() * kPointerSize;
4711 } 4710 }
4712 4711
4713 Map* result; 4712 Map* result;
4714 { MaybeObject* maybe_result = RawCopy(new_instance_size); 4713 MaybeObject* maybe_result = RawCopy(new_instance_size);
4715 if (!maybe_result->To(&result)) return maybe_result; 4714 if (!maybe_result->To(&result)) return maybe_result;
4716 }
4717 4715
4718 if (mode != CLEAR_INOBJECT_PROPERTIES) { 4716 if (mode != CLEAR_INOBJECT_PROPERTIES) {
4719 result->set_inobject_properties(inobject_properties()); 4717 result->set_inobject_properties(inobject_properties());
4720 } 4718 }
4721 4719
4720 result->SetLastAdded(kNoneAdded);
4722 result->set_code_cache(code_cache()); 4721 result->set_code_cache(code_cache());
4723 result->set_is_shared(sharing == SHARED_NORMALIZED_MAP); 4722 result->set_is_shared(sharing == SHARED_NORMALIZED_MAP);
4724 4723
4725 #ifdef DEBUG 4724 #ifdef DEBUG
4726 if (FLAG_verify_heap && Map::cast(result)->is_shared()) { 4725 if (FLAG_verify_heap && Map::cast(result)->is_shared()) {
4727 result->SharedMapVerify(); 4726 result->SharedMapVerify();
4728 } 4727 }
4729 #endif 4728 #endif
4730 4729
4731 return result; 4730 return result;
(...skipping 17 matching lines...) Expand all
4749 4748
4750 4749
4751 MaybeObject* Map::CopyReplaceDescriptors(DescriptorArray* descriptors, 4750 MaybeObject* Map::CopyReplaceDescriptors(DescriptorArray* descriptors,
4752 String* name, 4751 String* name,
4753 int last_added, 4752 int last_added,
4754 TransitionFlag flag) { 4753 TransitionFlag flag) {
4755 Map* result; 4754 Map* result;
4756 MaybeObject* maybe_result = CopyDropDescriptors(); 4755 MaybeObject* maybe_result = CopyDropDescriptors();
4757 if (!maybe_result->To(&result)) return maybe_result; 4756 if (!maybe_result->To(&result)) return maybe_result;
4758 4757
4759 if (last_added == DescriptorArray::kNoneAdded) { 4758 if (last_added == kNoneAdded) {
4760 ASSERT(descriptors->IsEmpty()); 4759 ASSERT(descriptors->IsEmpty());
4761 ASSERT(flag == OMIT_TRANSITION); 4760 } else {
4762 return result; 4761 ASSERT(descriptors->GetDetails(last_added).index() ==
4762 descriptors->number_of_descriptors());
4763 result->set_instance_descriptors(descriptors);
4764 result->SetLastAdded(last_added);
4763 } 4765 }
4764 4766
4765 descriptors->SetLastAdded(last_added);
4766 result->set_instance_descriptors(descriptors);
4767
4768 if (flag == INSERT_TRANSITION) { 4767 if (flag == INSERT_TRANSITION) {
4769 TransitionArray* transitions; 4768 TransitionArray* transitions;
4770 MaybeObject* maybe_transitions = AddTransition(name, result); 4769 MaybeObject* maybe_transitions = AddTransition(name, result);
4771 if (!maybe_transitions->To(&transitions)) return maybe_transitions; 4770 if (!maybe_transitions->To(&transitions)) return maybe_transitions;
4772 4771
4773 MaybeObject* maybe_set = set_transitions(transitions); 4772 MaybeObject* maybe_set = set_transitions(transitions);
4774 if (maybe_set->IsFailure()) return maybe_set; 4773 if (maybe_set->IsFailure()) return maybe_set;
4775 4774
4776 result->SetBackPointer(this); 4775 result->SetBackPointer(this);
4777 } 4776 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
4816 ASSERT(constructor()->IsJSFunction()); 4815 ASSERT(constructor()->IsJSFunction());
4817 JSFunction* ctor = JSFunction::cast(constructor()); 4816 JSFunction* ctor = JSFunction::cast(constructor());
4818 Map* initial_map = ctor->initial_map(); 4817 Map* initial_map = ctor->initial_map();
4819 DescriptorArray* initial_descriptors = initial_map->instance_descriptors(); 4818 DescriptorArray* initial_descriptors = initial_map->instance_descriptors();
4820 DescriptorArray* descriptors; 4819 DescriptorArray* descriptors;
4821 MaybeObject* maybe_descriptors = 4820 MaybeObject* maybe_descriptors =
4822 initial_descriptors->Copy(DescriptorArray::MAY_BE_SHARED); 4821 initial_descriptors->Copy(DescriptorArray::MAY_BE_SHARED);
4823 if (!maybe_descriptors->To(&descriptors)) return maybe_descriptors; 4822 if (!maybe_descriptors->To(&descriptors)) return maybe_descriptors;
4824 4823
4825 int last_added = initial_descriptors->IsEmpty() 4824 int last_added = initial_descriptors->IsEmpty()
4826 ? DescriptorArray::kNoneAdded 4825 ? kNoneAdded
4827 : initial_descriptors->LastAdded(); 4826 : initial_map->LastAdded();
4828 4827
4829 return CopyReplaceDescriptors(descriptors, NULL, last_added, OMIT_TRANSITION); 4828 return CopyReplaceDescriptors(descriptors, NULL, last_added, OMIT_TRANSITION);
4830 } 4829 }
4831 4830
4832 4831
4833 MaybeObject* Map::Copy(DescriptorArray::SharedMode shared_mode) { 4832 MaybeObject* Map::Copy(DescriptorArray::SharedMode shared_mode) {
4834 DescriptorArray* source_descriptors = instance_descriptors(); 4833 DescriptorArray* source_descriptors = instance_descriptors();
4835 DescriptorArray* descriptors; 4834 DescriptorArray* descriptors;
4836 MaybeObject* maybe_descriptors = source_descriptors->Copy(shared_mode); 4835 MaybeObject* maybe_descriptors = source_descriptors->Copy(shared_mode);
4837 if (!maybe_descriptors->To(&descriptors)) return maybe_descriptors; 4836 if (!maybe_descriptors->To(&descriptors)) return maybe_descriptors;
4838 4837
4839 int last_added = source_descriptors->IsEmpty() 4838 int last_added = source_descriptors->IsEmpty() ? kNoneAdded : LastAdded();
4840 ? DescriptorArray::kNoneAdded
4841 : source_descriptors->LastAdded();
4842 4839
4843 return CopyReplaceDescriptors(descriptors, NULL, last_added, OMIT_TRANSITION); 4840 return CopyReplaceDescriptors(descriptors, NULL, last_added, OMIT_TRANSITION);
4844 } 4841 }
4845 4842
4846 4843
4847 static bool InsertionPointFound(String* key1, String* key2) { 4844 static bool InsertionPointFound(String* key1, String* key2) {
4848 return key1->Hash() > key2->Hash() || key1 == key2; 4845 return key1->Hash() > key2->Hash() || key1 == key2;
4849 } 4846 }
4850 4847
4851 4848
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
4937 if (index == insertion_index) continue; 4934 if (index == insertion_index) continue;
4938 new_descriptors->CopyFrom(index, descriptors, index, witness); 4935 new_descriptors->CopyFrom(index, descriptors, index, witness);
4939 } 4936 }
4940 4937
4941 descriptor->SetEnumerationIndex( 4938 descriptor->SetEnumerationIndex(
4942 descriptors->GetDetails(insertion_index).index()); 4939 descriptors->GetDetails(insertion_index).index());
4943 new_descriptors->Set(insertion_index, descriptor, witness); 4940 new_descriptors->Set(insertion_index, descriptor, witness);
4944 4941
4945 SLOW_ASSERT(new_descriptors->IsSortedNoDuplicates()); 4942 SLOW_ASSERT(new_descriptors->IsSortedNoDuplicates());
4946 4943
4947 return CopyReplaceDescriptors( 4944 return CopyReplaceDescriptors(new_descriptors, key, LastAdded(), flag);
4948 new_descriptors, key, descriptors->LastAdded(), flag);
4949 } 4945 }
4950 4946
4951 4947
4952 void Map::UpdateCodeCache(Handle<Map> map, 4948 void Map::UpdateCodeCache(Handle<Map> map,
4953 Handle<String> name, 4949 Handle<String> name,
4954 Handle<Code> code) { 4950 Handle<Code> code) {
4955 Isolate* isolate = map->GetIsolate(); 4951 Isolate* isolate = map->GetIsolate();
4956 CALL_HEAP_FUNCTION_VOID(isolate, 4952 CALL_HEAP_FUNCTION_VOID(isolate,
4957 map->UpdateCodeCache(*name, *code)); 4953 map->UpdateCodeCache(*name, *code));
4958 } 4954 }
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
5725 FixedArray* result; 5721 FixedArray* result;
5726 if (number_of_descriptors == 0 && shared_mode == MAY_BE_SHARED) { 5722 if (number_of_descriptors == 0 && shared_mode == MAY_BE_SHARED) {
5727 return heap->empty_descriptor_array(); 5723 return heap->empty_descriptor_array();
5728 } 5724 }
5729 // Allocate the array of keys. 5725 // Allocate the array of keys.
5730 { MaybeObject* maybe_array = 5726 { MaybeObject* maybe_array =
5731 heap->AllocateFixedArray(ToKeyIndex(number_of_descriptors)); 5727 heap->AllocateFixedArray(ToKeyIndex(number_of_descriptors));
5732 if (!maybe_array->To(&result)) return maybe_array; 5728 if (!maybe_array->To(&result)) return maybe_array;
5733 } 5729 }
5734 5730
5735 result->set(kLastAddedIndex, Smi::FromInt(kNoneAdded)); 5731 result->set(kEnumCacheIndex, Smi::FromInt(Map::kNoneAdded));
5736 result->set(kTransitionsIndex, Smi::FromInt(0)); 5732 result->set(kTransitionsIndex, Smi::FromInt(0));
5737 return result; 5733 return result;
5738 } 5734 }
5739 5735
5740 5736
5741 void DescriptorArray::SetEnumCache(FixedArray* bridge_storage, 5737 void DescriptorArray::SetEnumCache(FixedArray* bridge_storage,
5742 FixedArray* new_cache, 5738 FixedArray* new_cache,
5743 Object* new_index_cache) { 5739 Object* new_index_cache) {
5744 ASSERT(bridge_storage->length() >= kEnumCacheBridgeLength); 5740 ASSERT(bridge_storage->length() >= kEnumCacheBridgeLength);
5745 ASSERT(new_index_cache->IsSmi() || new_index_cache->IsFixedArray()); 5741 ASSERT(new_index_cache->IsSmi() || new_index_cache->IsFixedArray());
5746 if (HasEnumCache()) { 5742 if (HasEnumCache()) {
5747 FixedArray::cast(get(kLastAddedIndex))-> 5743 FixedArray::cast(get(kEnumCacheIndex))->
5748 set(kEnumCacheBridgeCacheIndex, new_cache); 5744 set(kEnumCacheBridgeCacheIndex, new_cache);
5749 FixedArray::cast(get(kLastAddedIndex))-> 5745 FixedArray::cast(get(kEnumCacheIndex))->
5750 set(kEnumCacheBridgeIndicesCacheIndex, new_index_cache); 5746 set(kEnumCacheBridgeIndicesCacheIndex, new_index_cache);
5751 } else { 5747 } else {
5752 if (IsEmpty()) return; // Do nothing for empty descriptor array. 5748 if (IsEmpty()) return; // Do nothing for empty descriptor array.
5753 FixedArray::cast(bridge_storage)-> 5749 FixedArray::cast(bridge_storage)->
5754 set(kEnumCacheBridgeCacheIndex, new_cache); 5750 set(kEnumCacheBridgeCacheIndex, new_cache);
5755 FixedArray::cast(bridge_storage)-> 5751 FixedArray::cast(bridge_storage)->
5756 set(kEnumCacheBridgeIndicesCacheIndex, new_index_cache); 5752 set(kEnumCacheBridgeIndicesCacheIndex, new_index_cache);
5757 NoWriteBarrierSet(FixedArray::cast(bridge_storage), 5753 NoWriteBarrierSet(FixedArray::cast(bridge_storage),
5758 kEnumCacheBridgeLastAdded, 5754 kEnumCacheBridgeLastAdded,
5759 get(kLastAddedIndex)); 5755 get(kEnumCacheIndex));
5760 set(kLastAddedIndex, bridge_storage); 5756 set(kEnumCacheIndex, bridge_storage);
5761 } 5757 }
5762 } 5758 }
5763 5759
5764 5760
5765 void DescriptorArray::CopyFrom(int dst_index, 5761 void DescriptorArray::CopyFrom(int dst_index,
5766 DescriptorArray* src, 5762 DescriptorArray* src,
5767 int src_index, 5763 int src_index,
5768 const WhitenessWitness& witness) { 5764 const WhitenessWitness& witness) {
5769 Object* value = src->GetValue(src_index); 5765 Object* value = src->GetValue(src_index);
5770 PropertyDetails details = src->GetDetails(src_index); 5766 PropertyDetails details = src->GetDetails(src_index);
(...skipping 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after
7219 PropertyNormalizationMode mode) { 7215 PropertyNormalizationMode mode) {
7220 return 7216 return
7221 constructor() == other->constructor() && 7217 constructor() == other->constructor() &&
7222 prototype() == other->prototype() && 7218 prototype() == other->prototype() &&
7223 inobject_properties() == ((mode == CLEAR_INOBJECT_PROPERTIES) ? 7219 inobject_properties() == ((mode == CLEAR_INOBJECT_PROPERTIES) ?
7224 0 : 7220 0 :
7225 other->inobject_properties()) && 7221 other->inobject_properties()) &&
7226 instance_type() == other->instance_type() && 7222 instance_type() == other->instance_type() &&
7227 bit_field() == other->bit_field() && 7223 bit_field() == other->bit_field() &&
7228 bit_field2() == other->bit_field2() && 7224 bit_field2() == other->bit_field2() &&
7229 (bit_field3() & ~(1<<Map::kIsShared)) == 7225 static_cast<uint32_t>(bit_field3()) ==
7230 (other->bit_field3() & ~(1<<Map::kIsShared)); 7226 LastAddedBits::update(
7227 IsShared::update(other->bit_field3(), true),
7228 kNoneAdded);
7231 } 7229 }
7232 7230
7233 7231
7234 void JSFunction::JSFunctionIterateBody(int object_size, ObjectVisitor* v) { 7232 void JSFunction::JSFunctionIterateBody(int object_size, ObjectVisitor* v) {
7235 // Iterate over all fields in the body but take care in dealing with 7233 // Iterate over all fields in the body but take care in dealing with
7236 // the code entry. 7234 // the code entry.
7237 IteratePointers(v, kPropertiesOffset, kCodeEntryOffset); 7235 IteratePointers(v, kPropertiesOffset, kCodeEntryOffset);
7238 v->VisitCodeEntry(this->address() + kCodeEntryOffset); 7236 v->VisitCodeEntry(this->address() + kCodeEntryOffset);
7239 IteratePointers(v, kCodeEntryOffset + kPointerSize, object_size); 7237 IteratePointers(v, kCodeEntryOffset + kPointerSize, object_size);
7240 } 7238 }
(...skipping 5793 matching lines...) Expand 10 before | Expand all | Expand 10 after
13034 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); 13032 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER);
13035 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); 13033 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER);
13036 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); 13034 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER);
13037 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); 13035 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER);
13038 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); 13036 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER);
13039 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); 13037 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER);
13040 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); 13038 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER);
13041 } 13039 }
13042 13040
13043 } } // namespace v8::internal 13041 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698