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

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

Issue 2745413006: Revert of Collect type profile for DevTools. (Closed)
Patch Set: Created 3 years, 9 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/feedback-vector.cc ('k') | src/ic/ic.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 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_FEEDBACK_VECTOR_INL_H_ 5 #ifndef V8_FEEDBACK_VECTOR_INL_H_
6 #define V8_FEEDBACK_VECTOR_INL_H_ 6 #define V8_FEEDBACK_VECTOR_INL_H_
7 7
8 #include "src/factory.h" 8 #include "src/factory.h"
9 #include "src/feedback-vector.h" 9 #include "src/feedback-vector.h"
10 #include "src/globals.h" 10 #include "src/globals.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 } 47 }
48 48
49 int FeedbackMetadata::GetSlotSize(FeedbackSlotKind kind) { 49 int FeedbackMetadata::GetSlotSize(FeedbackSlotKind kind) {
50 switch (kind) { 50 switch (kind) {
51 case FeedbackSlotKind::kGeneral: 51 case FeedbackSlotKind::kGeneral:
52 case FeedbackSlotKind::kCompareOp: 52 case FeedbackSlotKind::kCompareOp:
53 case FeedbackSlotKind::kBinaryOp: 53 case FeedbackSlotKind::kBinaryOp:
54 case FeedbackSlotKind::kToBoolean: 54 case FeedbackSlotKind::kToBoolean:
55 case FeedbackSlotKind::kLiteral: 55 case FeedbackSlotKind::kLiteral:
56 case FeedbackSlotKind::kCreateClosure: 56 case FeedbackSlotKind::kCreateClosure:
57 case FeedbackSlotKind::kTypeProfile:
58 return 1; 57 return 1;
59 58
60 case FeedbackSlotKind::kCall: 59 case FeedbackSlotKind::kCall:
61 case FeedbackSlotKind::kLoadProperty: 60 case FeedbackSlotKind::kLoadProperty:
62 case FeedbackSlotKind::kLoadGlobalInsideTypeof: 61 case FeedbackSlotKind::kLoadGlobalInsideTypeof:
63 case FeedbackSlotKind::kLoadGlobalNotInsideTypeof: 62 case FeedbackSlotKind::kLoadGlobalNotInsideTypeof:
64 case FeedbackSlotKind::kLoadKeyed: 63 case FeedbackSlotKind::kLoadKeyed:
65 case FeedbackSlotKind::kStoreNamedSloppy: 64 case FeedbackSlotKind::kStoreNamedSloppy:
66 case FeedbackSlotKind::kStoreNamedStrict: 65 case FeedbackSlotKind::kStoreNamedStrict:
67 case FeedbackSlotKind::kStoreOwnNamed: 66 case FeedbackSlotKind::kStoreOwnNamed:
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 case FeedbackSlotKind::kCall: 179 case FeedbackSlotKind::kCall:
181 case FeedbackSlotKind::kLoadProperty: 180 case FeedbackSlotKind::kLoadProperty:
182 case FeedbackSlotKind::kLoadGlobalInsideTypeof: 181 case FeedbackSlotKind::kLoadGlobalInsideTypeof:
183 case FeedbackSlotKind::kLoadGlobalNotInsideTypeof: 182 case FeedbackSlotKind::kLoadGlobalNotInsideTypeof:
184 case FeedbackSlotKind::kLoadKeyed: 183 case FeedbackSlotKind::kLoadKeyed:
185 case FeedbackSlotKind::kStoreNamedSloppy: 184 case FeedbackSlotKind::kStoreNamedSloppy:
186 case FeedbackSlotKind::kStoreNamedStrict: 185 case FeedbackSlotKind::kStoreNamedStrict:
187 case FeedbackSlotKind::kStoreOwnNamed: 186 case FeedbackSlotKind::kStoreOwnNamed:
188 case FeedbackSlotKind::kStoreKeyedSloppy: 187 case FeedbackSlotKind::kStoreKeyedSloppy:
189 case FeedbackSlotKind::kStoreKeyedStrict: 188 case FeedbackSlotKind::kStoreKeyedStrict:
190 case FeedbackSlotKind::kStoreDataPropertyInLiteral: 189 case FeedbackSlotKind::kStoreDataPropertyInLiteral: {
191 case FeedbackSlotKind::kTypeProfile: {
192 if (obj->IsWeakCell() || obj->IsFixedArray() || obj->IsString()) { 190 if (obj->IsWeakCell() || obj->IsFixedArray() || obj->IsString()) {
193 with++; 191 with++;
194 } else if (obj == megamorphic_sentinel) { 192 } else if (obj == megamorphic_sentinel) {
195 gen++; 193 gen++;
196 if (code_is_interpreted) with++; 194 if (code_is_interpreted) with++;
197 } 195 }
198 total++; 196 total++;
199 break; 197 break;
200 } 198 }
201 case FeedbackSlotKind::kBinaryOp: 199 case FeedbackSlotKind::kBinaryOp:
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 #endif 304 #endif
307 int index = vector()->GetIndex(slot()) + 1; 305 int index = vector()->GetIndex(slot()) + 1;
308 vector()->set(index, feedback_extra, mode); 306 vector()->set(index, feedback_extra, mode);
309 } 307 }
310 308
311 Isolate* FeedbackNexus::GetIsolate() const { return vector()->GetIsolate(); } 309 Isolate* FeedbackNexus::GetIsolate() const { return vector()->GetIsolate(); }
312 } // namespace internal 310 } // namespace internal
313 } // namespace v8 311 } // namespace v8
314 312
315 #endif // V8_FEEDBACK_VECTOR_INL_H_ 313 #endif // V8_FEEDBACK_VECTOR_INL_H_
OLDNEW
« no previous file with comments | « src/feedback-vector.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698