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 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 // (generator objects) on the heap. | 593 // (generator objects) on the heap. |
594 if (IsResumableFunction(shared_info->kind())) { | 594 if (IsResumableFunction(shared_info->kind())) { |
595 return false; | 595 return false; |
596 } | 596 } |
597 | 597 |
598 // If this is a full script wrapped in a function we do not flush the code. | 598 // If this is a full script wrapped in a function we do not flush the code. |
599 if (shared_info->is_toplevel()) { | 599 if (shared_info->is_toplevel()) { |
600 return false; | 600 return false; |
601 } | 601 } |
602 | 602 |
603 // The function must not be a builtin. | 603 // The function must be user code. |
604 if (shared_info->IsBuiltin()) { | 604 if (!shared_info->IsUserJavaScript()) { |
605 return false; | 605 return false; |
606 } | 606 } |
607 | 607 |
608 // Maintain debug break slots in the code. | 608 // Maintain debug break slots in the code. |
609 if (shared_info->HasDebugCode()) { | 609 if (shared_info->HasDebugCode()) { |
610 return false; | 610 return false; |
611 } | 611 } |
612 | 612 |
613 // If this is a function initialized with %SetCode then the one-to-one | 613 // If this is a function initialized with %SetCode then the one-to-one |
614 // relation between SharedFunctionInfo and Code is broken. | 614 // relation between SharedFunctionInfo and Code is broken. |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode, | 657 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode, |
658 void> JSFunctionWeakCodeBodyVisitor; | 658 void> JSFunctionWeakCodeBodyVisitor; |
659 JSFunctionWeakCodeBodyVisitor::Visit(map, object); | 659 JSFunctionWeakCodeBodyVisitor::Visit(map, object); |
660 } | 660 } |
661 | 661 |
662 | 662 |
663 } // namespace internal | 663 } // namespace internal |
664 } // namespace v8 | 664 } // namespace v8 |
665 | 665 |
666 #endif // V8_OBJECTS_VISITING_INL_H_ | 666 #endif // V8_OBJECTS_VISITING_INL_H_ |
OLD | NEW |