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

Unified Diff: runtime/vm/il_printer.cc

Issue 2955073005: VM-codegen: Add IL instruction to check if a Smi is in a constant range
Patch Set: Remove unrelated change and other Slava feedback Created 3 years, 6 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/flow_graph_type_propagator.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/il_printer.cc
diff --git a/runtime/vm/il_printer.cc b/runtime/vm/il_printer.cc
index 653d564e6a8feb722191aa3a05cbafd76556c4ea..6e6dc7c85c67ffeccbae82810e7e112199ceadd5 100644
--- a/runtime/vm/il_printer.cc
+++ b/runtime/vm/il_printer.cc
@@ -1070,6 +1070,22 @@ void UnaryDoubleOpInstr::PrintOperandsTo(BufferFormatter* f) const {
}
+void SmiRangeComparisonInstr::PrintOperandsTo(BufferFormatter* f) const {
+ // This is currently only used for tests on Cids, so we print the range of
+ // cids as class names, too.
+ const Class& from_cls =
+ Class::Handle(Isolate::Current()->class_table()->At(from_));
+ const String& from_name = String::Handle(from_cls.ScrubbedName());
+ const Class& to_cls =
+ Class::Handle(Isolate::Current()->class_table()->At(to_));
+ const String& to_name = String::Handle(to_cls.ScrubbedName());
+ f->Print(" (/*%s*/ %" Pd " <= ", from_name.ToCString(), from_);
+ input()->PrintTo(f);
+ f->Print(" <= %" Pd " /*%s*/) ? %s : %s", to_, to_name.ToCString(),
+ is_negated() ? "false" : "true", is_negated() ? "true" : "false");
+}
+
+
void CheckClassIdInstr::PrintOperandsTo(BufferFormatter* f) const {
value()->PrintTo(f);
« no previous file with comments | « runtime/vm/flow_graph_type_propagator.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698