Version 2.16.0-57.0.dev
Merge commit '367083658866586349eee2ac8f7edb74e433b5fe' into 'dev'
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 181a9e9..6fb03db 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -5487,9 +5487,19 @@
}
static bool Equals(InstructionsPtr a, InstructionsPtr b) {
- if (Size(a) != Size(b)) return false;
+ // This method should only be called on non-null Instructions objects.
+ ASSERT_EQUAL(a->GetClassId(), kInstructionsCid);
+ ASSERT_EQUAL(b->GetClassId(), kInstructionsCid);
+ // Don't include the object header tags wholesale in the comparison,
+ // because the GC tags may differ in JIT mode. In fact, we can skip checking
+ // the object header entirely, as we're guaranteed that the cids match,
+ // because there are no subclasses for the Instructions class, and the sizes
+ // should match if the content size encoded in size_and_flags_ matches.
+ if (a->untag()->size_and_flags_ != b->untag()->size_and_flags_) {
+ return false;
+ }
NoSafepointScope no_safepoint;
- return memcmp(a->untag(), b->untag(), InstanceSize(Size(a))) == 0;
+ return memcmp(a->untag()->data(), b->untag()->data(), Size(a)) == 0;
}
uint32_t Hash() const {
diff --git a/tools/VERSION b/tools/VERSION
index 687f8d7..b55a51e 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 16
PATCH 0
-PRERELEASE 56
+PRERELEASE 57
PRERELEASE_PATCH 0
\ No newline at end of file