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 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 } | 616 } |
617 | 617 |
618 // Function must be lazy compilable. | 618 // Function must be lazy compilable. |
619 if (!shared_info->allows_lazy_compilation()) { | 619 if (!shared_info->allows_lazy_compilation()) { |
620 return false; | 620 return false; |
621 } | 621 } |
622 | 622 |
623 // We do not (yet?) flush code for generator functions, or async functions, | 623 // We do not (yet?) flush code for generator functions, or async functions, |
624 // because we don't know if there are still live activations | 624 // because we don't know if there are still live activations |
625 // (generator objects) on the heap. | 625 // (generator objects) on the heap. |
626 if (shared_info->is_resumable()) { | 626 if (IsResumableFunction(shared_info->kind())) { |
627 return false; | 627 return false; |
628 } | 628 } |
629 | 629 |
630 // If this is a full script wrapped in a function we do not flush the code. | 630 // If this is a full script wrapped in a function we do not flush the code. |
631 if (shared_info->is_toplevel()) { | 631 if (shared_info->is_toplevel()) { |
632 return false; | 632 return false; |
633 } | 633 } |
634 | 634 |
635 // The function must not be a builtin. | 635 // The function must not be a builtin. |
636 if (shared_info->IsBuiltin()) { | 636 if (shared_info->IsBuiltin()) { |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode, | 705 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode, |
706 void> JSFunctionWeakCodeBodyVisitor; | 706 void> JSFunctionWeakCodeBodyVisitor; |
707 JSFunctionWeakCodeBodyVisitor::Visit(map, object); | 707 JSFunctionWeakCodeBodyVisitor::Visit(map, object); |
708 } | 708 } |
709 | 709 |
710 | 710 |
711 } // namespace internal | 711 } // namespace internal |
712 } // namespace v8 | 712 } // namespace v8 |
713 | 713 |
714 #endif // V8_OBJECTS_VISITING_INL_H_ | 714 #endif // V8_OBJECTS_VISITING_INL_H_ |
OLD | NEW |