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

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

Issue 2515233002: [ic] Remove names table from type feedback metadata. (Closed)
Patch Set: Created 4 years, 1 month 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.cc ('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/globals.h" 8 #include "src/globals.h"
9 #include "src/type-feedback-vector.h" 9 #include "src/type-feedback-vector.h"
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 DCHECK_NE(FeedbackVectorSlotKind::KINDS_NUMBER, kind); 55 DCHECK_NE(FeedbackVectorSlotKind::KINDS_NUMBER, kind);
56 if (kind == FeedbackVectorSlotKind::GENERAL || 56 if (kind == FeedbackVectorSlotKind::GENERAL ||
57 kind == FeedbackVectorSlotKind::INTERPRETER_BINARYOP_IC || 57 kind == FeedbackVectorSlotKind::INTERPRETER_BINARYOP_IC ||
58 kind == FeedbackVectorSlotKind::INTERPRETER_COMPARE_IC) { 58 kind == FeedbackVectorSlotKind::INTERPRETER_COMPARE_IC) {
59 return 1; 59 return 1;
60 } 60 }
61 61
62 return 2; 62 return 2;
63 } 63 }
64 64
65 bool TypeFeedbackMetadata::SlotRequiresName(FeedbackVectorSlotKind kind) {
66 switch (kind) {
67 case FeedbackVectorSlotKind::LOAD_GLOBAL_IC:
68 return true;
69
70 case FeedbackVectorSlotKind::CALL_IC:
71 case FeedbackVectorSlotKind::LOAD_IC:
72 case FeedbackVectorSlotKind::KEYED_LOAD_IC:
73 case FeedbackVectorSlotKind::STORE_IC:
74 case FeedbackVectorSlotKind::KEYED_STORE_IC:
75 case FeedbackVectorSlotKind::INTERPRETER_BINARYOP_IC:
76 case FeedbackVectorSlotKind::INTERPRETER_COMPARE_IC:
77 case FeedbackVectorSlotKind::GENERAL:
78 case FeedbackVectorSlotKind::INVALID:
79 return false;
80
81 case FeedbackVectorSlotKind::KINDS_NUMBER:
82 break;
83 }
84 UNREACHABLE();
85 return false;
86 }
87
88 bool TypeFeedbackVector::is_empty() const { 65 bool TypeFeedbackVector::is_empty() const {
89 return length() == kReservedIndexCount; 66 return length() == kReservedIndexCount;
90 } 67 }
91 68
92 int TypeFeedbackVector::slot_count() const { 69 int TypeFeedbackVector::slot_count() const {
93 return length() - kReservedIndexCount; 70 return length() - kReservedIndexCount;
94 } 71 }
95 72
96 73
97 TypeFeedbackMetadata* TypeFeedbackVector::metadata() const { 74 TypeFeedbackMetadata* TypeFeedbackVector::metadata() const {
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 int index = vector()->GetIndex(slot()) + 1; 269 int index = vector()->GetIndex(slot()) + 1;
293 vector()->set(index, feedback_extra, mode); 270 vector()->set(index, feedback_extra, mode);
294 } 271 }
295 272
296 273
297 Isolate* FeedbackNexus::GetIsolate() const { return vector()->GetIsolate(); } 274 Isolate* FeedbackNexus::GetIsolate() const { return vector()->GetIsolate(); }
298 } // namespace internal 275 } // namespace internal
299 } // namespace v8 276 } // namespace v8
300 277
301 #endif // V8_TYPE_FEEDBACK_VECTOR_INL_H_ 278 #endif // V8_TYPE_FEEDBACK_VECTOR_INL_H_
OLDNEW
« no previous file with comments | « src/type-feedback-vector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698