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 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1227 // The top JS frame had been calling debug break slot stub. Patch the | 1227 // The top JS frame had been calling debug break slot stub. Patch the |
1228 // address this stub jumps to in the end. | 1228 // address this stub jumps to in the end. |
1229 LIVE_EDIT_FRAME_DROPPED_IN_DEBUG_SLOT_CALL, | 1229 LIVE_EDIT_FRAME_DROPPED_IN_DEBUG_SLOT_CALL, |
1230 // The top JS frame had been calling some C++ function. The return address | 1230 // The top JS frame had been calling some C++ function. The return address |
1231 // gets patched automatically. | 1231 // gets patched automatically. |
1232 LIVE_EDIT_FRAME_DROPPED_IN_DIRECT_CALL, | 1232 LIVE_EDIT_FRAME_DROPPED_IN_DIRECT_CALL, |
1233 LIVE_EDIT_FRAME_DROPPED_IN_RETURN_CALL, | 1233 LIVE_EDIT_FRAME_DROPPED_IN_RETURN_CALL, |
1234 LIVE_EDIT_CURRENTLY_SET_MODE | 1234 LIVE_EDIT_CURRENTLY_SET_MODE |
1235 }; | 1235 }; |
1236 | 1236 |
| 1237 enum class UnicodeEncoding : uint8_t { |
| 1238 // Different unicode encodings in a |word32|: |
| 1239 UTF16, // hi 16bits -> trailing surrogate or 0, low 16bits -> lead surrogate |
| 1240 UTF32, // full UTF32 code unit / Unicode codepoint |
| 1241 }; |
| 1242 |
| 1243 inline size_t hash_value(UnicodeEncoding encoding) { |
| 1244 return static_cast<uint8_t>(encoding); |
| 1245 } |
| 1246 |
| 1247 inline std::ostream& operator<<(std::ostream& os, UnicodeEncoding encoding) { |
| 1248 switch (encoding) { |
| 1249 case UnicodeEncoding::UTF16: |
| 1250 return os << "UTF16"; |
| 1251 case UnicodeEncoding::UTF32: |
| 1252 return os << "UTF32"; |
| 1253 } |
| 1254 UNREACHABLE(); |
| 1255 return os; |
| 1256 } |
| 1257 |
1237 } // namespace internal | 1258 } // namespace internal |
1238 } // namespace v8 | 1259 } // namespace v8 |
1239 | 1260 |
1240 namespace i = v8::internal; | 1261 namespace i = v8::internal; |
1241 | 1262 |
1242 #endif // V8_GLOBALS_H_ | 1263 #endif // V8_GLOBALS_H_ |
OLD | NEW |