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 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
696 | 696 |
697 for (int i = 0; i < transitions->number_of_transitions(); ++i) { | 697 for (int i = 0; i < transitions->number_of_transitions(); ++i) { |
698 StaticVisitor::VisitPointer(heap, transitions->GetKeySlot(i)); | 698 StaticVisitor::VisitPointer(heap, transitions->GetKeySlot(i)); |
699 } | 699 } |
700 } | 700 } |
701 | 701 |
702 | 702 |
703 template<typename StaticVisitor> | 703 template<typename StaticVisitor> |
704 void StaticMarkingVisitor<StaticVisitor>::MarkInlinedFunctionsCode( | 704 void StaticMarkingVisitor<StaticVisitor>::MarkInlinedFunctionsCode( |
705 Heap* heap, Code* code) { | 705 Heap* heap, Code* code) { |
| 706 // Skip in absence of inlining. |
| 707 // TODO(turbofan): Revisit once we support inlining. |
| 708 if (code->is_turbofanned()) return; |
706 // For optimized functions we should retain both non-optimized version | 709 // For optimized functions we should retain both non-optimized version |
707 // of its code and non-optimized version of all inlined functions. | 710 // of its code and non-optimized version of all inlined functions. |
708 // This is required to support bailing out from inlined code. | 711 // This is required to support bailing out from inlined code. |
709 DeoptimizationInputData* data = | 712 DeoptimizationInputData* data = |
710 DeoptimizationInputData::cast(code->deoptimization_data()); | 713 DeoptimizationInputData::cast(code->deoptimization_data()); |
711 FixedArray* literals = data->LiteralArray(); | 714 FixedArray* literals = data->LiteralArray(); |
712 for (int i = 0, count = data->InlinedFunctionCount()->value(); | 715 for (int i = 0, count = data->InlinedFunctionCount()->value(); |
713 i < count; | 716 i < count; |
714 i++) { | 717 i++) { |
715 JSFunction* inlined = JSFunction::cast(literals->get(i)); | 718 JSFunction* inlined = JSFunction::cast(literals->get(i)); |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
959 RelocIterator it(this, mode_mask); | 962 RelocIterator it(this, mode_mask); |
960 for (; !it.done(); it.next()) { | 963 for (; !it.done(); it.next()) { |
961 it.rinfo()->template Visit<StaticVisitor>(heap); | 964 it.rinfo()->template Visit<StaticVisitor>(heap); |
962 } | 965 } |
963 } | 966 } |
964 | 967 |
965 | 968 |
966 } } // namespace v8::internal | 969 } } // namespace v8::internal |
967 | 970 |
968 #endif // V8_OBJECTS_VISITING_INL_H_ | 971 #endif // V8_OBJECTS_VISITING_INL_H_ |
OLD | NEW |