OLD | NEW |
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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 // - to space is already 25% full. | 138 // - to space is already 25% full. |
139 return old_address < new_space_.age_mark() | 139 return old_address < new_space_.age_mark() |
140 || (new_space_.Size() + object_size) >= (new_space_.Capacity() >> 2); | 140 || (new_space_.Size() + object_size) >= (new_space_.Capacity() >> 2); |
141 } | 141 } |
142 | 142 |
143 | 143 |
144 void Heap::RecordWrite(Address address, int offset) { | 144 void Heap::RecordWrite(Address address, int offset) { |
145 if (new_space_.Contains(address)) return; | 145 if (new_space_.Contains(address)) return; |
146 ASSERT(!new_space_.FromSpaceContains(address)); | 146 ASSERT(!new_space_.FromSpaceContains(address)); |
147 SLOW_ASSERT(Contains(address + offset)); | 147 SLOW_ASSERT(Contains(address + offset)); |
| 148 #ifndef V8_HOST_ARCH_64_BIT |
148 Page::SetRSet(address, offset); | 149 Page::SetRSet(address, offset); |
| 150 #endif // V8_HOST_ARCH_64_BIT |
149 } | 151 } |
150 | 152 |
151 | 153 |
152 OldSpace* Heap::TargetSpace(HeapObject* object) { | 154 OldSpace* Heap::TargetSpace(HeapObject* object) { |
153 InstanceType type = object->map()->instance_type(); | 155 InstanceType type = object->map()->instance_type(); |
154 AllocationSpace space = TargetSpaceId(type); | 156 AllocationSpace space = TargetSpaceId(type); |
155 return (space == OLD_POINTER_SPACE) | 157 return (space == OLD_POINTER_SPACE) |
156 ? old_pointer_space_ | 158 ? old_pointer_space_ |
157 : old_data_space_; | 159 : old_data_space_; |
158 } | 160 } |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 allocation_allowed_ = new_state; | 300 allocation_allowed_ = new_state; |
299 return old; | 301 return old; |
300 } | 302 } |
301 | 303 |
302 #endif | 304 #endif |
303 | 305 |
304 | 306 |
305 } } // namespace v8::internal | 307 } } // namespace v8::internal |
306 | 308 |
307 #endif // V8_HEAP_INL_H_ | 309 #endif // V8_HEAP_INL_H_ |
OLD | NEW |