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 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
640 // Only flush code for functions. | 640 // Only flush code for functions. |
641 if (shared_info->code()->kind() != Code::FUNCTION) { | 641 if (shared_info->code()->kind() != Code::FUNCTION) { |
642 return false; | 642 return false; |
643 } | 643 } |
644 | 644 |
645 // Function must be lazy compilable. | 645 // Function must be lazy compilable. |
646 if (!shared_info->allows_lazy_compilation()) { | 646 if (!shared_info->allows_lazy_compilation()) { |
647 return false; | 647 return false; |
648 } | 648 } |
649 | 649 |
650 // We do not (yet?) flush code for generator functions, because we don't know | 650 // We do not (yet?) flush code for generator functions, or async functions, |
Hannes Payer (out of office)
2016/05/20 07:13:52
How about a list of items enumerating what we don'
caitp (gmail)
2016/05/20 07:55:48
isn't that what this routine is? thats how it look
Hannes Payer (out of office)
2016/05/20 12:00:41
Ah, async is based on generators. Then the comment
| |
651 // if there are still live activations (generator objects) on the heap. | 651 // because we don't know if there are still live activations |
652 if (shared_info->is_generator()) { | 652 // (generator objects) on the heap. |
653 if (shared_info->is_resumable()) { | |
653 return false; | 654 return false; |
654 } | 655 } |
655 | 656 |
656 // If this is a full script wrapped in a function we do not flush the code. | 657 // If this is a full script wrapped in a function we do not flush the code. |
657 if (shared_info->is_toplevel()) { | 658 if (shared_info->is_toplevel()) { |
658 return false; | 659 return false; |
659 } | 660 } |
660 | 661 |
661 // The function must not be a builtin. | 662 // The function must not be a builtin. |
662 if (shared_info->IsBuiltin()) { | 663 if (shared_info->IsBuiltin()) { |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
731 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode, | 732 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode, |
732 void> JSFunctionWeakCodeBodyVisitor; | 733 void> JSFunctionWeakCodeBodyVisitor; |
733 JSFunctionWeakCodeBodyVisitor::Visit(map, object); | 734 JSFunctionWeakCodeBodyVisitor::Visit(map, object); |
734 } | 735 } |
735 | 736 |
736 | 737 |
737 } // namespace internal | 738 } // namespace internal |
738 } // namespace v8 | 739 } // namespace v8 |
739 | 740 |
740 #endif // V8_OBJECTS_VISITING_INL_H_ | 741 #endif // V8_OBJECTS_VISITING_INL_H_ |
OLD | NEW |