Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Side by Side Diff: src/heap/objects-visiting-inl.h

Issue 1145893003: [crankshaft] Record inlined shared function infos instead of closures. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix test failures. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/objects-visiting.h"
8 9
9 namespace v8 { 10 namespace v8 {
10 namespace internal { 11 namespace internal {
11 12
12 template <typename StaticVisitor> 13 template <typename StaticVisitor>
13 void StaticNewSpaceVisitor<StaticVisitor>::Initialize() { 14 void StaticNewSpaceVisitor<StaticVisitor>::Initialize() {
14 table_.Register( 15 table_.Register(
15 kVisitShortcutCandidate, 16 kVisitShortcutCandidate,
16 &FixedBodyVisitor<StaticVisitor, ConsString::BodyDescriptor, int>::Visit); 17 &FixedBodyVisitor<StaticVisitor, ConsString::BodyDescriptor, int>::Visit);
17 18
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 int num_transitions = TransitionArray::NumberOfTransitions(transitions); 612 int num_transitions = TransitionArray::NumberOfTransitions(transitions);
612 for (int i = 0; i < num_transitions; ++i) { 613 for (int i = 0; i < num_transitions; ++i) {
613 StaticVisitor::VisitPointer(heap, transitions->GetKeySlot(i)); 614 StaticVisitor::VisitPointer(heap, transitions->GetKeySlot(i));
614 } 615 }
615 } 616 }
616 617
617 618
618 template <typename StaticVisitor> 619 template <typename StaticVisitor>
619 void StaticMarkingVisitor<StaticVisitor>::MarkInlinedFunctionsCode(Heap* heap, 620 void StaticMarkingVisitor<StaticVisitor>::MarkInlinedFunctionsCode(Heap* heap,
620 Code* code) { 621 Code* code) {
621 // Skip in absence of inlining.
622 // TODO(turbofan): Revisit once we support inlining.
623 if (code->is_turbofanned()) return;
624 // For optimized functions we should retain both non-optimized version 622 // For optimized functions we should retain both non-optimized version
625 // of its code and non-optimized version of all inlined functions. 623 // of its code and non-optimized version of all inlined functions.
626 // This is required to support bailing out from inlined code. 624 // This is required to support bailing out from inlined code.
627 DeoptimizationInputData* data = 625 DeoptimizationInputData* const data =
628 DeoptimizationInputData::cast(code->deoptimization_data()); 626 DeoptimizationInputData::cast(code->deoptimization_data());
629 FixedArray* literals = data->LiteralArray(); 627 FixedArray* const literals = data->LiteralArray();
630 for (int i = 0, count = data->InlinedFunctionCount()->value(); i < count; 628 int const inlined_count = data->InlinedFunctionCount()->value();
631 i++) { 629 for (int i = 0; i < inlined_count; ++i) {
632 JSFunction* inlined = JSFunction::cast(literals->get(i)); 630 StaticVisitor::MarkObject(
633 StaticVisitor::MarkObject(heap, inlined->shared()->code()); 631 heap, SharedFunctionInfo::cast(literals->get(i))->code());
634 } 632 }
635 } 633 }
636 634
637 635
638 inline static bool IsValidNonBuiltinContext(Object* context) { 636 inline static bool IsValidNonBuiltinContext(Object* context) {
639 return context->IsContext() && 637 return context->IsContext() &&
640 !Context::cast(context)->global_object()->IsJSBuiltinsObject(); 638 !Context::cast(context)->global_object()->IsJSBuiltinsObject();
641 } 639 }
642 640
643 641
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 868
871 RelocIterator it(this, mode_mask); 869 RelocIterator it(this, mode_mask);
872 for (; !it.done(); it.next()) { 870 for (; !it.done(); it.next()) {
873 it.rinfo()->template Visit<StaticVisitor>(heap); 871 it.rinfo()->template Visit<StaticVisitor>(heap);
874 } 872 }
875 } 873 }
876 } 874 }
877 } // namespace v8::internal 875 } // namespace v8::internal
878 876
879 #endif // V8_OBJECTS_VISITING_INL_H_ 877 #endif // V8_OBJECTS_VISITING_INL_H_
OLDNEW
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698