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

Unified Diff: runtime/vm/datastream.h

Issue 1915853004: Option to output precompiled instructions as a blob for use with mmap instead of assembly for use i… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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.cc ('k') | 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/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);
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698