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

Side by Side Diff: src/globals.h

Issue 2392533002: Reland of [interpreter] Add string type feedback to add (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 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 // All objects are at least pointer aligned, so we can remove the trailing 1206 // All objects are at least pointer aligned, so we can remove the trailing
1207 // zeros. 1207 // zeros.
1208 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> 1208 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >>
1209 kPointerSizeLog2); 1209 kPointerSizeLog2);
1210 } 1210 }
1211 1211
1212 // Type feedback is encoded in such a way that, we can combine the feedback 1212 // Type feedback is encoded in such a way that, we can combine the feedback
1213 // at different points by performing an 'OR' operation. Type feedback moves 1213 // at different points by performing an 'OR' operation. Type feedback moves
1214 // to a more generic type when we combine feedback. 1214 // to a more generic type when we combine feedback.
1215 // kSignedSmall -> kNumber -> kAny 1215 // kSignedSmall -> kNumber -> kAny
1216 // kString -> kAny
1216 class BinaryOperationFeedback { 1217 class BinaryOperationFeedback {
1217 public: 1218 public:
1218 enum { kNone = 0x00, kSignedSmall = 0x01, kNumber = 0x3, kAny = 0x7 }; 1219 enum {
1220 kNone = 0x0,
1221 kSignedSmall = 0x1,
1222 kNumber = 0x3,
1223 kString = 0x4,
rmcilroy 2016/10/04 08:05:32 This needs to keep the or-combining from kNumber->
Leszek Swirski 2016/10/04 08:30:40 Should it? or-combining kNumber and kString should
Leszek Swirski 2016/10/04 08:49:59 Never mind, Mythri explained f2f that number is a
1224 kAny = 0xF
1225 };
1219 }; 1226 };
1220 1227
1221 // TODO(epertoso): consider unifying this with BinaryOperationFeedback. 1228 // TODO(epertoso): consider unifying this with BinaryOperationFeedback.
1222 class CompareOperationFeedback { 1229 class CompareOperationFeedback {
1223 public: 1230 public:
1224 enum { kNone = 0x00, kSignedSmall = 0x01, kNumber = 0x3, kAny = 0x7 }; 1231 enum { kNone = 0x00, kSignedSmall = 0x01, kNumber = 0x3, kAny = 0x7 };
1225 }; 1232 };
1226 1233
1227 // Describes how exactly a frame has been dropped from stack. 1234 // Describes how exactly a frame has been dropped from stack.
1228 enum LiveEditFrameDropMode { 1235 enum LiveEditFrameDropMode {
1229 // No frame has been dropped. 1236 // No frame has been dropped.
1230 LIVE_EDIT_FRAMES_UNTOUCHED, 1237 LIVE_EDIT_FRAMES_UNTOUCHED,
1231 // The top JS frame had been calling debug break slot stub. Patch the 1238 // The top JS frame had been calling debug break slot stub. Patch the
1232 // address this stub jumps to in the end. 1239 // address this stub jumps to in the end.
1233 LIVE_EDIT_FRAME_DROPPED_IN_DEBUG_SLOT_CALL, 1240 LIVE_EDIT_FRAME_DROPPED_IN_DEBUG_SLOT_CALL,
1234 // The top JS frame had been calling some C++ function. The return address 1241 // The top JS frame had been calling some C++ function. The return address
1235 // gets patched automatically. 1242 // gets patched automatically.
1236 LIVE_EDIT_FRAME_DROPPED_IN_DIRECT_CALL, 1243 LIVE_EDIT_FRAME_DROPPED_IN_DIRECT_CALL,
1237 LIVE_EDIT_FRAME_DROPPED_IN_RETURN_CALL, 1244 LIVE_EDIT_FRAME_DROPPED_IN_RETURN_CALL,
1238 LIVE_EDIT_CURRENTLY_SET_MODE 1245 LIVE_EDIT_CURRENTLY_SET_MODE
1239 }; 1246 };
1240 1247
1241 } // namespace internal 1248 } // namespace internal
1242 } // namespace v8 1249 } // namespace v8
1243 1250
1244 namespace i = v8::internal; 1251 namespace i = v8::internal;
1245 1252
1246 #endif // V8_GLOBALS_H_ 1253 #endif // V8_GLOBALS_H_
OLDNEW
« src/code-stubs.cc ('K') | « src/code-stubs.cc ('k') | src/type-feedback-vector-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698