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

Unified Diff: runtime/vm/kernel_to_il.cc

Issue 2787463003: Step #2 in streaming the kernel flowgraph (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
« runtime/vm/kernel_binary_flowgraph.cc ('K') | « runtime/vm/kernel_to_il.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/kernel_to_il.cc
diff --git a/runtime/vm/kernel_to_il.cc b/runtime/vm/kernel_to_il.cc
index 82ef7da838e8df10d32074e49db0bca6b33f5d66..990a4b7c411c9b5d458bc664f043408eb087a372 100644
--- a/runtime/vm/kernel_to_il.cc
+++ b/runtime/vm/kernel_to_il.cc
@@ -1041,6 +1041,11 @@ dart::String& TranslationHelper::DartSymbol(String* content) const {
Z, dart::Symbols::FromUTF8(thread_, content->buffer(), content->size()));
}
+dart::String& TranslationHelper::DartSymbol(const uint8_t* utf8_array,
+ intptr_t len) const {
+ return dart::String::ZoneHandle(
+ Z, dart::Symbols::FromUTF8(thread_, utf8_array, len));
+}
const dart::String& TranslationHelper::DartClassName(
CanonicalName* kernel_klass) {
@@ -4239,25 +4244,22 @@ ArgumentArray FlowGraphBuilder::GetArguments(int count) {
void FlowGraphBuilder::VisitInvalidExpression(InvalidExpression* node) {
- // The frontend will take care of emitting normal errors (like
- // [NoSuchMethodError]s) and only emit [InvalidExpression]s in very special
- // situations (e.g. an invalid annotation).
- fragment_ = ThrowNoSuchMethodError();
+ fragment_ = streaming_flow_graph_builder_->BuildAt(node->kernel_offset());
}
void FlowGraphBuilder::VisitNullLiteral(NullLiteral* node) {
- fragment_ = Constant(Instance::ZoneHandle(Z, Instance::null()));
+ fragment_ = streaming_flow_graph_builder_->BuildAt(node->kernel_offset());
}
void FlowGraphBuilder::VisitBoolLiteral(BoolLiteral* node) {
- fragment_ = Constant(Bool::Get(node->value()));
+ fragment_ = streaming_flow_graph_builder_->BuildAt(node->kernel_offset());
}
void FlowGraphBuilder::VisitIntLiteral(IntLiteral* node) {
- fragment_ = IntConstant(node->value());
+ fragment_ = streaming_flow_graph_builder_->BuildAt(node->kernel_offset());
}
@@ -4273,7 +4275,7 @@ void FlowGraphBuilder::VisitDoubleLiteral(DoubleLiteral* node) {
void FlowGraphBuilder::VisitStringLiteral(StringLiteral* node) {
- fragment_ = Constant(H.DartSymbol(node->value()));
+ fragment_ = streaming_flow_graph_builder_->BuildAt(node->kernel_offset());
}
@@ -5180,7 +5182,7 @@ void FlowGraphBuilder::VisitNot(Not* node) {
void FlowGraphBuilder::VisitThisExpression(ThisExpression* node) {
- fragment_ = LoadLocal(scopes_->this_variable);
+ fragment_ = streaming_flow_graph_builder_->BuildAt(node->kernel_offset());
}
« runtime/vm/kernel_binary_flowgraph.cc ('K') | « runtime/vm/kernel_to_il.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698