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

Unified Diff: runtime/vm/scavenger.h

Issue 2684683002: Explain requirements on fields accessed from generated code. (Closed)
Patch Set: Created 3 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/isolate.h ('k') | runtime/vm/thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/scavenger.h
diff --git a/runtime/vm/scavenger.h b/runtime/vm/scavenger.h
index ee64a06b6e955facb5e79a0d9f500867dd5614d0..9bffb215b806dac03928c360b5f1712b9532d839 100644
--- a/runtime/vm/scavenger.h
+++ b/runtime/vm/scavenger.h
@@ -254,8 +254,12 @@ class Scavenger {
intptr_t NewSizeInWords(intptr_t old_size_in_words) const;
- // Current allocation top and end. These values are being accessed directly
- // from generated code.
+ // Accessed from generated code.
+ // ** This block of fields must come first! **
+ // For AOT cross-compilation, we rely on these members having the same offsets
+ // in SIMARM(IA32) and ARM, and the same offsets in SIMARM64(X64) and ARM64.
+ // We use only word-sized fields to avoid differences in struct packing on the
+ // different architectures. See also CheckOffsets in dart.cc.
uword top_;
uword end_;
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698