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

Side by Side Diff: src/globals.h

Issue 2406843002: [Interpreter] Collect feedback about Oddballs in Subtract Stub. (Closed)
Patch Set: Created 4 years, 2 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_GLOBALS_H_ 5 #ifndef V8_GLOBALS_H_
6 #define V8_GLOBALS_H_ 6 #define V8_GLOBALS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 inline uint32_t ObjectHash(Address address) { 1201 inline uint32_t ObjectHash(Address address) {
1202 // All objects are at least pointer aligned, so we can remove the trailing 1202 // All objects are at least pointer aligned, so we can remove the trailing
1203 // zeros. 1203 // zeros.
1204 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> 1204 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >>
1205 kPointerSizeLog2); 1205 kPointerSizeLog2);
1206 } 1206 }
1207 1207
1208 // Type feedback is encoded in such a way that, we can combine the feedback 1208 // Type feedback is encoded in such a way that, we can combine the feedback
1209 // at different points by performing an 'OR' operation. Type feedback moves 1209 // at different points by performing an 'OR' operation. Type feedback moves
1210 // to a more generic type when we combine feedback. 1210 // to a more generic type when we combine feedback.
1211 // kSignedSmall -> kNumber -> kAny 1211 // kSignedSmall -> kNumber -> kNumberOrOddball -> kAny
1212 // kString -> kAny 1212 // kString -> kAny
1213 // TODO(mythria): Remove kNumber type when crankshaft can handle Oddballs
1214 // similar to Numbers. We don't need kNumber feedback for Turbofan. Extra
1215 // information about Number might reduce few instructions but causes more
1216 // deopts. We collect Number only because crankshaft does not handle all
1217 // cases of oddballs.
1213 class BinaryOperationFeedback { 1218 class BinaryOperationFeedback {
1214 public: 1219 public:
1215 enum { 1220 enum {
1216 kNone = 0x0, 1221 kNone = 0x0,
1217 kSignedSmall = 0x1, 1222 kSignedSmall = 0x1,
1218 kNumber = 0x3, 1223 kNumber = 0x3,
1219 kString = 0x4, 1224 kNumberOrOddball = 0x7,
1225 kString = 0x8,
1220 kAny = 0xF 1226 kAny = 0xF
Leszek Swirski 2016/10/10 11:57:22 Should kAny change to 0x1F, so that it has a value
mythria 2016/10/10 13:26:00 Good point. Done.
1221 }; 1227 };
1222 }; 1228 };
1223 1229
1224 // TODO(epertoso): consider unifying this with BinaryOperationFeedback. 1230 // TODO(epertoso): consider unifying this with BinaryOperationFeedback.
1225 class CompareOperationFeedback { 1231 class CompareOperationFeedback {
1226 public: 1232 public:
1227 enum { kNone = 0x00, kSignedSmall = 0x01, kNumber = 0x3, kAny = 0x7 }; 1233 enum { kNone = 0x00, kSignedSmall = 0x01, kNumber = 0x3, kAny = 0x7 };
1228 }; 1234 };
1229 1235
1230 // Describes how exactly a frame has been dropped from stack. 1236 // Describes how exactly a frame has been dropped from stack.
(...skipping 30 matching lines...) Expand all
1261 UNREACHABLE(); 1267 UNREACHABLE();
1262 return os; 1268 return os;
1263 } 1269 }
1264 1270
1265 } // namespace internal 1271 } // namespace internal
1266 } // namespace v8 1272 } // namespace v8
1267 1273
1268 namespace i = v8::internal; 1274 namespace i = v8::internal;
1269 1275
1270 #endif // V8_GLOBALS_H_ 1276 #endif // V8_GLOBALS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698