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 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
747 return os << "NULL_OR_UNDEFINED"; | 747 return os << "NULL_OR_UNDEFINED"; |
748 case ConvertReceiverMode::kNotNullOrUndefined: | 748 case ConvertReceiverMode::kNotNullOrUndefined: |
749 return os << "NOT_NULL_OR_UNDEFINED"; | 749 return os << "NOT_NULL_OR_UNDEFINED"; |
750 case ConvertReceiverMode::kAny: | 750 case ConvertReceiverMode::kAny: |
751 return os << "ANY"; | 751 return os << "ANY"; |
752 } | 752 } |
753 UNREACHABLE(); | 753 UNREACHABLE(); |
754 return os; | 754 return os; |
755 } | 755 } |
756 | 756 |
| 757 // Defines whether tail call optimization is allowed. |
| 758 enum class TailCallMode : unsigned { kAllow, kDisallow }; |
| 759 |
| 760 inline size_t hash_value(TailCallMode mode) { return bit_cast<unsigned>(mode); } |
| 761 |
| 762 inline std::ostream& operator<<(std::ostream& os, TailCallMode mode) { |
| 763 switch (mode) { |
| 764 case TailCallMode::kAllow: |
| 765 return os << "ALLOW_TAIL_CALLS"; |
| 766 case TailCallMode::kDisallow: |
| 767 return os << "DISALLOW_TAIL_CALLS"; |
| 768 } |
| 769 UNREACHABLE(); |
| 770 return os; |
| 771 } |
757 | 772 |
758 // Used to specify if a macro instruction must perform a smi check on tagged | 773 // Used to specify if a macro instruction must perform a smi check on tagged |
759 // values. | 774 // values. |
760 enum SmiCheckType { | 775 enum SmiCheckType { |
761 DONT_DO_SMI_CHECK, | 776 DONT_DO_SMI_CHECK, |
762 DO_SMI_CHECK | 777 DO_SMI_CHECK |
763 }; | 778 }; |
764 | 779 |
765 | 780 |
766 enum ScopeType { | 781 enum ScopeType { |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1042 kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral); | 1057 kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral); |
1043 DCHECK(IsValidFunctionKind(kind)); | 1058 DCHECK(IsValidFunctionKind(kind)); |
1044 return kind; | 1059 return kind; |
1045 } | 1060 } |
1046 } // namespace internal | 1061 } // namespace internal |
1047 } // namespace v8 | 1062 } // namespace v8 |
1048 | 1063 |
1049 namespace i = v8::internal; | 1064 namespace i = v8::internal; |
1050 | 1065 |
1051 #endif // V8_GLOBALS_H_ | 1066 #endif // V8_GLOBALS_H_ |
OLD | NEW |