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

Unified Diff: runtime/vm/jit_optimizer.cc

Issue 2451893002: Revert "Recognize and optimize a.runtimeType == b.runtimeType pattern." (Closed)
Patch Set: Created 4 years, 2 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/isolate.h ('k') | runtime/vm/method_recognizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/jit_optimizer.cc
diff --git a/runtime/vm/jit_optimizer.cc b/runtime/vm/jit_optimizer.cc
index 63c79bc2a0f948c63075106fea7611d72b981b57..00f1588f9eba4a371e5e32346d7717be82bb297c 100644
--- a/runtime/vm/jit_optimizer.cc
+++ b/runtime/vm/jit_optimizer.cc
@@ -1707,20 +1707,13 @@ void JitOptimizer::VisitInstanceCall(InstanceCallInstr* instr) {
// we don't have one target.
const Function& target =
Function::Handle(Z, unary_checks.GetTargetAt(0));
- if (target.recognized_kind() == MethodRecognizer::kObjectRuntimeType) {
- has_one_target =
- PolymorphicInstanceCallInstr::ComputeRuntimeType(unary_checks) !=
- Type::null();
- } else {
- const bool polymorphic_target =
- MethodRecognizer::PolymorphicTarget(target);
- has_one_target = !polymorphic_target;
- }
+ const bool polymorphic_target = MethodRecognizer::PolymorphicTarget(target);
+ has_one_target = !polymorphic_target;
}
if (has_one_target) {
- const Function& target = Function::Handle(Z, unary_checks.GetTargetAt(0));
- const RawFunction::Kind function_kind = target.kind();
+ RawFunction::Kind function_kind =
+ Function::Handle(Z, unary_checks.GetTargetAt(0)).kind();
if (!flow_graph()->InstanceCallNeedsClassCheck(instr, function_kind)) {
PolymorphicInstanceCallInstr* call =
new(Z) PolymorphicInstanceCallInstr(instr, unary_checks,
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/method_recognizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698