Rename invoke-direct-empty to invoke-object-init

The invoke-direct-empty instruction was introduced to remove the
overhead of calling the empty Object constructor.  We now need it
to do some extra work on behalf of object construction, so it's
appropriate to change the instruction name to match the role it
fills rather than the more general role it was hoped to fill.

No functional changes.

Bug 3342343

Change-Id: I65dd6a2c00c99581c9a19b16fe193b70642c8fbb
diff --git a/vm/analysis/CodeVerify.c b/vm/analysis/CodeVerify.c
index 6020a05..d86c45f 100644
--- a/vm/analysis/CodeVerify.c
+++ b/vm/analysis/CodeVerify.c
@@ -5761,7 +5761,7 @@
      */
     case OP_EXECUTE_INLINE:
     case OP_EXECUTE_INLINE_RANGE:
-    case OP_INVOKE_DIRECT_EMPTY:
+    case OP_INVOKE_OBJECT_INIT:
     case OP_IGET_QUICK:
     case OP_IGET_WIDE_QUICK:
     case OP_IGET_OBJECT_QUICK:
diff --git a/vm/analysis/DexVerify.c b/vm/analysis/DexVerify.c
index 0fe5a12..d8d707b 100644
--- a/vm/analysis/DexVerify.c
+++ b/vm/analysis/DexVerify.c
@@ -1197,7 +1197,7 @@
         case OP_THROW_VERIFICATION_ERROR_JUMBO:
         case OP_EXECUTE_INLINE:
         case OP_EXECUTE_INLINE_RANGE:
-        case OP_INVOKE_DIRECT_EMPTY:
+        case OP_INVOKE_OBJECT_INIT:
         case OP_RETURN_VOID_BARRIER:
         case OP_IGET_QUICK:
         case OP_IGET_WIDE_QUICK:
diff --git a/vm/analysis/Liveness.c b/vm/analysis/Liveness.c
index 06a3501..44075ca 100644
--- a/vm/analysis/Liveness.c
+++ b/vm/analysis/Liveness.c
@@ -739,7 +739,7 @@
     /* quickened instructions, not expected to appear */
     case OP_EXECUTE_INLINE:
     case OP_EXECUTE_INLINE_RANGE:
-    case OP_INVOKE_DIRECT_EMPTY:
+    case OP_INVOKE_OBJECT_INIT:
     case OP_IGET_QUICK:
     case OP_IGET_WIDE_QUICK:
     case OP_IGET_OBJECT_QUICK:
diff --git a/vm/analysis/Optimize.c b/vm/analysis/Optimize.c
index abcf990..68e4d2f 100644
--- a/vm/analysis/Optimize.c
+++ b/vm/analysis/Optimize.c
@@ -173,7 +173,7 @@
          * essential substitutions:
          *  {iget,iput,sget,sput}-wide --> *-wide-volatile
          *  invoke-{virtual,direct,static}[/range] --> execute-inline
-         *  invoke-direct --> invoke-direct-empty
+         *  invoke-direct --> invoke-object-init
          *
          * essential-on-SMP substitutions:
          *  iget-* --> iget-*-volatile
@@ -938,7 +938,7 @@
          * OP_INVOKE_DIRECT when debugging is enabled.
          */
         assert((insns[0] & 0xff) == OP_INVOKE_DIRECT);
-        updateOpcode(method, insns, OP_INVOKE_DIRECT_EMPTY);
+        updateOpcode(method, insns, OP_INVOKE_OBJECT_INIT);
 
         //LOGI("DexOpt: marked-empty call to %s.%s --> %s.%s\n",
         //    method->clazz->descriptor, method->name,
diff --git a/vm/compiler/Dataflow.c b/vm/compiler/Dataflow.c
index d935fd5..ca72a68 100644
--- a/vm/compiler/Dataflow.c
+++ b/vm/compiler/Dataflow.c
@@ -750,7 +750,7 @@
     // EF OP_EXECUTE_INLINE_RANGE
     DF_FORMAT_3RC,
 
-    // F0 OP_INVOKE_DIRECT_EMPTY
+    // F0 OP_INVOKE_OBJECT_INIT
     DF_NOP,
 
     // F1 OP_RETURN_VOID_BARRIER
