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

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

Issue 1370303004: Distinction between FeedbackVectorICSlot and FeedbackVectorSlot eliminated. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 2703 matching lines...) Expand 10 before | Expand all | Expand 10 after
2714 // Allocate object to hold object observation state. 2714 // Allocate object to hold object observation state.
2715 set_observation_state(*factory->NewJSObjectFromMap( 2715 set_observation_state(*factory->NewJSObjectFromMap(
2716 factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize))); 2716 factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize)));
2717 2717
2718 // Microtask queue uses the empty fixed array as a sentinel for "empty". 2718 // Microtask queue uses the empty fixed array as a sentinel for "empty".
2719 // Number of queued microtasks stored in Isolate::pending_microtask_count(). 2719 // Number of queued microtasks stored in Isolate::pending_microtask_count().
2720 set_microtask_queue(empty_fixed_array()); 2720 set_microtask_queue(empty_fixed_array());
2721 2721
2722 { 2722 {
2723 FeedbackVectorSlotKind kinds[] = {FeedbackVectorSlotKind::LOAD_IC, 2723 FeedbackVectorSlotKind kinds[] = {FeedbackVectorSlotKind::LOAD_IC,
2724 FeedbackVectorSlotKind::INVALID,
2724 FeedbackVectorSlotKind::KEYED_LOAD_IC, 2725 FeedbackVectorSlotKind::KEYED_LOAD_IC,
2726 FeedbackVectorSlotKind::INVALID,
2725 FeedbackVectorSlotKind::STORE_IC, 2727 FeedbackVectorSlotKind::STORE_IC,
2726 FeedbackVectorSlotKind::KEYED_STORE_IC}; 2728 FeedbackVectorSlotKind::INVALID,
2727 StaticFeedbackVectorSpec spec(0, 4, kinds); 2729 FeedbackVectorSlotKind::KEYED_STORE_IC,
2730 FeedbackVectorSlotKind::INVALID};
2731 StaticFeedbackVectorSpec spec(arraysize(kinds), kinds);
2728 Handle<TypeFeedbackVector> dummy_vector = 2732 Handle<TypeFeedbackVector> dummy_vector =
2729 factory->NewTypeFeedbackVector(&spec); 2733 TypeFeedbackVector::New(isolate(), &spec);
2730 for (int i = 0; i < 4; i++) { 2734 for (int i = 0; i < spec.slots(); i++) {
2731 dummy_vector->Set(FeedbackVectorICSlot(0), 2735 if (kinds[i] != FeedbackVectorSlotKind::INVALID) {
Igor Sheludko 2015/09/30 16:30:56 I guess we wanted to use FeedbackVectorICSlot(i) h
mvstanton 2015/10/01 10:24:31 Good catch.
2732 *TypeFeedbackVector::MegamorphicSentinel(isolate()), 2736 dummy_vector->Set(FeedbackVectorSlot(i),
2733 SKIP_WRITE_BARRIER); 2737 *TypeFeedbackVector::MegamorphicSentinel(isolate()),
2738 SKIP_WRITE_BARRIER);
2739 }
2734 } 2740 }
2741 DCHECK_EQ(FeedbackVectorSlotKind::LOAD_IC,
2742 dummy_vector->GetKind(
2743 FeedbackVectorSlot(TypeFeedbackVector::kDummyLoadICSlot)));
2744 DCHECK_EQ(FeedbackVectorSlotKind::KEYED_LOAD_IC,
2745 dummy_vector->GetKind(FeedbackVectorSlot(
2746 TypeFeedbackVector::kDummyKeyedLoadICSlot)));
2747 DCHECK_EQ(FeedbackVectorSlotKind::STORE_IC,
2748 dummy_vector->GetKind(
2749 FeedbackVectorSlot(TypeFeedbackVector::kDummyStoreICSlot)));
2750 DCHECK_EQ(FeedbackVectorSlotKind::KEYED_STORE_IC,
2751 dummy_vector->GetKind(FeedbackVectorSlot(
2752 TypeFeedbackVector::kDummyKeyedStoreICSlot)));
2753
2735 set_dummy_vector(*dummy_vector); 2754 set_dummy_vector(*dummy_vector);
2736 } 2755 }
2737 2756
2738 set_detached_contexts(empty_fixed_array()); 2757 set_detached_contexts(empty_fixed_array());
2739 set_retained_maps(ArrayList::cast(empty_fixed_array())); 2758 set_retained_maps(ArrayList::cast(empty_fixed_array()));
2740 2759
2741 set_weak_object_to_code_table( 2760 set_weak_object_to_code_table(
2742 *WeakHashTable::New(isolate(), 16, USE_DEFAULT_MINIMUM_CAPACITY, 2761 *WeakHashTable::New(isolate(), 16, USE_DEFAULT_MINIMUM_CAPACITY,
2743 TENURED)); 2762 TENURED));
2744 2763
(...skipping 3340 matching lines...) Expand 10 before | Expand all | Expand 10 after
6085 } 6104 }
6086 6105
6087 6106
6088 // static 6107 // static
6089 int Heap::GetStaticVisitorIdForMap(Map* map) { 6108 int Heap::GetStaticVisitorIdForMap(Map* map) {
6090 return StaticVisitorBase::GetVisitorId(map); 6109 return StaticVisitorBase::GetVisitorId(map);
6091 } 6110 }
6092 6111
6093 } // namespace internal 6112 } // namespace internal
6094 } // namespace v8 6113 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698