| 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 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 757 |
| 758 // Defines whether tail call optimization is allowed. |
| 759 enum class TailCallMode : unsigned { kAllow, kDisallow }; |
| 760 |
| 761 inline size_t hash_value(TailCallMode mode) { return bit_cast<unsigned>(mode); } |
| 762 |
| 763 inline std::ostream& operator<<(std::ostream& os, TailCallMode mode) { |
| 764 switch (mode) { |
| 765 case TailCallMode::kAllow: |
| 766 return os << "ALLOW_TAIL_CALLS"; |
| 767 case TailCallMode::kDisallow: |
| 768 return os << "DISALLOW_TAIL_CALLS"; |
| 769 } |
| 770 UNREACHABLE(); |
| 771 return os; |
| 772 } |
| 773 |
| 774 |
| 758 // Used to specify if a macro instruction must perform a smi check on tagged | 775 // Used to specify if a macro instruction must perform a smi check on tagged |
| 759 // values. | 776 // values. |
| 760 enum SmiCheckType { | 777 enum SmiCheckType { |
| 761 DONT_DO_SMI_CHECK, | 778 DONT_DO_SMI_CHECK, |
| 762 DO_SMI_CHECK | 779 DO_SMI_CHECK |
| 763 }; | 780 }; |
| 764 | 781 |
| 765 | 782 |
| 766 enum ScopeType { | 783 enum ScopeType { |
| 767 EVAL_SCOPE, // The top-level scope for an eval source. | 784 EVAL_SCOPE, // The top-level scope for an eval source. |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1042 kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral); | 1059 kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral); |
| 1043 DCHECK(IsValidFunctionKind(kind)); | 1060 DCHECK(IsValidFunctionKind(kind)); |
| 1044 return kind; | 1061 return kind; |
| 1045 } | 1062 } |
| 1046 } // namespace internal | 1063 } // namespace internal |
| 1047 } // namespace v8 | 1064 } // namespace v8 |
| 1048 | 1065 |
| 1049 namespace i = v8::internal; | 1066 namespace i = v8::internal; |
| 1050 | 1067 |
| 1051 #endif // V8_GLOBALS_H_ | 1068 #endif // V8_GLOBALS_H_ |
| OLD | NEW |