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

Side by Side Diff: src/globals.h

Issue 2392533002: Reland of [interpreter] Add string type feedback to add (Closed)
Patch Set: Use the fancy new IsStringInstanceType method 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
« no previous file with comments | « src/code-stubs.cc ('k') | src/type-feedback-vector-inl.h » ('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_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 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 -> kAny
1212 // kString -> kAny
1212 class BinaryOperationFeedback { 1213 class BinaryOperationFeedback {
1213 public: 1214 public:
1214 enum { kNone = 0x00, kSignedSmall = 0x01, kNumber = 0x3, kAny = 0x7 }; 1215 enum {
1216 kNone = 0x0,
1217 kSignedSmall = 0x1,
1218 kNumber = 0x3,
1219 kString = 0x4,
1220 kAny = 0xF
1221 };
1215 }; 1222 };
1216 1223
1217 // TODO(epertoso): consider unifying this with BinaryOperationFeedback. 1224 // TODO(epertoso): consider unifying this with BinaryOperationFeedback.
1218 class CompareOperationFeedback { 1225 class CompareOperationFeedback {
1219 public: 1226 public:
1220 enum { kNone = 0x00, kSignedSmall = 0x01, kNumber = 0x3, kAny = 0x7 }; 1227 enum { kNone = 0x00, kSignedSmall = 0x01, kNumber = 0x3, kAny = 0x7 };
1221 }; 1228 };
1222 1229
1223 // Describes how exactly a frame has been dropped from stack. 1230 // Describes how exactly a frame has been dropped from stack.
1224 enum LiveEditFrameDropMode { 1231 enum LiveEditFrameDropMode {
1225 // No frame has been dropped. 1232 // No frame has been dropped.
1226 LIVE_EDIT_FRAMES_UNTOUCHED, 1233 LIVE_EDIT_FRAMES_UNTOUCHED,
1227 // The top JS frame had been calling debug break slot stub. Patch the 1234 // The top JS frame had been calling debug break slot stub. Patch the
1228 // address this stub jumps to in the end. 1235 // address this stub jumps to in the end.
1229 LIVE_EDIT_FRAME_DROPPED_IN_DEBUG_SLOT_CALL, 1236 LIVE_EDIT_FRAME_DROPPED_IN_DEBUG_SLOT_CALL,
1230 // The top JS frame had been calling some C++ function. The return address 1237 // The top JS frame had been calling some C++ function. The return address
1231 // gets patched automatically. 1238 // gets patched automatically.
1232 LIVE_EDIT_FRAME_DROPPED_IN_DIRECT_CALL, 1239 LIVE_EDIT_FRAME_DROPPED_IN_DIRECT_CALL,
1233 LIVE_EDIT_FRAME_DROPPED_IN_RETURN_CALL, 1240 LIVE_EDIT_FRAME_DROPPED_IN_RETURN_CALL,
1234 LIVE_EDIT_CURRENTLY_SET_MODE 1241 LIVE_EDIT_CURRENTLY_SET_MODE
1235 }; 1242 };
1236 1243
1237 } // namespace internal 1244 } // namespace internal
1238 } // namespace v8 1245 } // namespace v8
1239 1246
1240 namespace i = v8::internal; 1247 namespace i = v8::internal;
1241 1248
1242 #endif // V8_GLOBALS_H_ 1249 #endif // V8_GLOBALS_H_
OLDNEW
« no previous file with comments | « 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