163 {
164 GrowableArray<Library*>
libs(3);
167 bool fingerprints_match = true;
168
173 if (!func.IsNull()) {
174 fingerprints_match =
176 fingerprints_match;
177 func.set_recognized_kind(kind);
178 switch (kind) {
179#define RECOGNIZE_METHOD(class_name, function_name, enum_name, fp) \
180 case MethodRecognizer::k##enum_name: \
181 func.reset_unboxed_parameters_and_return(); \
182 break;
184#undef RECOGNIZE_METHOD
185 default:
186 break;
187 }
188 } else if (!FLAG_precompiled_mode) {
189 fingerprints_match = false;
192 }
193 }
194
195#define SET_FUNCTION_BIT(class_name, function_name, dest, fp, setter, value) \
196 func = Library::GetFunction(libs, #class_name, #function_name); \
197 if (!func.IsNull()) { \
198 fingerprints_match = \
199 func.CheckSourceFingerprint(fp) && fingerprints_match; \
200 func.setter(value); \
201 } else if (!FLAG_precompiled_mode) { \
202 OS::PrintErr("Missing %s::%s\n", #class_name, #function_name); \
203 fingerprints_match = false; \
204 }
205
206#define SET_IS_POLYMORPHIC_TARGET(class_name, function_name, dest, fp) \
207 SET_FUNCTION_BIT(class_name, function_name, dest, fp, \
208 set_is_polymorphic_target, true)
209
211
212#undef SET_RECOGNIZED_KIND
213#undef SET_IS_POLYMORPHIC_TARGET
214#undef SET_FUNCTION_BIT
215
216 if (!fingerprints_match) {
217
218
220 "FP mismatch while recognizing methods. If the behavior of "
221 "these functions has changed, then changes are also needed in "
222 "the VM's compiler. Otherwise the fingerprint can simply be "
223 "updated in recognized_methods_list.h\n");
224 }
225}
static FunctionPtr GetFunction(const GrowableArray< Library * > &libs, const char *class_name, const char *function_name)
static void static void PrintErr(const char *format,...) PRINTF_ATTRIBUTE(1
#define SET_IS_POLYMORPHIC_TARGET(class_name, function_name, dest, fp)
#define RECOGNIZE_METHOD(class_name, function_name, enum_name, fp)
const char *const class_name
static const struct dart::@132 recognized_methods[MethodRecognizer::kNumRecognizedMethods]
const char *const function_name
#define ALL_INTRINSICS_LIST(V)
#define POLYMORPHIC_TARGET_LIST(V)