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 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
767 const uint32_t kHoleNanLower32 = 0xFFFF7FFF; | 767 const uint32_t kHoleNanLower32 = 0xFFFF7FFF; |
768 #else | 768 #else |
769 const uint32_t kHoleNanUpper32 = 0xFFF7FFFF; | 769 const uint32_t kHoleNanUpper32 = 0xFFF7FFFF; |
770 const uint32_t kHoleNanLower32 = 0xFFF7FFFF; | 770 const uint32_t kHoleNanLower32 = 0xFFF7FFFF; |
771 #endif | 771 #endif |
772 | 772 |
773 const uint64_t kHoleNanInt64 = | 773 const uint64_t kHoleNanInt64 = |
774 (static_cast<uint64_t>(kHoleNanUpper32) << 32) | kHoleNanLower32; | 774 (static_cast<uint64_t>(kHoleNanUpper32) << 32) | kHoleNanLower32; |
775 | 775 |
776 | 776 |
| 777 // ES6 section 20.1.2.6 Number.MAX_SAFE_INTEGER |
| 778 const double kMaxSafeInteger = 9007199254740991.0; // 2^53-1 |
| 779 |
| 780 |
777 // The order of this enum has to be kept in sync with the predicates below. | 781 // The order of this enum has to be kept in sync with the predicates below. |
778 enum VariableMode { | 782 enum VariableMode { |
779 // User declared variables: | 783 // User declared variables: |
780 VAR, // declared via 'var', and 'function' declarations | 784 VAR, // declared via 'var', and 'function' declarations |
781 | 785 |
782 CONST_LEGACY, // declared via legacy 'const' declarations | 786 CONST_LEGACY, // declared via legacy 'const' declarations |
783 | 787 |
784 LET, // declared via 'let' declarations (first lexical) | 788 LET, // declared via 'let' declarations (first lexical) |
785 | 789 |
786 CONST, // declared via 'const' declarations | 790 CONST, // declared via 'const' declarations |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1014 inline FunctionKind WithObjectLiteralBit(FunctionKind kind) { | 1018 inline FunctionKind WithObjectLiteralBit(FunctionKind kind) { |
1015 kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral); | 1019 kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral); |
1016 DCHECK(IsValidFunctionKind(kind)); | 1020 DCHECK(IsValidFunctionKind(kind)); |
1017 return kind; | 1021 return kind; |
1018 } | 1022 } |
1019 } } // namespace v8::internal | 1023 } } // namespace v8::internal |
1020 | 1024 |
1021 namespace i = v8::internal; | 1025 namespace i = v8::internal; |
1022 | 1026 |
1023 #endif // V8_GLOBALS_H_ | 1027 #endif // V8_GLOBALS_H_ |
OLD | NEW |