| 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 2350 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2361        i < number_of_transitions * step; | 2361        i < number_of_transitions * step; | 
| 2362        i++) { | 2362        i++) { | 
| 2363     prototype_transitions->set_undefined(heap_, header + i); | 2363     prototype_transitions->set_undefined(heap_, header + i); | 
| 2364   } | 2364   } | 
| 2365 } | 2365 } | 
| 2366 | 2366 | 
| 2367 | 2367 | 
| 2368 void MarkCompactCollector::ClearNonLiveMapTransitions(Map* map, | 2368 void MarkCompactCollector::ClearNonLiveMapTransitions(Map* map, | 
| 2369                                                       MarkBit map_mark) { | 2369                                                       MarkBit map_mark) { | 
| 2370   // Follow the chain of back pointers to find the prototype. | 2370   // Follow the chain of back pointers to find the prototype. | 
| 2371   Map* real_prototype = map; | 2371   Object* real_prototype = map; | 
| 2372   while (real_prototype->IsMap()) { | 2372   while (real_prototype->IsMap()) { | 
| 2373     real_prototype = reinterpret_cast<Map*>(real_prototype->prototype()); | 2373     real_prototype = Map::cast(real_prototype)->prototype(); | 
| 2374     ASSERT(real_prototype->IsHeapObject()); | 2374     ASSERT(real_prototype->IsHeapObject()); | 
| 2375   } | 2375   } | 
| 2376 | 2376 | 
| 2377   // Follow back pointers, setting them to prototype, clearing map transitions | 2377   // Follow back pointers, setting them to prototype, clearing map transitions | 
| 2378   // when necessary. | 2378   // when necessary. | 
| 2379   Map* current = map; | 2379   Map* current = map; | 
| 2380   bool current_is_alive = map_mark.Get(); | 2380   bool current_is_alive = map_mark.Get(); | 
| 2381   bool on_dead_path = !current_is_alive; | 2381   bool on_dead_path = !current_is_alive; | 
| 2382   while (current->IsMap()) { | 2382   while (current->IsMap()) { | 
| 2383     Object* next = current->prototype(); | 2383     Object* next = current->prototype(); | 
| (...skipping 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3938   while (buffer != NULL) { | 3938   while (buffer != NULL) { | 
| 3939     SlotsBuffer* next_buffer = buffer->next(); | 3939     SlotsBuffer* next_buffer = buffer->next(); | 
| 3940     DeallocateBuffer(buffer); | 3940     DeallocateBuffer(buffer); | 
| 3941     buffer = next_buffer; | 3941     buffer = next_buffer; | 
| 3942   } | 3942   } | 
| 3943   *buffer_address = NULL; | 3943   *buffer_address = NULL; | 
| 3944 } | 3944 } | 
| 3945 | 3945 | 
| 3946 | 3946 | 
| 3947 } }  // namespace v8::internal | 3947 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|