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 2722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2733 // with NULL. In this case we do not need to transfer this entry to | 2733 // with NULL. In this case we do not need to transfer this entry to |
2734 // the store buffer which we are rebuilding. | 2734 // the store buffer which we are rebuilding. |
2735 if (new_addr != NULL) { | 2735 if (new_addr != NULL) { |
2736 *p = HeapObject::FromAddress(new_addr); | 2736 *p = HeapObject::FromAddress(new_addr); |
2737 } else { | 2737 } else { |
2738 // We have to zap this pointer, because the store buffer may overflow later, | 2738 // We have to zap this pointer, because the store buffer may overflow later, |
2739 // and then we have to scan the entire heap and we don't want to find | 2739 // and then we have to scan the entire heap and we don't want to find |
2740 // spurious newspace pointers in the old space. | 2740 // spurious newspace pointers in the old space. |
2741 // TODO(mstarzinger): This was changed to a sentinel value to track down | 2741 // TODO(mstarzinger): This was changed to a sentinel value to track down |
2742 // rare crashes, change it back to Smi::FromInt(0) later. | 2742 // rare crashes, change it back to Smi::FromInt(0) later. |
2743 *p = reinterpret_cast<HeapObject*>(Smi::FromInt(0x0f100d00 >> 1)); // flood | 2743 *p = reinterpret_cast<HeapObject*>(Smi::FromInt(0x0f100d00 >> 1)); // flood |
2744 } | 2744 } |
2745 } | 2745 } |
2746 | 2746 |
2747 | 2747 |
2748 static String* UpdateReferenceInExternalStringTableEntry(Heap* heap, | 2748 static String* UpdateReferenceInExternalStringTableEntry(Heap* heap, |
2749 Object** p) { | 2749 Object** p) { |
2750 MapWord map_word = HeapObject::cast(*p)->map_word(); | 2750 MapWord map_word = HeapObject::cast(*p)->map_word(); |
2751 | 2751 |
2752 if (map_word.IsForwardingAddress()) { | 2752 if (map_word.IsForwardingAddress()) { |
2753 return String::cast(map_word.ToForwardingAddress()); | 2753 return String::cast(map_word.ToForwardingAddress()); |
(...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4102 while (buffer != NULL) { | 4102 while (buffer != NULL) { |
4103 SlotsBuffer* next_buffer = buffer->next(); | 4103 SlotsBuffer* next_buffer = buffer->next(); |
4104 DeallocateBuffer(buffer); | 4104 DeallocateBuffer(buffer); |
4105 buffer = next_buffer; | 4105 buffer = next_buffer; |
4106 } | 4106 } |
4107 *buffer_address = NULL; | 4107 *buffer_address = NULL; |
4108 } | 4108 } |
4109 | 4109 |
4110 | 4110 |
4111 } } // namespace v8::internal | 4111 } } // namespace v8::internal |
OLD | NEW |