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

Side by Side Diff: src/type-feedback-vector-inl.h

Issue 2063823006: [turbofan] Fix includes for JSOperatorBuilder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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/type-feedback-vector.h ('k') | no next file » | 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_TYPE_FEEDBACK_VECTOR_INL_H_ 5 #ifndef V8_TYPE_FEEDBACK_VECTOR_INL_H_
6 #define V8_TYPE_FEEDBACK_VECTOR_INL_H_ 6 #define V8_TYPE_FEEDBACK_VECTOR_INL_H_
7 7
8 #include "src/type-feedback-vector.h" 8 #include "src/type-feedback-vector.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 return length() - kReservedIndexCount; 71 return length() - kReservedIndexCount;
72 } 72 }
73 73
74 74
75 TypeFeedbackMetadata* TypeFeedbackVector::metadata() const { 75 TypeFeedbackMetadata* TypeFeedbackVector::metadata() const {
76 return is_empty() ? TypeFeedbackMetadata::cast(GetHeap()->empty_fixed_array()) 76 return is_empty() ? TypeFeedbackMetadata::cast(GetHeap()->empty_fixed_array())
77 : TypeFeedbackMetadata::cast(get(kMetadataIndex)); 77 : TypeFeedbackMetadata::cast(get(kMetadataIndex));
78 } 78 }
79 79
80 80
81 // static
82 int TypeFeedbackVector::GetIndex(FeedbackVectorSlot slot) {
83 return kReservedIndexCount + slot.ToInt();
84 }
85
86
87 // Conversion from an integer index to either a slot or an ic slot. The caller 81 // Conversion from an integer index to either a slot or an ic slot. The caller
88 // should know what kind she expects. 82 // should know what kind she expects.
89 // static 83 // static
90 FeedbackVectorSlot TypeFeedbackVector::ToSlot(int index) { 84 FeedbackVectorSlot TypeFeedbackVector::ToSlot(int index) {
91 DCHECK(index >= kReservedIndexCount); 85 DCHECK(index >= kReservedIndexCount);
92 return FeedbackVectorSlot(index - kReservedIndexCount); 86 return FeedbackVectorSlot(index - kReservedIndexCount);
93 } 87 }
94 88
95 89
96 Object* TypeFeedbackVector::Get(FeedbackVectorSlot slot) const { 90 Object* TypeFeedbackVector::Get(FeedbackVectorSlot slot) const {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 int index = vector()->GetIndex(slot()) + 1; 184 int index = vector()->GetIndex(slot()) + 1;
191 vector()->set(index, feedback_extra, mode); 185 vector()->set(index, feedback_extra, mode);
192 } 186 }
193 187
194 188
195 Isolate* FeedbackNexus::GetIsolate() const { return vector()->GetIsolate(); } 189 Isolate* FeedbackNexus::GetIsolate() const { return vector()->GetIsolate(); }
196 } // namespace internal 190 } // namespace internal
197 } // namespace v8 191 } // namespace v8
198 192
199 #endif // V8_TYPE_FEEDBACK_VECTOR_INL_H_ 193 #endif // V8_TYPE_FEEDBACK_VECTOR_INL_H_
OLDNEW
« no previous file with comments | « src/type-feedback-vector.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698