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

Unified Diff: runtime/vm/thread.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/scavenger.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/thread.h
diff --git a/runtime/vm/thread.h b/runtime/vm/thread.h
index 76a72adaa6f7a2e6904edbc344d189ce90db277b..b680a4f1bf6f6800fe7d11e3c28682abed975194 100644
--- a/runtime/vm/thread.h
+++ b/runtime/vm/thread.h
@@ -673,7 +673,12 @@ class Thread : public BaseThread {
template <class T>
T* AllocateReusableHandle();
- // Accessed 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 stack_limit_;
uword stack_overflow_flags_;
Isolate* isolate_;
« no previous file with comments | « runtime/vm/scavenger.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698