| 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 6186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6197 } | 6197 } |
| 6198 | 6198 |
| 6199 #endif // DEBUG | 6199 #endif // DEBUG |
| 6200 | 6200 |
| 6201 bool Heap::Contains(HeapObject* value) { | 6201 bool Heap::Contains(HeapObject* value) { |
| 6202 return Contains(value->address()); | 6202 return Contains(value->address()); |
| 6203 } | 6203 } |
| 6204 | 6204 |
| 6205 | 6205 |
| 6206 bool Heap::Contains(Address addr) { | 6206 bool Heap::Contains(Address addr) { |
| 6207 if (OS::IsOutsideAllocatedSpace(addr)) return false; | 6207 if (isolate_->memory_allocator()->IsOutsideAllocatedSpace(addr)) return false; |
| 6208 return HasBeenSetUp() && | 6208 return HasBeenSetUp() && |
| 6209 (new_space_.ToSpaceContains(addr) || | 6209 (new_space_.ToSpaceContains(addr) || |
| 6210 old_pointer_space_->Contains(addr) || | 6210 old_pointer_space_->Contains(addr) || |
| 6211 old_data_space_->Contains(addr) || | 6211 old_data_space_->Contains(addr) || |
| 6212 code_space_->Contains(addr) || | 6212 code_space_->Contains(addr) || |
| 6213 map_space_->Contains(addr) || | 6213 map_space_->Contains(addr) || |
| 6214 cell_space_->Contains(addr) || | 6214 cell_space_->Contains(addr) || |
| 6215 property_cell_space_->Contains(addr) || | 6215 property_cell_space_->Contains(addr) || |
| 6216 lo_space_->SlowContains(addr)); | 6216 lo_space_->SlowContains(addr)); |
| 6217 } | 6217 } |
| 6218 | 6218 |
| 6219 | 6219 |
| 6220 bool Heap::InSpace(HeapObject* value, AllocationSpace space) { | 6220 bool Heap::InSpace(HeapObject* value, AllocationSpace space) { |
| 6221 return InSpace(value->address(), space); | 6221 return InSpace(value->address(), space); |
| 6222 } | 6222 } |
| 6223 | 6223 |
| 6224 | 6224 |
| 6225 bool Heap::InSpace(Address addr, AllocationSpace space) { | 6225 bool Heap::InSpace(Address addr, AllocationSpace space) { |
| 6226 if (OS::IsOutsideAllocatedSpace(addr)) return false; | 6226 if (isolate_->memory_allocator()->IsOutsideAllocatedSpace(addr)) return false; |
| 6227 if (!HasBeenSetUp()) return false; | 6227 if (!HasBeenSetUp()) return false; |
| 6228 | 6228 |
| 6229 switch (space) { | 6229 switch (space) { |
| 6230 case NEW_SPACE: | 6230 case NEW_SPACE: |
| 6231 return new_space_.ToSpaceContains(addr); | 6231 return new_space_.ToSpaceContains(addr); |
| 6232 case OLD_POINTER_SPACE: | 6232 case OLD_POINTER_SPACE: |
| 6233 return old_pointer_space_->Contains(addr); | 6233 return old_pointer_space_->Contains(addr); |
| 6234 case OLD_DATA_SPACE: | 6234 case OLD_DATA_SPACE: |
| 6235 return old_data_space_->Contains(addr); | 6235 return old_data_space_->Contains(addr); |
| 6236 case CODE_SPACE: | 6236 case CODE_SPACE: |
| (...skipping 1858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8095 if (FLAG_concurrent_recompilation) { | 8095 if (FLAG_concurrent_recompilation) { |
| 8096 heap_->relocation_mutex_->Lock(); | 8096 heap_->relocation_mutex_->Lock(); |
| 8097 #ifdef DEBUG | 8097 #ifdef DEBUG |
| 8098 heap_->relocation_mutex_locked_by_optimizer_thread_ = | 8098 heap_->relocation_mutex_locked_by_optimizer_thread_ = |
| 8099 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); | 8099 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); |
| 8100 #endif // DEBUG | 8100 #endif // DEBUG |
| 8101 } | 8101 } |
| 8102 } | 8102 } |
| 8103 | 8103 |
| 8104 } } // namespace v8::internal | 8104 } } // namespace v8::internal |
| OLD | NEW |