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 7059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7070 | 7070 |
7071 for (auto x : slots) { | 7071 for (auto x : slots) { |
7072 RememberedSet<OLD_TO_NEW>::Insert(chunk, x.first); | 7072 RememberedSet<OLD_TO_NEW>::Insert(chunk, x.first); |
7073 } | 7073 } |
7074 | 7074 |
7075 RememberedSet<OLD_TO_NEW>::Iterate(chunk, [&slots](Address addr) { | 7075 RememberedSet<OLD_TO_NEW>::Iterate(chunk, [&slots](Address addr) { |
7076 CHECK(slots[addr]); | 7076 CHECK(slots[addr]); |
7077 return KEEP_SLOT; | 7077 return KEEP_SLOT; |
7078 }); | 7078 }); |
7079 | 7079 |
7080 RememberedSet<OLD_TO_NEW>::RemoveRange(chunk, start, start + kPointerSize); | 7080 RememberedSet<OLD_TO_NEW>::RemoveRange(chunk, start, start + kPointerSize, |
| 7081 SlotSet::FREE_EMPTY_BUCKETS); |
7081 slots[start] = false; | 7082 slots[start] = false; |
7082 RememberedSet<OLD_TO_NEW>::Iterate(chunk, [&slots](Address addr) { | 7083 RememberedSet<OLD_TO_NEW>::Iterate(chunk, [&slots](Address addr) { |
7083 CHECK(slots[addr]); | 7084 CHECK(slots[addr]); |
7084 return KEEP_SLOT; | 7085 return KEEP_SLOT; |
7085 }); | 7086 }); |
7086 | 7087 |
7087 RememberedSet<OLD_TO_NEW>::RemoveRange(chunk, start + kPointerSize, | 7088 RememberedSet<OLD_TO_NEW>::RemoveRange(chunk, start + kPointerSize, |
7088 start + Page::kPageSize); | 7089 start + Page::kPageSize, |
| 7090 SlotSet::FREE_EMPTY_BUCKETS); |
7089 slots[start + kPointerSize] = false; | 7091 slots[start + kPointerSize] = false; |
7090 slots[start + Page::kPageSize - kPointerSize] = false; | 7092 slots[start + Page::kPageSize - kPointerSize] = false; |
7091 RememberedSet<OLD_TO_NEW>::Iterate(chunk, [&slots](Address addr) { | 7093 RememberedSet<OLD_TO_NEW>::Iterate(chunk, [&slots](Address addr) { |
7092 CHECK(slots[addr]); | 7094 CHECK(slots[addr]); |
7093 return KEEP_SLOT; | 7095 return KEEP_SLOT; |
7094 }); | 7096 }); |
7095 | 7097 |
7096 RememberedSet<OLD_TO_NEW>::RemoveRange( | 7098 RememberedSet<OLD_TO_NEW>::RemoveRange(chunk, start, |
7097 chunk, start, start + Page::kPageSize + kPointerSize); | 7099 start + Page::kPageSize + kPointerSize, |
| 7100 SlotSet::FREE_EMPTY_BUCKETS); |
7098 slots[start + Page::kPageSize] = false; | 7101 slots[start + Page::kPageSize] = false; |
7099 RememberedSet<OLD_TO_NEW>::Iterate(chunk, [&slots](Address addr) { | 7102 RememberedSet<OLD_TO_NEW>::Iterate(chunk, [&slots](Address addr) { |
7100 CHECK(slots[addr]); | 7103 CHECK(slots[addr]); |
7101 return KEEP_SLOT; | 7104 return KEEP_SLOT; |
7102 }); | 7105 }); |
7103 | 7106 |
7104 RememberedSet<OLD_TO_NEW>::RemoveRange( | 7107 RememberedSet<OLD_TO_NEW>::RemoveRange( |
7105 chunk, chunk->area_end() - kPointerSize, chunk->area_end()); | 7108 chunk, chunk->area_end() - kPointerSize, chunk->area_end(), |
| 7109 SlotSet::FREE_EMPTY_BUCKETS); |
7106 slots[chunk->area_end() - kPointerSize] = false; | 7110 slots[chunk->area_end() - kPointerSize] = false; |
7107 RememberedSet<OLD_TO_NEW>::Iterate(chunk, [&slots](Address addr) { | 7111 RememberedSet<OLD_TO_NEW>::Iterate(chunk, [&slots](Address addr) { |
7108 CHECK(slots[addr]); | 7112 CHECK(slots[addr]); |
7109 return KEEP_SLOT; | 7113 return KEEP_SLOT; |
7110 }); | 7114 }); |
7111 } | 7115 } |
7112 | 7116 |
7113 } // namespace internal | 7117 } // namespace internal |
7114 } // namespace v8 | 7118 } // namespace v8 |
OLD | NEW |