Index: runtime/vm/datastream.h |
diff --git a/runtime/vm/datastream.h b/runtime/vm/datastream.h |
index f47e822bd8ed4657e9af80f79bb73f862f0ff1a2..58452a07f64afc36b617ed0a8cfbfe36d0caa8f3 100644 |
--- a/runtime/vm/datastream.h |
+++ b/runtime/vm/datastream.h |
@@ -387,6 +387,16 @@ class WriteStream : public ValueObject { |
current_ += len; |
} |
+ void WriteWord(uword value) { |
+ const intptr_t len = sizeof(uword); |
+ if ((end_ - current_) < len) { |
+ Resize(len); |
+ } |
+ ASSERT((end_ - current_) >= len); |
+ *reinterpret_cast<uword*>(current_) = value; |
+ current_ += len; |
+ } |
+ |
void Print(const char* format, ...) { |
va_list args; |
va_start(args, format); |