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

Unified Diff: runtime/vm/globals.h

Issue 604553003: Don't use the size-zero array hack to access variable data in Snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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/raw_object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/globals.h
diff --git a/runtime/vm/globals.h b/runtime/vm/globals.h
index f9a5d278d25ba8d94d59a9529ae7981cde92eb16..69c8d62afe65b3110eb052474978febd2d5656db 100644
--- a/runtime/vm/globals.h
+++ b/runtime/vm/globals.h
@@ -55,6 +55,13 @@ const intptr_t kOffsetOfPtr = 32;
(reinterpret_cast<intptr_t>( \
(reinterpret_cast<type*>(kOffsetOfPtr)->accessor())) - kOffsetOfPtr)
+#define OPEN_ARRAY_START(type, align) \
+ do { \
+ const uword result = reinterpret_cast<uword>(this) + sizeof(*this); \
+ ASSERT(Utils::IsAligned(result, sizeof(align))); \
+ return reinterpret_cast<type*>(result); \
+ } while (0)
+
// A type large enough to contain the value of the C++ vtable. This is needed
// to support the handle operations.
« no previous file with comments | « no previous file | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698