Basic implementation of invoke / invoke-polymorphic.
Basic switch interpreter support for invoke-polymorphic. This change
allows for virtual/interface and static invokes on method handles.
Support for direct invokes (including constructors) and field
getters and setters will be added in follow up changes.
Bug: 30550796
Test: make test-art-host
Change-Id: Ieb3a991d974060d930d56467908d5c7c11d0e38e
diff --git a/runtime/verifier/method_verifier.cc b/runtime/verifier/method_verifier.cc
index 50466ed..ae82d6c 100644
--- a/runtime/verifier/method_verifier.cc
+++ b/runtime/verifier/method_verifier.cc
@@ -3040,6 +3040,13 @@
just_set_result = true;
break;
}
+ case Instruction::INVOKE_POLYMORPHIC:
+ case Instruction::INVOKE_POLYMORPHIC_RANGE: {
+ Fail(VERIFY_ERROR_FORCE_INTERPRETER)
+ << "instruction is not supported by verifier; skipping verification";
+ have_pending_experimental_failure_ = true;
+ return false;
+ }
case Instruction::NEG_INT:
case Instruction::NOT_INT:
work_line_->CheckUnaryOp(this, inst, reg_types_.Integer(), reg_types_.Integer());
@@ -3352,8 +3359,6 @@
case Instruction::UNUSED_FC ... Instruction::UNUSED_FF:
case Instruction::UNUSED_79:
case Instruction::UNUSED_7A:
- case Instruction::INVOKE_POLYMORPHIC:
- case Instruction::INVOKE_POLYMORPHIC_RANGE:
Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "Unexpected opcode " << inst->DumpString(dex_file_);
break;