| 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 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 814 | 814 |
| 815 enum FunctionKind { | 815 enum FunctionKind { |
| 816 kNormalFunction = 0, | 816 kNormalFunction = 0, |
| 817 kArrowFunction = 1 << 0, | 817 kArrowFunction = 1 << 0, |
| 818 kGeneratorFunction = 1 << 1, | 818 kGeneratorFunction = 1 << 1, |
| 819 kConciseMethod = 1 << 2, | 819 kConciseMethod = 1 << 2, |
| 820 kConciseGeneratorMethod = kGeneratorFunction | kConciseMethod, | 820 kConciseGeneratorMethod = kGeneratorFunction | kConciseMethod, |
| 821 kAccessorFunction = 1 << 3, | 821 kAccessorFunction = 1 << 3, |
| 822 kDefaultConstructor = 1 << 4, | 822 kDefaultConstructor = 1 << 4, |
| 823 kSubclassConstructor = 1 << 5, | 823 kSubclassConstructor = 1 << 5, |
| 824 kBaseConstructor = 1 << 6, | 824 kBaseConstructor = 1 << 6 |
| 825 }; | 825 }; |
| 826 | 826 |
| 827 | 827 |
| 828 inline bool IsValidFunctionKind(FunctionKind kind) { | 828 inline bool IsValidFunctionKind(FunctionKind kind) { |
| 829 return kind == FunctionKind::kNormalFunction || | 829 return kind == FunctionKind::kNormalFunction || |
| 830 kind == FunctionKind::kArrowFunction || | 830 kind == FunctionKind::kArrowFunction || |
| 831 kind == FunctionKind::kGeneratorFunction || | 831 kind == FunctionKind::kGeneratorFunction || |
| 832 kind == FunctionKind::kConciseMethod || | 832 kind == FunctionKind::kConciseMethod || |
| 833 kind == FunctionKind::kConciseGeneratorMethod || | 833 kind == FunctionKind::kConciseGeneratorMethod || |
| 834 kind == FunctionKind::kAccessorFunction || | 834 kind == FunctionKind::kAccessorFunction || |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 884 DCHECK(IsValidFunctionKind(kind)); | 884 DCHECK(IsValidFunctionKind(kind)); |
| 885 return kind & | 885 return kind & |
| 886 (FunctionKind::kBaseConstructor | FunctionKind::kSubclassConstructor | | 886 (FunctionKind::kBaseConstructor | FunctionKind::kSubclassConstructor | |
| 887 FunctionKind::kDefaultConstructor); | 887 FunctionKind::kDefaultConstructor); |
| 888 } | 888 } |
| 889 } } // namespace v8::internal | 889 } } // namespace v8::internal |
| 890 | 890 |
| 891 namespace i = v8::internal; | 891 namespace i = v8::internal; |
| 892 | 892 |
| 893 #endif // V8_GLOBALS_H_ | 893 #endif // V8_GLOBALS_H_ |
| OLD | NEW |