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

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

Issue 150098: X64: Fix bad value in stack layout constants. (Closed)
Patch Set: Created 11 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
« no previous file with comments | « no previous file | src/spaces.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after
1134 current < space->top(); 1134 current < space->top();
1135 current += object->Size()) { 1135 current += object->Size()) {
1136 object = HeapObject::FromAddress(current); 1136 object = HeapObject::FromAddress(current);
1137 if (object->IsMarked()) { 1137 if (object->IsMarked()) {
1138 object->ClearMark(); 1138 object->ClearMark();
1139 MarkCompactCollector::tracer()->decrement_marked_count(); 1139 MarkCompactCollector::tracer()->decrement_marked_count();
1140 } else { 1140 } else {
1141 // We give non-live objects a map that will correctly give their size, 1141 // We give non-live objects a map that will correctly give their size,
1142 // since their existing map might not be live after the collection. 1142 // since their existing map might not be live after the collection.
1143 int size = object->Size(); 1143 int size = object->Size();
1144 if (size >= Array::kHeaderSize) { 1144 if (size >= ByteArray::kHeaderSize) {
1145 object->set_map(Heap::byte_array_map()); 1145 object->set_map(Heap::byte_array_map());
1146 ByteArray::cast(object)->set_length(ByteArray::LengthFor(size)); 1146 ByteArray::cast(object)->set_length(ByteArray::LengthFor(size));
1147 } else { 1147 } else {
1148 ASSERT(size == kPointerSize); 1148 ASSERT(size == kPointerSize);
1149 object->set_map(Heap::one_word_filler_map()); 1149 object->set_map(Heap::one_word_filler_map());
1150 } 1150 }
1151 ASSERT(object->Size() == size); 1151 ASSERT(object->Size() == size);
1152 } 1152 }
1153 // The object is now unmarked for the call to Size() at the top of the 1153 // The object is now unmarked for the call to Size() at the top of the
1154 // loop. 1154 // loop.
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
1800 1800
1801 void MarkCompactCollector::RebuildRSets() { 1801 void MarkCompactCollector::RebuildRSets() {
1802 #ifdef DEBUG 1802 #ifdef DEBUG
1803 ASSERT(state_ == RELOCATE_OBJECTS); 1803 ASSERT(state_ == RELOCATE_OBJECTS);
1804 state_ = REBUILD_RSETS; 1804 state_ = REBUILD_RSETS;
1805 #endif 1805 #endif
1806 Heap::RebuildRSets(); 1806 Heap::RebuildRSets();
1807 } 1807 }
1808 1808
1809 } } // namespace v8::internal 1809 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698