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 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 switch (mode) { | 763 switch (mode) { |
764 case TailCallMode::kAllow: | 764 case TailCallMode::kAllow: |
765 return os << "ALLOW_TAIL_CALLS"; | 765 return os << "ALLOW_TAIL_CALLS"; |
766 case TailCallMode::kDisallow: | 766 case TailCallMode::kDisallow: |
767 return os << "DISALLOW_TAIL_CALLS"; | 767 return os << "DISALLOW_TAIL_CALLS"; |
768 } | 768 } |
769 UNREACHABLE(); | 769 UNREACHABLE(); |
770 return os; | 770 return os; |
771 } | 771 } |
772 | 772 |
| 773 // Defines specifics about arguments object or rest parameter creation. |
| 774 enum class CreateArgumentsType : uint8_t { |
| 775 kMappedArguments, |
| 776 kUnmappedArguments, |
| 777 kRestParameter |
| 778 }; |
| 779 |
| 780 inline size_t hash_value(CreateArgumentsType type) { |
| 781 return bit_cast<uint8_t>(type); |
| 782 } |
| 783 |
| 784 inline std::ostream& operator<<(std::ostream& os, CreateArgumentsType type) { |
| 785 switch (type) { |
| 786 case CreateArgumentsType::kMappedArguments: |
| 787 return os << "MAPPED_ARGUMENTS"; |
| 788 case CreateArgumentsType::kUnmappedArguments: |
| 789 return os << "UNMAPPED_ARGUMENTS"; |
| 790 case CreateArgumentsType::kRestParameter: |
| 791 return os << "REST_PARAMETER"; |
| 792 } |
| 793 UNREACHABLE(); |
| 794 return os; |
| 795 } |
| 796 |
773 // Used to specify if a macro instruction must perform a smi check on tagged | 797 // Used to specify if a macro instruction must perform a smi check on tagged |
774 // values. | 798 // values. |
775 enum SmiCheckType { | 799 enum SmiCheckType { |
776 DONT_DO_SMI_CHECK, | 800 DONT_DO_SMI_CHECK, |
777 DO_SMI_CHECK | 801 DO_SMI_CHECK |
778 }; | 802 }; |
779 | 803 |
780 | 804 |
781 enum ScopeType { | 805 enum ScopeType { |
782 EVAL_SCOPE, // The top-level scope for an eval source. | 806 EVAL_SCOPE, // The top-level scope for an eval source. |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1065 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> | 1089 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> |
1066 kPointerSizeLog2); | 1090 kPointerSizeLog2); |
1067 } | 1091 } |
1068 | 1092 |
1069 } // namespace internal | 1093 } // namespace internal |
1070 } // namespace v8 | 1094 } // namespace v8 |
1071 | 1095 |
1072 namespace i = v8::internal; | 1096 namespace i = v8::internal; |
1073 | 1097 |
1074 #endif // V8_GLOBALS_H_ | 1098 #endif // V8_GLOBALS_H_ |
OLD | NEW |