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 {}; |