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

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

Issue 1670813005: Revert of Type Feedback Vector lives in the closure (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« no previous file with comments | « src/snapshot/serialize.cc ('k') | src/type-feedback-vector.cc » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_H_ 5 #ifndef V8_TYPE_FEEDBACK_VECTOR_H_
6 #define V8_TYPE_FEEDBACK_VECTOR_H_ 6 #define V8_TYPE_FEEDBACK_VECTOR_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "src/base/logging.h" 10 #include "src/base/logging.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 static inline TypeFeedbackMetadata* cast(Object* obj); 129 static inline TypeFeedbackMetadata* cast(Object* obj);
130 130
131 static const int kSlotsCountIndex = 0; 131 static const int kSlotsCountIndex = 0;
132 static const int kReservedIndexCount = 1; 132 static const int kReservedIndexCount = 1;
133 133
134 // Returns number of feedback vector elements used by given slot kind. 134 // Returns number of feedback vector elements used by given slot kind.
135 static inline int GetSlotSize(FeedbackVectorSlotKind kind); 135 static inline int GetSlotSize(FeedbackVectorSlotKind kind);
136 136
137 bool SpecDiffersFrom(const FeedbackVectorSpec* other_spec) const; 137 bool SpecDiffersFrom(const FeedbackVectorSpec* other_spec) const;
138 138
139 bool DiffersFrom(const TypeFeedbackMetadata* other_metadata) const;
140
141 // Returns number of slots in the vector. 139 // Returns number of slots in the vector.
142 inline int slot_count() const; 140 inline int slot_count() const;
143 141
144 // Returns slot kind for given slot. 142 // Returns slot kind for given slot.
145 FeedbackVectorSlotKind GetKind(FeedbackVectorSlot slot) const; 143 FeedbackVectorSlotKind GetKind(FeedbackVectorSlot slot) const;
146 144
147 template <typename Spec> 145 template <typename Spec>
148 static Handle<TypeFeedbackMetadata> New(Isolate* isolate, const Spec* spec); 146 static Handle<TypeFeedbackMetadata> New(Isolate* isolate, const Spec* spec);
149 147
150 #ifdef OBJECT_PRINT 148 #ifdef OBJECT_PRINT
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 inline void ComputeCounts(int* with_type_info, int* generic); 187 inline void ComputeCounts(int* with_type_info, int* generic);
190 188
191 inline bool is_empty() const; 189 inline bool is_empty() const;
192 190
193 // Returns number of slots in the vector. 191 // Returns number of slots in the vector.
194 inline int slot_count() const; 192 inline int slot_count() const;
195 193
196 inline TypeFeedbackMetadata* metadata() const; 194 inline TypeFeedbackMetadata* metadata() const;
197 195
198 // Conversion from a slot to an integer index to the underlying array. 196 // Conversion from a slot to an integer index to the underlying array.
199 static inline int GetIndex(FeedbackVectorSlot slot); 197 inline int GetIndex(FeedbackVectorSlot slot) const;
200 static int GetIndexFromSpec(const FeedbackVectorSpec* spec, 198 static int GetIndexFromSpec(const FeedbackVectorSpec* spec,
201 FeedbackVectorSlot slot); 199 FeedbackVectorSlot slot);
202 200
203 // Conversion from an integer index to the underlying array to a slot. 201 // Conversion from an integer index to the underlying array to a slot.
204 static inline FeedbackVectorSlot ToSlot(int index); 202 inline FeedbackVectorSlot ToSlot(int index) const;
205 inline Object* Get(FeedbackVectorSlot slot) const; 203 inline Object* Get(FeedbackVectorSlot slot) const;
206 inline void Set(FeedbackVectorSlot slot, Object* value, 204 inline void Set(FeedbackVectorSlot slot, Object* value,
207 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); 205 WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
208 206
209 // Returns slot kind for given slot. 207 // Returns slot kind for given slot.
210 inline FeedbackVectorSlotKind GetKind(FeedbackVectorSlot slot) const; 208 inline FeedbackVectorSlotKind GetKind(FeedbackVectorSlot slot) const;
211 209
212 static Handle<TypeFeedbackVector> New(Isolate* isolate, 210 static Handle<TypeFeedbackVector> New(Isolate* isolate,
213 Handle<TypeFeedbackMetadata> metadata); 211 Handle<TypeFeedbackMetadata> metadata);
214 212
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 KeyedAccessStoreMode GetKeyedAccessStoreMode() const; 534 KeyedAccessStoreMode GetKeyedAccessStoreMode() const;
537 IcCheckType GetKeyType() const; 535 IcCheckType GetKeyType() const;
538 536
539 InlineCacheState StateFromFeedback() const override; 537 InlineCacheState StateFromFeedback() const override;
540 Name* FindFirstName() const override; 538 Name* FindFirstName() const override;
541 }; 539 };
542 } // namespace internal 540 } // namespace internal
543 } // namespace v8 541 } // namespace v8
544 542
545 #endif // V8_TRANSITIONS_H_ 543 #endif // V8_TRANSITIONS_H_
OLDNEW
« no previous file with comments | « src/snapshot/serialize.cc ('k') | src/type-feedback-vector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698