| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1996 | 1996 |
| 1997 Address old_addr = object->address(); | 1997 Address old_addr = object->address(); |
| 1998 | 1998 |
| 1999 Address new_addr = Memory::Address_at(old_addr); | 1999 Address new_addr = Memory::Address_at(old_addr); |
| 2000 | 2000 |
| 2001 // The new space sweep will overwrite the map word of dead objects | 2001 // The new space sweep will overwrite the map word of dead objects |
| 2002 // with NULL. In this case we do not need to transfer this entry to | 2002 // with NULL. In this case we do not need to transfer this entry to |
| 2003 // the store buffer which we are rebuilding. | 2003 // the store buffer which we are rebuilding. |
| 2004 if (new_addr != NULL) { | 2004 if (new_addr != NULL) { |
| 2005 *p = HeapObject::FromAddress(new_addr); | 2005 *p = HeapObject::FromAddress(new_addr); |
| 2006 if (HEAP->InNewSpace(new_addr)) { | |
| 2007 HEAP->store_buffer()-> | |
| 2008 EnterDirectlyIntoStoreBuffer(reinterpret_cast<Address>(p)); | |
| 2009 } | |
| 2010 } else { | 2006 } else { |
| 2011 // We have to zap this pointer, because the store buffer may overflow later, | 2007 // We have to zap this pointer, because the store buffer may overflow later, |
| 2012 // and then we have to scan the entire heap and we don't want to find | 2008 // and then we have to scan the entire heap and we don't want to find |
| 2013 // spurious newspace pointers in the old space. | 2009 // spurious newspace pointers in the old space. |
| 2014 *p = HeapObject::FromAddress(NULL); // Fake heap object not in new space. | 2010 *p = HeapObject::FromAddress(NULL); // Fake heap object not in new space. |
| 2015 } | 2011 } |
| 2016 } | 2012 } |
| 2017 | 2013 |
| 2018 | 2014 |
| 2019 static String* UpdateNewSpaceReferenceInExternalStringTableEntry(Heap* heap, | 2015 static String* UpdateNewSpaceReferenceInExternalStringTableEntry(Heap* heap, |
| (...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2770 } | 2766 } |
| 2771 | 2767 |
| 2772 | 2768 |
| 2773 void MarkCompactCollector::Initialize() { | 2769 void MarkCompactCollector::Initialize() { |
| 2774 StaticPointersToNewGenUpdatingVisitor::Initialize(); | 2770 StaticPointersToNewGenUpdatingVisitor::Initialize(); |
| 2775 StaticMarkingVisitor::Initialize(); | 2771 StaticMarkingVisitor::Initialize(); |
| 2776 } | 2772 } |
| 2777 | 2773 |
| 2778 | 2774 |
| 2779 } } // namespace v8::internal | 2775 } } // namespace v8::internal |
| OLD | NEW |