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 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
808 // implemented according to ES6, section 7.1.1. | 808 // implemented according to ES6, section 7.1.1. |
809 enum class ToPrimitiveHint { kDefault, kNumber, kString }; | 809 enum class ToPrimitiveHint { kDefault, kNumber, kString }; |
810 | 810 |
811 // Defines specifics about arguments object or rest parameter creation. | 811 // Defines specifics about arguments object or rest parameter creation. |
812 enum class CreateArgumentsType : uint8_t { | 812 enum class CreateArgumentsType : uint8_t { |
813 kMappedArguments, | 813 kMappedArguments, |
814 kUnmappedArguments, | 814 kUnmappedArguments, |
815 kRestParameter | 815 kRestParameter |
816 }; | 816 }; |
817 | 817 |
818 enum class HandleDereferenceMode { | |
819 kHandleDereferenceAllowed, | |
adamk
2016/08/05 18:38:10
These can just be kAllowed and kDisallowed, since
marja
2016/08/08 08:20:13
+1
rmcilroy
2016/08/08 13:05:56
Good point! :). Done.
| |
820 kHandleDereferenceDisallowed | |
821 }; | |
822 | |
818 inline size_t hash_value(CreateArgumentsType type) { | 823 inline size_t hash_value(CreateArgumentsType type) { |
819 return bit_cast<uint8_t>(type); | 824 return bit_cast<uint8_t>(type); |
820 } | 825 } |
821 | 826 |
822 inline std::ostream& operator<<(std::ostream& os, CreateArgumentsType type) { | 827 inline std::ostream& operator<<(std::ostream& os, CreateArgumentsType type) { |
823 switch (type) { | 828 switch (type) { |
824 case CreateArgumentsType::kMappedArguments: | 829 case CreateArgumentsType::kMappedArguments: |
825 return os << "MAPPED_ARGUMENTS"; | 830 return os << "MAPPED_ARGUMENTS"; |
826 case CreateArgumentsType::kUnmappedArguments: | 831 case CreateArgumentsType::kUnmappedArguments: |
827 return os << "UNMAPPED_ARGUMENTS"; | 832 return os << "UNMAPPED_ARGUMENTS"; |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1148 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> | 1153 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> |
1149 kPointerSizeLog2); | 1154 kPointerSizeLog2); |
1150 } | 1155 } |
1151 | 1156 |
1152 } // namespace internal | 1157 } // namespace internal |
1153 } // namespace v8 | 1158 } // namespace v8 |
1154 | 1159 |
1155 namespace i = v8::internal; | 1160 namespace i = v8::internal; |
1156 | 1161 |
1157 #endif // V8_GLOBALS_H_ | 1162 #endif // V8_GLOBALS_H_ |
OLD | NEW |