OLD | NEW |
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 4961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4972 if (Heap::ShouldZapGarbage() && HasTransitionArray()) { | 4972 if (Heap::ShouldZapGarbage() && HasTransitionArray()) { |
4973 ZapTransitions(); | 4973 ZapTransitions(); |
4974 } | 4974 } |
4975 | 4975 |
4976 WRITE_FIELD(this, kTransitionsOrBackPointerOffset, back_pointer); | 4976 WRITE_FIELD(this, kTransitionsOrBackPointerOffset, back_pointer); |
4977 CONDITIONAL_WRITE_BARRIER( | 4977 CONDITIONAL_WRITE_BARRIER( |
4978 heap, this, kTransitionsOrBackPointerOffset, back_pointer, mode); | 4978 heap, this, kTransitionsOrBackPointerOffset, back_pointer, mode); |
4979 } | 4979 } |
4980 | 4980 |
4981 | 4981 |
4982 void Map::AppendDescriptor(Descriptor* desc, | 4982 void Map::AppendDescriptor(Descriptor* desc) { |
4983 const DescriptorArray::WhitenessWitness& witness) { | |
4984 DescriptorArray* descriptors = instance_descriptors(); | 4983 DescriptorArray* descriptors = instance_descriptors(); |
4985 int number_of_own_descriptors = NumberOfOwnDescriptors(); | 4984 int number_of_own_descriptors = NumberOfOwnDescriptors(); |
4986 ASSERT(descriptors->number_of_descriptors() == number_of_own_descriptors); | 4985 ASSERT(descriptors->number_of_descriptors() == number_of_own_descriptors); |
4987 descriptors->Append(desc, witness); | 4986 descriptors->Append(desc); |
4988 SetNumberOfOwnDescriptors(number_of_own_descriptors + 1); | 4987 SetNumberOfOwnDescriptors(number_of_own_descriptors + 1); |
4989 } | 4988 } |
4990 | 4989 |
4991 | 4990 |
4992 Object* Map::GetBackPointer() { | 4991 Object* Map::GetBackPointer() { |
4993 Object* object = READ_FIELD(this, kTransitionsOrBackPointerOffset); | 4992 Object* object = READ_FIELD(this, kTransitionsOrBackPointerOffset); |
4994 if (object->IsDescriptorArray()) { | 4993 if (object->IsDescriptorArray()) { |
4995 return TransitionArray::cast(object)->back_pointer_storage(); | 4994 return TransitionArray::cast(object)->back_pointer_storage(); |
4996 } else { | 4995 } else { |
4997 ASSERT(object->IsMap() || object->IsUndefined()); | 4996 ASSERT(object->IsMap() || object->IsUndefined()); |
(...skipping 2051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7049 #undef READ_SHORT_FIELD | 7048 #undef READ_SHORT_FIELD |
7050 #undef WRITE_SHORT_FIELD | 7049 #undef WRITE_SHORT_FIELD |
7051 #undef READ_BYTE_FIELD | 7050 #undef READ_BYTE_FIELD |
7052 #undef WRITE_BYTE_FIELD | 7051 #undef WRITE_BYTE_FIELD |
7053 #undef NOBARRIER_READ_BYTE_FIELD | 7052 #undef NOBARRIER_READ_BYTE_FIELD |
7054 #undef NOBARRIER_WRITE_BYTE_FIELD | 7053 #undef NOBARRIER_WRITE_BYTE_FIELD |
7055 | 7054 |
7056 } } // namespace v8::internal | 7055 } } // namespace v8::internal |
7057 | 7056 |
7058 #endif // V8_OBJECTS_INL_H_ | 7057 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |