174 {
175 if (!CanIntrinsify(parsed_function)) {
176 return false;
177 }
178
180 return compiler->intrinsic_slow_path_label()->IsUnused();
181 }
182
183 const Function&
function = parsed_function.function();
184#if !defined(HASH_IN_OBJECT_HEADER)
185
186
187
188
189 if (
function.recognized_kind() == MethodRecognizer::kObject_getHash) {
190 return false;
191 }
192#endif
193
194#if !defined(PRODUCT)
195#define EMIT_BREAKPOINT() compiler->assembler()->Breakpoint()
196#else
197#define EMIT_BREAKPOINT()
198#endif
199
200#define EMIT_CASE(class_name, function_name, enum_name, fp) \
201 case MethodRecognizer::k##enum_name: { \
202 compiler->assembler()->Comment("Intrinsic"); \
203 Label normal_ir_body; \
204 const auto size_before = compiler->assembler()->CodeSize(); \
205 AsmIntrinsifier::enum_name(compiler->assembler(), &normal_ir_body); \
206 const auto size_after = compiler->assembler()->CodeSize(); \
207 if (size_before == size_after) return false; \
208 if (function.HasUnboxedParameters()) { \
209 FATAL("Unsupported unboxed parameters in asm intrinsic %s", \
210 function.ToFullyQualifiedCString()); \
211 } \
212 if (function.HasUnboxedReturnValue()) { \
213 FATAL("Unsupported unboxed return value in asm intrinsic %s", \
214 function.ToFullyQualifiedCString()); \
215 } \
216 if (!normal_ir_body.IsBound()) { \
217 EMIT_BREAKPOINT(); \
218 return true; \
219 } \
220 return false; \
221 }
222
223 switch (
function.recognized_kind()) {
225 default:
226 break;
227 }
228 switch (
function.recognized_kind()) {
230 default:
231 break;
232 }
233
234#undef EMIT_BREAKPOINT
235
236#undef EMIT_INTRINSIC
237 return false;
238}
static bool GraphIntrinsify(const ParsedFunction &parsed_function, FlowGraphCompiler *compiler)
Dart_NativeFunction function
#define EMIT_CASE(class_name, function_name, enum_name, fp)
#define CORE_INTEGER_LIB_INTRINSIC_LIST(V)
#define ALL_INTRINSICS_NO_INTEGER_LIB_LIST(V)