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 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1234 // 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 |
1235 // address this stub jumps to in the end. | 1235 // address this stub jumps to in the end. |
1236 LIVE_EDIT_FRAME_DROPPED_IN_DEBUG_SLOT_CALL, | 1236 LIVE_EDIT_FRAME_DROPPED_IN_DEBUG_SLOT_CALL, |
1237 // 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 |
1238 // gets patched automatically. | 1238 // gets patched automatically. |
1239 LIVE_EDIT_FRAME_DROPPED_IN_DIRECT_CALL, | 1239 LIVE_EDIT_FRAME_DROPPED_IN_DIRECT_CALL, |
1240 LIVE_EDIT_FRAME_DROPPED_IN_RETURN_CALL, | 1240 LIVE_EDIT_FRAME_DROPPED_IN_RETURN_CALL, |
1241 LIVE_EDIT_CURRENTLY_SET_MODE | 1241 LIVE_EDIT_CURRENTLY_SET_MODE |
1242 }; | 1242 }; |
1243 | 1243 |
1244 enum class UnicodeEncoding : uint8_t { | |
1245 // Different unicode encodings in a |word32|: | |
1246 UTF16, // hi 16bits -> trailing surrogate or 0, low 16bits -> lead surrogate | |
1247 UTF32, // full UTF32 code unit / Unicode codepoint | |
1248 }; | |
1249 | |
1250 inline size_t hash_value(UnicodeEncoding encoding) { | |
1251 return static_cast<uint8_t>(encoding); | |
1252 } | |
1253 | |
1254 inline std::ostream& operator<<(std::ostream& os, UnicodeEncoding encoding) { | |
1255 switch (encoding) { | |
1256 case UnicodeEncoding::UTF16: | |
1257 return os << "UTF16"; | |
1258 case UnicodeEncoding::UTF32: | |
1259 return os << "UTF32"; | |
1260 } | |
1261 UNREACHABLE(); | |
1262 return os; | |
1263 } | |
1264 | |
1265 } // namespace internal | 1244 } // namespace internal |
1266 } // namespace v8 | 1245 } // namespace v8 |
1267 | 1246 |
1268 namespace i = v8::internal; | 1247 namespace i = v8::internal; |
1269 | 1248 |
1270 #endif // V8_GLOBALS_H_ | 1249 #endif // V8_GLOBALS_H_ |
OLD | NEW |