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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 // (sorted alphabetically) | 265 // (sorted alphabetically) |
266 | 266 |
267 class FreeStoreAllocationPolicy; | 267 class FreeStoreAllocationPolicy; |
268 template <typename T, class P = FreeStoreAllocationPolicy> class List; | 268 template <typename T, class P = FreeStoreAllocationPolicy> class List; |
269 | 269 |
270 // ----------------------------------------------------------------------------- | 270 // ----------------------------------------------------------------------------- |
271 // Declarations for use in both the preparser and the rest of V8. | 271 // Declarations for use in both the preparser and the rest of V8. |
272 | 272 |
273 // The Strict Mode (ECMA-262 5th edition, 4.2.2). | 273 // The Strict Mode (ECMA-262 5th edition, 4.2.2). |
274 | 274 |
275 enum LanguageMode { SLOPPY, STRICT, LANGUAGE_END = 3 }; | 275 enum LanguageMode : uint32_t { SLOPPY, STRICT, LANGUAGE_END }; |
276 | |
277 | 276 |
278 inline std::ostream& operator<<(std::ostream& os, const LanguageMode& mode) { | 277 inline std::ostream& operator<<(std::ostream& os, const LanguageMode& mode) { |
279 switch (mode) { | 278 switch (mode) { |
280 case SLOPPY: return os << "sloppy"; | 279 case SLOPPY: return os << "sloppy"; |
281 case STRICT: return os << "strict"; | 280 case STRICT: return os << "strict"; |
282 default: UNREACHABLE(); | 281 default: UNREACHABLE(); |
283 } | 282 } |
284 return os; | 283 return os; |
285 } | 284 } |
286 | 285 |
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1156 public: | 1155 public: |
1157 enum { kNone = 0x00, kSignedSmall = 0x01, kNumber = 0x3, kAny = 0x7 }; | 1156 enum { kNone = 0x00, kSignedSmall = 0x01, kNumber = 0x3, kAny = 0x7 }; |
1158 }; | 1157 }; |
1159 | 1158 |
1160 } // namespace internal | 1159 } // namespace internal |
1161 } // namespace v8 | 1160 } // namespace v8 |
1162 | 1161 |
1163 namespace i = v8::internal; | 1162 namespace i = v8::internal; |
1164 | 1163 |
1165 #endif // V8_GLOBALS_H_ | 1164 #endif // V8_GLOBALS_H_ |
OLD | NEW |