summaryrefslogtreecommitdiff
path: root/compiler/optimizing/instruction_builder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/optimizing/instruction_builder.cc')
-rw-r--r--compiler/optimizing/instruction_builder.cc28
1 files changed, 0 insertions, 28 deletions
diff --git a/compiler/optimizing/instruction_builder.cc b/compiler/optimizing/instruction_builder.cc
index 1993fa2512..6839292397 100644
--- a/compiler/optimizing/instruction_builder.cc
+++ b/compiler/optimizing/instruction_builder.cc
@@ -1148,10 +1148,6 @@ bool HInstructionBuilder::BuildInvokePolymorphic(uint32_t dex_pc,
DCHECK_EQ(1 + ArtMethod::NumArgRegisters(shorty), operands.GetNumberOfOperands());
DataType::Type return_type = DataType::FromShorty(shorty[0]);
size_t number_of_arguments = strlen(shorty);
- // Other inputs are needed to propagate type information regarding the MethodType of the
- // call site. We need this when generating code to check that VarHandle accessors are
- // called correctly (for references).
- size_t number_of_other_inputs = 0u;
// We use ResolveMethod which is also used in BuildInvoke in order to
// not duplicate code. As such, we need to provide is_string_constructor
// even if we don't need it afterwards.
@@ -1163,36 +1159,12 @@ bool HInstructionBuilder::BuildInvokePolymorphic(uint32_t dex_pc,
&invoke_type,
/* target_method= */ nullptr,
&is_string_constructor);
-
- bool needs_other_inputs =
- resolved_method->GetIntrinsic() == static_cast<uint32_t>(Intrinsics::kVarHandleGet) &&
- return_type == DataType::Type::kReference &&
- number_of_arguments == 1u;
- if (needs_other_inputs) {
- // The extra argument here is the loaded callsite return type, which needs to be checked
- // against the runtime VarHandle type.
- number_of_other_inputs++;
- }
-
HInvoke* invoke = new (allocator_) HInvokePolymorphic(allocator_,
number_of_arguments,
- number_of_other_inputs,
return_type,
dex_pc,
method_idx,
resolved_method);
-
- if (needs_other_inputs) {
- ScopedObjectAccess soa(Thread::Current());
- ArtMethod* referrer = graph_->GetArtMethod();
- dex::TypeIndex ret_type_index = referrer->GetDexFile()->GetProtoId(proto_idx).return_type_idx_;
- HLoadClass* load_cls = BuildLoadClass(ret_type_index, dex_pc);
- size_t last_index = invoke->InputCount() - 1;
-
- DCHECK(invoke->InputAt(last_index) == nullptr);
- invoke->SetRawInputAt(last_index, load_cls);
- }
-
return HandleInvoke(invoke, operands, shorty, /* is_unresolved= */ false);
}