| 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 4951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4962 | 4962 |
| 4963 | 4963 |
| 4964 // If the descriptor is using the empty transition array, install a new empty | 4964 // If the descriptor is using the empty transition array, install a new empty |
| 4965 // transition array that will have place for an element transition. | 4965 // transition array that will have place for an element transition. |
| 4966 static void EnsureHasTransitionArray(Handle<Map> map) { | 4966 static void EnsureHasTransitionArray(Handle<Map> map) { |
| 4967 Handle<TransitionArray> transitions; | 4967 Handle<TransitionArray> transitions; |
| 4968 if (!map->HasTransitionArray()) { | 4968 if (!map->HasTransitionArray()) { |
| 4969 transitions = TransitionArray::Allocate(map->GetIsolate(), 0); | 4969 transitions = TransitionArray::Allocate(map->GetIsolate(), 0); |
| 4970 transitions->set_back_pointer_storage(map->GetBackPointer()); | 4970 transitions->set_back_pointer_storage(map->GetBackPointer()); |
| 4971 } else if (!map->transitions()->IsFullTransitionArray()) { | 4971 } else if (!map->transitions()->IsFullTransitionArray()) { |
| 4972 transitions = TransitionArray::ExtendToFullTransitionArray( | 4972 transitions = TransitionArray::ExtendToFullTransitionArray(map); |
| 4973 handle(map->transitions())); | |
| 4974 } else { | 4973 } else { |
| 4975 return; | 4974 return; |
| 4976 } | 4975 } |
| 4977 map->set_transitions(*transitions); | 4976 map->set_transitions(*transitions); |
| 4978 } | 4977 } |
| 4979 | 4978 |
| 4980 | 4979 |
| 4981 void Map::InitializeDescriptors(DescriptorArray* descriptors) { | 4980 void Map::InitializeDescriptors(DescriptorArray* descriptors) { |
| 4982 int len = descriptors->number_of_descriptors(); | 4981 int len = descriptors->number_of_descriptors(); |
| 4983 set_instance_descriptors(descriptors); | 4982 set_instance_descriptors(descriptors); |
| (...skipping 2099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7083 #undef READ_SHORT_FIELD | 7082 #undef READ_SHORT_FIELD |
| 7084 #undef WRITE_SHORT_FIELD | 7083 #undef WRITE_SHORT_FIELD |
| 7085 #undef READ_BYTE_FIELD | 7084 #undef READ_BYTE_FIELD |
| 7086 #undef WRITE_BYTE_FIELD | 7085 #undef WRITE_BYTE_FIELD |
| 7087 #undef NOBARRIER_READ_BYTE_FIELD | 7086 #undef NOBARRIER_READ_BYTE_FIELD |
| 7088 #undef NOBARRIER_WRITE_BYTE_FIELD | 7087 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7089 | 7088 |
| 7090 } } // namespace v8::internal | 7089 } } // namespace v8::internal |
| 7091 | 7090 |
| 7092 #endif // V8_OBJECTS_INL_H_ | 7091 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |