@@ -9153,7 +9153,7 @@ void Function::SetDeoptReasonForAll(intptr_t deopt_id,
91539153 }
91549154}
91559155
9156- bool Function::CheckSourceFingerprint(const char* prefix, int32_t fp) const {
9156+ bool Function::CheckSourceFingerprint(int32_t fp) const {
91579157 if (Isolate::Current()->obfuscate() || FLAG_precompiled_mode ||
91589158 (Dart::vm_snapshot_kind() != Snapshot::kNone)) {
91599159 return true; // The kernel structure has been altered, skip checking.
@@ -9165,12 +9165,6 @@ bool Function::CheckSourceFingerprint(const char* prefix, int32_t fp) const {
91659165 return true;
91669166 }
91679167
9168- #if 1
9169- // The non-nullable experiment changes the fingerprints, we only track
9170- // one fingerprint set, until we unfork and settle on a single snapshot
9171- // version this check has to be bypassed.
9172- // TODO(36376) - Restore checking fingerprints of recognized methods.
9173- #else
91749168 if (SourceFingerprint() != fp) {
91759169 const bool recalculatingFingerprints = false;
91769170 if (recalculatingFingerprints) {
@@ -9189,7 +9183,6 @@ bool Function::CheckSourceFingerprint(const char* prefix, int32_t fp) const {
91899183 return false;
91909184 }
91919185 }
9192- #endif
91939186 return true;
91949187}
91959188
@@ -13520,7 +13513,7 @@ void Library::CheckFunctionFingerprints() {
1352013513 has_errors = true; \
1352113514 OS::PrintErr("Function not found %s.%s\n", #class_name, #function_name); \
1352213515 } else { \
13523- CHECK_FINGERPRINT3 (func, class_name, function_name, dest, fp); \
13516+ ASSERT (func.CheckSourceFingerprint(fp)); \
1352413517 }
1352513518
1352613519#define CHECK_FINGERPRINTS2(class_name, function_name, dest, fp) \
@@ -13563,7 +13556,7 @@ void Library::CheckFunctionFingerprints() {
1356313556 has_errors = true; \
1356413557 OS::PrintErr("Function not found %s.%s\n", #class_name, #factory_name); \
1356513558 } else { \
13566- CHECK_FINGERPRINT2 (func, symbol, cid, fp); \
13559+ ASSERT (func.CheckSourceFingerprint( fp)); \
1356713560 }
1356813561
1356913562 all_libs.Add(&Library::ZoneHandle(Library::CoreLibrary()));
0 commit comments