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

Side by Side Diff: src/heap/heap.cc

Issue 2676583002: [ic] Encode [Keyed]StoreIC's language mode in slot kind instead of code object's flags. (Closed)
Patch Set: Rebasing Created 3 years, 10 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
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 #include "src/heap/heap.h" 5 #include "src/heap/heap.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/ast/context-slot-cache.h" 9 #include "src/ast/context-slot-cache.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 2741 matching lines...) Expand 10 before | Expand all | Expand 10 after
2752 set_undefined_cell(*factory->NewCell(factory->undefined_value())); 2752 set_undefined_cell(*factory->NewCell(factory->undefined_value()));
2753 2753
2754 // Microtask queue uses the empty fixed array as a sentinel for "empty". 2754 // Microtask queue uses the empty fixed array as a sentinel for "empty".
2755 // Number of queued microtasks stored in Isolate::pending_microtask_count(). 2755 // Number of queued microtasks stored in Isolate::pending_microtask_count().
2756 set_microtask_queue(empty_fixed_array()); 2756 set_microtask_queue(empty_fixed_array());
2757 2757
2758 { 2758 {
2759 StaticFeedbackVectorSpec spec; 2759 StaticFeedbackVectorSpec spec;
2760 FeedbackVectorSlot slot = spec.AddLoadICSlot(); 2760 FeedbackVectorSlot slot = spec.AddLoadICSlot();
2761 DCHECK_EQ(slot, FeedbackVectorSlot(TypeFeedbackVector::kDummyLoadICSlot)); 2761 DCHECK_EQ(slot, FeedbackVectorSlot(TypeFeedbackVector::kDummyLoadICSlot));
2762 2762 USE(slot);
2763 slot = spec.AddKeyedLoadICSlot();
2764 DCHECK_EQ(slot,
2765 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedLoadICSlot));
2766
2767 slot = spec.AddStoreICSlot();
2768 DCHECK_EQ(slot, FeedbackVectorSlot(TypeFeedbackVector::kDummyStoreICSlot));
2769
2770 slot = spec.AddKeyedStoreICSlot();
2771 DCHECK_EQ(slot,
2772 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot));
2773 2763
2774 Handle<TypeFeedbackMetadata> dummy_metadata = 2764 Handle<TypeFeedbackMetadata> dummy_metadata =
2775 TypeFeedbackMetadata::New(isolate(), &spec); 2765 TypeFeedbackMetadata::New(isolate(), &spec);
2776 Handle<TypeFeedbackVector> dummy_vector = 2766 Handle<TypeFeedbackVector> dummy_vector =
2777 TypeFeedbackVector::New(isolate(), dummy_metadata); 2767 TypeFeedbackVector::New(isolate(), dummy_metadata);
2778 2768
2779 set_dummy_vector(*dummy_vector); 2769 set_dummy_vector(*dummy_vector);
2780 2770
2781 // Now initialize dummy vector's entries. 2771 // Now initialize dummy vector's entries.
2782 LoadICNexus(isolate()).ConfigureMegamorphic(); 2772 LoadICNexus(isolate()).ConfigureMegamorphic();
2783 StoreICNexus(isolate()).ConfigureMegamorphic();
2784 KeyedLoadICNexus(isolate()).ConfigureMegamorphicKeyed(PROPERTY);
2785 KeyedStoreICNexus(isolate()).ConfigureMegamorphicKeyed(PROPERTY);
2786 } 2773 }
2787 2774
2788 { 2775 {
2789 // Create a canonical empty TypeFeedbackVector, which is shared by all 2776 // Create a canonical empty TypeFeedbackVector, which is shared by all
2790 // functions that don't need actual type feedback slots. Note however 2777 // functions that don't need actual type feedback slots. Note however
2791 // that all these functions will share the same invocation count, but 2778 // that all these functions will share the same invocation count, but
2792 // that shouldn't matter since we only use the invocation count to 2779 // that shouldn't matter since we only use the invocation count to
2793 // relativize the absolute call counts, but we can only have call counts 2780 // relativize the absolute call counts, but we can only have call counts
2794 // if we have actual feedback slots. 2781 // if we have actual feedback slots.
2795 Handle<FixedArray> empty_type_feedback_vector = factory->NewFixedArray( 2782 Handle<FixedArray> empty_type_feedback_vector = factory->NewFixedArray(
(...skipping 3805 matching lines...) Expand 10 before | Expand all | Expand 10 after
6601 } 6588 }
6602 6589
6603 6590
6604 // static 6591 // static
6605 int Heap::GetStaticVisitorIdForMap(Map* map) { 6592 int Heap::GetStaticVisitorIdForMap(Map* map) {
6606 return StaticVisitorBase::GetVisitorId(map); 6593 return StaticVisitorBase::GetVisitorId(map);
6607 } 6594 }
6608 6595
6609 } // namespace internal 6596 } // namespace internal
6610 } // namespace v8 6597 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698