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

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

Issue 2673383002: [ic] Encode LoadGlobalIC's typeof mode in slot kind instead of code object's flags. (Closed)
Patch Set: 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 #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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 switch (kind) { 54 switch (kind) {
55 case FeedbackVectorSlotKind::GENERAL: 55 case FeedbackVectorSlotKind::GENERAL:
56 case FeedbackVectorSlotKind::INTERPRETER_COMPARE_IC: 56 case FeedbackVectorSlotKind::INTERPRETER_COMPARE_IC:
57 case FeedbackVectorSlotKind::INTERPRETER_BINARYOP_IC: 57 case FeedbackVectorSlotKind::INTERPRETER_BINARYOP_IC:
58 case FeedbackVectorSlotKind::LITERAL: 58 case FeedbackVectorSlotKind::LITERAL:
59 case FeedbackVectorSlotKind::CREATE_CLOSURE: 59 case FeedbackVectorSlotKind::CREATE_CLOSURE:
60 return 1; 60 return 1;
61 61
62 case FeedbackVectorSlotKind::CALL_IC: 62 case FeedbackVectorSlotKind::CALL_IC:
63 case FeedbackVectorSlotKind::LOAD_IC: 63 case FeedbackVectorSlotKind::LOAD_IC:
64 case FeedbackVectorSlotKind::LOAD_GLOBAL_IC: 64 case FeedbackVectorSlotKind::LOAD_GLOBAL_INSIDE_TYPEOF_IC:
65 case FeedbackVectorSlotKind::LOAD_GLOBAL_NOT_INSIDE_TYPEOF_IC:
65 case FeedbackVectorSlotKind::KEYED_LOAD_IC: 66 case FeedbackVectorSlotKind::KEYED_LOAD_IC:
66 case FeedbackVectorSlotKind::STORE_SLOPPY_IC: 67 case FeedbackVectorSlotKind::STORE_SLOPPY_IC:
67 case FeedbackVectorSlotKind::STORE_STRICT_IC: 68 case FeedbackVectorSlotKind::STORE_STRICT_IC:
68 case FeedbackVectorSlotKind::KEYED_STORE_SLOPPY_IC: 69 case FeedbackVectorSlotKind::KEYED_STORE_SLOPPY_IC:
69 case FeedbackVectorSlotKind::KEYED_STORE_STRICT_IC: 70 case FeedbackVectorSlotKind::KEYED_STORE_STRICT_IC:
70 case FeedbackVectorSlotKind::STORE_DATA_PROPERTY_IN_LITERAL_IC: 71 case FeedbackVectorSlotKind::STORE_DATA_PROPERTY_IN_LITERAL_IC:
71 return 2; 72 return 2;
72 73
73 case FeedbackVectorSlotKind::INVALID: 74 case FeedbackVectorSlotKind::INVALID:
74 case FeedbackVectorSlotKind::KINDS_NUMBER: 75 case FeedbackVectorSlotKind::KINDS_NUMBER:
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 int total = 0; 168 int total = 0;
168 TypeFeedbackMetadataIterator iter(metadata()); 169 TypeFeedbackMetadataIterator iter(metadata());
169 while (iter.HasNext()) { 170 while (iter.HasNext()) {
170 FeedbackVectorSlot slot = iter.Next(); 171 FeedbackVectorSlot slot = iter.Next();
171 FeedbackVectorSlotKind kind = iter.kind(); 172 FeedbackVectorSlotKind kind = iter.kind();
172 173
173 Object* const obj = Get(slot); 174 Object* const obj = Get(slot);
174 switch (kind) { 175 switch (kind) {
175 case FeedbackVectorSlotKind::CALL_IC: 176 case FeedbackVectorSlotKind::CALL_IC:
176 case FeedbackVectorSlotKind::LOAD_IC: 177 case FeedbackVectorSlotKind::LOAD_IC:
177 case FeedbackVectorSlotKind::LOAD_GLOBAL_IC: 178 case FeedbackVectorSlotKind::LOAD_GLOBAL_INSIDE_TYPEOF_IC:
179 case FeedbackVectorSlotKind::LOAD_GLOBAL_NOT_INSIDE_TYPEOF_IC:
178 case FeedbackVectorSlotKind::KEYED_LOAD_IC: 180 case FeedbackVectorSlotKind::KEYED_LOAD_IC:
179 case FeedbackVectorSlotKind::STORE_SLOPPY_IC: 181 case FeedbackVectorSlotKind::STORE_SLOPPY_IC:
180 case FeedbackVectorSlotKind::STORE_STRICT_IC: 182 case FeedbackVectorSlotKind::STORE_STRICT_IC:
181 case FeedbackVectorSlotKind::KEYED_STORE_SLOPPY_IC: 183 case FeedbackVectorSlotKind::KEYED_STORE_SLOPPY_IC:
182 case FeedbackVectorSlotKind::KEYED_STORE_STRICT_IC: 184 case FeedbackVectorSlotKind::KEYED_STORE_STRICT_IC:
183 case FeedbackVectorSlotKind::STORE_DATA_PROPERTY_IN_LITERAL_IC: { 185 case FeedbackVectorSlotKind::STORE_DATA_PROPERTY_IN_LITERAL_IC: {
184 if (obj->IsWeakCell() || obj->IsFixedArray() || obj->IsString()) { 186 if (obj->IsWeakCell() || obj->IsFixedArray() || obj->IsString()) {
185 with++; 187 with++;
186 } else if (obj == megamorphic_sentinel) { 188 } else if (obj == megamorphic_sentinel) {
187 gen++; 189 gen++;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 int index = vector()->GetIndex(slot()) + 1; 300 int index = vector()->GetIndex(slot()) + 1;
299 vector()->set(index, feedback_extra, mode); 301 vector()->set(index, feedback_extra, mode);
300 } 302 }
301 303
302 304
303 Isolate* FeedbackNexus::GetIsolate() const { return vector()->GetIsolate(); } 305 Isolate* FeedbackNexus::GetIsolate() const { return vector()->GetIsolate(); }
304 } // namespace internal 306 } // namespace internal
305 } // namespace v8 307 } // namespace v8
306 308
307 #endif // V8_TYPE_FEEDBACK_VECTOR_INL_H_ 309 #endif // V8_TYPE_FEEDBACK_VECTOR_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698