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 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1017 inline bool IsGeneratorFunction(FunctionKind kind) { | 1017 inline bool IsGeneratorFunction(FunctionKind kind) { |
1018 DCHECK(IsValidFunctionKind(kind)); | 1018 DCHECK(IsValidFunctionKind(kind)); |
1019 return kind & FunctionKind::kGeneratorFunction; | 1019 return kind & FunctionKind::kGeneratorFunction; |
1020 } | 1020 } |
1021 | 1021 |
1022 inline bool IsAsyncFunction(FunctionKind kind) { | 1022 inline bool IsAsyncFunction(FunctionKind kind) { |
1023 DCHECK(IsValidFunctionKind(kind)); | 1023 DCHECK(IsValidFunctionKind(kind)); |
1024 return kind & FunctionKind::kAsyncFunction; | 1024 return kind & FunctionKind::kAsyncFunction; |
1025 } | 1025 } |
1026 | 1026 |
1027 inline bool IsResumableFunction(FunctionKind kind) { | |
1028 return IsGeneratorFunction(kind) || IsAsyncFunction(kind); | |
Benedikt Meurer
2016/06/13 17:13:47
I'm really not sure this helper function adds to t
caitp (gmail)
2016/06/13 17:17:32
I generally agree, but it is sort of mixed messagi
| |
1029 } | |
1030 | |
1027 inline bool IsConciseMethod(FunctionKind kind) { | 1031 inline bool IsConciseMethod(FunctionKind kind) { |
1028 DCHECK(IsValidFunctionKind(kind)); | 1032 DCHECK(IsValidFunctionKind(kind)); |
1029 return kind & FunctionKind::kConciseMethod; | 1033 return kind & FunctionKind::kConciseMethod; |
1030 } | 1034 } |
1031 | 1035 |
1032 inline bool IsGetterFunction(FunctionKind kind) { | 1036 inline bool IsGetterFunction(FunctionKind kind) { |
1033 DCHECK(IsValidFunctionKind(kind)); | 1037 DCHECK(IsValidFunctionKind(kind)); |
1034 return kind & FunctionKind::kGetterFunction; | 1038 return kind & FunctionKind::kGetterFunction; |
1035 } | 1039 } |
1036 | 1040 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1085 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> | 1089 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> |
1086 kPointerSizeLog2); | 1090 kPointerSizeLog2); |
1087 } | 1091 } |
1088 | 1092 |
1089 } // namespace internal | 1093 } // namespace internal |
1090 } // namespace v8 | 1094 } // namespace v8 |
1091 | 1095 |
1092 namespace i = v8::internal; | 1096 namespace i = v8::internal; |
1093 | 1097 |
1094 #endif // V8_GLOBALS_H_ | 1098 #endif // V8_GLOBALS_H_ |
OLD | NEW |