| 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 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 650 FUNCTION_SCOPE, // The top-level scope for a function. | 650 FUNCTION_SCOPE, // The top-level scope for a function. |
| 651 MODULE_SCOPE, // The scope introduced by a module literal | 651 MODULE_SCOPE, // The scope introduced by a module literal |
| 652 SCRIPT_SCOPE, // The top-level scope for a script or a top-level eval. | 652 SCRIPT_SCOPE, // The top-level scope for a script or a top-level eval. |
| 653 CATCH_SCOPE, // The scope introduced by catch. | 653 CATCH_SCOPE, // The scope introduced by catch. |
| 654 BLOCK_SCOPE, // The scope introduced by a new block. | 654 BLOCK_SCOPE, // The scope introduced by a new block. |
| 655 WITH_SCOPE, // The scope introduced by with. | 655 WITH_SCOPE, // The scope introduced by with. |
| 656 ARROW_SCOPE // The top-level scope for an arrow function literal. | 656 ARROW_SCOPE // The top-level scope for an arrow function literal. |
| 657 }; | 657 }; |
| 658 | 658 |
| 659 | 659 |
| 660 const uint32_t kHoleNanUpper32 = 0x7FFFFFFF; | 660 const uint32_t kHoleNanUpper32 = 0xFFF7FFFF; |
| 661 const uint32_t kHoleNanLower32 = 0xFFFFFFFF; | 661 const uint32_t kHoleNanLower32 = 0xFFF7FFFF; |
| 662 const uint32_t kNaNOrInfinityLowerBoundUpper32 = 0x7FF00000; | |
| 663 | 662 |
| 664 const uint64_t kHoleNanInt64 = | 663 const uint64_t kHoleNanInt64 = |
| 665 (static_cast<uint64_t>(kHoleNanUpper32) << 32) | kHoleNanLower32; | 664 (static_cast<uint64_t>(kHoleNanUpper32) << 32) | kHoleNanLower32; |
| 666 const uint64_t kLastNonNaNInt64 = | |
| 667 (static_cast<uint64_t>(kNaNOrInfinityLowerBoundUpper32) << 32); | |
| 668 | 665 |
| 669 | 666 |
| 670 // The order of this enum has to be kept in sync with the predicates below. | 667 // The order of this enum has to be kept in sync with the predicates below. |
| 671 enum VariableMode { | 668 enum VariableMode { |
| 672 // User declared variables: | 669 // User declared variables: |
| 673 VAR, // declared via 'var', and 'function' declarations | 670 VAR, // declared via 'var', and 'function' declarations |
| 674 | 671 |
| 675 CONST_LEGACY, // declared via legacy 'const' declarations | 672 CONST_LEGACY, // declared via legacy 'const' declarations |
| 676 | 673 |
| 677 LET, // declared via 'let' declarations (first lexical) | 674 LET, // declared via 'let' declarations (first lexical) |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 DCHECK(IsValidFunctionKind(kind)); | 815 DCHECK(IsValidFunctionKind(kind)); |
| 819 return kind & FunctionKind::kDefaultConstructor; | 816 return kind & FunctionKind::kDefaultConstructor; |
| 820 } | 817 } |
| 821 | 818 |
| 822 | 819 |
| 823 } } // namespace v8::internal | 820 } } // namespace v8::internal |
| 824 | 821 |
| 825 namespace i = v8::internal; | 822 namespace i = v8::internal; |
| 826 | 823 |
| 827 #endif // V8_GLOBALS_H_ | 824 #endif // V8_GLOBALS_H_ |
| OLD | NEW |