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

Unified Diff: runtime/vm/object.h

Issue 1653003003: Precompilation: canonicalize Instructions in PRODUCT mode. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | « runtime/vm/flag_list.h ('k') | runtime/vm/precompiler.h » ('j') | no next file with comments »
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 1715a13a293a8ae1b354697908eb522cd39752a3..23cae39f5ee57a884e94b2fbafbaef3f91c3c0c2 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -3823,6 +3823,14 @@ class Instructions : public Object {
entry_point - HeaderSize() + kHeapObjectTag);
}
+ bool Equals(const Instructions& other) const {
+ if (size() != other.size()) {
+ return false;
+ }
+ NoSafepointScope no_safepoint;
+ return memcmp(raw_ptr(), other.raw_ptr(), InstanceSize(size())) == 0;
+ }
+
private:
void set_size(intptr_t size) const {
StoreNonPointer(&raw_ptr()->size_, size);
@@ -4606,6 +4614,7 @@ class Code : public Object {
friend class Class;
friend class SnapshotWriter;
friend class CodePatcher; // for set_instructions
+ friend class Precompiler; // for set_instructions
// So that the RawFunction pointer visitor can determine whether code the
// function points to is optimized.
friend class RawFunction;
« no previous file with comments | « runtime/vm/flag_list.h ('k') | runtime/vm/precompiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698