Permalink
Browse files

Update the tests to handle MethodHandle kind fixes

  • Loading branch information...
agorski3 authored and JesusFreke committed Aug 3, 2018
1 parent c6b0408 commit d33818773e0ac9badf5dec02829859f493c5a0af
@@ -14,9 +14,9 @@
.method public static constMethodHandle()V
.registers 15
const-method-handle v0, static-invoke@Ljava/lang/Integer;->toString(I)Ljava/lang/String;
const-method-handle v0, invoke-static@Ljava/lang/Integer;->toString(I)Ljava/lang/String;
const-method-handle v0, instance-invoke@Ljava/lang/Integer;->toString()Ljava/lang/String;
const-method-handle v0, invoke-instance@Ljava/lang/Integer;->toString()Ljava/lang/String;
const-method-handle v0, static-put@LConstMethodHandle;->instanceField:Ljava/lang/Object;
@@ -74,7 +74,7 @@ public void testPoolCallSite() throws IOException {
new ImmutableMethodImplementation(10, ImmutableList.of(
new ImmutableInstruction35c(Opcode.INVOKE_CUSTOM, 0, 0, 0, 0, 0, 0,
new ImmutableCallSiteReference("call_site_1",
new ImmutableMethodHandleReference(MethodHandleType.STATIC_INVOKE,
new ImmutableMethodHandleReference(MethodHandleType.INVOKE_STATIC,
new ImmutableMethodReference("Lcls1", "loader",
ImmutableList.of("Ljava/lang/invoke/Lookup;",
"Ljava/lang/String;",
@@ -96,7 +96,7 @@ public void testBuilderCallSite() throws IOException {
BuilderCallSiteReference callSite = dexBuilder.internCallSite(new ImmutableCallSiteReference("call_site_1",
new ImmutableMethodHandleReference(
MethodHandleType.STATIC_INVOKE,
MethodHandleType.INVOKE_STATIC,
new ImmutableMethodReference("Lcls1", "loader", ImmutableList.of("Ljava/lang/invoke/Lookup;",
"Ljava/lang/String;",
"Ljava/lang/invoke/MethodType;"),
@@ -214,9 +214,9 @@ INSTRUCTION_FORMAT32x("move-object/16")
INSTRUCTION_FORMAT35c_CALL_SITE("invoke-custom")
INSTRUCTION_FORMAT35c_METHOD("invoke-virtual")
INSTRUCTION_FORMAT35c_METHOD("invoke-super")
INSTRUCTION_FORMAT35c_METHOD("invoke-direct")
INSTRUCTION_FORMAT35c_METHOD("invoke-static")
INSTRUCTION_FORMAT35c_METHOD("invoke-interface")
INSTRUCTION_FORMAT35c_METHOD_OR_METHOD_HANDLE_TYPE("invoke-direct")
INSTRUCTION_FORMAT35c_METHOD_OR_METHOD_HANDLE_TYPE("invoke-static")
INSTRUCTION_FORMAT35c_METHOD_OR_METHOD_HANDLE_TYPE("invoke-interface")
INSTRUCTION_FORMAT35c_TYPE("filled-new-array")
INSTRUCTION_FORMAT35c_METHOD_ODEX("invoke-direct-empty")
INSTRUCTION_FORMAT3rc_METHOD_ODEX("invoke-object-init/range")
@@ -45,12 +45,15 @@ illegal-method-access
class-change-error
instantiation-error
instance-invoke
static-invoke
instance-get
instance-put
static-get
invoke-static
invoke-instance
invoke-constructor
invoke-direct
invoke-interface
static-put
static-get
instance-put
instance-get
inline@0xABCD
inline@0x0123
@@ -45,12 +45,15 @@ VERIFICATION_ERROR_TYPE("illegal-method-access")
VERIFICATION_ERROR_TYPE("class-change-error")
VERIFICATION_ERROR_TYPE("instantiation-error")
METHOD_HANDLE_TYPE_METHOD("instance-invoke")
METHOD_HANDLE_TYPE_METHOD("static-invoke")
METHOD_HANDLE_TYPE_FIELD("instance-get")
METHOD_HANDLE_TYPE_FIELD("instance-put")
METHOD_HANDLE_TYPE_FIELD("static-get")
INSTRUCTION_FORMAT35c_METHOD_OR_METHOD_HANDLE_TYPE("invoke-static")
METHOD_HANDLE_TYPE_METHOD("invoke-instance")
METHOD_HANDLE_TYPE_METHOD("invoke-constructor")
INSTRUCTION_FORMAT35c_METHOD_OR_METHOD_HANDLE_TYPE("invoke-direct")
INSTRUCTION_FORMAT35c_METHOD_OR_METHOD_HANDLE_TYPE("invoke-interface")
METHOD_HANDLE_TYPE_FIELD("static-put")
METHOD_HANDLE_TYPE_FIELD("static-get")
METHOD_HANDLE_TYPE_FIELD("instance-put")
METHOD_HANDLE_TYPE_FIELD("instance-get")
INLINE_INDEX("inline@0xABCD")
INLINE_INDEX("inline@0x0123")
@@ -206,7 +206,7 @@ INSTRUCTION_FORMAT21c_TYPE("new-instance")
REGISTER("v0")
COMMA(",")
CLASS_DESCRIPTOR("Lcom/android/internal/os/BatteryStatsImpl$1;")
INSTRUCTION_FORMAT35c_METHOD("invoke-direct")
INSTRUCTION_FORMAT35c_METHOD_OR_METHOD_HANDLE_TYPE("invoke-direct")
OPEN_BRACE("{")
REGISTER("v0")
CLOSE_BRACE("}")
@@ -275,7 +275,7 @@ SIMPLE_NAME("phone")
PROLOGUE_DIRECTIVE(".prologue")
LINE_DIRECTIVE(".line")
POSITIVE_INTEGER_LITERAL("42")
INSTRUCTION_FORMAT35c_METHOD("invoke-direct")
INSTRUCTION_FORMAT35c_METHOD_OR_METHOD_HANDLE_TYPE("invoke-direct")
OPEN_BRACE("{")
REGISTER("p0")
COMMA(",")
@@ -397,7 +397,7 @@ INSTRUCTION_FORMAT21c_TYPE("new-instance")
REGISTER("v2")
COMMA(",")
CLASS_DESCRIPTOR("Ljava/lang/StringBuilder;")
INSTRUCTION_FORMAT35c_METHOD("invoke-direct")
INSTRUCTION_FORMAT35c_METHOD_OR_METHOD_HANDLE_TYPE("invoke-direct")
OPEN_BRACE("{")
REGISTER("v2")
CLOSE_BRACE("}")
@@ -457,7 +457,7 @@ CLOSE_PAREN(")")
CLASS_DESCRIPTOR("Ljava/lang/String;")
INSTRUCTION_FORMAT11x("move-result-object")
REGISTER("v2")
INSTRUCTION_FORMAT35c_METHOD("invoke-direct")
INSTRUCTION_FORMAT35c_METHOD_OR_METHOD_HANDLE_TYPE("invoke-direct")
OPEN_BRACE("{")
REGISTER("v1")
COMMA(",")
@@ -594,7 +594,7 @@ COMMA(",")
POSITIVE_INTEGER_LITERAL("0x0")
LINE_DIRECTIVE(".line")
POSITIVE_INTEGER_LITERAL("981")
INSTRUCTION_FORMAT35c_METHOD("invoke-direct")
INSTRUCTION_FORMAT35c_METHOD_OR_METHOD_HANDLE_TYPE("invoke-direct")
OPEN_BRACE("{")
REGISTER("p0")
COMMA(",")
@@ -615,7 +615,7 @@ REGISTER("v0")
COMMA(",")
COLON(":")
SIMPLE_NAME("cond_28")
INSTRUCTION_FORMAT35c_METHOD("invoke-direct")
INSTRUCTION_FORMAT35c_METHOD_OR_METHOD_HANDLE_TYPE("invoke-direct")
OPEN_BRACE("{")
REGISTER("p0")
COMMA(",")

0 comments on commit d338187

Please sign in to comment.