Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(362)

Side by Side Diff: src/mark-compact.cc

Issue 20142008: Ignore external strings in old pointer space migration invariant check. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2724 matching lines...) Expand 10 before | Expand all | Expand 10 after
2735 // pointers to new space. 2735 // pointers to new space.
2736 void MarkCompactCollector::MigrateObject(Address dst, 2736 void MarkCompactCollector::MigrateObject(Address dst,
2737 Address src, 2737 Address src,
2738 int size, 2738 int size,
2739 AllocationSpace dest) { 2739 AllocationSpace dest) {
2740 HEAP_PROFILE(heap(), ObjectMoveEvent(src, dst)); 2740 HEAP_PROFILE(heap(), ObjectMoveEvent(src, dst));
2741 // TODO(hpayer): Replace that check with an assert. 2741 // TODO(hpayer): Replace that check with an assert.
2742 CHECK(dest != LO_SPACE && size <= Page::kMaxNonCodeHeapObjectSize); 2742 CHECK(dest != LO_SPACE && size <= Page::kMaxNonCodeHeapObjectSize);
2743 if (dest == OLD_POINTER_SPACE) { 2743 if (dest == OLD_POINTER_SPACE) {
2744 // TODO(hpayer): Replace this check with an assert. 2744 // TODO(hpayer): Replace this check with an assert.
2745 CHECK(heap_->TargetSpace(HeapObject::FromAddress(src)) == 2745 HeapObject* heap_object = HeapObject::FromAddress(src);
2746 heap_->old_pointer_space()); 2746 CHECK(heap_object->IsExternalString() ||
2747 heap_->TargetSpace(heap_object) == heap_->old_pointer_space());
2747 Address src_slot = src; 2748 Address src_slot = src;
2748 Address dst_slot = dst; 2749 Address dst_slot = dst;
2749 ASSERT(IsAligned(size, kPointerSize)); 2750 ASSERT(IsAligned(size, kPointerSize));
2750 2751
2751 for (int remaining = size / kPointerSize; remaining > 0; remaining--) { 2752 for (int remaining = size / kPointerSize; remaining > 0; remaining--) {
2752 Object* value = Memory::Object_at(src_slot); 2753 Object* value = Memory::Object_at(src_slot);
2753 2754
2754 Memory::Object_at(dst_slot) = value; 2755 Memory::Object_at(dst_slot) = value;
2755 2756
2756 if (heap_->InNewSpace(value)) { 2757 if (heap_->InNewSpace(value)) {
(...skipping 1580 matching lines...) Expand 10 before | Expand all | Expand 10 after
4337 while (buffer != NULL) { 4338 while (buffer != NULL) {
4338 SlotsBuffer* next_buffer = buffer->next(); 4339 SlotsBuffer* next_buffer = buffer->next();
4339 DeallocateBuffer(buffer); 4340 DeallocateBuffer(buffer);
4340 buffer = next_buffer; 4341 buffer = next_buffer;
4341 } 4342 }
4342 *buffer_address = NULL; 4343 *buffer_address = NULL;
4343 } 4344 }
4344 4345
4345 4346
4346 } } // namespace v8::internal 4347 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698