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

Unified Diff: runtime/vm/kernel_to_il.cc

Issue 2794473002: Stream StaticGet (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
« no previous file with comments | « runtime/vm/kernel_binary_flowgraph.cc ('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 1cec036ce829cee69de167130589c2b88493993f..e700fb5ff85a29d333493e33332c171e16528ce3 100644
--- a/runtime/vm/kernel_to_il.cc
+++ b/runtime/vm/kernel_to_il.cc
@@ -4656,36 +4656,7 @@ void FlowGraphBuilder::VisitVariableSet(VariableSet* node) {
void FlowGraphBuilder::VisitStaticGet(StaticGet* node) {
- CanonicalName* target = node->target();
- if (target->IsField()) {
- const dart::Field& field =
- dart::Field::ZoneHandle(Z, H.LookupFieldByKernelField(target));
- if (field.is_const()) {
- fragment_ = Constant(constant_evaluator_.EvaluateExpression(node));
- } else {
- const dart::Class& owner = dart::Class::Handle(Z, field.Owner());
- const dart::String& getter_name = H.DartGetterName(target);
- const Function& getter =
- Function::ZoneHandle(Z, owner.LookupStaticFunction(getter_name));
- if (getter.IsNull() || !field.has_initializer()) {
- Fragment instructions = Constant(field);
- fragment_ = instructions + LoadStaticField();
- } else {
- fragment_ = StaticCall(node->position(), getter, 0);
- }
- }
- } else {
- const Function& function =
- Function::ZoneHandle(Z, H.LookupStaticMethodByKernelProcedure(target));
-
- if (target->IsGetter()) {
- fragment_ = StaticCall(node->position(), function, 0);
- } else if (target->IsMethod()) {
- fragment_ = Constant(constant_evaluator_.EvaluateExpression(node));
- } else {
- UNIMPLEMENTED();
- }
- }
+ fragment_ = streaming_flow_graph_builder_->BuildAt(node->kernel_offset());
}
« no previous file with comments | « runtime/vm/kernel_binary_flowgraph.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698