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

Unified Diff: runtime/vm/kernel_binary_flowgraph.cc

Issue 2995423002: Allow the VM to read Kernel files with external libraries (Closed)
Patch Set: Created 3 years, 4 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/kernel_binary_flowgraph.h ('k') | runtime/vm/kernel_reader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/kernel_binary_flowgraph.cc
diff --git a/runtime/vm/kernel_binary_flowgraph.cc b/runtime/vm/kernel_binary_flowgraph.cc
index 24ca742f6adff2bdfaef42c8997cd68f86ceab69..eb976d501057907c862ded382cf5c70f9c8cdba2 100644
--- a/runtime/vm/kernel_binary_flowgraph.cc
+++ b/runtime/vm/kernel_binary_flowgraph.cc
@@ -87,7 +87,7 @@ void VariableDeclarationHelper::ReadUntilExcluding(Field field) {
equals_position_ = builder_->ReadPosition(); // read equals position.
if (++next_read_ == field) return;
case kFlags:
- flags_ = builder_->ReadFlags(); // read flags.
+ flags_ = builder_->ReadFlags();
if (++next_read_ == field) return;
case kNameIndex:
name_index_ = builder_->ReadStringReference(); // read name index.
@@ -133,7 +133,7 @@ void FieldHelper::ReadUntilExcluding(Field field,
end_position_ = builder_->ReadPosition(false); // read end position.
if (++next_read_ == field) return;
case kFlags:
- flags_ = builder_->ReadFlags(); // read flags.
+ flags_ = builder_->ReadFlags();
if (++next_read_ == field) return;
case kName:
builder_->SkipName(); // read name.
@@ -205,7 +205,7 @@ void ProcedureHelper::ReadUntilExcluding(Field field) {
kind_ = static_cast<Kind>(builder_->ReadByte());
if (++next_read_ == field) return;
case kFlags:
- flags_ = builder_->ReadFlags(); // read flags.
+ flags_ = builder_->ReadFlags();
if (++next_read_ == field) return;
case kName:
builder_->SkipName(); // read name.
@@ -256,7 +256,7 @@ void ConstructorHelper::ReadUntilExcluding(Field field) {
end_position_ = builder_->ReadPosition(); // read end position.
if (++next_read_ == field) return;
case kFlags:
- flags_ = builder_->ReadFlags(); // read flags.
+ flags_ = builder_->ReadFlags();
if (++next_read_ == field) return;
case kName:
builder_->SkipName(); // read name.
@@ -410,8 +410,7 @@ void LibraryHelper::ReadUntilExcluding(Field field) {
// Ordered with fall-through.
switch (next_read_) {
case kFlags: {
- word flags = builder_->ReadFlags(); // read flags.
- ASSERT(flags == 0); // external libraries not supported
+ flags_ = builder_->ReadFlags();
if (++next_read_ == field) return;
}
case kCanonicalName:
@@ -4660,11 +4659,11 @@ void StreamingFlowGraphBuilder::SkipLibraryCombinator() {
}
void StreamingFlowGraphBuilder::SkipLibraryDependency() {
- ReadFlags(); // read flags.
- SkipListOfExpressions(); // Read annotations.
- ReadCanonicalNameReference(); // read target_reference.
- ReadStringReference(); // read name_index.
- intptr_t combinator_count = ReadListLength(); // read list length.
+ ReadFlags();
+ SkipListOfExpressions(); // Annotations.
+ ReadCanonicalNameReference();
+ ReadStringReference(); // Name.
+ intptr_t combinator_count = ReadListLength();
for (intptr_t i = 0; i < combinator_count; ++i) {
SkipLibraryCombinator();
}
@@ -4714,10 +4713,6 @@ Tag StreamingFlowGraphBuilder::PeekTag(uint8_t* payload) {
return reader_->PeekTag(payload);
}
-word StreamingFlowGraphBuilder::ReadFlags() {
- return reader_->ReadFlags();
-}
-
void StreamingFlowGraphBuilder::loop_depth_inc() {
++flow_graph_builder_->loop_depth_;
}
« no previous file with comments | « runtime/vm/kernel_binary_flowgraph.h ('k') | runtime/vm/kernel_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698