| 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 #ifndef V8_OBJECTS_VISITING_INL_H_ | 5 #ifndef V8_OBJECTS_VISITING_INL_H_ |
| 6 #define V8_OBJECTS_VISITING_INL_H_ | 6 #define V8_OBJECTS_VISITING_INL_H_ |
| 7 | 7 |
| 8 #include "src/heap/array-buffer-tracker.h" | 8 #include "src/heap/array-buffer-tracker.h" |
| 9 #include "src/heap/objects-visiting.h" | 9 #include "src/heap/objects-visiting.h" |
| 10 #include "src/ic/ic-state.h" | 10 #include "src/ic/ic-state.h" |
| (...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 672 // If this is a full script wrapped in a function we do not flush the code. | 672 // If this is a full script wrapped in a function we do not flush the code. |
| 673 if (shared_info->is_toplevel()) { | 673 if (shared_info->is_toplevel()) { |
| 674 return false; | 674 return false; |
| 675 } | 675 } |
| 676 | 676 |
| 677 // The function must not be a builtin. | 677 // The function must not be a builtin. |
| 678 if (shared_info->IsBuiltin()) { | 678 if (shared_info->IsBuiltin()) { |
| 679 return false; | 679 return false; |
| 680 } | 680 } |
| 681 | 681 |
| 682 // Maintain debug break slots in the code. |
| 683 if (shared_info->HasDebugCode()) { |
| 684 return false; |
| 685 } |
| 686 |
| 682 // If this is a function initialized with %SetCode then the one-to-one | 687 // If this is a function initialized with %SetCode then the one-to-one |
| 683 // relation between SharedFunctionInfo and Code is broken. | 688 // relation between SharedFunctionInfo and Code is broken. |
| 684 if (shared_info->dont_flush()) { | 689 if (shared_info->dont_flush()) { |
| 685 return false; | 690 return false; |
| 686 } | 691 } |
| 687 | 692 |
| 688 // ---------------------------------------------------------------- | 693 // ---------------------------------------------------------------- |
| 689 // The above predicates up to this line are hard invariants, below | 694 // The above predicates up to this line are hard invariants, below |
| 690 // this line are heuristics that should not affect correctness. | 695 // this line are heuristics that should not affect correctness. |
| 691 // ---------------------------------------------------------------- | 696 // ---------------------------------------------------------------- |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 752 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode, | 757 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode, |
| 753 void> JSFunctionWeakCodeBodyVisitor; | 758 void> JSFunctionWeakCodeBodyVisitor; |
| 754 JSFunctionWeakCodeBodyVisitor::Visit(map, object); | 759 JSFunctionWeakCodeBodyVisitor::Visit(map, object); |
| 755 } | 760 } |
| 756 | 761 |
| 757 | 762 |
| 758 } // namespace internal | 763 } // namespace internal |
| 759 } // namespace v8 | 764 } // namespace v8 |
| 760 | 765 |
| 761 #endif // V8_OBJECTS_VISITING_INL_H_ | 766 #endif // V8_OBJECTS_VISITING_INL_H_ |
| OLD | NEW |