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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 2877713003: Eliminated with_checks variable (Closed)
Patch Set: Removed TODO Created 3 years, 7 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/intermediate_language.h ('k') | runtime/vm/intermediate_language_dbc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index 79e5100a6b77a1d780817340c9e4f3bd93e64e7a..1fb896fd79c133ddbdd940acf8a3a9397f4b30b7 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -3345,16 +3345,6 @@ intptr_t PolymorphicInstanceCallInstr::CallCount() const {
// PolymorphicInstanceCallInstr.
#if !defined(TARGET_ARCH_DBC)
void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- if (!with_checks()) {
- ASSERT(targets().HasSingleTarget());
- const Function& target = targets().FirstTarget();
- compiler->GenerateStaticCall(deopt_id(), instance_call()->token_pos(),
- target, instance_call()->ArgumentCount(),
- instance_call()->argument_names(), locs(),
- ICData::Handle());
- return;
- }
-
compiler->EmitPolymorphicInstanceCall(
targets_, *instance_call(), instance_call()->ArgumentCount(),
instance_call()->argument_names(), deopt_id(),
@@ -3415,10 +3405,10 @@ Definition* InstanceCallInstr::Canonicalize(FlowGraph* flow_graph) {
return this;
}
- const bool with_checks = false;
- const bool complete = false;
- PolymorphicInstanceCallInstr* specialized = new PolymorphicInstanceCallInstr(
- this, *new_target, with_checks, complete);
+ ASSERT(new_target->HasSingleTarget());
+ const Function& target = new_target->FirstTarget();
+ StaticCallInstr* specialized =
+ StaticCallInstr::FromCall(flow_graph->zone(), this, target);
flow_graph->InsertBefore(this, specialized, env(), FlowGraph::kValue);
return specialized;
}
@@ -3443,7 +3433,7 @@ Definition* PolymorphicInstanceCallInstr::Canonicalize(FlowGraph* flow_graph) {
bool PolymorphicInstanceCallInstr::IsSureToCallSingleRecognizedTarget() const {
- if (FLAG_precompiled_mode && with_checks()) return false;
+ if (FLAG_precompiled_mode && !complete()) return false;
return targets_.HasSingleRecognizedTarget();
}
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_dbc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698