| OLD | NEW |
| 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 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1141 return os; | 1141 return os; |
| 1142 } | 1142 } |
| 1143 | 1143 |
| 1144 inline uint32_t ObjectHash(Address address) { | 1144 inline uint32_t ObjectHash(Address address) { |
| 1145 // All objects are at least pointer aligned, so we can remove the trailing | 1145 // All objects are at least pointer aligned, so we can remove the trailing |
| 1146 // zeros. | 1146 // zeros. |
| 1147 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> | 1147 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> |
| 1148 kPointerSizeLog2); | 1148 kPointerSizeLog2); |
| 1149 } | 1149 } |
| 1150 | 1150 |
| 1151 // Type feedbac is encoded in such a way that, we can combine the feedback | 1151 // Type feedback is encoded in such a way that, we can combine the feedback |
| 1152 // at different points by performing an 'OR' operation. Type feedback moves | 1152 // at different points by performing an 'OR' operation. Type feedback moves |
| 1153 // to a more generic type when we combine feedback. | 1153 // to a more generic type when we combine feedback. |
| 1154 // kSignedSmall -> kNumber -> kAny | 1154 // kSignedSmall -> kNumber -> kAny |
| 1155 class BinaryOperationFeedback { | 1155 class BinaryOperationFeedback { |
| 1156 public: | 1156 public: |
| 1157 enum { kNone = 0x00, kSignedSmall = 0x01, kNumber = 0x3, kAny = 0x7 }; | 1157 enum { kNone = 0x00, kSignedSmall = 0x01, kNumber = 0x3, kAny = 0x7 }; |
| 1158 }; | 1158 }; |
| 1159 | 1159 |
| 1160 } // namespace internal | 1160 } // namespace internal |
| 1161 } // namespace v8 | 1161 } // namespace v8 |
| 1162 | 1162 |
| 1163 namespace i = v8::internal; | 1163 namespace i = v8::internal; |
| 1164 | 1164 |
| 1165 #endif // V8_GLOBALS_H_ | 1165 #endif // V8_GLOBALS_H_ |
| OLD | NEW |