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

Unified Diff: runtime/vm/kernel_binary.cc

Issue 2790093002: Hacky streaming of VariableGet (Closed)
Patch Set: Created 3 years, 9 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
Index: runtime/vm/kernel_binary.cc
diff --git a/runtime/vm/kernel_binary.cc b/runtime/vm/kernel_binary.cc
index 78f982b34a42a46e339fcca8d1cf16a6ed5b922d..95044b6d7d8587484166f1daf83fb89be3cb0d4c 100644
--- a/runtime/vm/kernel_binary.cc
+++ b/runtime/vm/kernel_binary.cc
@@ -521,7 +521,9 @@ VariableGet* VariableGet::ReadFrom(Reader* reader) {
VariableGet* get = new VariableGet();
get->kernel_offset_ = reader->offset() - 1; // -1 to include tag byte.
get->position_ = reader->ReadPosition();
+ get->variable_kernel_offset_ = reader->ReadUInt();
get->variable_ = reader->helper()->variables().Lookup(reader->ReadUInt());
+ ASSERT(get->variable_->kernel_offset() == get->variable_kernel_offset_);
reader->ReadOptional<DartType>(); // Unused promoted type.
return get;
}
@@ -532,7 +534,9 @@ VariableGet* VariableGet::ReadFrom(Reader* reader, uint8_t payload) {
VariableGet* get = new VariableGet();
get->kernel_offset_ = reader->offset() - 1; // -1 to include tag byte.
get->position_ = reader->ReadPosition();
+ get->variable_kernel_offset_ = reader->ReadUInt();
get->variable_ = reader->helper()->variables().Lookup(payload);
+ ASSERT(get->variable_->kernel_offset() == get->variable_kernel_offset_);
return get;
}

Powered by Google App Engine
This is Rietveld 408576698