| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/api.h" | 8 #include "src/api.h" |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 case LO_SPACE: | 502 case LO_SPACE: |
| 503 return "large_object_space"; | 503 return "large_object_space"; |
| 504 default: | 504 default: |
| 505 UNREACHABLE(); | 505 UNREACHABLE(); |
| 506 } | 506 } |
| 507 return nullptr; | 507 return nullptr; |
| 508 } | 508 } |
| 509 | 509 |
| 510 | 510 |
| 511 void Heap::ClearAllICsByKind(Code::Kind kind) { | 511 void Heap::ClearAllICsByKind(Code::Kind kind) { |
| 512 // TODO(mvstanton): Do not iterate the heap. | |
| 513 HeapObjectIterator it(code_space()); | 512 HeapObjectIterator it(code_space()); |
| 514 | 513 |
| 515 for (Object* object = it.Next(); object != NULL; object = it.Next()) { | 514 for (Object* object = it.Next(); object != NULL; object = it.Next()) { |
| 516 Code* code = Code::cast(object); | 515 Code* code = Code::cast(object); |
| 517 Code::Kind current_kind = code->kind(); | 516 Code::Kind current_kind = code->kind(); |
| 518 if (current_kind == Code::FUNCTION || | 517 if (current_kind == Code::FUNCTION || |
| 519 current_kind == Code::OPTIMIZED_FUNCTION) { | 518 current_kind == Code::OPTIMIZED_FUNCTION) { |
| 520 code->ClearInlineCaches(kind); | 519 code->ClearInlineCaches(kind); |
| 521 } | 520 } |
| 522 } | 521 } |
| (...skipping 4721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5244 | 5243 |
| 5245 new_space_.Verify(); | 5244 new_space_.Verify(); |
| 5246 | 5245 |
| 5247 old_space_->Verify(&visitor); | 5246 old_space_->Verify(&visitor); |
| 5248 map_space_->Verify(&visitor); | 5247 map_space_->Verify(&visitor); |
| 5249 | 5248 |
| 5250 VerifyPointersVisitor no_dirty_regions_visitor; | 5249 VerifyPointersVisitor no_dirty_regions_visitor; |
| 5251 code_space_->Verify(&no_dirty_regions_visitor); | 5250 code_space_->Verify(&no_dirty_regions_visitor); |
| 5252 | 5251 |
| 5253 lo_space_->Verify(); | 5252 lo_space_->Verify(); |
| 5254 | |
| 5255 mark_compact_collector_.VerifyWeakEmbeddedObjectsInCode(); | |
| 5256 if (FLAG_omit_map_checks_for_leaf_maps) { | |
| 5257 mark_compact_collector_.VerifyOmittedMapChecks(); | |
| 5258 } | |
| 5259 } | 5253 } |
| 5260 #endif | 5254 #endif |
| 5261 | 5255 |
| 5262 | 5256 |
| 5263 void Heap::ZapFromSpace() { | 5257 void Heap::ZapFromSpace() { |
| 5264 if (!new_space_.IsFromSpaceCommitted()) return; | 5258 if (!new_space_.IsFromSpaceCommitted()) return; |
| 5265 NewSpacePageIterator it(new_space_.FromSpaceStart(), | 5259 NewSpacePageIterator it(new_space_.FromSpaceStart(), |
| 5266 new_space_.FromSpaceEnd()); | 5260 new_space_.FromSpaceEnd()); |
| 5267 while (it.has_next()) { | 5261 while (it.has_next()) { |
| 5268 NewSpacePage* page = it.next(); | 5262 NewSpacePage* page = it.next(); |
| (...skipping 1726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6995 *object_type = "CODE_TYPE"; \ | 6989 *object_type = "CODE_TYPE"; \ |
| 6996 *object_sub_type = "CODE_AGE/" #name; \ | 6990 *object_sub_type = "CODE_AGE/" #name; \ |
| 6997 return true; | 6991 return true; |
| 6998 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) | 6992 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) |
| 6999 #undef COMPARE_AND_RETURN_NAME | 6993 #undef COMPARE_AND_RETURN_NAME |
| 7000 } | 6994 } |
| 7001 return false; | 6995 return false; |
| 7002 } | 6996 } |
| 7003 } // namespace internal | 6997 } // namespace internal |
| 7004 } // namespace v8 | 6998 } // namespace v8 |
| OLD | NEW |