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

Unified Diff: runtime/vm/flow_graph.cc

Issue 2856543002: Use off-heap data for class check instructions (Closed)
Patch Set: Created 3 years, 8 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/flow_graph.cc
diff --git a/runtime/vm/flow_graph.cc b/runtime/vm/flow_graph.cc
index dff1c08e5882e639e8d8bd3dea9548902818261f..f7e9228f677d0df402b48eb9d6a48086cf5b8e37 100644
--- a/runtime/vm/flow_graph.cc
+++ b/runtime/vm/flow_graph.cc
@@ -468,6 +468,19 @@ bool FlowGraph::InstanceCallNeedsClassCheck(InstanceCallInstr* call,
}
+Instruction* FlowGraph::GetCheckClass(Definition* to_check,
+ const CallTargets& targets,
+ intptr_t deopt_id,
+ TokenPosition token_pos) {
+ if (targets.IsMonomorphic() && targets.MonomorphicReceiverCid() == kSmiCid) {
+ return new (zone())
+ CheckSmiInstr(new (zone()) Value(to_check), deopt_id, token_pos);
+ }
+ return new (zone()) CheckClassInstr(new (zone()) Value(to_check), deopt_id,
+ targets, token_pos);
+}
+
+
bool FlowGraph::VerifyUseLists() {
// Verify the initial definitions.
for (intptr_t i = 0; i < graph_entry_->initial_definitions()->length(); ++i) {

Powered by Google App Engine
This is Rietveld 408576698