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

Unified Diff: runtime/vm/datastream.h

Issue 2622053002: Refactor snapshots pieces to include a section for loading instructions into the heap of a regular … (Closed)
Patch Set: . Created 3 years, 11 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/dart_api_impl_test.cc ('k') | runtime/vm/gc_sweeper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/datastream.h
diff --git a/runtime/vm/datastream.h b/runtime/vm/datastream.h
index b50f585492fc2b2e02167fd88493ef15ee228ab1..841e265870371b77b4d6993ebeaedf27ee67792f 100644
--- a/runtime/vm/datastream.h
+++ b/runtime/vm/datastream.h
@@ -314,6 +314,12 @@ class WriteStream : public ValueObject {
void set_current(uint8_t* value) { current_ = value; }
+ void Align(intptr_t alignment) {
+ intptr_t position = current_ - *buffer_;
+ position = Utils::RoundUp(position, alignment);
+ current_ = *buffer_ + position;
+ }
+
template <int N, typename T>
class Raw {};
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/gc_sweeper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698