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 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
809 // implemented according to ES6, section 7.1.1. | 809 // implemented according to ES6, section 7.1.1. |
810 enum class ToPrimitiveHint { kDefault, kNumber, kString }; | 810 enum class ToPrimitiveHint { kDefault, kNumber, kString }; |
811 | 811 |
812 // Defines specifics about arguments object or rest parameter creation. | 812 // Defines specifics about arguments object or rest parameter creation. |
813 enum class CreateArgumentsType : uint8_t { | 813 enum class CreateArgumentsType : uint8_t { |
814 kMappedArguments, | 814 kMappedArguments, |
815 kUnmappedArguments, | 815 kUnmappedArguments, |
816 kRestParameter | 816 kRestParameter |
817 }; | 817 }; |
818 | 818 |
| 819 enum class HandleDereferenceMode { kAllowed, kDisallowed }; |
| 820 |
819 inline size_t hash_value(CreateArgumentsType type) { | 821 inline size_t hash_value(CreateArgumentsType type) { |
820 return bit_cast<uint8_t>(type); | 822 return bit_cast<uint8_t>(type); |
821 } | 823 } |
822 | 824 |
823 inline std::ostream& operator<<(std::ostream& os, CreateArgumentsType type) { | 825 inline std::ostream& operator<<(std::ostream& os, CreateArgumentsType type) { |
824 switch (type) { | 826 switch (type) { |
825 case CreateArgumentsType::kMappedArguments: | 827 case CreateArgumentsType::kMappedArguments: |
826 return os << "MAPPED_ARGUMENTS"; | 828 return os << "MAPPED_ARGUMENTS"; |
827 case CreateArgumentsType::kUnmappedArguments: | 829 case CreateArgumentsType::kUnmappedArguments: |
828 return os << "UNMAPPED_ARGUMENTS"; | 830 return os << "UNMAPPED_ARGUMENTS"; |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1147 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> | 1149 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> |
1148 kPointerSizeLog2); | 1150 kPointerSizeLog2); |
1149 } | 1151 } |
1150 | 1152 |
1151 } // namespace internal | 1153 } // namespace internal |
1152 } // namespace v8 | 1154 } // namespace v8 |
1153 | 1155 |
1154 namespace i = v8::internal; | 1156 namespace i = v8::internal; |
1155 | 1157 |
1156 #endif // V8_GLOBALS_H_ | 1158 #endif // V8_GLOBALS_H_ |
OLD | NEW |