| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 1990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2001 ASSERT(Heap::map_space()->Contains(map)); | 2001 ASSERT(Heap::map_space()->Contains(map)); |
| 2002 MapWord map_word = map->map_word(); | 2002 MapWord map_word = map->map_word(); |
| 2003 ASSERT(!map_word.IsMarked()); | 2003 ASSERT(!map_word.IsMarked()); |
| 2004 if (map_word.IsOverflowed()) { | 2004 if (map_word.IsOverflowed()) { |
| 2005 Map* new_map = GetForwardedMap(map_word); | 2005 Map* new_map = GetForwardedMap(map_word); |
| 2006 ASSERT(Heap::map_space()->Contains(new_map)); | 2006 ASSERT(Heap::map_space()->Contains(new_map)); |
| 2007 obj->set_map(new_map); | 2007 obj->set_map(new_map); |
| 2008 | 2008 |
| 2009 #ifdef DEBUG | 2009 #ifdef DEBUG |
| 2010 if (FLAG_gc_verbose) { | 2010 if (FLAG_gc_verbose) { |
| 2011 PrintF("update %p : %p -> %p\n", | 2011 PrintF("update %p : %p -> %p\n", obj->address(), |
| 2012 obj->address(), | 2012 map, new_map); |
| 2013 reinterpret_cast<void*>(map), | |
| 2014 reinterpret_cast<void*>(new_map)); | |
| 2015 } | 2013 } |
| 2016 #endif | 2014 #endif |
| 2017 } | 2015 } |
| 2018 | 2016 |
| 2019 int size = obj->SizeFromMap(map); | 2017 int size = obj->SizeFromMap(map); |
| 2020 obj->IterateBody(map->instance_type(), size, &map_updating_visitor_); | 2018 obj->IterateBody(map->instance_type(), size, &map_updating_visitor_); |
| 2021 return size; | 2019 return size; |
| 2022 } | 2020 } |
| 2023 | 2021 |
| 2024 static void UpdateMapPointersInRange(Address start, Address end) { | 2022 static void UpdateMapPointersInRange(Address start, Address end) { |
| (...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2634 } | 2632 } |
| 2635 | 2633 |
| 2636 | 2634 |
| 2637 void MarkCompactCollector::Initialize() { | 2635 void MarkCompactCollector::Initialize() { |
| 2638 StaticPointersToNewGenUpdatingVisitor::Initialize(); | 2636 StaticPointersToNewGenUpdatingVisitor::Initialize(); |
| 2639 StaticMarkingVisitor::Initialize(); | 2637 StaticMarkingVisitor::Initialize(); |
| 2640 } | 2638 } |
| 2641 | 2639 |
| 2642 | 2640 |
| 2643 } } // namespace v8::internal | 2641 } } // namespace v8::internal |
| OLD | NEW |