Lines Matching refs:FunctionKind
14 enum class FunctionKind : uint8_t { enum
69 STATIC_ASSERT(static_cast<int>(FunctionKind::kLastFunctionKind) <
72 inline bool IsArrowFunction(FunctionKind kind) { in IsArrowFunction()
73 return base::IsInRange(kind, FunctionKind::kArrowFunction, in IsArrowFunction()
74 FunctionKind::kAsyncArrowFunction); in IsArrowFunction()
77 inline bool IsModule(FunctionKind kind) { in IsModule()
78 return base::IsInRange(kind, FunctionKind::kModule, in IsModule()
79 FunctionKind::kAsyncModule); in IsModule()
82 inline bool IsAsyncModule(FunctionKind kind) { in IsAsyncModule()
83 return kind == FunctionKind::kAsyncModule; in IsAsyncModule()
86 inline bool IsAsyncGeneratorFunction(FunctionKind kind) { in IsAsyncGeneratorFunction()
87 return base::IsInRange(kind, FunctionKind::kAsyncConciseGeneratorMethod, in IsAsyncGeneratorFunction()
88 FunctionKind::kAsyncGeneratorFunction); in IsAsyncGeneratorFunction()
91 inline bool IsGeneratorFunction(FunctionKind kind) { in IsGeneratorFunction()
92 return base::IsInRange(kind, FunctionKind::kAsyncConciseGeneratorMethod, in IsGeneratorFunction()
93 FunctionKind::kStaticConciseGeneratorMethod); in IsGeneratorFunction()
96 inline bool IsAsyncFunction(FunctionKind kind) { in IsAsyncFunction()
97 return base::IsInRange(kind, FunctionKind::kAsyncArrowFunction, in IsAsyncFunction()
98 FunctionKind::kAsyncGeneratorFunction); in IsAsyncFunction()
101 inline bool IsResumableFunction(FunctionKind kind) { in IsResumableFunction()
105 inline bool IsConciseMethod(FunctionKind kind) { in IsConciseMethod()
106 return base::IsInRange(kind, FunctionKind::kAsyncConciseMethod, in IsConciseMethod()
107 FunctionKind::kStaticAsyncConciseGeneratorMethod) || in IsConciseMethod()
108 base::IsInRange(kind, FunctionKind::kConciseGeneratorMethod, in IsConciseMethod()
109 FunctionKind::kClassStaticInitializerFunction); in IsConciseMethod()
112 inline bool IsStrictFunctionWithoutPrototype(FunctionKind kind) { in IsStrictFunctionWithoutPrototype()
113 return base::IsInRange(kind, FunctionKind::kGetterFunction, in IsStrictFunctionWithoutPrototype()
114 FunctionKind::kAsyncArrowFunction) || in IsStrictFunctionWithoutPrototype()
115 base::IsInRange(kind, FunctionKind::kAsyncConciseMethod, in IsStrictFunctionWithoutPrototype()
116 FunctionKind::kStaticAsyncConciseGeneratorMethod) || in IsStrictFunctionWithoutPrototype()
117 base::IsInRange(kind, FunctionKind::kConciseGeneratorMethod, in IsStrictFunctionWithoutPrototype()
118 FunctionKind::kClassStaticInitializerFunction); in IsStrictFunctionWithoutPrototype()
121 inline bool IsGetterFunction(FunctionKind kind) { in IsGetterFunction()
122 return base::IsInRange(kind, FunctionKind::kGetterFunction, in IsGetterFunction()
123 FunctionKind::kStaticGetterFunction); in IsGetterFunction()
126 inline bool IsSetterFunction(FunctionKind kind) { in IsSetterFunction()
127 return base::IsInRange(kind, FunctionKind::kSetterFunction, in IsSetterFunction()
128 FunctionKind::kStaticSetterFunction); in IsSetterFunction()
131 inline bool IsAccessorFunction(FunctionKind kind) { in IsAccessorFunction()
132 return base::IsInRange(kind, FunctionKind::kGetterFunction, in IsAccessorFunction()
133 FunctionKind::kStaticSetterFunction); in IsAccessorFunction()
136 inline bool IsDefaultConstructor(FunctionKind kind) { in IsDefaultConstructor()
137 return base::IsInRange(kind, FunctionKind::kDefaultBaseConstructor, in IsDefaultConstructor()
138 FunctionKind::kDefaultDerivedConstructor); in IsDefaultConstructor()
141 inline bool IsBaseConstructor(FunctionKind kind) { in IsBaseConstructor()
142 return base::IsInRange(kind, FunctionKind::kBaseConstructor, in IsBaseConstructor()
143 FunctionKind::kDefaultBaseConstructor); in IsBaseConstructor()
146 inline bool IsDerivedConstructor(FunctionKind kind) { in IsDerivedConstructor()
147 return base::IsInRange(kind, FunctionKind::kDefaultDerivedConstructor, in IsDerivedConstructor()
148 FunctionKind::kDerivedConstructor); in IsDerivedConstructor()
151 inline bool IsClassConstructor(FunctionKind kind) { in IsClassConstructor()
152 return base::IsInRange(kind, FunctionKind::kBaseConstructor, in IsClassConstructor()
153 FunctionKind::kDerivedConstructor); in IsClassConstructor()
156 inline bool IsClassMembersInitializerFunction(FunctionKind kind) { in IsClassMembersInitializerFunction()
157 return base::IsInRange(kind, FunctionKind::kClassMembersInitializerFunction, in IsClassMembersInitializerFunction()
158 FunctionKind::kClassStaticInitializerFunction); in IsClassMembersInitializerFunction()
161 inline bool IsConstructable(FunctionKind kind) { in IsConstructable()
162 return base::IsInRange(kind, FunctionKind::kNormalFunction, in IsConstructable()
163 FunctionKind::kDerivedConstructor); in IsConstructable()
166 inline bool IsStatic(FunctionKind kind) { in IsStatic()
168 case FunctionKind::kStaticGetterFunction: in IsStatic()
169 case FunctionKind::kStaticSetterFunction: in IsStatic()
170 case FunctionKind::kStaticConciseMethod: in IsStatic()
171 case FunctionKind::kStaticConciseGeneratorMethod: in IsStatic()
172 case FunctionKind::kStaticAsyncConciseMethod: in IsStatic()
173 case FunctionKind::kStaticAsyncConciseGeneratorMethod: in IsStatic()
174 case FunctionKind::kClassStaticInitializerFunction: in IsStatic()
181 inline bool BindsSuper(FunctionKind kind) { in BindsSuper()
186 inline bool IsAwaitAsIdentifierDisallowed(FunctionKind kind) { in IsAwaitAsIdentifierDisallowed()
191 kind == FunctionKind::kClassStaticInitializerFunction; in IsAwaitAsIdentifierDisallowed()
194 inline const char* FunctionKind2String(FunctionKind kind) { in FunctionKind2String()
196 case FunctionKind::kNormalFunction: in FunctionKind2String()
198 case FunctionKind::kArrowFunction: in FunctionKind2String()
200 case FunctionKind::kGeneratorFunction: in FunctionKind2String()
202 case FunctionKind::kConciseMethod: in FunctionKind2String()
204 case FunctionKind::kStaticConciseMethod: in FunctionKind2String()
206 case FunctionKind::kDerivedConstructor: in FunctionKind2String()
208 case FunctionKind::kBaseConstructor: in FunctionKind2String()
210 case FunctionKind::kGetterFunction: in FunctionKind2String()
212 case FunctionKind::kStaticGetterFunction: in FunctionKind2String()
214 case FunctionKind::kSetterFunction: in FunctionKind2String()
216 case FunctionKind::kStaticSetterFunction: in FunctionKind2String()
218 case FunctionKind::kAsyncFunction: in FunctionKind2String()
220 case FunctionKind::kModule: in FunctionKind2String()
222 case FunctionKind::kAsyncModule: in FunctionKind2String()
224 case FunctionKind::kClassMembersInitializerFunction: in FunctionKind2String()
226 case FunctionKind::kClassStaticInitializerFunction: in FunctionKind2String()
228 case FunctionKind::kDefaultBaseConstructor: in FunctionKind2String()
230 case FunctionKind::kDefaultDerivedConstructor: in FunctionKind2String()
232 case FunctionKind::kAsyncArrowFunction: in FunctionKind2String()
234 case FunctionKind::kAsyncConciseMethod: in FunctionKind2String()
236 case FunctionKind::kStaticAsyncConciseMethod: in FunctionKind2String()
238 case FunctionKind::kConciseGeneratorMethod: in FunctionKind2String()
240 case FunctionKind::kStaticConciseGeneratorMethod: in FunctionKind2String()
242 case FunctionKind::kAsyncConciseGeneratorMethod: in FunctionKind2String()
244 case FunctionKind::kStaticAsyncConciseGeneratorMethod: in FunctionKind2String()
246 case FunctionKind::kAsyncGeneratorFunction: in FunctionKind2String()
248 case FunctionKind::kInvalid: in FunctionKind2String()
254 inline std::ostream& operator<<(std::ostream& os, FunctionKind kind) {