Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(320)

Unified Diff: runtime/vm/object.h

Issue 1387613003: Dedup stackmaps. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/precompiler.h » ('j') | runtime/vm/precompiler.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 3bfe15e4e5ea3f5a6a0ab0304b30176cf82bb783..2c5f12c1cc0c1293549b117ca8f2408d21b11040 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -3955,6 +3955,14 @@ class Stackmap : public Object {
StoreNonPointer(&raw_ptr()->register_bit_count_, register_bit_count);
}
+ bool Equals(const Stackmap& other) const {
+ if (Length() != other.Length()) {
+ return false;
+ }
+ NoSafepointScope no_safepoint;
+ return memcmp(raw_ptr(), other.raw_ptr(), InstanceSize(Length())) == 0;
+ }
+
static const intptr_t kMaxLengthInBytes = kSmiMax;
static intptr_t InstanceSize() {
« no previous file with comments | « no previous file | runtime/vm/precompiler.h » ('j') | runtime/vm/precompiler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698