diff --git a/vm/compiler/codegen/arm/CodegenDriver.c b/vm/compiler/codegen/arm/CodegenDriver.c
index 74f648b..7049e49 100644
--- a/vm/compiler/codegen/arm/CodegenDriver.c
+++ b/vm/compiler/codegen/arm/CodegenDriver.c
@@ -3222,7 +3222,7 @@
             break;
         }
         /* NOP */
-        case OP_INVOKE_DIRECT_EMPTY: {
+        case OP_INVOKE_OBJECT_INIT: {
             if (gDvmJit.methodTraceSupport)
                 genInterpSingleStep(cUnit, mir);
             break;
diff --git a/vm/mterp/armv5te/OP_INVOKE_DIRECT_EMPTY.S b/vm/mterp/armv5te/OP_INVOKE_OBJECT_INIT.S
similarity index 77%
rename from vm/mterp/armv5te/OP_INVOKE_DIRECT_EMPTY.S
rename to vm/mterp/armv5te/OP_INVOKE_OBJECT_INIT.S
index 3c6b192..b75e124 100644
--- a/vm/mterp/armv5te/OP_INVOKE_DIRECT_EMPTY.S
+++ b/vm/mterp/armv5te/OP_INVOKE_OBJECT_INIT.S
@@ -1,6 +1,6 @@
 %verify "executed"
     /*
-     * invoke-direct-empty is a no-op in a "standard" interpreter.
+     * invoke-object-init is a no-op in a "standard" interpreter.
      */
     FETCH_ADVANCE_INST(3)               @ advance to next instr, load rINST
     GET_INST_OPCODE(ip)                 @ ip<- opcode from rINST
diff --git a/vm/mterp/c/OP_INVOKE_DIRECT_EMPTY.c b/vm/mterp/c/OP_INVOKE_OBJECT_INIT.c
similarity index 82%
rename from vm/mterp/c/OP_INVOKE_DIRECT_EMPTY.c
rename to vm/mterp/c/OP_INVOKE_OBJECT_INIT.c
index 8bdf78a..cc65e3f 100644
--- a/vm/mterp/c/OP_INVOKE_DIRECT_EMPTY.c
+++ b/vm/mterp/c/OP_INVOKE_OBJECT_INIT.c
@@ -1,4 +1,4 @@
-HANDLE_OPCODE(OP_INVOKE_DIRECT_EMPTY /*vB, {vD, vE, vF, vG, vA}, meth@CCCC*/)
+HANDLE_OPCODE(OP_INVOKE_OBJECT_INIT /*vB, {vD, vE, vF, vG, vA}, meth@CCCC*/)
 #if INTERP_TYPE != INTERP_DBG
     //LOGI("Ignoring empty\n");
     FINISH(3);
diff --git a/vm/mterp/out/InterpAsm-armv5te-vfp.S b/vm/mterp/out/InterpAsm-armv5te-vfp.S
index 60fb6c3..8ff4137 100644
--- a/vm/mterp/out/InterpAsm-armv5te-vfp.S
+++ b/vm/mterp/out/InterpAsm-armv5te-vfp.S
@@ -7408,10 +7408,10 @@
 
 /* ------------------------------ */
     .balign 64
-.L_OP_INVOKE_DIRECT_EMPTY: /* 0xf0 */
-/* File: armv5te/OP_INVOKE_DIRECT_EMPTY.S */
+.L_OP_INVOKE_OBJECT_INIT: /* 0xf0 */
+/* File: armv5te/OP_INVOKE_OBJECT_INIT.S */
     /*
-     * invoke-direct-empty is a no-op in a "standard" interpreter.
+     * invoke-object-init is a no-op in a "standard" interpreter.
      */
     FETCH_ADVANCE_INST(3)               @ advance to next instr, load rINST
     GET_INST_OPCODE(ip)                 @ ip<- opcode from rINST
diff --git a/vm/mterp/out/InterpAsm-armv5te.S b/vm/mterp/out/InterpAsm-armv5te.S
index c869286..5869d26 100644
--- a/vm/mterp/out/InterpAsm-armv5te.S
+++ b/vm/mterp/out/InterpAsm-armv5te.S
@@ -7730,10 +7730,10 @@
 
 /* ------------------------------ */
     .balign 64
-.L_OP_INVOKE_DIRECT_EMPTY: /* 0xf0 */
-/* File: armv5te/OP_INVOKE_DIRECT_EMPTY.S */
+.L_OP_INVOKE_OBJECT_INIT: /* 0xf0 */
+/* File: armv5te/OP_INVOKE_OBJECT_INIT.S */
     /*
-     * invoke-direct-empty is a no-op in a "standard" interpreter.
+     * invoke-object-init is a no-op in a "standard" interpreter.
      */
     FETCH_ADVANCE_INST(3)               @ advance to next instr, load rINST
     GET_INST_OPCODE(ip)                 @ ip<- opcode from rINST
diff --git a/vm/mterp/out/InterpAsm-armv7-a-neon.S b/vm/mterp/out/InterpAsm-armv7-a-neon.S
index 4784fbc..c8affdc 100644
--- a/vm/mterp/out/InterpAsm-armv7-a-neon.S
+++ b/vm/mterp/out/InterpAsm-armv7-a-neon.S
@@ -7366,10 +7366,10 @@
 
 /* ------------------------------ */
     .balign 64
-.L_OP_INVOKE_DIRECT_EMPTY: /* 0xf0 */
-/* File: armv5te/OP_INVOKE_DIRECT_EMPTY.S */
+.L_OP_INVOKE_OBJECT_INIT: /* 0xf0 */
+/* File: armv5te/OP_INVOKE_OBJECT_INIT.S */
     /*
-     * invoke-direct-empty is a no-op in a "standard" interpreter.
+     * invoke-object-init is a no-op in a "standard" interpreter.
      */
     FETCH_ADVANCE_INST(3)               @ advance to next instr, load rINST
     GET_INST_OPCODE(ip)                 @ ip<- opcode from rINST
diff --git a/vm/mterp/out/InterpAsm-armv7-a.S b/vm/mterp/out/InterpAsm-armv7-a.S
index 8d5786c..a6cb849 100644
--- a/vm/mterp/out/InterpAsm-armv7-a.S
+++ b/vm/mterp/out/InterpAsm-armv7-a.S
@@ -7366,10 +7366,10 @@
 
 /* ------------------------------ */
     .balign 64
-.L_OP_INVOKE_DIRECT_EMPTY: /* 0xf0 */
-/* File: armv5te/OP_INVOKE_DIRECT_EMPTY.S */
+.L_OP_INVOKE_OBJECT_INIT: /* 0xf0 */
+/* File: armv5te/OP_INVOKE_OBJECT_INIT.S */
     /*
-     * invoke-direct-empty is a no-op in a "standard" interpreter.
+     * invoke-object-init is a no-op in a "standard" interpreter.
      */
     FETCH_ADVANCE_INST(3)               @ advance to next instr, load rINST
     GET_INST_OPCODE(ip)                 @ ip<- opcode from rINST
diff --git a/vm/mterp/out/InterpAsm-x86-atom.S b/vm/mterp/out/InterpAsm-x86-atom.S
index 2ba7e5a..321165e 100644
--- a/vm/mterp/out/InterpAsm-x86-atom.S
+++ b/vm/mterp/out/InterpAsm-x86-atom.S
@@ -14663,8 +14663,8 @@
 
 /* ------------------------------ */
     .balign 64
-.L_OP_INVOKE_DIRECT_EMPTY: /* 0xf0 */
-/* File: x86-atom/OP_INVOKE_DIRECT_EMPTY.S */
+.L_OP_INVOKE_OBJECT_INIT: /* 0xf0 */
+/* File: x86-atom/OP_INVOKE_OBJECT_INIT.S */
    /* Copyright (C) 2008 The Android Open Source Project
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
@@ -14681,16 +14681,17 @@
     */
 
    /*
-    * File: OP_INVOKE_DIRECT_EMPTY.S
+    * File: OP_INVOKE_OBJECT_INIT.S
     *
     * Code: Used as a no-op. Uses no substitutions.
     *
-    * For: invoke-direct-empty
+    * For: invoke-object-init
     *
     * Format: B|A|op CCCC G|F|E|D (35c)
     */
 
     FINISH 3
+
 /* ------------------------------ */
     .balign 64
 .L_OP_RETURN_VOID_BARRIER: /* 0xf1 */
@@ -27320,7 +27321,7 @@
 .long .L_OP_THROW_VERIFICATION_ERROR
 .long .L_OP_EXECUTE_INLINE
 .long .L_OP_EXECUTE_INLINE_RANGE
-.long .L_OP_INVOKE_DIRECT_EMPTY
+.long .L_OP_INVOKE_OBJECT_INIT
 .long .L_OP_UNUSED_F1
 .long .L_OP_IGET_QUICK
 .long .L_OP_IGET_WIDE_QUICK
diff --git a/vm/mterp/out/InterpAsm-x86.S b/vm/mterp/out/InterpAsm-x86.S
index e42a8cd..92786c6 100644
--- a/vm/mterp/out/InterpAsm-x86.S
+++ b/vm/mterp/out/InterpAsm-x86.S
@@ -6124,10 +6124,10 @@
     GOTO_NEXT
 /* ------------------------------ */
     .balign 64
-.L_OP_INVOKE_DIRECT_EMPTY: /* 0xf0 */
-/* File: x86/OP_INVOKE_DIRECT_EMPTY.S */
+.L_OP_INVOKE_OBJECT_INIT: /* 0xf0 */
+/* File: x86/OP_INVOKE_OBJECT_INIT.S */
     /*
-     * invoke-direct-empty is a no-op in a "standard" interpreter.
+     * invoke-object-init is a no-op in a "standard" interpreter.
      */
     FETCH_INST_WORD 3
     ADVANCE_PC 3
@@ -12963,7 +12963,7 @@
 .long .L_OP_THROW_VERIFICATION_ERROR
 .long .L_OP_EXECUTE_INLINE
 .long .L_OP_EXECUTE_INLINE_RANGE
-.long .L_OP_INVOKE_DIRECT_EMPTY
+.long .L_OP_INVOKE_OBJECT_INIT
 .long .L_OP_RETURN_VOID_BARRIER
 .long .L_OP_IGET_QUICK
 .long .L_OP_IGET_WIDE_QUICK
diff --git a/vm/mterp/out/InterpC-allstubs.c b/vm/mterp/out/InterpC-allstubs.c
index a5e448e..8f627c9 100644
--- a/vm/mterp/out/InterpC-allstubs.c
+++ b/vm/mterp/out/InterpC-allstubs.c
@@ -3052,8 +3052,8 @@
     FINISH(3);
 OP_END
 
-/* File: c/OP_INVOKE_DIRECT_EMPTY.c */
-HANDLE_OPCODE(OP_INVOKE_DIRECT_EMPTY /*vB, {vD, vE, vF, vG, vA}, meth@CCCC*/)
+/* File: c/OP_INVOKE_OBJECT_INIT.c */
+HANDLE_OPCODE(OP_INVOKE_OBJECT_INIT /*vB, {vD, vE, vF, vG, vA}, meth@CCCC*/)
 #if INTERP_TYPE != INTERP_DBG
     //LOGI("Ignoring empty\n");
     FINISH(3);
diff --git a/vm/mterp/out/InterpC-portdbg.c b/vm/mterp/out/InterpC-portdbg.c
index d9b59ab..8497502 100644
--- a/vm/mterp/out/InterpC-portdbg.c
+++ b/vm/mterp/out/InterpC-portdbg.c
@@ -3414,8 +3414,8 @@
     FINISH(3);
 OP_END
 
-/* File: c/OP_INVOKE_DIRECT_EMPTY.c */
-HANDLE_OPCODE(OP_INVOKE_DIRECT_EMPTY /*vB, {vD, vE, vF, vG, vA}, meth@CCCC*/)
+/* File: c/OP_INVOKE_OBJECT_INIT.c */
+HANDLE_OPCODE(OP_INVOKE_OBJECT_INIT /*vB, {vD, vE, vF, vG, vA}, meth@CCCC*/)
 #if INTERP_TYPE != INTERP_DBG
     //LOGI("Ignoring empty\n");
     FINISH(3);
diff --git a/vm/mterp/out/InterpC-portstd.c b/vm/mterp/out/InterpC-portstd.c
index 68a35ae..08d06b8 100644
--- a/vm/mterp/out/InterpC-portstd.c
+++ b/vm/mterp/out/InterpC-portstd.c
@@ -3164,8 +3164,8 @@
     FINISH(3);
 OP_END
 
-/* File: c/OP_INVOKE_DIRECT_EMPTY.c */
-HANDLE_OPCODE(OP_INVOKE_DIRECT_EMPTY /*vB, {vD, vE, vF, vG, vA}, meth@CCCC*/)
+/* File: c/OP_INVOKE_OBJECT_INIT.c */
+HANDLE_OPCODE(OP_INVOKE_OBJECT_INIT /*vB, {vD, vE, vF, vG, vA}, meth@CCCC*/)
 #if INTERP_TYPE != INTERP_DBG
     //LOGI("Ignoring empty\n");
     FINISH(3);
diff --git a/vm/mterp/x86-atom/OP_INVOKE_DIRECT_EMPTY.S b/vm/mterp/x86-atom/OP_INVOKE_OBJECT_INIT.S
similarity index 91%
rename from vm/mterp/x86-atom/OP_INVOKE_DIRECT_EMPTY.S
rename to vm/mterp/x86-atom/OP_INVOKE_OBJECT_INIT.S
index 86d8211..16ae56e 100644
--- a/vm/mterp/x86-atom/OP_INVOKE_DIRECT_EMPTY.S
+++ b/vm/mterp/x86-atom/OP_INVOKE_OBJECT_INIT.S
@@ -14,13 +14,13 @@
     */
 
    /*
-    * File: OP_INVOKE_DIRECT_EMPTY.S
+    * File: OP_INVOKE_OBJECT_INIT.S
     *
     * Code: Used as a no-op. Uses no substitutions.
     *
-    * For: invoke-direct-empty
+    * For: invoke-object-init
     *
     * Format: B|A|op CCCC G|F|E|D (35c)
     */
 
-    FINISH 3
\ No newline at end of file
+    FINISH 3
diff --git a/vm/mterp/x86-atom/entry.S b/vm/mterp/x86-atom/entry.S
index 3796838..ac6973b 100644
--- a/vm/mterp/x86-atom/entry.S
+++ b/vm/mterp/x86-atom/entry.S
@@ -373,7 +373,7 @@
 .long .L_OP_THROW_VERIFICATION_ERROR
 .long .L_OP_EXECUTE_INLINE
 .long .L_OP_EXECUTE_INLINE_RANGE
-.long .L_OP_INVOKE_DIRECT_EMPTY
+.long .L_OP_INVOKE_OBJECT_INIT
 .long .L_OP_UNUSED_F1
 .long .L_OP_IGET_QUICK
 .long .L_OP_IGET_WIDE_QUICK
diff --git a/vm/mterp/x86/OP_INVOKE_DIRECT_EMPTY.S b/vm/mterp/x86/OP_INVOKE_DIRECT_EMPTY.S
deleted file mode 100644
index 2fa25e3..0000000
--- a/vm/mterp/x86/OP_INVOKE_DIRECT_EMPTY.S
+++ /dev/null
@@ -1,7 +0,0 @@
-%verify "executed"
-    /*
-     * invoke-direct-empty is a no-op in a "standard" interpreter.
-     */
-    FETCH_INST_WORD 3
-    ADVANCE_PC 3
-    GOTO_NEXT
diff --git a/vm/mterp/x86/OP_INVOKE_OBJECT_INIT.S b/vm/mterp/x86/OP_INVOKE_OBJECT_INIT.S
new file mode 100644
index 0000000..6402392
--- /dev/null
+++ b/vm/mterp/x86/OP_INVOKE_OBJECT_INIT.S
@@ -0,0 +1,7 @@
+%verify "executed"
+    /*
+     * invoke-object-init is a no-op in a "standard" interpreter.
+     */
+    FETCH_INST_WORD 3
+    ADVANCE_PC 3
+    GOTO_NEXT
diff --git a/vm/mterp/x86/entry.S b/vm/mterp/x86/entry.S
index d6d9375..69f2ae5 100644
--- a/vm/mterp/x86/entry.S
+++ b/vm/mterp/x86/entry.S
@@ -361,7 +361,7 @@
 .long .L_OP_THROW_VERIFICATION_ERROR
 .long .L_OP_EXECUTE_INLINE
 .long .L_OP_EXECUTE_INLINE_RANGE
-.long .L_OP_INVOKE_DIRECT_EMPTY
+.long .L_OP_INVOKE_OBJECT_INIT
 .long .L_OP_RETURN_VOID_BARRIER
 .long .L_OP_IGET_QUICK
 .long .L_OP_IGET_WIDE_QUICK