Merge remote branch 'goog/dalvik-dev' into mm

Change-Id: I4346c9891939e589c627b9de4d71b959ed8f3b51
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 1b48950..1db053d 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -46,6 +46,7 @@
 #$(call add-clean-step, rm -rf $(OUT)/obj/SHARED_LIBRARIES/libdvm*)
 $(call add-clean-step, rm -rf $(OUT)/obj/SHARED_LIBRARIES/libdvm*)
 $(call add-clean-step, rm -rf $(OUT)/obj/SHARED_LIBRARIES/libdvm*)
+$(call add-clean-step, rm -rf $(OUT)/obj/SHARED_LIBRARIES/libdvm*)
 # ************************************************
 # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
 # ************************************************
diff --git a/dalvikvm/Main.c b/dalvikvm/Main.c
index a6439fb..666317c 100644
--- a/dalvikvm/Main.c
+++ b/dalvikvm/Main.c
@@ -299,4 +299,3 @@
     /*printf("--- VM is down, process exiting\n");*/
     return result;
 }
-
diff --git a/dexdump/Android.mk b/dexdump/Android.mk
index c8720d8..026067b 100644
--- a/dexdump/Android.mk
+++ b/dexdump/Android.mk
@@ -18,8 +18,7 @@
 LOCAL_PATH:= $(call my-dir)
 
 dexdump_src_files := \
-		DexDump.c \
-		OpCodeNames.c
+		DexDump.c
 
 dexdump_c_includes := \
 		dalvik \
@@ -72,4 +71,3 @@
 
 include $(BUILD_HOST_EXECUTABLE)
 endif # !TARGET_SIMULATOR
-
diff --git a/dexdump/DexDump.c b/dexdump/DexDump.c
index e5527ca..33646bb 100644
--- a/dexdump/DexDump.c
+++ b/dexdump/DexDump.c
@@ -34,11 +34,10 @@
 #include "libdex/DexClass.h"
 #include "libdex/DexProto.h"
 #include "libdex/InstrUtils.h"
+#include "libdex/OpCodeNames.h"
 #include "libdex/SysUtil.h"
 #include "libdex/CmdUtils.h"
 
-#include "dexdump/OpCodeNames.h"
-
 #include <stdlib.h>
 #include <stdio.h>
 #include <fcntl.h>
@@ -80,20 +79,20 @@
 } FieldMethodInfo;
 
 /*
- * Get 2 little-endian bytes. 
- */ 
+ * Get 2 little-endian bytes.
+ */
 static inline u2 get2LE(unsigned char const* pSrc)
 {
     return pSrc[0] | (pSrc[1] << 8);
-}   
+}
 
 /*
- * Get 4 little-endian bytes. 
- */ 
+ * Get 4 little-endian bytes.
+ */
 static inline u4 get4LE(unsigned char const* pSrc)
 {
     return pSrc[0] | (pSrc[1] << 8) | (pSrc[2] << 16) | (pSrc[3] << 24);
-}   
+}
 
 /*
  * Converts a single-character primitive type into its human-readable
@@ -255,7 +254,7 @@
 {
 #define NUM_FLAGS   18
     static const char* kAccessStrings[kAccessForMAX][NUM_FLAGS] = {
-        {   
+        {
             /* class, inner class */
             "PUBLIC",           /* 0x0001 */
             "PRIVATE",          /* 0x0002 */
@@ -573,7 +572,7 @@
     if (triesSize == 0) {
         printf("      catches       : (none)\n");
         return;
-    } 
+    }
 
     printf("      catches       : %d\n", triesSize);
 
@@ -585,7 +584,7 @@
         u4 start = pTry->startAddr;
         u4 end = start + pTry->insnCount;
         DexCatchIterator iterator;
-        
+
         printf("        0x%04x - 0x%04x\n", start, end);
 
         dexCatchIteratorInit(&iterator, pCode, pTry->handlerOff);
@@ -593,14 +592,14 @@
         for (;;) {
             DexCatchHandler* handler = dexCatchIteratorNext(&iterator);
             const char* descriptor;
-            
+
             if (handler == NULL) {
                 break;
             }
-            
-            descriptor = (handler->typeIdx == kDexNoIndex) ? "<any>" : 
+
+            descriptor = (handler->typeIdx == kDexNoIndex) ? "<any>" :
                 dexStringByTypeIdx(pDexFile, handler->typeIdx);
-            
+
             printf("          %s -> 0x%04x\n", descriptor,
                     handler->address);
         }
@@ -616,11 +615,11 @@
 /*
  * Dump the positions list.
  */
-void dumpPositions(DexFile* pDexFile, const DexCode* pCode, 
+void dumpPositions(DexFile* pDexFile, const DexCode* pCode,
         const DexMethod *pDexMethod)
 {
     printf("      positions     : \n");
-    const DexMethodId *pMethodId 
+    const DexMethodId *pMethodId
             = dexGetMethodId(pDexFile, pDexMethod->methodIdx);
     const char *classDescriptor
             = dexStringByTypeIdx(pDexFile, pMethodId->classIdx);
@@ -634,7 +633,7 @@
         const char *signature)
 {
     printf("        0x%04x - 0x%04x reg=%d %s %s %s\n",
-            startAddress, endAddress, reg, name, descriptor, 
+            startAddress, endAddress, reg, name, descriptor,
             signature);
 }
 
@@ -646,9 +645,9 @@
 {
     printf("      locals        : \n");
 
-    const DexMethodId *pMethodId 
+    const DexMethodId *pMethodId
             = dexGetMethodId(pDexFile, pDexMethod->methodIdx);
-    const char *classDescriptor 
+    const char *classDescriptor
             = dexStringByTypeIdx(pDexFile, pMethodId->classIdx);
 
     dexDecodeDebugInfo(pDexFile, pCode, classDescriptor, pMethodId->protoIdx,
@@ -669,7 +668,7 @@
     pMethInfo->name = dexStringById(pDexFile, pMethodId->nameIdx);
     pMethInfo->signature = dexCopyDescriptorFromMethodId(pDexFile, pMethodId);
 
-    pMethInfo->classDescriptor = 
+    pMethInfo->classDescriptor =
             dexStringByTypeIdx(pDexFile, pMethodId->classIdx);
     return true;
 }
@@ -740,7 +739,7 @@
             printf("|%04x: nop // spacer", insnIdx);
         }
     } else {
-        printf("|%04x: %s", insnIdx, getOpcodeName(pDecInsn->opCode));
+        printf("|%04x: %s", insnIdx, dexGetOpcodeName(pDecInsn->opCode));
     }
 
     switch (dexGetInstrFormat(gInstrFormat, pDecInsn->opCode)) {
@@ -836,7 +835,14 @@
             pDecInsn->vA, pDecInsn->vB, (s4)pDecInsn->vC, (u2)pDecInsn->vC);
         break;
     case kFmt22c:        // op vA, vB, thing@CCCC
-        if (pDecInsn->opCode >= OP_IGET && pDecInsn->opCode <= OP_IPUT_SHORT) {
+        if (pDecInsn->opCode == OP_INSTANCE_OF ||
+            pDecInsn->opCode == OP_NEW_ARRAY)
+        {
+            printf(" v%d, v%d, %s // class@%04x",
+                pDecInsn->vA, pDecInsn->vB,
+                getClassDescriptor(pDexFile, pDecInsn->vC), pDecInsn->vC);
+        } else {
+            /* iget* and iput*, including dexopt-generated -volatile */
             FieldMethodInfo fieldInfo;
             if (getFieldInfo(pDexFile, pDecInsn->vC, &fieldInfo)) {
                 printf(" v%d, v%d, %s.%s:%s // field@%04x", pDecInsn->vA,
@@ -846,10 +852,6 @@
                 printf(" v%d, v%d, ??? // field@%04x", pDecInsn->vA,
                     pDecInsn->vB, pDecInsn->vC);
             }
-        } else {
-            printf(" v%d, v%d, %s // class@%04x",
-                pDecInsn->vA, pDecInsn->vB,
-                getClassDescriptor(pDexFile, pDecInsn->vC), pDecInsn->vC);
         }
         break;
     case kFmt22cs:       // [opt] op vA, vB, field offset CCCC
@@ -1067,9 +1069,9 @@
             insnWidth = 2 + get2LE((const u1*)(insns+1)) * 4;
         } else if (instr == kArrayDataSignature) {
             int width = get2LE((const u1*)(insns+1));
-            int size = get2LE((const u1*)(insns+2)) | 
+            int size = get2LE((const u1*)(insns+2)) |
                        (get2LE((const u1*)(insns+3))<<16);
-            // The plus 1 is to round up for odd size and width 
+            // The plus 1 is to round up for odd size and width
             insnWidth = 4 + ((size * width) + 1) / 2;
         } else {
             opCode = instr & 0xff;
@@ -1355,7 +1357,7 @@
         printf("Trouble reading class data (#%d)\n", idx);
         goto bail;
     }
-    
+
     classDescriptor = dexStringByTypeIdx(pDexFile, pClassDef->classIdx);
 
     /*
@@ -1893,4 +1895,3 @@
 
     return (result != 0);
 }
-
diff --git a/dexlist/DexList.c b/dexlist/DexList.c
index 841c17f..3552d2e 100644
--- a/dexlist/DexList.c
+++ b/dexlist/DexList.c
@@ -165,19 +165,19 @@
         fprintf(stderr, "Trouble reading class data\n");
         return;
     }
-    
+
     if (pClassDef->sourceFileIdx == 0xffffffff) {
         fileName = NULL;
     } else {
         fileName = dexStringById(pDexFile, pClassDef->sourceFileIdx);
     }
-    
-    /* 
+
+    /*
      * TODO: Each class def points at a sourceFile, so maybe that
      * should be printed out. However, this needs to be coordinated
      * with the tools that parse this output.
      */
-       
+
     for (i = 0; i < (int) pClassData->header.directMethodsSize; i++) {
         dumpMethod(pDexFile, fileName, &pClassData->directMethods[i], i);
     }
@@ -291,4 +291,3 @@
     free(gParms.argCopy);
     return result;
 }
-
diff --git a/dexopt/OptMain.c b/dexopt/OptMain.c
index edd5425..8dffcf5 100644
--- a/dexopt/OptMain.c
+++ b/dexopt/OptMain.c
@@ -485,4 +485,3 @@
     fprintf(stderr, "Usage: don't use this\n");
     return 1;
 }
-
diff --git a/docs/dalvik-bytecode.html b/docs/dalvik-bytecode.html
index 6d6c4f1..e69a962 100644
--- a/docs/dalvik-bytecode.html
+++ b/docs/dalvik-bytecode.html
@@ -448,7 +448,7 @@
     no arrays of <code>long</code> or <code>double</code>, but reference
     types are acceptable). The constructed
     instance is stored as a "result" in the same way that the method invocation
-    instructions store their results, so the constructed instance must 
+    instructions store their results, so the constructed instance must
     be moved to a register with an immediately subsequent
     <code>move-result-object</code> instruction (if it is to be used).</td>
 </tr>
@@ -1453,7 +1453,7 @@
     float result = a % b;
   </td>
   <td>Floating point remainder after division. This function is different
-    than IEEE 754 remainder and is defined as 
+    than IEEE 754 remainder and is defined as
     <code>result == a - roundTowardZero(a / b) * b</code>.
   </td>
 </tr>
@@ -1491,7 +1491,7 @@
     double result = a % b;
   </td>
   <td>Floating point remainder after division. This function is different
-    than IEEE 754 remainder and is defined as 
+    than IEEE 754 remainder and is defined as
     <code>result == a - roundTowardZero(a / b) * b</code>.
   </td>
 </tr>
diff --git a/docs/dalvik-constraints.html b/docs/dalvik-constraints.html
index 105225a..69abf3a 100644
--- a/docs/dalvik-constraints.html
+++ b/docs/dalvik-constraints.html
@@ -5,11 +5,11 @@
     <title>Dalvik bytecode constraints</title>
     <link rel=stylesheet href="dalvik-constraints.css">
   </head>
-  
+
   <body>
-  
+
     <h1>Dalvik bytecode constraints</h1>
-  
+
 <!--
     <h1>General integrity constraints</h1>
 
@@ -18,17 +18,17 @@
         <th>
           Identifier
         </th>
-        
+
         <th>
           Description
         </th>
       </tr>
-  
+
       <tr>
         <td>
           A1
         </td>
-        
+
         <td>
           The magic number of the DEX file must be "dex\n035\0".
         </td>
@@ -38,7 +38,7 @@
         <td>
           A1
         </td>
-        
+
         <td>
           The checksum must be an Adler-32 checksum of the whole file contents
           except magic and checksum field.
@@ -54,14 +54,14 @@
 The header_size must have the value 0x70.
 
 The endian_tag must have either the value ENDIAN_CONSTANT or
-REVERSE_ENDIAN_CONSTANT.   
- 
+REVERSE_ENDIAN_CONSTANT.
+
 For each of the link, string_ids, type_ids, proto_ids, field_ids, method_ids, class_defs
 and data sections, the offset and size fields must be either both zero or both
 non-zero. In the latter case, the offset must be four-byte-aligned.
 
 All offset fields in the header except map_off must be four-byte-aligned.
- 
+
 The map_off field must be either zero or point into the data section. In the
 latter case, the data section must exist.
 
@@ -124,7 +124,7 @@
 ...
 
 -->
- 
+
     <h2>
       Static constraints
     </h2>
@@ -134,153 +134,153 @@
     They usually can be checked without employing control or data-flow analysis
     techniques.
     </p>
-  
+
     <table>
       <tr>
         <th>
           Identifier
         </th>
-        
+
         <th>
           Description
         </th>
-        
+
         <th>
           Spec equivalent
         </th>
       </tr>
-  
+
       <tr>
         <td>
           A1
         </td>
-        
+
         <td>
-          The <code>insns</code> array must not be empty. 
+          The <code>insns</code> array must not be empty.
         </td>
-  
+
         <td>
           4.8.1.1
         </td>
       </tr>
-      
+
       <tr>
         <td>
           A2
         </td>
-        
+
         <td>
           The first opcode in the <code>insns</code> array must have index zero.
         </td>
-  
+
         <td>
           4.8.1.3
         </td>
       </tr>
-      
+
       <tr>
         <td>
           A3
         </td>
-        
+
         <td>
           The <code>insns</code> array must only contain valid Dalvik opcodes.
         </td>
-  
+
         <td>
           4.8.1.4
         </td>
       </tr>
-      
+
       <tr>
         <td>
           A4
         </td>
-        
+
         <td>
           The index of instruction <code>n+1</code> must equal the index of
           instruction <code>n</code> plus the length of instruction
           <code>n</code>, taking into account possible operands.
         </td>
-  
+
         <td>
           4.8.1.5
         </td>
       </tr>
-      
+
       <tr>
         <td>
           A5
         </td>
-        
+
         <td>
           The last instruction in the <code>insns</code> array must end at index
-          <code>insns_size-1</code>.   
+          <code>insns_size-1</code>.
         </td>
-  
+
         <td>
           4.8.1.6
         </td>
       </tr>
-      
+
       <tr>
         <td>
           A6
         </td>
-        
+
         <td>
           All <code>goto</code> and <code>if-&lt;kind&gt;</code> targets must
           be opcodes within in the same method.
         </td>
-  
+
         <td>
           4.8.1.7
         </td>
       </tr>
-      
+
       <tr>
         <td>
           A7
         </td>
-        
+
         <td>
           All targets of a <code>packed-switch</code> instruction must be
           opcodes within in the same method. The size and the list of targets
-          must be consistent. 
+          must be consistent.
         </td>
-  
+
         <td>
           4.8.1.8
         </td>
       </tr>
-          
+
       <tr>
         <td>
           A8
         </td>
-        
+
         <td>
           All targets of a <code>sparse-switch</code> instruction must be
           opcodes within in the same method. The corresponding table must be
-          consistent and sorted low-to-high. 
+          consistent and sorted low-to-high.
         </td>
-  
+
         <td>
           4.8.1.9
         </td>
       </tr>
-      
+
       <tr>
         <td>
           A9
         </td>
-        
+
         <td>
           The <code>B</code> operand of the <code>const-string</code> and
           <code>const-string/jumbo</code> instructions must be a valid index
           into the string constant pool.
         </td>
-  
+
         <td>
           4.8.1.10
         </td>
@@ -290,31 +290,31 @@
         <td>
           A10
         </td>
-        
+
         <td>
           The <code>C</code> operand of the <code>iget&lt;kind&gt;</code> and
           <code>iput&lt;kind&gt;</code> instructions must be a valid index into
           the field constant pool. The referenced entry must represent an
           instance field.
         </td>
-  
+
         <td>
           4.8.1.12
         </td>
       </tr>
-      
+
       <tr>
         <td>
           A11
         </td>
-        
+
         <td>
           The <code>C</code> operand of the <code>sget&lt;kind&gt;</code> and
           <code>sput&lt;kind&gt;</code> instructions must be a valid index into
           the field constant pool. The referenced entry must represent a static
           field.
         </td>
-  
+
         <td>
           4.8.1.12
         </td>
@@ -324,33 +324,33 @@
         <td>
           A12
         </td>
-        
+
         <td>
           The <code>C</code> operand of the <code>invoke-virtual</code>,
           <code>invoke-super</code>, <code<invoke-direct</code> and
           <code>invoke-static</code> instructions must be a valid index into the
           method constant pool. In all cases, the referenced
-          <code>method_id</code> must belong to a class (not an interface). 
+          <code>method_id</code> must belong to a class (not an interface).
         </td>
-  
+
         <td>
           4.8.1.13
         </td>
       </tr>
-      
+
       <tr>
         <td>
           A13
         </td>
-        
+
         <td>
           The <code>B</code> operand of the <code>invoke-virtual/range</code>,
           <code>invoke-super/range</code>, <code>invoke-direct/range</code>, and
           <code>invoke-static/range</code> instructions must be a valid index
           into the method constant pool. In all cases, the referenced
-          <code>method_id</code> must belong to a class (not an interface). 
+          <code>method_id</code> must belong to a class (not an interface).
         </td>
-  
+
         <td>
           4.8.1.13
         </td>
@@ -360,81 +360,81 @@
         <td>
           A14
         </td>
-        
+
         <td>
           A method the name of which starts with a '<' must only be invoked
           implicitly by the VM, not by code originating from a Dex file. The
           only exception is the instance initializer, which may be invoked by
           <code>invoke-direct</code>.
         </td>
-  
+
         <td>
           4.8.1.14
         </td>
       </tr>
-      
+
       <tr>
         <td>
           A15
         </td>
-        
+
         <td>
           The <code>C</code> operand of the <code>invoke-interface</code>
           instruction must be a valid index into the method constant pool. The
           referenced <code>method_id</code> must belong to an interface (not a
           class).
         </td>
-  
+
         <td>
           4.8.1.15
         </td>
       </tr>
-  
+
       <tr>
         <td>
           A16
         </td>
-        
+
         <td>
           The <code>B</code> operand of the <code>invoke-interface/range</code>
           instruction must be a valid index into the method constant pool.
           The referenced <code>method_id</code> must belong to an interface (not
           a class).
         </td>
-  
+
         <td>
           4.8.1.15
         </td>
       </tr>
-  
+
       <tr>
         <td>
           A17
         </td>
-        
+
         <td>
           The <code>B</code> operand of the <code>const-class</code>,
           <code>check-cast</code>, <code>new-instance</code>, and
           <code>filled-new-array/range</code> instructions must be a valid index
           into the type constant pool.
         </td>
-  
+
         <td>
           4.8.1.16
         </td>
       </tr>
-  
+
       <tr>
         <td>
           A18
         </td>
-        
+
         <td>
           The <code>C</code> operand of the <code>instance-of</code>,
           <code>new-array</code>, and <code>filled-new-array</code>
           instructions must be a valid index into the type constant pool.
         </td>
-  
+
         <td>
           4.8.1.16
         </td>
@@ -444,85 +444,85 @@
         <td>
           A19
         </td>
-        
+
         <td>
           The dimensions of an array created by a <code>new-array</code>
           instruction must be less than <code>256</code>.
         </td>
-  
+
         <td>
           4.8.1.17
         </td>
       </tr>
-  
+
       <tr>
         <td>
           A20
         </td>
-        
+
         <td>
           The <code>new</code> instruction must not refer to array classes,
           interfaces, or abstract classes.
         </td>
-  
+
         <td>
           4.8.1.18
         </td>
       </tr>
-  
+
       <tr>
         <td>
           A21
         </td>
-        
+
         <td>
           The type referred to by a <code>new-array</code> instruction must be
           a valid, non-reference type.
         </td>
-  
+
         <td>
           4.8.1.20
         </td>
       </tr>
-  
+
       <tr>
         <td>
           A22
         </td>
-        
+
         <td>
           All registers referred to by an instruction in a single-width
           (non-pair) fashion must be valid for the current method. That is,
           their indices must be non-negative and smaller than
-          <code>registers_size</code>. 
+          <code>registers_size</code>.
         </td>
-  
+
         <td>
           4.8.1.21
         </td>
       </tr>
-  
+
       <tr>
         <td>
           A23
         </td>
-        
+
         <td>
           All registers referred to by an instruction in a double-width (pair)
           fashion must be valid for the current method. That is, their indices
-          must be non-negative and smaller than <code>registers_size-1</code>. 
+          must be non-negative and smaller than <code>registers_size-1</code>.
         </td>
-  
+
         <td>
           4.8.1.23
         </td>
       </tr>
     </table>
-      
+
     <h2>
       Structural constraints
     </h2>
-  
+
     <p>
     Structural constraints are constraints on relationships between several
     elements of the bytecode. They usually can't be checked without employing
@@ -534,291 +534,291 @@
         <th>
           Identifier
         </th>
-        
+
         <th>
           Description
         </th>
-        
+
         <th>
           Spec equivalent
         </th>
       </tr>
-  
+
       <tr>
         <td>
           B1
         </td>
-        
+
         <td>
           The number and types of arguments (registers and immediate values)
           must always match the instruction.
         </td>
-  
+
         <td>
           4.8.2.1
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B2
         </td>
-        
+
         <td>
-          Register pairs must never be broken up. 
+          Register pairs must never be broken up.
         </td>
-  
+
         <td>
           4.8.2.3
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B3
         </td>
-        
+
         <td>
           A register (or pair) has to be assigned first before it can be
           read.
         </td>
-  
+
         <td>
           4.8.2.4
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B4
         </td>
-        
+
         <td>
           An <code>invoke-direct</code> instruction must only invoke an instance
           initializer or a method in the current class or one of its
-          superclasses. 
+          superclasses.
         </td>
-  
+
         <td>
           4.8.2.7
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B5
         </td>
-        
+
         <td>
           An instance initializer must only be invoked on an uninitialized
           instance.
         </td>
-  
+
         <td>
           4.8.2.8
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B6
         </td>
-        
+
         <td>
           Instance methods may only be invoked on and instance fields may only
-          be accessed on already initialized instances.   
+          be accessed on already initialized instances.
         </td>
-  
+
         <td>
           4.8.2.9
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B7
         </td>
-        
+
         <td>
           A register which holds the result of a <code>new-instance</code>code>
           instruction must not be used if the same
           <code>new-instance</code>code> instruction is again executed before
-          the instance is initialized.           
+          the instance is initialized.
         </td>
-  
+
         <td>
           4.8.2.10
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B8
         </td>
-        
+
         <td>
            An instance initializer must call another instance initializer (same
            class or superclass) before any instance members can be accessed.
            Exceptions are non-inherited instance fields, which can be assigned
            before calling another initializer, and the <code>Object</code> class
-           in general.   
+           in general.
         </td>
-  
+
         <td>
           4.8.2.11
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B9
         </td>
-        
+
         <td>
            All actual method arguments must be assignment-compatible with their
-           respective formal arguments.    
+           respective formal arguments.
         </td>
-  
+
         <td>
           4.8.2.12
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B10
         </td>
-        
+
         <td>
            For each instance method invocation, the actual instance must be
            assignment-compatible with the class or interface specified in the
            instruction.
         </td>
-  
+
         <td>
           4.8.2.13
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B11
         </td>
-        
+
         <td>
            A <code>return&lt;kind&gt;</code> instruction must match its
-           method's return type.  
+           method's return type.
         </td>
-  
+
         <td>
           4.8.2.14
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B12
         </td>
-        
+
         <td>
            When accessing protected members of a superclass, the actual type of
            the instance being accessed must be either the current class or one
            of its subclasses.
         </td>
-  
+
         <td>
           4.8.2.15
         </td>
       </tr>
-  
+
      <tr>
         <td>
           B13
         </td>
-        
+
         <td>
            The type of a value stored into a static field must be
            assignment-compatible with or convertible to the field's type.
         </td>
-  
+
         <td>
           4.8.2.16
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B14
         </td>
-        
+
         <td>
            The type of a value stored into a field must be assignment-compatible
            with or convertible to the field's type.
         </td>
-  
+
         <td>
           4.8.2.17
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B15
         </td>
-        
+
         <td>
            The type of every value stored into an array must be
            assignment-compatible with the array's component type.
         </td>
-  
+
         <td>
           4.8.2.18
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B16
         </td>
-        
+
         <td>
            The <code>A</code> operand of a <code>throw</code> instruction must
-           be assignment-compatible with <code>java.lang.Throwable</code>. 
+           be assignment-compatible with <code>java.lang.Throwable</code>.
         </td>
-  
+
         <td>
           4.8.2.19
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B17
         </td>
-        
+
         <td>
            The last reachable instruction of a method must either be a backwards
            <code>goto</code> or branch, a <code>return</code>, or a
            <code>throw</code> instruction. It must not be possible to leave the
            <code>insns</code> array at the bottom.
         </td>
-  
+
         <td>
           4.8.2.20
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B18
         </td>
-        
+
         <td>
           The unassigned half of a former register pair may not be read (is
           considered invalid) until it has been re-assigned by some other
           instruction.
-        </td>        
-  
+        </td>
+
         <td>
           4.8.2.3, 4.8.2.4
         </td>
@@ -828,15 +828,15 @@
         <td>
           B19
         </td>
-        
+
         <td>
           A <code>move-result&lt;kind&gt;</code> instruction must be immediately
           preceded (in the <code>insns</code> array) by an
           <code>&lt;invoke-kind&gt;</code> instruction. The only exception is
           the <code>move-result-object</code> instruction, which may also be
-          preceded by a <code>filled-new-array</code> instruction. 
+          preceded by a <code>filled-new-array</code> instruction.
         </td>
-  
+
         <td>
           -
         </td>
@@ -846,16 +846,16 @@
         <td>
           B20
         </td>
-        
+
         <td>
           A <code>move-result&lt;kind&gt;</code> instruction must be immediately
           preceded (in actual control flow) by a matching
           <code>return-&lt;kind&gt;</code> instruction (it must not be jumped
           to). The only exception is the <code>move-result-object</code>
           instruction, which may also be preceded by a
-          <code>filled-new-array</code> instruction. 
+          <code>filled-new-array</code> instruction.
         </td>
-  
+
         <td>
           -
         </td>
@@ -865,28 +865,28 @@
         <td>
           B21
         </td>
-        
+
         <td>
           A <code>move-exception</code> instruction must only appear as the
           first instruction in an exception handler.
         </td>
-  
+
         <td>
           -
         </td>
       </tr>
-      
+
       <tr>
         <td>
           B22
         </td>
-        
+
         <td>
           The <code>packed-switch-data</code>, <code>sparse-switch-data</code>,
           and <code>fill-array-data</code> pseudo-instructions must not be
           reachable by control flow.
         </td>
-  
+
         <td>
           -
         </td>
diff --git a/docs/dex-format.css b/docs/dex-format.css
index 17e935f..153dd4e 100644
--- a/docs/dex-format.css
+++ b/docs/dex-format.css
@@ -85,13 +85,13 @@
     background: #eeeeff;
 }
 
-table p { 
+table p {
     margin-bottom: 0pt;
 }
 
 /* for the bnf syntax sections */
 
-table.bnf { 
+table.bnf {
     background: #eeeeff;
     border-color: #aaaaff;
     border-style: solid;
@@ -104,7 +104,7 @@
     padding-right: 6pt;
 }
 
-table.bnf td { 
+table.bnf td {
     border: none;
     padding-left: 6pt;
     padding-right: 6pt;
@@ -112,12 +112,12 @@
     padding-bottom: 1pt;
 }
 
-table.bnf td:first-child { 
+table.bnf td:first-child {
     padding-right: 0pt;
     width: 8pt;
 }
 
-table.bnf td:first-child td { 
+table.bnf td:first-child td {
     padding-left: 0pt;
 }
 
diff --git a/docs/dex-format.html b/docs/dex-format.html
index bc69dd0..cab9d4c 100644
--- a/docs/dex-format.html
+++ b/docs/dex-format.html
@@ -1305,7 +1305,7 @@
 <tr>
   <td>data_off</td>
   <td>uint</td>
-  <td>offset from the start of the file to the start of the 
+  <td>offset from the start of the file to the start of the
    <code>data</code> section.
   </td>
 </tr>
@@ -1559,7 +1559,7 @@
   <td>data</td>
   <td>ubyte[]</td>
   <td>a series of MUTF-8 code units (a.k.a. octets, a.k.a. bytes)
-    followed by a byte of value <code>0</code>. See 
+    followed by a byte of value <code>0</code>. See
     "MUTF-8 (Modified UTF-8) Encoding" above for details and
     discussion about the data format.
     <p><b>Note:</b> It is acceptable to have a string which includes
@@ -1892,7 +1892,7 @@
 </tbody>
 </table>
 
-<p><b>Note:</b> All elements' <code>field_id</code>s and 
+<p><b>Note:</b> All elements' <code>field_id</code>s and
 <code>method_id</code>s must refer to the same defining class.</p>
 
 <h3><code>encoded_field</code> Format</h3>
@@ -2055,10 +2055,10 @@
 <tr>
   <td>debug_info_off</td>
   <td>uint</td>
-  <td>offset from the start of the file to the debug info (line numbers + 
-    local variable info) sequence for this code, or <code>0</code> if 
-    there simply is no information. The offset, if non-zero, should be 
-    to a location in the <code>data</code> section. The format of 
+  <td>offset from the start of the file to the debug info (line numbers +
+    local variable info) sequence for this code, or <code>0</code> if
+    there simply is no information. The offset, if non-zero, should be
+    to a location in the <code>data</code> section. The format of
     the data is specified by "<code>debug_info_item</code>" below.
   </td>
 </tr>
@@ -2258,7 +2258,7 @@
 should be associated with the next positions table entry emitted by
 the state machine. It is initialized in the sequence header, and may
 change in positive or negative directions but must never be less than
-<code>1</code>. The <code>source_file</code> register represents the 
+<code>1</code>. The <code>source_file</code> register represents the
 source file that the line number entries refer to. It is initialized to
 the value of <code>source_file_idx</code> in <code>class_def_item</code>.
 The other two variables, <code>prologue_end</code> and
@@ -2282,7 +2282,7 @@
 <tr>
  <td>line_start</td>
  <td>uleb128</td>
- <td>the initial value for the state machine's <code>line</code> register. 
+ <td>the initial value for the state machine's <code>line</code> register.
     Does not represent an actual positions entry.
  </td>
 </tr>
@@ -2351,7 +2351,7 @@
     <code>name_idx</code>: string index of the name<br/>
     <code>type_idx</code>: type index of the type
   </td>
-  <td>introduces a local variable at the current address. Either 
+  <td>introduces a local variable at the current address. Either
     <code>name_idx</code> or <code>type_idx</code> may be
     <code>NO_INDEX</code> to indicate that that value is unknown.
   </td>
@@ -2363,7 +2363,7 @@
     uleb128p1&nbsp;name_idx<br/>
     uleb128p1&nbsp;type_idx<br/>
     uleb128p1&nbsp;sig_idx
-  </td> 
+  </td>
   <td><code>register_num</code>: register that will contain local<br/>
     <code>name_idx</code>: string index of the name<br/>
     <code>type_idx</code>: type index of the type<br/>
@@ -2385,7 +2385,7 @@
   <td>0x05</td>
   <td>uleb128&nbsp;register_num</td>
   <td><code>register_num</code>: register that contained local</td>
-  <td>marks a currently-live local variable as out of scope at the current 
+  <td>marks a currently-live local variable as out of scope at the current
     address
   </td>
 </tr>
@@ -2404,9 +2404,9 @@
   <td>0x07</td>
   <td></td>
   <td><i>(none)</i></td>
-  <td>sets the <code>prologue_end</code> state machine register, 
-    indicating that the next position entry that is added should be 
-    considered the end of a method prologue (an appropriate place for 
+  <td>sets the <code>prologue_end</code> state machine register,
+    indicating that the next position entry that is added should be
+    considered the end of a method prologue (an appropriate place for
     a method breakpoint). The <code>prologue_end</code> register is
     cleared by any special (<code>&gt;= 0x0a</code>) opcode.
   </td>
@@ -2416,9 +2416,9 @@
   <td>0x08</td>
   <td></td>
   <td><i>(none)</i></td>
-  <td>sets the <code>epilogue_begin</code> state machine register, 
-    indicating that the next position entry that is added should be 
-    considered the beginning of a method epilogue (an appropriate place 
+  <td>sets the <code>epilogue_begin</code> state machine register,
+    indicating that the next position entry that is added should be
+    considered the beginning of a method epilogue (an appropriate place
     to suspend execution before method exit).
     The <code>epilogue_begin</code> register is cleared by any special
     (<code>&gt;= 0x0a</code>) opcode.
@@ -2427,7 +2427,7 @@
 <tr>
   <td>DBG_SET_FILE</td>
   <td>0x09</td>
-  <td>uleb128p1&nbsp;name_idx</td> 
+  <td>uleb128p1&nbsp;name_idx</td>
   <td><code>name_idx</code>: string index of source file name;
     <code>NO_INDEX</code> if unknown
   </td>
@@ -2438,7 +2438,7 @@
 </tr>
 <tr>
   <td><i>Special Opcodes</i></td>
-  <!-- When updating the range below, make sure to search for other 
+  <!-- When updating the range below, make sure to search for other
   instances of 0x0a in this section. -->
   <td>0x0a&hellip;0xff</td>
   <td></td>
@@ -2532,7 +2532,7 @@
 </tbody>
 </table>
 
-<p><b>Note:</b> All elements' <code>field_id</code>s and 
+<p><b>Note:</b> All elements' <code>field_id</code>s and
 <code>method_id</code>s must refer to the same defining class.</p>
 
 <h3><code>field_annotation</code> Format</h3>
diff --git a/docs/hello-world.html b/docs/hello-world.html
index dbbaea6..7491a28 100644
--- a/docs/hello-world.html
+++ b/docs/hello-world.html
@@ -22,7 +22,7 @@
 % <font color="green">dx --dex --output=foo.jar Foo.class</font><br>
 % <font color="green">adb push foo.jar /sdcard</font><br>
 % <font color="green">adb shell dalvikvm -cp /sdcard/foo.jar Foo</font><br>
-Hello, world 
+Hello, world
 </code>
 </p><p>
 The <code>-cp</code> option sets the classpath.  The initial directory
diff --git a/docs/instruction-formats.css b/docs/instruction-formats.css
index ee23c5c..a2dc42f 100644
--- a/docs/instruction-formats.css
+++ b/docs/instruction-formats.css
@@ -124,6 +124,6 @@
     width: 22%;
 }
 
-table.format p { 
+table.format p {
     margin-bottom: 0pt;
 }
\ No newline at end of file
diff --git a/docs/java-bytecode.css b/docs/java-bytecode.css
index 6075c0d..48984b2 100644
--- a/docs/java-bytecode.css
+++ b/docs/java-bytecode.css
@@ -10,7 +10,7 @@
     }
 }
 
-h1 { 
+h1 {
     text-align: center;
 }
 
@@ -26,16 +26,16 @@
     border-width: 0;
 }
 
-td.outer { 
+td.outer {
     width: 25%;
     padding: 0;
 }
 
-td.outer table { 
+td.outer table {
     width: 100%;
 }
 
-td.outer td { 
+td.outer td {
     border-width: 0;
     background: #f8f8f8;
     padding: 1pt;
@@ -43,11 +43,11 @@
     padding-right: 2pt;
 }
 
-tr.d td { 
+tr.d td {
     background: #dddddd;
 }
 
-td.outer td + td + td { 
+td.outer td + td + td {
     font-family: monospace;
     font-weight: bold;
     padding-right: 5pt;
diff --git a/docs/java-constraints.html b/docs/java-constraints.html
index 2410a1e..9d3c434 100644
--- a/docs/java-constraints.html
+++ b/docs/java-constraints.html
@@ -30,7 +30,7 @@
       constraint will fail during the Dx conversion or during verification in
       the VM itself.
     </p>
-  
+
     <h2>
       Static constraints
     </h2>
@@ -40,311 +40,311 @@
     They usually can be checked without employing control or data-flow analysis
     techniques.
     </p>
-    
+
     <table>
       <tr>
         <th>
           Identifier
         </th>
-        
+
         <th>
           Description
         </th>
-        
+
         <th>
           Spec equivalent
         </th>
-        
+
         <th>
           Failure mode
         </th>
       </tr>
-  
+
       <tr>
         <td>
           A1
         </td>
-        
+
         <td>
-          The <code>code</code> array must not be empty. 
+          The <code>code</code> array must not be empty.
         </td>
-  
+
         <td>
           4.8.1.1
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-  
+
       <tr>
         <td>
           A2
         </td>
-        
+
         <td>
-          The <code>code</code> array must not be larger than 65535 bytes. 
+          The <code>code</code> array must not be larger than 65535 bytes.
         </td>
-  
+
         <td>
           4.8.1.2
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-      
+
       <tr>
         <td>
           A3
         </td>
-        
+
         <td>
           The first opcode in <code>code</code> array must have index
           <code>0</code>.
         </td>
-  
+
         <td>
           4.8.1.3
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-      
+
       <tr>
         <td>
           A4
         </td>
-        
+
         <td>
           The <code>code</code> array must only contain valid opcodes.
         </td>
-  
+
         <td>
           4.8.1.4
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-      
+
       <tr>
         <td>
           A5
         </td>
-        
+
         <td>
           The index of instruction <code>n+1</code> must equal the index of
           instruction <code>n</code> plus the length of instruction
           <code>n</code>, taking into account a possible <code>wide</code>
           instruction. Opcodes modified by a <code>wide</code> instruction must
-          not be directly reachable. 
+          not be directly reachable.
         </td>
-  
+
         <td>
           4.8.1.5
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-      
+
       <tr>
         <td>
           A6
         </td>
-        
+
         <td>
           The last instruction in <code>code</code> array must end at index
-          <code>code_length-1</code>.   
+          <code>code_length-1</code>.
         </td>
-  
+
         <td>
           4.8.1.6
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-      
+
       <tr>
         <td>
           A7
         </td>
-        
+
         <td>
           All jump and branch targets must be opcodes within the same method.
           Opcodes modified by a <code>wide</code> instruction must not be
-          directly reachable via a jump or branch instruction. 
+          directly reachable via a jump or branch instruction.
         </td>
-  
+
         <td>
           4.8.1.7
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-      
+
       <tr>
         <td>
           A8
         </td>
-        
+
         <td>
           All targets of a <code>tableswitch</code> instruction must be opcodes
           within the same method. Upper and lower bounds must be consistent.
           Opcodes modified by a <code>wide</code> instruction must not be
-          directly reachable via a <code>tableswitch</code> instruction. 
+          directly reachable via a <code>tableswitch</code> instruction.
         </td>
-  
+
         <td>
           4.8.1.8
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-          
+
       <tr>
         <td>
           A9
         </td>
-        
+
         <td>
           All targets of a <code>lookupswitch</code> instruction must be opcodes
           within the same method. Its table must be consistent and sorted
           low-to-high. Opcodes modified by a <code>wide</code> instruction must
-          not be directly reachable via a <code>lookupswitch</code> instruction. 
+          not be directly reachable via a <code>lookupswitch</code> instruction.
         </td>
-  
+
         <td>
           4.8.1.9
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-      
+
       <tr>
         <td>
           A10
         </td>
-        
+
         <td>
           The operands of <code>ldc</code> and <code>ldc_w</code> instructions
           must be valid indices into the constant pool. The respective entries
           must be of type <code>CONSTANT_Integer</code>,
-          <code>CONSTANT_Float</code>, or <code>CONSTANT_String</code>. 
+          <code>CONSTANT_Float</code>, or <code>CONSTANT_String</code>.
         </td>
-  
+
         <td>
           4.8.1.10
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-      
+
       <tr>
         <td>
           A11
         </td>
-        
+
         <td>
           The operands of <code>ldc2_w</code> instructions must be valid indices
           into the constant pool. The respective entries must be of type
           <code>CONSTANT_Long</code> or <code>CONSTANT_Double</code>. The
           subsequent constant pool entry must be valid and remain unused.
         </td>
-  
+
         <td>
           4.8.1.11
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-      
+
       <tr>
         <td>
           A12
         </td>
-        
+
         <td>
           The Operands of <code>get&lt;kind&gt;</code> and
           <code>put&lt;kind&gt;</code> instructions must be valid indices into
           constant pool. The respective entries must be of type
           <code>CONSTANT_Fieldref</code>.
         </td>
-  
+
         <td>
           4.8.1.12
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-      
+
       <tr>
         <td>
           A13
         </td>
-        
+
         <td>
           The first two operands of <code>invokevirtual</code>,
           <code>invokespecial</code>, and <code>invokestatic</code> must form a
           valid 16-bit index into the constant pool. The respective entries must
           be of type <code>CONSTANT_Methodref</code>.
         </td>
-  
+
         <td>
           4.8.1.13
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-      
+
       <tr>
         <td>
           A14
         </td>
-        
+
         <td>
           Methods whose names start with '<' must only be invoked implicitly by
           the VM, not by class file code. The only exception is the instance
           initializer, which may be invoked by <code>invokespecial</code>.
         </td>
-  
+
         <td>
           4.8.1.14
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-      
+
       <tr>
         <td>
           A15
         </td>
-        
+
         <td>
           The first two operands of <code>invokeinterface</code> must form a
           valid 16-bit index into the constant pool. The entry must be of type
@@ -352,21 +352,21 @@
           specify number of local variables and the fourth operand must always
           be zero.
         </td>
-  
+
         <td>
           4.8.1.15
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-  
+
       <tr>
         <td>
           A16
         </td>
-        
+
         <td>
           The operands of <code>instanceof</code>, <code>checkcast</code>,
           <code>new</code>, and <code>anewarray</code> instructions must
@@ -375,218 +375,218 @@
           into the constant pool. All respective entries must be of type
           <code>CONSTANT_Class</code>.
         </td>
-  
+
         <td>
           4.8.1.16
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-  
+
      <tr>
         <td>
           A17
         </td>
-        
+
         <td>
           The dimensions of an array created by <code>anewarray</code>
           instructions must be less than <code>256</code>.
         </td>
-  
+
         <td>
           4.8.1.17
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-  
+
       <tr>
         <td>
           A18
         </td>
-        
+
         <td>
           The <code>new</code> instruction must not reference array classes,
           interfaces, or abstract classes.
         </td>
-  
+
         <td>
           4.8.1.18
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-  
+
       <tr>
         <td>
           A19
         </td>
-        
+
         <td>
           The type referenced by a <code>multinewarray</code> instruction must
           have at least as many dimensions as specified in the instruction. The
-          dimensions operand must not be <code>0</code>  
+          dimensions operand must not be <code>0</code>
         </td>
-  
+
         <td>
           4.8.1.19
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-  
+
       <tr>
         <td>
           A20
         </td>
-        
+
         <td>
           The type referenced by a <code>newarray</code> instruction must be a
           valid, non-reference type.
         </td>
-  
+
         <td>
           4.8.1.20
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-  
+
       <tr>
         <td>
           A21
         </td>
-        
+
         <td>
           The index operand of instructions explicitly referencing single-width
           local variables must be non-negative and smaller than
           <code>max_locals</code>.
         </td>
-  
+
         <td>
           4.8.1.21
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-  
+
       <tr>
         <td>
           A22
         </td>
-        
+
         <td>
           The index operand of instructions implicitly referencing single-width
           local variables must be non-negative and smaller than
           <code>max_locals</code>.
         </td>
-  
+
         <td>
           4.8.1.22
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-  
+
       <tr>
         <td>
           A23
         </td>
-        
+
         <td>
           The index operand of instructions explicitly referencing double-width
           local variables must be non-negative and smaller than
           <code>max_locals-1</code>.
         </td>
-  
+
         <td>
           4.8.1.23
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-  
+
       <tr>
         <td>
           A24
         </td>
-        
+
         <td>
           The index operand of instructions implicitly referencing double-width
           local variables must be non-negative and smaller than
           <code>max_locals-1</code>.
         </td>
-  
+
         <td>
           4.8.1.24
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-  
+
       <tr>
         <td>
           A25
         </td>
-        
+
         <td>
           The index operand of <code>wide</code> instructions explicitly
           referencing single-width local variables must be non-negative and
           smaller than <code>max_locals</code>.
         </td>
-  
+
         <td>
           4.8.1.25
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-  
+
       <tr>
         <td>
           A26
         </td>
-        
+
         <td>
           The index operand of <code>wide</code> instructions explicitly
           referencing double-width local variables must be non-negative and
           smaller than <code>max_locals-1</code>.
         </td>
-  
+
         <td>
           4.8.1.25
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
     </table>
-      
+
     <h2>
       Structural constraints
     </h2>
-  
+
     <p>
     Structural constraints are constraints on relationships between several
     elements of the bytecode. They usually can't be checked without employing
@@ -598,466 +598,466 @@
         <th>
           Identifier
         </th>
-        
+
         <th>
           Description
         </th>
-        
+
         <th>
           Spec equivalent
         </th>
-        
+
         <th>
           Failure mode
         </th>
       </tr>
-  
+
       <tr>
         <td>
           B1
         </td>
-        
+
         <td>
           The number and types of arguments (operands and local variables) must
           always match the instruction.
         </td>
-  
+
         <td>
           4.8.2.1
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-      
+
       <tr>
         <td>
           B2
         </td>
-        
+
         <td>
           The operand stack must have the same depth for all executions paths
-          leading to an instruction. 
+          leading to an instruction.
         </td>
-  
+
         <td>
           4.8.2.2
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B3
         </td>
-        
+
         <td>
-          Local variable pairs must never be broken up. 
+          Local variable pairs must never be broken up.
         </td>
-  
+
         <td>
           4.8.2.3
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B4
         </td>
-        
+
         <td>
           A local variable (or pair) has to be assigned first before it can be
           read.
         </td>
-  
+
         <td>
           4.8.2.4
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B5
         </td>
-        
+
         <td>
-          The operand stack must never grow beyond <code>max_stack</code>. 
+          The operand stack must never grow beyond <code>max_stack</code>.
         </td>
-  
+
         <td>
           4.8.2.5
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B6
         </td>
-        
+
         <td>
-          The operand stack must never underflow. 
+          The operand stack must never underflow.
         </td>
-  
+
         <td>
           4.8.2.6
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B7
         </td>
-        
+
         <td>
           An <code>invokespecial</code> instruction must only invoke an instance
           initializer or a method in the current class or one of its
-          superclasses. 
+          superclasses.
         </td>
-  
+
         <td>
           4.8.2.7
         </td>
-  
+
         <td>
           VM
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B8
         </td>
-        
+
         <td>
           An instance initializer must only be invoked on an uninitialized
-          instance residing on the operand stack. 
+          instance residing on the operand stack.
         </td>
-  
+
         <td>
           4.8.2.8
         </td>
-  
+
         <td>
           VM
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B9
         </td>
-        
+
         <td>
           Instance methods may only be invoked on and instance fields may only
-          be accessed on already initialized instances.   
+          be accessed on already initialized instances.
         </td>
-  
+
         <td>
           4.8.2.9
         </td>
-  
+
         <td>
           VM
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B10
         </td>
-        
+
         <td>
            The must be no backwards branches with uninitialized instances on the
            operand stack or in local variables. There must be no code protected
            by an exception handler that contains local variables with
            uninitialized instances.
         </td>
-  
+
         <td>
           4.8.2.10
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B11
         </td>
-        
+
         <td>
            An instance initializer must call another instance initializer (same
            class or superclass) before any instance members can be accessed.
            Exceptions are non-inherited instance fields, which can be assigned
            before calling another initializer, and the <code>Object</code> class
-           in general.   
+           in general.
         </td>
-  
+
         <td>
           4.8.2.11
         </td>
-  
+
         <td>
           VM
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B12
         </td>
-        
+
         <td>
            All actual method arguments must be assignment-compatible with formal
-           arguments.    
+           arguments.
         </td>
-  
+
         <td>
           4.8.2.12
         </td>
-  
+
         <td>
           VM
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B13
         </td>
-        
+
         <td>
            For each instance method invocation, the actual instance must be
            assignment-compatible with the class or interface specified in the
            instruction.
         </td>
-  
+
         <td>
           4.8.2.13
         </td>
-  
+
         <td>
           VM
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B14
         </td>
-        
+
         <td>
-           A returns instruction must match its method's return type.   
+           A returns instruction must match its method's return type.
         </td>
-  
+
         <td>
           4.8.2.14
         </td>
-  
+
         <td>
           VM
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B15
         </td>
-        
+
         <td>
            When accessing protected members of a superclass, the actual type of
            the instance being accessed must be either the current class or one
            of its subclasses.
         </td>
-  
+
         <td>
           4.8.2.15
         </td>
-  
+
         <td>
           VM
         </td>
       </tr>
-  
+
      <tr>
         <td>
           B16
         </td>
-        
+
         <td>
            The type of a value stored into a static field must be
            assignment-compatible with or convertible to the field's type.
         </td>
-  
+
         <td>
           4.8.2.16
         </td>
-  
+
         <td>
           VM
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B17
         </td>
-        
+
         <td>
            The type of a value stored into a field must be assignment-compatible
            with or convertible to the field's type.
         </td>
-  
+
         <td>
           4.8.2.17
         </td>
-  
+
         <td>
           VM
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B18
         </td>
-        
+
         <td>
            The type of every value stored into an array must be
            assignment-compatible with the array's component type.
         </td>
-  
+
         <td>
           4.8.2.18
         </td>
-  
+
         <td>
           VM
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B19
         </td>
-        
+
         <td>
            The operand of an <code>athrow</code> instruction must be
-           assignment-compatible with <code>java.lang.Throwable</code>. 
+           assignment-compatible with <code>java.lang.Throwable</code>.
         </td>
-  
+
         <td>
           4.8.2.19
         </td>
-  
+
         <td>
           VM
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B20
         </td>
-        
+
         <td>
            The last reachable instruction of a method must either be a backwards
            jump or branch, a return, or an <code>athrow</code> instruction. It
            must not be possible to leave the <code>code</code> array at the
            bottom.
         </td>
-  
+
         <td>
           4.8.2.20
         </td>
-  
+
         <td>
           VM
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B21
         </td>
-        
+
         <td>
            Local variable values must not be used as return addresses.
         </td>
-  
+
         <td>
           4.8.2.21
         </td>
-  
+
         <td>
           VM
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B22
         </td>
-        
+
         <td>
           There must be a single, uniquely determined return instruction per
           subroutine call.
         </td>
-  
+
         <td>
           4.8.2.22
         </td>
-  
+
         <td>
           VM
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B23
         </td>
-        
+
         <td>
           Subroutine calls must not be directly or indirectly self-recursive.
         </td>
-  
+
         <td>
           4.8.2.23
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-  
+
       <tr>
         <td>
           B24
         </td>
-        
+
         <td>
            <code>ReturnAddress</code> instances must not be reused. If a
            subroutine returns to a <code>ReturnAddress</code> further up the
@@ -1065,16 +1065,16 @@
            <code>ReturnAddress</code> instances further down the stack must
            never be used.
         </td>
-  
+
         <td>
           4.8.2.24
         </td>
-  
+
         <td>
           DX
         </td>
       </tr>
-  
+
     </table>
   </body>
 </html>
diff --git a/docs/jni-tips.html b/docs/jni-tips.html
index 3d2f347..76cb03f 100644
--- a/docs/jni-tips.html
+++ b/docs/jni-tips.html
@@ -124,7 +124,7 @@
      * class/field/method IDs for this class.  Returns false on failure.
      */
     native private static boolean nativeClassInit();
- 
+
     /*
      * Invoke the native initializer when the class is loaded.
      */
@@ -410,7 +410,7 @@
 </p>
 <ul>
 <li> Check for null pointers where not allowed.
-<li>
+</li>
 <li> Verify argument type correctness (jclass is a class object,
 jfieldID points to field data, jstring is a java.lang.String).
 </li>
diff --git a/docs/libraries.html b/docs/libraries.html
index e1c3035..ed2fa72 100644
--- a/docs/libraries.html
+++ b/docs/libraries.html
@@ -6,7 +6,7 @@
 <head>
 
 <title>Dalvik Libraries</title>
-    
+
 <link rel=stylesheet href="dex-format.css">
 <link href="prettify.css" type="text/css" rel="stylesheet" />
 <script type="text/javascript" src="prettify.js"></script>
diff --git a/docs/opcodes/opcode-04-move-wide.html b/docs/opcodes/opcode-04-move-wide.html
index e043be9..8a3bd00 100644
--- a/docs/opcodes/opcode-04-move-wide.html
+++ b/docs/opcodes/opcode-04-move-wide.html
@@ -19,7 +19,7 @@
 <p>
 Note: It is legal to move from vN to either vN-1 or vN+1, so implementations
 must arrange for both halves of a register pair to be read before anything is
-written. 
+written.
 </p>
 
 <h2>Details</h2>
diff --git a/docs/opcodes/opcode-07-move-object.html b/docs/opcodes/opcode-07-move-object.html
index e62750d..f290277 100644
--- a/docs/opcodes/opcode-07-move-object.html
+++ b/docs/opcodes/opcode-07-move-object.html
@@ -79,7 +79,7 @@
     becomes undefined.
   </li>
 </ul>
- 
+
 <h2>Exceptions</h2>
 
 <p>
diff --git a/docs/opcodes/opcode-0a-move-result.html b/docs/opcodes/opcode-0a-move-result.html
index f043d13..616087f 100644
--- a/docs/opcodes/opcode-0a-move-result.html
+++ b/docs/opcodes/opcode-0a-move-result.html
@@ -17,7 +17,7 @@
 Move the single-word non-object result of the most recent invoke-kind into the
 indicated register. This must be done as the instruction immediately after an
 invoke-kind whose (single-word, non-object) result is not to be ignored;
-anywhere else is invalid. 
+anywhere else is invalid.
 </p>
 
 <h2>Details</h2>
@@ -57,7 +57,7 @@
   <li>
     The result delivered by the invoke-kind instruction must not be a reference
     value or require a register pair.
-  </li> 
+  </li>
 </ul>
 
 <h2>Behavior</h2>
@@ -76,7 +76,7 @@
     becomes undefined.
   </li>
 </ul>
- 
+
 <h2>Exceptions</h2>
 
 <p>
@@ -89,7 +89,7 @@
 This instruction can also be thought of as reading the contents of a special
 "result" register that is made valid and defined by executing a non-void return
 instruction or a filled-new-array instruction. The execution of any other
-instruction (including this one) renders this special register invalid. 
+instruction (including this one) renders this special register invalid.
 </p>
 
 </body>
diff --git a/docs/opcodes/opcode-0b-move-result-wide.html b/docs/opcodes/opcode-0b-move-result-wide.html
index c3e5779..c53517a 100644
--- a/docs/opcodes/opcode-0b-move-result-wide.html
+++ b/docs/opcodes/opcode-0b-move-result-wide.html
@@ -17,7 +17,7 @@
 Move the double-word result of the most recent invoke-kind into the indicated
 register pair. This must be done as the instruction immediately after an
 invoke-kind whose (double-word) result is not to be ignored; anywhere else is
-invalid. 
+invalid.
 </p>
 
 <h2>Details</h2>
@@ -60,7 +60,7 @@
     or a double value.
   </li>
 </ul>
- 
+
 <h2>Behavior</h2>
 
 <ul>
@@ -81,7 +81,7 @@
     becomes undefined.
   </li>
 </ul>
- 
+
 <h2>Exceptions</h2>
 
 <p>
diff --git a/docs/opcodes/opcode-0c-move-result-object.html b/docs/opcodes/opcode-0c-move-result-object.html
index f065fed..1538735 100644
--- a/docs/opcodes/opcode-0c-move-result-object.html
+++ b/docs/opcodes/opcode-0c-move-result-object.html
@@ -77,7 +77,7 @@
     becomes undefined.
   </li>
 </ul>
- 
+
 <h2>Exceptions</h2>
 
 <p>
@@ -90,7 +90,7 @@
 This instruction can also be thought of as reading the contents of a special
 "result" register that is made valid and defined by executing a non-void return
 instruction or a filled-new-array instruction. The execution of any other
-instruction (including this one) renders this special register invalid. 
+instruction (including this one) renders this special register invalid.
 </p>
 
 </body>
diff --git a/docs/opcodes/opcode-0d-move-exception.html b/docs/opcodes/opcode-0d-move-exception.html
index 3c3bc83..0f756d0 100644
--- a/docs/opcodes/opcode-0d-move-exception.html
+++ b/docs/opcodes/opcode-0d-move-exception.html
@@ -17,7 +17,7 @@
 Save a just-caught exception into the given register. This should be the first
 instruction of any exception handler whose caught exception is not to be
 ignored, and this instruction may only ever occur as the first instruction of an
-exception handler; anywhere else is invalid. 
+exception handler; anywhere else is invalid.
 </p>
 
 <h2>Details</h2>
@@ -51,7 +51,7 @@
     the handlers defined for the method in the Dex file.
   </li>
 </ul>
- 
+
 <h2>Behavior</h2>
 
 <ul>
diff --git a/docs/opcodes/opcode-0e-return-void.html b/docs/opcodes/opcode-0e-return-void.html
index 7a9431e..0498f81 100644
--- a/docs/opcodes/opcode-0e-return-void.html
+++ b/docs/opcodes/opcode-0e-return-void.html
@@ -14,7 +14,7 @@
 <h2>Purpose</h2>
 
 <p>
-Return from a void method. 
+Return from a void method.
 </p>
 
 <h2>Details</h2>
@@ -72,8 +72,8 @@
       </li>
     </ul>
   </li>
-</ul> 
-          
+</ul>
+
 <h2>Exceptions</h2>
 
 <p>
diff --git a/docs/opcodes/opcode-0f-return.html b/docs/opcodes/opcode-0f-return.html
index 33e0b7c..4de55ea 100644
--- a/docs/opcodes/opcode-0f-return.html
+++ b/docs/opcodes/opcode-0f-return.html
@@ -52,8 +52,8 @@
   <li>
     The type of vA must match the return type of the method.
   </li>
-</ul> 
-    
+</ul>
+
 <h2>Behavior</h2>
 
 <ul>
@@ -89,7 +89,7 @@
     </ul>
   </li>
 </ul>
- 
+
 <h2>Exceptions</h2>
 
 <p>
diff --git a/docs/opcodes/opcode-10-return-wide.html b/docs/opcodes/opcode-10-return-wide.html
index f1a6b83..4ccfce4 100644
--- a/docs/opcodes/opcode-10-return-wide.html
+++ b/docs/opcodes/opcode-10-return-wide.html
@@ -53,7 +53,7 @@
     The type of vA must match the return type of the method.
   </li>
 </ul>
- 
+
 <h2>Behavior</h2>
 
 <ul>
diff --git a/docs/opcodes/opcode-11-return-object.html b/docs/opcodes/opcode-11-return-object.html
index 369233c..b4866ed 100644
--- a/docs/opcodes/opcode-11-return-object.html
+++ b/docs/opcodes/opcode-11-return-object.html
@@ -84,7 +84,7 @@
       </li>
     </ul>
   </li>
-</ul> 
+</ul>
 
 <h2>Exceptions</h2>
 
diff --git a/docs/opcodes/opcode-12-const.html b/docs/opcodes/opcode-12-const.html
index b2d894f..d2b6ef9 100644
--- a/docs/opcodes/opcode-12-const.html
+++ b/docs/opcodes/opcode-12-const.html
@@ -15,7 +15,7 @@
 
 <p>
 Move the given literal value (sign-extended to 32 bits, if necessary) into the
-specified register. 
+specified register.
 </p>
 
 <h2>Details</h2>
@@ -72,7 +72,7 @@
     <ul>
       <li>
         If we are executing the /high16 variant, then B is left-shifted by 16
-        bits, that is, B'=B << 0x10 
+        bits, that is, B'=B << 0x10
       <li>
         Otherwise, if B is a 4 bit or 16 bit constant, it is sign-extended to 32
         bits, that is, B'=sign-extended(B).
@@ -91,7 +91,7 @@
     If v(A+1) is the upper half of a register pair, v(A+1)' becomes undefined.
   </li>
 </ul>
-     
+
 <h2>Exceptions</h2>
 
 <p>
diff --git a/docs/opcodes/opcode-16-const-wide.html b/docs/opcodes/opcode-16-const-wide.html
index ac92b04..6197e35 100644
--- a/docs/opcodes/opcode-16-const-wide.html
+++ b/docs/opcodes/opcode-16-const-wide.html
@@ -15,7 +15,7 @@
 
 <p>
 Move the given literal value (sign-extended to 64 bits) into the specified
-register-pair. 
+register-pair.
 </p>
 
 <h2>Details</h2>
@@ -98,7 +98,7 @@
   <li>
     If v(A+2) is the upper half of a register pair, v(A+2)' becomes undefined.
   </li>
-</ul> 
+</ul>
 
 <h2>Exceptions</h2>
 
diff --git a/docs/opcodes/opcode-1a-const-string.html b/docs/opcodes/opcode-1a-const-string.html
index bd89b70..d10c115 100644
--- a/docs/opcodes/opcode-1a-const-string.html
+++ b/docs/opcodes/opcode-1a-const-string.html
@@ -15,7 +15,7 @@
 
 <p>
 Move a reference to the string specified by the given index into the specified
-register. 
+register.
 </p>
 
 <h2>Details</h2>
@@ -52,7 +52,7 @@
   </li>
   <li>
     B must be a valid index into the string constant pool.
-  </li>     
+  </li>
 </ul>
 
 <h2>Behavior</h2>
@@ -72,7 +72,7 @@
   </li>
   <li>
     If v(A+1) is the upper half of a register pair, v(A+1)' becomes undefined.
-  </li> 
+  </li>
 </ul>
 
 <h2>Exceptions</h2>
diff --git a/docs/opcodes/opcode-1b-const-class.html b/docs/opcodes/opcode-1b-const-class.html
index 7a33e77..f40b986 100644
--- a/docs/opcodes/opcode-1b-const-class.html
+++ b/docs/opcodes/opcode-1b-const-class.html
@@ -16,7 +16,7 @@
 <p>
 Move a reference to the class specified by the given index into the specified
 register. In the case where the indicated type is primitive, this will store a
-reference to the primitive type's degenerate class. 
+reference to the primitive type's degenerate class.
 </p>
 
 <h2>Details</h2>
diff --git a/docs/opcodes/opcode-1d-monitor-enter.html b/docs/opcodes/opcode-1d-monitor-enter.html
index cecc939..28c10f4 100644
--- a/docs/opcodes/opcode-1d-monitor-enter.html
+++ b/docs/opcodes/opcode-1d-monitor-enter.html
@@ -14,7 +14,7 @@
 <h2>Purpose</h2>
 
 <p>
-Acquire the monitor for the indicated object. 
+Acquire the monitor for the indicated object.
 </p>
 
 <h2>Details</h2>
@@ -46,7 +46,7 @@
     Register vA must contain a reference to an object.
   </li>
 </ul>
- 
+
 <h2>Behavior</h2>
 
 <ul>
diff --git a/docs/opcodes/opcode-1e-monitor-exit.html b/docs/opcodes/opcode-1e-monitor-exit.html
index bee711d..cd7b165 100644
--- a/docs/opcodes/opcode-1e-monitor-exit.html
+++ b/docs/opcodes/opcode-1e-monitor-exit.html
@@ -25,7 +25,7 @@
 catch-all (e.g., finally) block as the monitor cleanup for that block itself,
 as a way to handle the arbitrary exceptions that might get thrown due to the
 historical implementation of Thread.stop(), while still managing to have proper
-monitor hygiene. 
+monitor hygiene.
 </p>
 
 <h2>Details</h2>
@@ -57,7 +57,7 @@
     Register vA must contain a reference to an object.
   </li>
 </ul>
- 
+
 <h2>Behavior</h2>
 
 <ul>
@@ -83,7 +83,7 @@
     an exception handler it cannot be distinguished from the same type of
     exception being thrown immediately after the monitor-exit instruction.
   </li>
-</ul> 
+</ul>
 
 <h2>Exceptions</h2>
 
diff --git a/docs/opcodes/opcode-1f-check-cast.html b/docs/opcodes/opcode-1f-check-cast.html
index 6325ca4..8eedd2d 100644
--- a/docs/opcodes/opcode-1f-check-cast.html
+++ b/docs/opcodes/opcode-1f-check-cast.html
@@ -15,7 +15,7 @@
 
 <p>
 Throw if the reference in the given register cannot be cast to the indicated
-type. The type must be a reference type (not a primitive type). 
+type. The type must be a reference type (not a primitive type).
 </p>
 
 <h2>Details</h2>
@@ -53,8 +53,8 @@
   <li>
     Type pool entry B must contain a valid type descriptor for a reference type.
   </li>
-</ul> 
-    
+</ul>
+
 <h2>Behavior</h2>
 
 <ul>
diff --git a/docs/opcodes/opcode-20-instance-of.html b/docs/opcodes/opcode-20-instance-of.html
index 5dbfef7..88076d8 100644
--- a/docs/opcodes/opcode-20-instance-of.html
+++ b/docs/opcodes/opcode-20-instance-of.html
@@ -55,7 +55,7 @@
   <li>
     Type constant pool entry C must contain a valid type descriptor for a
     reference type.
-  </li> 
+  </li>
 </ul>
 
 <h2>Behavior</h2>
@@ -88,7 +88,7 @@
   </li>
   <li>
     If v(A+1) is the upper half of a register pair, v(A+1)' becomes undefined.
-  </li> 
+  </li>
 
 <h2>Exceptions</h2>
 
diff --git a/docs/opcodes/opcode-21-array-length.html b/docs/opcodes/opcode-21-array-length.html
index 5767742..8072a7c 100644
--- a/docs/opcodes/opcode-21-array-length.html
+++ b/docs/opcodes/opcode-21-array-length.html
@@ -48,7 +48,7 @@
     Register vB must contain a reference to an array.
   </li>
 </ul>
-    
+
 <h2>Behavior</h2>
 
 <ul>
diff --git a/docs/opcodes/opcode-22-new-instance.html b/docs/opcodes/opcode-22-new-instance.html
index ec0a347..bdcfc3e 100644
--- a/docs/opcodes/opcode-22-new-instance.html
+++ b/docs/opcodes/opcode-22-new-instance.html
@@ -15,7 +15,7 @@
 
 <p>
 Construct a new instance of the indicated type, storing a reference to it in the
-destination. The type must refer to a non-array class. 
+destination. The type must refer to a non-array class.
 </p>
 
 <h2>Details</h2>
@@ -77,7 +77,7 @@
   </li>
   <li>
     If v(A+1) is the upper part of a register pair, v(A+1)' becomes undefined.
-  </li>     
+  </li>
 </ul>
 
 <h2>Exceptions</h2>
@@ -88,7 +88,7 @@
   </li>
   <li>
     All exceptions that are possible during instantiation can occur.
-  </li> 
+  </li>
 </ul>
 
 </body>
diff --git a/docs/opcodes/opcode-23-new-array.html b/docs/opcodes/opcode-23-new-array.html
index be46a49..29327e9 100644
--- a/docs/opcodes/opcode-23-new-array.html
+++ b/docs/opcodes/opcode-23-new-array.html
@@ -15,7 +15,7 @@
 
 <p>
 Construct a new array of the indicated type and size. The type must be an array
-type. 
+type.
 </p>
 
 <h2>Details</h2>
@@ -56,7 +56,7 @@
   </li>
   <li>
     Type constant pool entry C must contain a valid array type descriptor.
-  </li>   
+  </li>
 </ul>
 
 <h2>Behavior</h2>
@@ -87,7 +87,7 @@
   </li>
   <li>
     If v(A+1) is the upper half of a register pair, v(A+1)' becomes undefined.
-  </li> 
+  </li>
 </ul>
 
 <h2>Exceptions</h2>
@@ -101,7 +101,7 @@
   </li>
   <li>
     All exceptions that are possible during instantiation can occur.
-  </li> 
+  </li>
 </ul>
 
 </body>
diff --git a/docs/opcodes/opcode-24-filled-new-array.html b/docs/opcodes/opcode-24-filled-new-array.html
index cba0c5d..1dfa089 100644
--- a/docs/opcodes/opcode-24-filled-new-array.html
+++ b/docs/opcodes/opcode-24-filled-new-array.html
@@ -21,7 +21,7 @@
 store their results, so the constructed instance must be moved to a register
 with a subsequent move-result-object instruction (if it is to be used).
 </p>
- 
+
 <h2>Details</h2>
 
 <table class="instruc">
@@ -80,9 +80,9 @@
   <li>
     If the element type is a reference type, then all actual arguments
     (vD .. vA, depending on B) must be references, too.
-  </li> 
+  </li>
 </ul>
-    
+
 <h2>Behavior</h2>
 
 <ul>
@@ -115,7 +115,7 @@
         If B > 3 then R[3] = vG
       </li>
       <li>
-        If B > 4 then R[4] = vA 
+        If B > 4 then R[4] = vA
       </li>
     </ul>
   </li>
@@ -123,7 +123,7 @@
     No reference to R is stored in any register. Instead, R can be accessed by a
     move-result-object instruction immediately following this filled-new-array
     instruction.
-  </li> 
+  </li>
 </ul>
 
 <h2>Exceptions</h2>
@@ -137,7 +137,7 @@
   </li>
   <li>
     All exceptions that are possible during instantiation can occur.
-  </li> 
+  </li>
 </ul>
 
 </body>
diff --git a/docs/opcodes/opcode-25-filled-new-array-range.html b/docs/opcodes/opcode-25-filled-new-array-range.html
index 944a8b1..2ee7505 100644
--- a/docs/opcodes/opcode-25-filled-new-array-range.html
+++ b/docs/opcodes/opcode-25-filled-new-array-range.html
@@ -16,7 +16,7 @@
 <p>
 Construct an array of the given type and size, filling it with the supplied
 contents. Clarifications and restrictions are the same as filled-new-array,
-described above. 
+described above.
 </p>
 
 <h2>Details</h2>
@@ -70,7 +70,7 @@
   </li>
   <li>
     The element size of the type denoted by B must be no larger than 32 bits.
-  </li> 
+  </li>
 </ul>
 
 <h2>Behavior</h2>
@@ -102,7 +102,7 @@
         ...
       </li>
       <li>
-        J[vA] = vN 
+        J[vA] = vN
       </li>
     </ul>
   </li>
@@ -110,7 +110,7 @@
     No reference to J is stored in any register. Instead, J can be accessed by a
     move-result-object instruction immediately following this filled-new-array
     instruction.
-  </li> 
+  </li>
 </ul>
 
 <h2>Exceptions</h2>
diff --git a/docs/opcodes/opcode-26-fill-array-data.html b/docs/opcodes/opcode-26-fill-array-data.html
index c5040a5..77b45ae 100644
--- a/docs/opcodes/opcode-26-fill-array-data.html
+++ b/docs/opcodes/opcode-26-fill-array-data.html
@@ -21,7 +21,7 @@
 Note: The address of the table is guaranteed to be even (that is, 4-byte
 aligned). If the code size of the method is otherwise odd, then an extra code
 unit is inserted between the main code and the table whose value is the same as
-a nop. 
+a nop.
 </p>
 
 <h2>Details</h2>
@@ -69,8 +69,8 @@
   <li>
     The table size must be equal or smaller than the array length.
   </li>
-</ul>  
-     
+</ul>
+
 <h2>Behavior</h2>
 
 <ul>
@@ -88,7 +88,7 @@
 
 <ul>
   <li>
-    NullPointerException if vA is null.   
+    NullPointerException if vA is null.
   </li>
 </ul>
 
diff --git a/docs/opcodes/opcode-27-throw.html b/docs/opcodes/opcode-27-throw.html
index f4416ce..1a0eb09 100644
--- a/docs/opcodes/opcode-27-throw.html
+++ b/docs/opcodes/opcode-27-throw.html
@@ -50,7 +50,7 @@
     to the usual rules of the Java programming language.
   </li>
 </ul>
- 
+
 <h2>Behavior</h2>
 
 <ul>
@@ -73,7 +73,7 @@
   </li>
   <li>
     Otherwise, the indicated exception.
-  </li>   
+  </li>
 </ul>
 
 </body>
diff --git a/docs/opcodes/opcode-28-goto.html b/docs/opcodes/opcode-28-goto.html
index 5ca92b6..fec294c 100644
--- a/docs/opcodes/opcode-28-goto.html
+++ b/docs/opcodes/opcode-28-goto.html
@@ -18,7 +18,7 @@
 </p>
 <p>
 Note: The branch offset may not be 0. (A spin loop may be legally constructed
-either with goto/32 or by including a nop as a target before the branch.) 
+either with goto/32 or by including a nop as a target before the branch.)
 </p>
 
 <h2>Details</h2>
@@ -48,7 +48,7 @@
   </li>
   <li>
     A must not be 0.
-  </li>   
+  </li>
 </ul>
 
 <h2>Behavior</h2>
@@ -60,7 +60,7 @@
   </li>
   <li>
     Executions resumes at PC'.
-  </li>   
+  </li>
 </ul>
 
 <h2>Exceptions</h2>
diff --git a/docs/opcodes/opcode-29-goto-16.html b/docs/opcodes/opcode-29-goto-16.html
index abe4aec..791456b 100644
--- a/docs/opcodes/opcode-29-goto-16.html
+++ b/docs/opcodes/opcode-29-goto-16.html
@@ -18,7 +18,7 @@
 </p>
 <p>
 Note: The branch offset may not be 0. (A spin loop may be legally constructed
-either with goto/32 or by including a nop as a target before the branch.) 
+either with goto/32 or by including a nop as a target before the branch.)
 </p>
 
 <h2>Details</h2>
@@ -48,7 +48,7 @@
   </li>
   <li>
     A must not be 0.
-  </li>   
+  </li>
 </ul>
 
 <h2>Behavior</h2>
@@ -60,7 +60,7 @@
   </li>
   <li>
     Executions resumes at PC'.
-  </li>   
+  </li>
 </ul>
 
 <h2>Exceptions</h2>
diff --git a/docs/opcodes/opcode-2a-goto-32.html b/docs/opcodes/opcode-2a-goto-32.html
index 7d64ac9..b98dd85 100644
--- a/docs/opcodes/opcode-2a-goto-32.html
+++ b/docs/opcodes/opcode-2a-goto-32.html
@@ -53,7 +53,7 @@
   </li>
   <li>
     Executions resumes at PC'.
-  </li>   
+  </li>
 </ul>
 
 <h2>Exceptions</h2>
diff --git a/docs/opcodes/opcode-2b-packed-switch.html b/docs/opcodes/opcode-2b-packed-switch.html
index 73125bd..b2d5251 100644
--- a/docs/opcodes/opcode-2b-packed-switch.html
+++ b/docs/opcodes/opcode-2b-packed-switch.html
@@ -22,7 +22,7 @@
 Note: The address of the table is guaranteed to be even (that is, 4-byte
 aligned). If the code size of the method is otherwise odd, then an extra code
 unit is inserted between the main code and the table whose value is the same as
-a nop. 
+a nop.
 </p>
 
 <h2>Details</h2>
@@ -92,7 +92,7 @@
     statement.
   </li>
 </ul>
- 
+
 <h2>Exceptions</h2>
 
 <p>
diff --git a/docs/opcodes/opcode-2c-sparse-switch.html b/docs/opcodes/opcode-2c-sparse-switch.html
index cec581e..9d81eda 100644
--- a/docs/opcodes/opcode-2c-sparse-switch.html
+++ b/docs/opcodes/opcode-2c-sparse-switch.html
@@ -22,7 +22,7 @@
 Note: The address of the table is guaranteed to be even (that is, 4-byte
 aligned). If the code size of the method is otherwise odd, then an extra code
 unit is inserted between the main code and the table whose value is the same as
-a nop. 
+a nop.
 </p>
 
 <h2>Details</h2>
@@ -87,11 +87,11 @@
       </li>
     </ul>
   </li>
-  <li> 
+  <li>
     Otherwise execution continues at the instruction following the sparse-switch
     statement.
   </li>
-</ul> 
+</ul>
 
 <h2>Exceptions</h2>
 
diff --git a/docs/opcodes/opcode-2d-cmp-kind.html b/docs/opcodes/opcode-2d-cmp-kind.html
index 431ccd4..f55a006 100644
--- a/docs/opcodes/opcode-2d-cmp-kind.html
+++ b/docs/opcodes/opcode-2d-cmp-kind.html
@@ -24,7 +24,7 @@
 For example, to check to see if floating point a < b, then it is advisable to
 use cmpg-float; a result of -1 indicates that the test was true, and the other
 values indicate it was false either due to a valid comparison or because one
-or the other values was NaN. 
+or the other values was NaN.
 </p>
 
 <h2>Details</h2>
@@ -71,7 +71,7 @@
     For the -long variant, both both vB and vC must be the lower part of a
     register pair holding a long value.
   </li>
-</ul> 
+</ul>
 
 <h2>Behavior</h2>
 
@@ -109,8 +109,8 @@
   <li>
     If v(A+1) is the upper half of a register pair, v(A+1)' becomes undefined.
   </li>
-</ul> 
-    
+</ul>
+
 <h2>Exceptions</h2>
 
 <p>
diff --git a/docs/opcodes/opcode-32-if-test.html b/docs/opcodes/opcode-32-if-test.html
index af0adb2..ee394f6 100644
--- a/docs/opcodes/opcode-32-if-test.html
+++ b/docs/opcodes/opcode-32-if-test.html
@@ -20,7 +20,7 @@
 <p>
 Note: The branch offset may not be 0. (A spin loop may be legally constructed
 either by branching around a backward goto or by including a nop as a target
-before the branch.) 
+before the branch.)
 </p>
 
 <h2>Details</h2>
@@ -68,7 +68,7 @@
   </li>
     C must of a signed offset that, when added to the PC of the instruction,
     points to a valid bytecode instruction inside the same method.
-  </li> 
+  </li>
 </ul>
 
 <h2>Behavior</h2>
@@ -89,7 +89,7 @@
       </li>
     </ul>
   </li>
-</ul> 
+</ul>
 
 <h2>Exceptions</h2>
 
diff --git a/docs/opcodes/opcode-38-if-testz.html b/docs/opcodes/opcode-38-if-testz.html
index 354e894..060bbdb 100644
--- a/docs/opcodes/opcode-38-if-testz.html
+++ b/docs/opcodes/opcode-38-if-testz.html
@@ -20,7 +20,7 @@
 <p>
   Note: The branch offset may not be 0. (A spin loop may be legally constructed
   either by branching around a backward goto or by including a nop as a target
-  before the branch.) 
+  before the branch.)
 </p>
 
 <h2>Details</h2>
@@ -67,7 +67,7 @@
   </li>
   <li>
     B must not be 0.
-  </li> 
+  </li>
 </ul>
 
 <h2>Behavior</h2>
diff --git a/docs/opcodes/opcode-44-aget.html b/docs/opcodes/opcode-44-aget.html
index b9d6f23..6e8836f 100644
--- a/docs/opcodes/opcode-44-aget.html
+++ b/docs/opcodes/opcode-44-aget.html
@@ -15,7 +15,7 @@
 
 <p>
 Perform the identified array operation at the identified index of the given
-array, storing into the value register. 
+array, storing into the value register.
 </p>
 
 <h2>Details</h2>
@@ -63,7 +63,7 @@
   </li>
   <li>
     Register vC must contain an integer value.
-  </li> 
+  </li>
 </ul>
 
 <h2>Behavior</h2>
@@ -97,7 +97,7 @@
     v(A+2)' becomes undefined.
   </li>
 </ul>
-    
+
 <h2>Exceptions</h2>
 
 <ul>
@@ -107,7 +107,7 @@
   <li>
     ArrayIndexOutOfBoundsException if vC < 0 or vC >= array.length.
   </li>
-</ul> 
+</ul>
 
 </body>
 </html>
diff --git a/docs/opcodes/opcode-7b-unop.html b/docs/opcodes/opcode-7b-unop.html
index 1068a25..8b06092 100644
--- a/docs/opcodes/opcode-7b-unop.html
+++ b/docs/opcodes/opcode-7b-unop.html
@@ -84,7 +84,7 @@
 
 <ul>
   <li>
-    The given operation &lt;unop&gt; is performed according to the semantics 
+    The given operation &lt;unop&gt; is performed according to the semantics
     specified in table XXX.
   </li>
   <li>
diff --git a/docs/porting-proto.c.txt b/docs/porting-proto.c.txt
index 2f72bac..98c6fd3 100644
--- a/docs/porting-proto.c.txt
+++ b/docs/porting-proto.c.txt
@@ -242,4 +242,3 @@
 #ifdef __ARM_ARCH_7A__
 # warning "found __ARM_ARCH_7A__"
 #endif
-
diff --git a/docs/prettify.js b/docs/prettify.js
index c954118..9e99fc6 100644
--- a/docs/prettify.js
+++ b/docs/prettify.js
@@ -969,7 +969,7 @@
     var newlineRe = /\r\n?|\n/g;
     var trailingSpaceRe = /[ \r\n]$/;
     var lastWasSpace = true;  // the last text chunk emitted ended with a space.
-    
+
     // A helper function that is responsible for opening sections of decoration
     // and outputing properly escaped chunks of source
     function emitTextUpTo(sourceIdx) {
diff --git a/dvz/Android.mk b/dvz/Android.mk
index 56b7890..72b92a0 100644
--- a/dvz/Android.mk
+++ b/dvz/Android.mk
@@ -9,10 +9,10 @@
 LOCAL_SHARED_LIBRARIES := \
 	libcutils
 
-LOCAL_C_INCLUDES := 
+LOCAL_C_INCLUDES :=
 
-LOCAL_CFLAGS := 
+LOCAL_CFLAGS :=
 
-LOCAL_MODULE := dvz 
+LOCAL_MODULE := dvz
 
 include $(BUILD_EXECUTABLE)
diff --git a/dvz/dvz.c b/dvz/dvz.c
index 2d204bb..88fe086 100644
--- a/dvz/dvz.c
+++ b/dvz/dvz.c
@@ -45,7 +45,7 @@
     int err;
 
     g_pid = pid;
-    
+
     my_pgid = getpgid(0);
     if (my_pgid < 0) {
         perror ("error with getpgid()");
@@ -62,8 +62,8 @@
         // The zygote was unable to move this process into our pgid
         // We have to forward signals
 
-        int forward_signals[] 
-            = {SIGHUP, SIGINT, SIGTERM, SIGWINCH, 
+        int forward_signals[]
+            = {SIGHUP, SIGINT, SIGTERM, SIGWINCH,
             SIGTSTP, SIGTTIN, SIGTTOU, SIGCONT};
 
         struct sigaction sa;
diff --git a/dx/etc/dx.bat b/dx/etc/dx.bat
index 1361bb6..36b6206 100755
--- a/dx/etc/dx.bat
+++ b/dx/etc/dx.bat
@@ -83,4 +83,3 @@
 set javaOpts=%javaOpts% %defaultMx%
 
 call java %javaOpts% -Djava.ext.dirs=%frameworkdir% -jar %jarpath% %args%
-
diff --git a/dx/etc/run-opcode-gen b/dx/etc/run-opcode-gen
index 70e9707..061c048 100755
--- a/dx/etc/run-opcode-gen
+++ b/dx/etc/run-opcode-gen
@@ -18,5 +18,3 @@
 
 ./opcode-gen ../src/com/android/dx/dex/code/DalvOps.java
 ./opcode-gen ../src/com/android/dx/dex/code/Dops.java
-
-
diff --git a/dx/src/com/android/dx/cf/attrib/AttAnnotationDefault.java b/dx/src/com/android/dx/cf/attrib/AttAnnotationDefault.java
index acf5a9e..fe0b3ab 100644
--- a/dx/src/com/android/dx/cf/attrib/AttAnnotationDefault.java
+++ b/dx/src/com/android/dx/cf/attrib/AttAnnotationDefault.java
@@ -34,7 +34,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param value {@code non-null;} the annotation default value
      * @param byteLength {@code >= 0;} attribute data length in the original
      * classfile (not including the attribute header)
@@ -58,7 +58,7 @@
 
     /**
      * Gets the annotation default value.
-     * 
+     *
      * @return {@code non-null;} the value
      */
     public Constant getValue() {
diff --git a/dx/src/com/android/dx/cf/attrib/AttCode.java b/dx/src/com/android/dx/cf/attrib/AttCode.java
index 89ba895..8d34c69 100644
--- a/dx/src/com/android/dx/cf/attrib/AttCode.java
+++ b/dx/src/com/android/dx/cf/attrib/AttCode.java
@@ -45,7 +45,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param maxStack {@code >= 0;} the stack size
      * @param maxLocals {@code >= 0;} the number of locals
      * @param code {@code non-null;} array containing the bytecode per se
@@ -100,7 +100,7 @@
 
     /**
      * Gets the maximum stack size.
-     * 
+     *
      * @return {@code >= 0;} the maximum stack size
      */
     public int getMaxStack() {
@@ -109,7 +109,7 @@
 
     /**
      * Gets the number of locals.
-     * 
+     *
      * @return {@code >= 0;} the number of locals
      */
     public int getMaxLocals() {
@@ -118,7 +118,7 @@
 
     /**
      * Gets the bytecode array.
-     * 
+     *
      * @return {@code non-null;} the bytecode array
      */
     public BytecodeArray getCode() {
@@ -127,7 +127,7 @@
 
     /**
      * Gets the exception table.
-     * 
+     *
      * @return {@code non-null;} the exception table
      */
     public ByteCatchList getCatches() {
@@ -136,7 +136,7 @@
 
     /**
      * Gets the associated attribute list.
-     * 
+     *
      * @return {@code non-null;} the attribute list
      */
     public AttributeList getAttributes() {
diff --git a/dx/src/com/android/dx/cf/attrib/AttConstantValue.java b/dx/src/com/android/dx/cf/attrib/AttConstantValue.java
index a7436f3..aa6d1b3 100644
--- a/dx/src/com/android/dx/cf/attrib/AttConstantValue.java
+++ b/dx/src/com/android/dx/cf/attrib/AttConstantValue.java
@@ -35,7 +35,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param constantValue {@code non-null;} the constant value, which must
      * be an instance of one of: {@code CstString},
      * {@code CstInteger}, {@code CstLong},
@@ -68,7 +68,7 @@
      * is an instance of one of: {@code CstString},
      * {@code CstInteger}, {@code CstLong},
      * {@code CstFloat}, or {@code CstDouble}.
-     * 
+     *
      * @return {@code non-null;} the constant value
      */
     public TypedConstant getConstantValue() {
diff --git a/dx/src/com/android/dx/cf/attrib/AttEnclosingMethod.java b/dx/src/com/android/dx/cf/attrib/AttEnclosingMethod.java
index 68a24d9..6717e15 100644
--- a/dx/src/com/android/dx/cf/attrib/AttEnclosingMethod.java
+++ b/dx/src/com/android/dx/cf/attrib/AttEnclosingMethod.java
@@ -35,7 +35,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param type {@code non-null;} the innermost enclosing class
      * @param method {@code null-ok;} the name-and-type of the innermost enclosing
      * method, if any
@@ -58,7 +58,7 @@
 
     /**
      * Gets the innermost enclosing class.
-     * 
+     *
      * @return {@code non-null;} the innermost enclosing class
      */
     public CstType getEnclosingClass() {
@@ -68,7 +68,7 @@
     /**
      * Gets the name-and-type of the innermost enclosing method, if
      * any.
-     * 
+     *
      * @return {@code null-ok;} the name-and-type of the innermost enclosing
      * method, if any
      */
diff --git a/dx/src/com/android/dx/cf/attrib/AttExceptions.java b/dx/src/com/android/dx/cf/attrib/AttExceptions.java
index c592047..a17e009 100644
--- a/dx/src/com/android/dx/cf/attrib/AttExceptions.java
+++ b/dx/src/com/android/dx/cf/attrib/AttExceptions.java
@@ -31,7 +31,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param exceptions {@code non-null;} list of classes, presumed but not
      * verified to be subclasses of {@code Throwable}
      */
@@ -59,7 +59,7 @@
      * Gets the list of classes associated with this instance. In
      * general, these classes are not pre-verified to be subclasses of
      * {@code Throwable}.
-     * 
+     *
      * @return {@code non-null;} the list of classes
      */
     public TypeList getExceptions() {
diff --git a/dx/src/com/android/dx/cf/attrib/AttInnerClasses.java b/dx/src/com/android/dx/cf/attrib/AttInnerClasses.java
index bd6c7cd..77a4b08 100644
--- a/dx/src/com/android/dx/cf/attrib/AttInnerClasses.java
+++ b/dx/src/com/android/dx/cf/attrib/AttInnerClasses.java
@@ -30,7 +30,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param innerClasses {@code non-null;} list of inner class entries
      */
     public AttInnerClasses(InnerClassList innerClasses) {
@@ -55,7 +55,7 @@
 
     /**
      * Gets the list of "inner class" entries associated with this instance.
-     * 
+     *
      * @return {@code non-null;} the list
      */
     public InnerClassList getInnerClasses() {
diff --git a/dx/src/com/android/dx/cf/attrib/AttLineNumberTable.java b/dx/src/com/android/dx/cf/attrib/AttLineNumberTable.java
index 38980be..5eac8cb 100644
--- a/dx/src/com/android/dx/cf/attrib/AttLineNumberTable.java
+++ b/dx/src/com/android/dx/cf/attrib/AttLineNumberTable.java
@@ -31,7 +31,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param lineNumbers {@code non-null;} list of line number entries
      */
     public AttLineNumberTable(LineNumberList lineNumbers) {
@@ -56,7 +56,7 @@
 
     /**
      * Gets the list of "line number" entries associated with this instance.
-     * 
+     *
      * @return {@code non-null;} the list
      */
     public LineNumberList getLineNumbers() {
diff --git a/dx/src/com/android/dx/cf/attrib/AttLocalVariableTable.java b/dx/src/com/android/dx/cf/attrib/AttLocalVariableTable.java
index 53ba64f..1d2b4aa 100644
--- a/dx/src/com/android/dx/cf/attrib/AttLocalVariableTable.java
+++ b/dx/src/com/android/dx/cf/attrib/AttLocalVariableTable.java
@@ -27,7 +27,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param localVariables {@code non-null;} list of local variable entries
      */
     public AttLocalVariableTable(LocalVariableList localVariables) {
diff --git a/dx/src/com/android/dx/cf/attrib/AttLocalVariableTypeTable.java b/dx/src/com/android/dx/cf/attrib/AttLocalVariableTypeTable.java
index 49cdb0c..2520bf6 100644
--- a/dx/src/com/android/dx/cf/attrib/AttLocalVariableTypeTable.java
+++ b/dx/src/com/android/dx/cf/attrib/AttLocalVariableTypeTable.java
@@ -27,7 +27,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param localVariables {@code non-null;} list of local variable entries
      */
     public AttLocalVariableTypeTable(LocalVariableList localVariables) {
diff --git a/dx/src/com/android/dx/cf/attrib/AttRuntimeInvisibleAnnotations.java b/dx/src/com/android/dx/cf/attrib/AttRuntimeInvisibleAnnotations.java
index e83b76f..d3afe27 100644
--- a/dx/src/com/android/dx/cf/attrib/AttRuntimeInvisibleAnnotations.java
+++ b/dx/src/com/android/dx/cf/attrib/AttRuntimeInvisibleAnnotations.java
@@ -28,7 +28,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param annotations {@code non-null;} the list of annotations
      * @param byteLength {@code >= 0;} attribute data length in the original
      * classfile (not including the attribute header)
diff --git a/dx/src/com/android/dx/cf/attrib/AttRuntimeInvisibleParameterAnnotations.java b/dx/src/com/android/dx/cf/attrib/AttRuntimeInvisibleParameterAnnotations.java
index 7dfe206..c9c5136 100644
--- a/dx/src/com/android/dx/cf/attrib/AttRuntimeInvisibleParameterAnnotations.java
+++ b/dx/src/com/android/dx/cf/attrib/AttRuntimeInvisibleParameterAnnotations.java
@@ -30,7 +30,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param parameterAnnotations {@code non-null;} the parameter annotations
      * @param byteLength {@code >= 0;} attribute data length in the original
      * classfile (not including the attribute header)
diff --git a/dx/src/com/android/dx/cf/attrib/AttRuntimeVisibleAnnotations.java b/dx/src/com/android/dx/cf/attrib/AttRuntimeVisibleAnnotations.java
index 9de0588..a6a640d 100644
--- a/dx/src/com/android/dx/cf/attrib/AttRuntimeVisibleAnnotations.java
+++ b/dx/src/com/android/dx/cf/attrib/AttRuntimeVisibleAnnotations.java
@@ -28,7 +28,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param annotations {@code non-null;} the list of annotations
      * @param byteLength {@code >= 0;} attribute data length in the original
      * classfile (not including the attribute header)
diff --git a/dx/src/com/android/dx/cf/attrib/AttRuntimeVisibleParameterAnnotations.java b/dx/src/com/android/dx/cf/attrib/AttRuntimeVisibleParameterAnnotations.java
index 76607c0..177eb4c 100644
--- a/dx/src/com/android/dx/cf/attrib/AttRuntimeVisibleParameterAnnotations.java
+++ b/dx/src/com/android/dx/cf/attrib/AttRuntimeVisibleParameterAnnotations.java
@@ -30,7 +30,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param annotations {@code non-null;} the parameter annotations
      * @param byteLength {@code >= 0;} attribute data length in the original
      * classfile (not including the attribute header)
diff --git a/dx/src/com/android/dx/cf/attrib/AttSignature.java b/dx/src/com/android/dx/cf/attrib/AttSignature.java
index b9cb97d..f6023f3 100644
--- a/dx/src/com/android/dx/cf/attrib/AttSignature.java
+++ b/dx/src/com/android/dx/cf/attrib/AttSignature.java
@@ -30,7 +30,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param signature {@code non-null;} the signature string
      */
     public AttSignature(CstUtf8 signature) {
@@ -50,7 +50,7 @@
 
     /**
      * Gets the signature string.
-     * 
+     *
      * @return {@code non-null;} the signature string
      */
     public CstUtf8 getSignature() {
diff --git a/dx/src/com/android/dx/cf/attrib/AttSourceFile.java b/dx/src/com/android/dx/cf/attrib/AttSourceFile.java
index 941a2b0..b84ff4d 100644
--- a/dx/src/com/android/dx/cf/attrib/AttSourceFile.java
+++ b/dx/src/com/android/dx/cf/attrib/AttSourceFile.java
@@ -30,7 +30,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param sourceFile {@code non-null;} the name of the source file
      */
     public AttSourceFile(CstUtf8 sourceFile) {
@@ -50,7 +50,7 @@
 
     /**
      * Gets the source file name of this instance.
-     * 
+     *
      * @return {@code non-null;} the source file
      */
     public CstUtf8 getSourceFile() {
diff --git a/dx/src/com/android/dx/cf/attrib/BaseAnnotations.java b/dx/src/com/android/dx/cf/attrib/BaseAnnotations.java
index 4d9201e..bc138af 100644
--- a/dx/src/com/android/dx/cf/attrib/BaseAnnotations.java
+++ b/dx/src/com/android/dx/cf/attrib/BaseAnnotations.java
@@ -32,7 +32,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param attributeName {@code non-null;} the name of the attribute
      * @param annotations {@code non-null;} the list of annotations
      * @param byteLength {@code >= 0;} attribute data length in the original
@@ -63,7 +63,7 @@
 
     /**
      * Gets the list of annotations associated with this instance.
-     * 
+     *
      * @return {@code non-null;} the list
      */
     public final Annotations getAnnotations() {
diff --git a/dx/src/com/android/dx/cf/attrib/BaseAttribute.java b/dx/src/com/android/dx/cf/attrib/BaseAttribute.java
index c9c1b33..9961725 100644
--- a/dx/src/com/android/dx/cf/attrib/BaseAttribute.java
+++ b/dx/src/com/android/dx/cf/attrib/BaseAttribute.java
@@ -28,7 +28,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param name {@code non-null;} attribute name
      */
     public BaseAttribute(String name) {
diff --git a/dx/src/com/android/dx/cf/attrib/BaseLocalVariables.java b/dx/src/com/android/dx/cf/attrib/BaseLocalVariables.java
index 5ba5889..27cd6fb 100644
--- a/dx/src/com/android/dx/cf/attrib/BaseLocalVariables.java
+++ b/dx/src/com/android/dx/cf/attrib/BaseLocalVariables.java
@@ -29,7 +29,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param name {@code non-null;} attribute name
      * @param localVariables {@code non-null;} list of local variable entries
      */
@@ -56,7 +56,7 @@
 
     /**
      * Gets the list of "local variable" entries associated with this instance.
-     * 
+     *
      * @return {@code non-null;} the list
      */
     public final LocalVariableList getLocalVariables() {
diff --git a/dx/src/com/android/dx/cf/attrib/BaseParameterAnnotations.java b/dx/src/com/android/dx/cf/attrib/BaseParameterAnnotations.java
index 1b204b3..791f8cd 100644
--- a/dx/src/com/android/dx/cf/attrib/BaseParameterAnnotations.java
+++ b/dx/src/com/android/dx/cf/attrib/BaseParameterAnnotations.java
@@ -32,7 +32,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param attributeName {@code non-null;} the name of the attribute
      * @param parameterAnnotations {@code non-null;} the annotations
      * @param byteLength {@code >= 0;} attribute data length in the original
@@ -64,7 +64,7 @@
 
     /**
      * Gets the list of annotation lists associated with this instance.
-     * 
+     *
      * @return {@code non-null;} the list
      */
     public final AnnotationsList getParameterAnnotations() {
diff --git a/dx/src/com/android/dx/cf/attrib/RawAttribute.java b/dx/src/com/android/dx/cf/attrib/RawAttribute.java
index 585e5c5..e905dd1 100644
--- a/dx/src/com/android/dx/cf/attrib/RawAttribute.java
+++ b/dx/src/com/android/dx/cf/attrib/RawAttribute.java
@@ -28,13 +28,13 @@
 
     /**
      * {@code null-ok;} constant pool to use for resolution of cpis in {@link
-     * #data} 
+     * #data}
      */
     private final ConstantPool pool;
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param name {@code non-null;} attribute name
      * @param data {@code non-null;} attribute data
      * @param pool {@code null-ok;} constant pool to use for cpi resolution
@@ -52,7 +52,7 @@
 
     /**
      * Constructs an instance from a sub-array of a {@link ByteArray}.
-     * 
+     *
      * @param name {@code non-null;} attribute name
      * @param data {@code non-null;} array containing the attribute data
      * @param offset offset in {@code data} to the attribute data
@@ -66,7 +66,7 @@
 
     /**
      * Get the raw data of the attribute.
-     * 
+     *
      * @return {@code non-null;} the data
      */
     public ByteArray getData() {
@@ -82,7 +82,7 @@
      * Gets the constant pool to use for cpi resolution, if any. It
      * presumably came from the class file that this attribute came
      * from.
-     * 
+     *
      * @return {@code null-ok;} the constant pool
      */
     public ConstantPool getPool() {
diff --git a/dx/src/com/android/dx/cf/code/BaseMachine.java b/dx/src/com/android/dx/cf/code/BaseMachine.java
index b7e700d..aae6056 100644
--- a/dx/src/com/android/dx/cf/code/BaseMachine.java
+++ b/dx/src/com/android/dx/cf/code/BaseMachine.java
@@ -27,7 +27,7 @@
 
 /**
  * Base implementation of {@link Machine}.
- * 
+ *
  * <p><b>Note:</b> For the most part, the documentation for this class
  * ignores the distinction between {@link Type} and {@link
  * TypeBearer}.</p>
@@ -35,7 +35,7 @@
 public abstract class BaseMachine implements Machine {
     /* {@code non-null;} the prototype for the associated method */
     private final Prototype prototype;
-    
+
     /** {@code non-null;} primary arguments */
     private TypeBearer[] args;
 
@@ -77,7 +77,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param prototype {@code non-null;} the prototype for the associated method
      */
     public BaseMachine(Prototype prototype) {
@@ -132,7 +132,7 @@
     public void popArgs(Frame frame, Prototype prototype) {
         StdTypeList types = prototype.getParameterTypes();
         int size = types.size();
-        
+
         // Use the above method to do the actual popping...
         popArgs(frame, size);
 
@@ -253,7 +253,7 @@
 
     /**
      * Gets the number of primary arguments.
-     * 
+     *
      * @return {@code >= 0;} the number of primary arguments
      */
     protected final int argCount() {
@@ -263,7 +263,7 @@
     /**
      * Gets the width of the arguments (where a category-2 value counts as
      * two).
-     * 
+     *
      * @return {@code >= 0;} the argument width
      */
     protected final int argWidth() {
@@ -278,7 +278,7 @@
 
     /**
      * Gets the {@code n}th primary argument.
-     * 
+     *
      * @param n {@code >= 0, < argCount();} which argument
      * @return {@code non-null;} the indicated argument
      */
@@ -297,7 +297,7 @@
 
     /**
      * Gets the type auxiliary argument.
-     * 
+     *
      * @return {@code null-ok;} the salient type
      */
     protected final Type getAuxType() {
@@ -306,7 +306,7 @@
 
     /**
      * Gets the {@code int} auxiliary argument.
-     * 
+     *
      * @return the argument value
      */
     protected final int getAuxInt() {
@@ -315,7 +315,7 @@
 
     /**
      * Gets the constant auxiliary argument.
-     * 
+     *
      * @return {@code null-ok;} the argument value
      */
     protected final Constant getAuxCst() {
@@ -324,7 +324,7 @@
 
     /**
      * Gets the branch target auxiliary argument.
-     * 
+     *
      * @return the argument value
      */
     protected final int getAuxTarget() {
@@ -333,7 +333,7 @@
 
     /**
      * Gets the switch cases auxiliary argument.
-     * 
+     *
      * @return {@code null-ok;} the argument value
      */
     protected final SwitchList getAuxCases() {
@@ -350,7 +350,7 @@
     }
     /**
      * Gets the last local index accessed.
-     * 
+     *
      * @return {@code >= -1;} the salient local index or {@code -1} if none
      * was set since the last time {@link #clearArgs} was called
      */
@@ -364,7 +364,7 @@
      * by a previous call to {@link #localTarget} with the type of what
      * should be the sole result set by a call to {@link #setResult} (or
      * the combination {@link #clearResult} then {@link #addResult}.
-     * 
+     *
      * @return {@code null-ok;} the salient register spec or {@code null} if no
      * local target was set since the last time {@link #clearArgs} was
      * called
@@ -375,7 +375,7 @@
         }
 
         if (resultCount != 1) {
-            throw new SimException("local target with " + 
+            throw new SimException("local target with " +
                     ((resultCount == 0) ? "no" : "multiple") + " results");
         }
 
@@ -413,10 +413,10 @@
 
     /**
      * Sets the results list to be the given single value.
-     * 
+     *
      * <p><b>Note:</b> If there is more than one result value, the
      * others may be added by using {@link #addResult}.</p>
-     * 
+     *
      * @param result {@code non-null;} result value
      */
     protected final void setResult(TypeBearer result) {
@@ -430,9 +430,9 @@
 
     /**
      * Adds an additional element to the list of results.
-     * 
+     *
      * @see #setResult
-     * 
+     *
      * @param result {@code non-null;} result value
      */
     protected final void addResult(TypeBearer result) {
@@ -447,7 +447,7 @@
     /**
      * Gets the count of results. This throws an exception if results were
      * never set. (Explicitly clearing the results counts as setting them.)
-     * 
+     *
      * @return {@code >= 0;} the count
      */
     protected final int resultCount() {
@@ -461,7 +461,7 @@
     /**
      * Gets the width of the results (where a category-2 value counts as
      * two).
-     * 
+     *
      * @return {@code >= 0;} the result width
      */
     protected final int resultWidth() {
@@ -476,7 +476,7 @@
 
     /**
      * Gets the {@code n}th result value.
-     * 
+     *
      * @param n {@code >= 0, < resultCount();} which result
      * @return {@code non-null;} the indicated result value
      */
@@ -498,7 +498,7 @@
      * there is a local target (see {@link #localTarget}), then the sole
      * result is stored to that target; otherwise any results are pushed
      * onto the stack.
-     * 
+     *
      * @param frame {@code non-null;} frame to operate on
      */
     protected final void storeResults(Frame frame) {
@@ -528,7 +528,7 @@
     /**
      * Throws an exception that indicates a mismatch in local variable
      * types.
-     * 
+     *
      * @param found {@code non-null;} the encountered type
      * @param local {@code non-null;} the local variable's claimed type
      */
@@ -536,8 +536,8 @@
             TypeBearer local) {
         throw new SimException("local variable type mismatch: " +
                 "attempt to set or access a value of type " +
-                found.toHuman() + 
-                " using a local variable of type " + 
+                found.toHuman() +
+                " using a local variable of type " +
                 local.toHuman() +
                 ". This is symptomatic of .class transformation tools " +
                 "that ignore local variable information.");
diff --git a/dx/src/com/android/dx/cf/code/BasicBlocker.java b/dx/src/com/android/dx/cf/code/BasicBlocker.java
index d67e525..8fb9560 100644
--- a/dx/src/com/android/dx/cf/code/BasicBlocker.java
+++ b/dx/src/com/android/dx/cf/code/BasicBlocker.java
@@ -54,13 +54,13 @@
 
     /**
      * {@code non-null, sparse;} for each instruction offset to a branch of
-     * some sort, the list of targets for that instruction 
+     * some sort, the list of targets for that instruction
      */
     private final IntList[] targetLists;
 
     /**
      * {@code non-null, sparse;} for each instruction offset to a throwing
-     * instruction, the list of exception handlers for that instruction 
+     * instruction, the list of exception handlers for that instruction
      */
     private final ByteCatchList[] catchLists;
 
@@ -71,7 +71,7 @@
      * Identifies and enumerates the basic blocks in the given method,
      * returning a list of them. The returned list notably omits any
      * definitely-dead code that is identified in the process.
-     * 
+     *
      * @param method {@code non-null;} method to convert
      * @return {@code non-null;} list of basic blocks
      */
@@ -85,7 +85,7 @@
     /**
      * Constructs an instance. This class is not publicly instantiable; use
      * {@link #identifyBlocks}.
-     * 
+     *
      * @param method {@code non-null;} method to convert
      */
     private BasicBlocker(ConcreteMethod method) {
@@ -174,7 +174,7 @@
                 if ((type == Type.INT) || (type == Type.LONG)) {
                     visitThrowing(offset, length, true);
                 }
-                break;                
+                break;
             }
             default: {
                 visitCommon(offset, length, true);
@@ -265,7 +265,7 @@
 
     /**
      * Extracts the list of basic blocks from the bit sets.
-     * 
+     *
      * @return {@code non-null;} the list of basic blocks
      */
     private ByteBlockList getBlockList() {
@@ -367,7 +367,7 @@
     /**
      * Sets a bit in the work set, but only if the instruction in question
      * isn't yet known to be possibly-live.
-     * 
+     *
      * @param offset offset to the instruction in question
      * @param blockStart {@code true} iff this instruction starts a
      * basic block
@@ -384,7 +384,7 @@
 
     /**
      * Helper method used by all the visitor methods.
-     * 
+     *
      * @param offset offset to the instruction
      * @param length length of the instruction, in bytes
      * @param nextIsLive {@code true} iff the instruction after
@@ -417,7 +417,7 @@
      * Helper method used by all the visitor methods that deal with
      * opcodes that possibly throw. This method should be called after calling
      * {@link #visitCommon}.
-     * 
+     *
      * @param offset offset to the instruction
      * @param length length of the instruction, in bytes
      * @param nextIsLive {@code true} iff the instruction after
diff --git a/dx/src/com/android/dx/cf/code/ByteBlock.java b/dx/src/com/android/dx/cf/code/ByteBlock.java
index 40b91c3..73bbbab 100644
--- a/dx/src/com/android/dx/cf/code/ByteBlock.java
+++ b/dx/src/com/android/dx/cf/code/ByteBlock.java
@@ -40,8 +40,8 @@
     private final ByteCatchList catches;
 
     /**
-     * Constructs an instance. 
-     * 
+     * Constructs an instance.
+     *
      * @param label {@code >= 0;} target label for this block
      * @param start {@code >= 0;} bytecode offset (inclusive) of the start
      * of the block
@@ -99,7 +99,7 @@
 
     /**
      * Gets the label of this block.
-     * 
+     *
      * @return {@code >= 0;} the label
      */
     public int getLabel() {
@@ -108,7 +108,7 @@
 
     /**
      * Gets the bytecode offset (inclusive) of the start of this block.
-     * 
+     *
      * @return {@code >= 0;} the start offset
      */
     public int getStart() {
@@ -117,7 +117,7 @@
 
     /**
      * Gets the bytecode offset (exclusive) of the end of this block.
-     * 
+     *
      * @return {@code > getStart();} the end offset
      */
     public int getEnd() {
@@ -125,9 +125,9 @@
     }
 
     /**
-     * Gets the list of successors that this block may branch to 
+     * Gets the list of successors that this block may branch to
      * non-exceptionally.
-     * 
+     *
      * @return {@code non-null;} the successor list
      */
     public IntList getSuccessors() {
@@ -136,7 +136,7 @@
 
     /**
      * Gets the list of exceptions caught and their handler targets.
-     * 
+     *
      * @return {@code non-null;} the catch list
      */
     public ByteCatchList getCatches() {
diff --git a/dx/src/com/android/dx/cf/code/ByteCatchList.java b/dx/src/com/android/dx/cf/code/ByteCatchList.java
index aab2087..36c37af 100644
--- a/dx/src/com/android/dx/cf/code/ByteCatchList.java
+++ b/dx/src/com/android/dx/cf/code/ByteCatchList.java
@@ -129,7 +129,7 @@
      * is <i>not</i> found for the exception type of the given item in
      * the given array. A match is considered to be either an exact type
      * match or the class {@code Object} which represents a catch-all.
-     * 
+     *
      * @param item {@code non-null;} item with the exception type to look for
      * @param arr {@code non-null;} array to search in
      * @param count {@code non-null;} maximum number of elements in the array to check
@@ -153,7 +153,7 @@
      * is a list of all the exception handler addresses, with the given
      * {@code noException} address appended if appropriate. The
      * result is automatically made immutable.
-     * 
+     *
      * @param noException {@code >= -1;} the no-exception address to append, or
      * {@code -1} not to append anything
      * @return {@code non-null;} list of exception targets, with
diff --git a/dx/src/com/android/dx/cf/code/ByteOps.java b/dx/src/com/android/dx/cf/code/ByteOps.java
index ea7b514..1376008 100644
--- a/dx/src/com/android/dx/cf/code/ByteOps.java
+++ b/dx/src/com/android/dx/cf/code/ByteOps.java
@@ -272,20 +272,20 @@
     /**
      * "l": {@code op local}; category-1 local; implies
      * {@code max_locals} is at least two more than the given
-     * local number 
+     * local number
      */
     public static final int FMT_LOCAL_1 = 10;
 
     /**
      * "m": {@code op local}; category-2 local; implies
      * {@code max_locals} is at least two more than the given
-     * local number 
+     * local number
      */
     public static final int FMT_LOCAL_2 = 11;
 
     /**
      * "y": {@code op #byte} ({@code bipush} and
-     * {@code newarray}) 
+     * {@code newarray})
      */
     public static final int FMT_LITERAL_BYTE = 12;
 
@@ -342,7 +342,7 @@
 
     /**
      * {@code non-null;} map from opcodes to format or'ed with allowed constant
-     * pool types 
+     * pool types
      */
     private static final int[] OPCODE_INFO = new int[256];
 
@@ -622,7 +622,7 @@
 
     /**
      * Gets the name of the given opcode.
-     * 
+     *
      * @param opcode {@code >= 0, <= 255;} the opcode
      * @return {@code non-null;} its name
      */
@@ -639,7 +639,7 @@
 
     /**
      * Gets the format and allowed cp types of the given opcode.
-     * 
+     *
      * @param opcode {@code >= 0, <= 255;} the opcode
      * @return its format and allowed cp types
      */
diff --git a/dx/src/com/android/dx/cf/code/BytecodeArray.java b/dx/src/com/android/dx/cf/code/BytecodeArray.java
index 83cff5d..80e94bf 100644
--- a/dx/src/com/android/dx/cf/code/BytecodeArray.java
+++ b/dx/src/com/android/dx/cf/code/BytecodeArray.java
@@ -46,7 +46,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param bytes {@code non-null;} underlying bytes
      * @param pool {@code non-null;} constant pool to use when resolving constant
      * pool indices
@@ -66,7 +66,7 @@
 
     /**
      * Gets the underlying byte array.
-     * 
+     *
      * @return {@code non-null;} the byte array
      */
     public ByteArray getBytes() {
@@ -75,7 +75,7 @@
 
     /**
      * Gets the size of the bytecode array, per se.
-     * 
+     *
      * @return {@code >= 0;} the length of the bytecode array
      */
     public int size() {
@@ -86,7 +86,7 @@
      * Gets the total length of this structure in bytes, when included in
      * a {@code Code} attribute. The returned value includes the
      * array size plus four bytes for {@code code_length}.
-     * 
+     *
      * @return {@code >= 4;} the total length, in bytes
      */
     public int byteLength() {
@@ -95,7 +95,7 @@
 
     /**
      * Parses each instruction in the array, in order.
-     * 
+     *
      * @param visitor {@code null-ok;} visitor to call back to for each instruction
      */
     public void forEach(Visitor visitor) {
@@ -114,7 +114,7 @@
     /**
      * Finds the offset to each instruction in the bytecode array. The
      * result is a bit set with the offset of each opcode-per-se flipped on.
-     * 
+     *
      * @see Bits
      * @return {@code non-null;} appropriately constructed bit set
      */
@@ -138,7 +138,7 @@
      * the indicated offset (that is, the bit index), repeating until the
      * work set is empty. It is expected that the visitor will regularly
      * set new bits in the work set during the process.
-     * 
+     *
      * @param workSet {@code non-null;} the work set to process
      * @param visitor {@code non-null;} visitor to call back to for each instruction
      */
@@ -162,16 +162,16 @@
      * Parses the instruction at the indicated offset. Indicate the
      * result by calling the visitor if supplied and by returning the
      * number of bytes consumed by the instruction.
-     * 
+     *
      * <p>In order to simplify further processing, the opcodes passed
      * to the visitor are canonicalized, altering the opcode to a more
      * universal one and making formerly implicit arguments
      * explicit. In particular:</p>
-     * 
+     *
      * <ul>
      * <li>The opcodes to push literal constants of primitive types all become
      *   {@code ldc}.
-     *   E.g., {@code fconst_0}, {@code sipush}, and 
+     *   E.g., {@code fconst_0}, {@code sipush}, and
      *   {@code lconst_0} qualify for this treatment.</li>
      * <li>{@code aconst_null} becomes {@code ldc} of a
      *   "known null."</li>
@@ -202,7 +202,7 @@
      *   their pushed type. E.g., {@code arraylength} gets type
      *   {@code Type.INT}.</li>
      * </ul>
-     * 
+     *
      * @param offset {@code >= 0, < bytes.size();} offset to the start of the
      * instruction
      * @param visitor {@code null-ok;} visitor to call back to
@@ -313,7 +313,7 @@
                 case ByteOps.LDC: {
                     int idx = bytes.getUnsignedByte(offset + 1);
                     Constant cst = pool.get(idx);
-                    int value = (cst instanceof CstInteger) ? 
+                    int value = (cst instanceof CstInteger) ?
                         ((CstInteger) cst).getValue() : 0;
                     visitor.visitConstant(ByteOps.LDC, offset, 2, cst, value);
                     return 2;
@@ -321,7 +321,7 @@
                 case ByteOps.LDC_W: {
                     int idx = bytes.getUnsignedShort(offset + 1);
                     Constant cst = pool.get(idx);
-                    int value = (cst instanceof CstInteger) ? 
+                    int value = (cst instanceof CstInteger) ?
                         ((CstInteger) cst).getValue() : 0;
                     visitor.visitConstant(ByteOps.LDC, offset, 3, cst, value);
                     return 3;
@@ -798,7 +798,7 @@
 
     /**
      * Helper to deal with {@code tableswitch}.
-     * 
+     *
      * @param offset the offset to the {@code tableswitch} opcode itself
      * @param visitor {@code non-null;} visitor to use
      * @return instruction length, in bytes
@@ -841,7 +841,7 @@
 
     /**
      * Helper to deal with {@code lookupswitch}.
-     * 
+     *
      * @param offset the offset to the {@code lookupswitch} opcode itself
      * @param visitor {@code non-null;} visitor to use
      * @return instruction length, in bytes
@@ -1059,10 +1059,10 @@
         }
      }
 
-    
+
     /**
      * Helper to deal with {@code wide}.
-     * 
+     *
      * @param offset the offset to the {@code wide} opcode itself
      * @param visitor {@code non-null;} visitor to use
      * @return instruction length, in bytes
@@ -1145,7 +1145,7 @@
     public interface Visitor {
         /**
          * Visits an invalid instruction.
-         * 
+         *
          * @param opcode the opcode
          * @param offset offset to the instruction
          * @param length length of the instruction, in bytes
@@ -1155,7 +1155,7 @@
         /**
          * Visits an instruction which has no inline arguments
          * (implicit or explicit).
-         * 
+         *
          * @param opcode the opcode
          * @param offset offset to the instruction
          * @param length length of the instruction, in bytes
@@ -1166,7 +1166,7 @@
 
         /**
          * Visits an instruction which has a local variable index argument.
-         * 
+         *
          * @param opcode the opcode
          * @param offset offset to the instruction
          * @param length length of the instruction, in bytes
@@ -1188,13 +1188,13 @@
          * should-be-zero value left-shifted by 8. In the case of entries
          * of type {@code int}, the {@code value} field always
          * holds the raw value (for convenience of clients).
-         * 
+         *
          * <p><b>Note:</b> In order to avoid giving it a barely-useful
          * visitor all its own, {@code newarray} also uses this
          * form, passing {@code value} as the array type code and
          * {@code cst} as a {@link CstType} instance
          * corresponding to the array type.</p>
-         * 
+         *
          * @param opcode the opcode
          * @param offset offset to the instruction
          * @param length length of the instruction, in bytes
@@ -1207,7 +1207,7 @@
 
         /**
          * Visits an instruction which has a branch target argument.
-         * 
+         *
          * @param opcode the opcode
          * @param offset offset to the instruction
          * @param length length of the instruction, in bytes
@@ -1218,7 +1218,7 @@
 
         /**
          * Visits a switch instruction.
-         * 
+         *
          * @param opcode the opcode
          * @param offset offset to the instruction
          * @param length length of the instruction, in bytes
@@ -1318,7 +1318,7 @@
             return previousOffset;
         }
     }
-    
+
     /**
      * Base implementation of {@link Visitor}, which has empty method
      * bodies for all methods.
diff --git a/dx/src/com/android/dx/cf/code/ConcreteMethod.java b/dx/src/com/android/dx/cf/code/ConcreteMethod.java
index 70b6b45..da6cff7 100644
--- a/dx/src/com/android/dx/cf/code/ConcreteMethod.java
+++ b/dx/src/com/android/dx/cf/code/ConcreteMethod.java
@@ -43,13 +43,13 @@
 
     /**
      * {@code null-ok;} the class's {@code SourceFile} attribute value,
-     * if any 
+     * if any
      */
     private final CstUtf8 sourceFile;
 
     /**
      * whether the class that this method is part of is defined with
-     * {@code ACC_SUPER} 
+     * {@code ACC_SUPER}
      */
     private final boolean accSuper;
 
@@ -64,7 +64,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param method {@code non-null;} the method to be based on
      * @param cf {@code non-null;} the class file that contains this method
      * @param keepLines whether to keep the line number information
@@ -179,7 +179,7 @@
     /**
      * Gets whether the class that this method is part of is defined with
      * {@code ACC_SUPER}.
-     * 
+     *
      * @return the {@code ACC_SUPER} value
      */
     public boolean getAccSuper() {
@@ -188,7 +188,7 @@
 
     /**
      * Gets the maximum stack size.
-     * 
+     *
      * @return {@code >= 0;} the maximum stack size
      */
     public int getMaxStack() {
@@ -197,7 +197,7 @@
 
     /**
      * Gets the number of locals.
-     * 
+     *
      * @return {@code >= 0;} the number of locals
      */
     public int getMaxLocals() {
@@ -206,7 +206,7 @@
 
     /**
      * Gets the bytecode array.
-     * 
+     *
      * @return {@code non-null;} the bytecode array
      */
     public BytecodeArray getCode() {
@@ -215,7 +215,7 @@
 
     /**
      * Gets the exception table.
-     * 
+     *
      * @return {@code non-null;} the exception table
      */
     public ByteCatchList getCatches() {
@@ -224,7 +224,7 @@
 
     /**
      * Gets the line number list.
-     * 
+     *
      * @return {@code non-null;} the line number list
      */
     public LineNumberList getLineNumbers() {
@@ -233,7 +233,7 @@
 
     /**
      * Gets the local variable list.
-     * 
+     *
      * @return {@code non-null;} the local variable list
      */
     public LocalVariableList getLocalVariables() {
@@ -243,7 +243,7 @@
     /**
      * Returns a {@link SourcePosition} instance corresponding to the
      * given bytecode offset.
-     * 
+     *
      * @param offset {@code >= 0;} the bytecode offset
      * @return {@code non-null;} an appropriate instance
      */
diff --git a/dx/src/com/android/dx/cf/code/ExecutionStack.java b/dx/src/com/android/dx/cf/code/ExecutionStack.java
index 15a9e6c..8f5b528 100644
--- a/dx/src/com/android/dx/cf/code/ExecutionStack.java
+++ b/dx/src/com/android/dx/cf/code/ExecutionStack.java
@@ -24,7 +24,7 @@
 
 /**
  * Representation of a Java method execution stack.
- * 
+ *
  * <p><b>Note:</b> For the most part, the documentation for this class
  * ignores the distinction between {@link Type} and {@link
  * TypeBearer}.</p>
@@ -35,13 +35,13 @@
 
     /**
      * {@code >= 0;} stack pointer (points one past the end) / current stack
-     * size 
+     * size
      */
     private int stackPtr;
 
     /**
-     * Constructs an instance. 
-     * 
+     * Constructs an instance.
+     *
      * @param maxStack {@code >= 0;} the maximum size of the stack for this
      * instance
      */
@@ -53,7 +53,7 @@
 
     /**
      * Makes and returns a mutable copy of this instance.
-     * 
+     *
      * @return {@code non-null;} the copy
      */
     public ExecutionStack copy() {
@@ -68,7 +68,7 @@
     /**
      * Annotates (adds context to) the given exception with information
      * about this instance.
-     * 
+     *
      * @param ex {@code non-null;} the exception to annotate
      */
     public void annotate(ExceptionWithContext ex) {
@@ -85,7 +85,7 @@
     /**
      * Replaces all the occurrences of the given uninitialized type in
      * this stack with its initialized equivalent.
-     * 
+     *
      * @param type {@code non-null;} type to replace
      */
     public void makeInitialized(Type type) {
@@ -107,7 +107,7 @@
 
     /**
      * Gets the maximum stack size for this instance.
-     * 
+     *
      * @return {@code >= 0;} the max stack size
      */
     public int getMaxStack() {
@@ -116,7 +116,7 @@
 
     /**
      * Gets the current stack size.
-     * 
+     *
      * @return {@code >= 0, < getMaxStack();} the current stack size
      */
     public int size() {
@@ -138,7 +138,7 @@
 
     /**
      * Pushes a value of the given type onto the stack.
-     * 
+     *
      * @param type {@code non-null;} type of the value
      * @throws SimException thrown if there is insufficient room on the
      * stack for the value
@@ -175,10 +175,10 @@
      * {@code n == 0} means to peek at the top of the stack. Note that
      * this will return {@code null} if the indicated element is the
      * deeper half of a category-2 value.
-     * 
+     *
      * @param n {@code >= 0;} which element to peek at
      * @return {@code null-ok;} the type of value stored at that element
-     * @throws SimException thrown if {@code n >= size()} 
+     * @throws SimException thrown if {@code n >= size()}
      */
     public TypeBearer peek(int n) {
         if (n < 0) {
@@ -197,7 +197,7 @@
      * stack, returning the type per se, as opposed to the
      * <i>type-bearer</i>.  This method is just a convenient shorthand
      * for {@code peek(n).getType()}.
-     * 
+     *
      * @see #peek
      */
     public Type peekType(int n) {
@@ -206,7 +206,7 @@
 
     /**
      * Pops the top element off of the stack.
-     * 
+     *
      * @return {@code non-null;} the type formerly on the top of the stack
      * @throws SimException thrown if the stack is empty
      */
@@ -226,7 +226,7 @@
      * contexts, particularly when merging two instances. As such, it places
      * the following restriction on its behavior: You may only replace
      * values with other values of the same category.
-     * 
+     *
      * @param n {@code >= 0;} which element to change, where {@code 0} is
      * the top element of the stack
      * @param type {@code non-null;} type of the new value
@@ -281,7 +281,7 @@
      * Gets the string form for a stack element. This is the same as
      * {@code toString()} except that {@code null} is converted
      * to {@code "<invalid>"}.
-     * 
+     *
      * @param type {@code null-ok;} the stack element
      * @return {@code non-null;} the string form
      */
@@ -295,7 +295,7 @@
 
     /**
      * Throws a properly-formatted exception.
-     * 
+     *
      * @param msg {@code non-null;} useful message
      * @return never (keeps compiler happy)
      */
diff --git a/dx/src/com/android/dx/cf/code/Frame.java b/dx/src/com/android/dx/cf/code/Frame.java
index f345335..002a4fb 100644
--- a/dx/src/com/android/dx/cf/code/Frame.java
+++ b/dx/src/com/android/dx/cf/code/Frame.java
@@ -197,7 +197,7 @@
         } catch (NullPointerException ex) {
             throw new NullPointerException("can't return from non-subroutine");
         }
-       
+
         return (subLocals == null) ? null
                 : new Frame(subLocals, stack, newSubroutines);
     }
@@ -234,7 +234,7 @@
      * Merges this frame's subroutine lists with another. The result
      * is the deepest common nesting (effectively, the common prefix of the
      * two lists).
-     * 
+     *
      * @param otherSubroutines label list of subroutine start blocks, from
      * least-nested to most-nested.
      * @return {@code non-null;} merged subroutine nest list as described above
@@ -359,7 +359,7 @@
                             RuntimeException("Incompatible merged subroutines");
                 }
             }
-            
+
         }
 
         return new Frame(resultLocals, resultStack, resultSubroutines);
diff --git a/dx/src/com/android/dx/cf/code/LineNumberList.java b/dx/src/com/android/dx/cf/code/LineNumberList.java
index 7af3f4e..f54f8b5 100644
--- a/dx/src/com/android/dx/cf/code/LineNumberList.java
+++ b/dx/src/com/android/dx/cf/code/LineNumberList.java
@@ -29,7 +29,7 @@
     /**
      * Returns an instance which is the concatenation of the two given
      * instances.
-     * 
+     *
      * @param list1 {@code non-null;} first instance
      * @param list2 {@code non-null;} second instance
      * @return {@code non-null;} combined instance
@@ -58,7 +58,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param count the number of elements to be in the list
      */
     public LineNumberList(int count) {
@@ -67,7 +67,7 @@
 
     /**
      * Gets the indicated item.
-     * 
+     *
      * @param n {@code >= 0;} which item
      * @return {@code null-ok;} the indicated item
      */
@@ -77,7 +77,7 @@
 
     /**
      * Sets the item at the given index.
-     * 
+     *
      * @param n {@code >= 0, < size();} which element
      * @param item {@code non-null;} the item
      */
@@ -91,7 +91,7 @@
 
     /**
      * Sets the item at the given index.
-     * 
+     *
      * @param n {@code >= 0, < size();} which element
      * @param startPc {@code >= 0;} start pc of this item
      * @param lineNumber {@code >= 0;} corresponding line number
@@ -102,7 +102,7 @@
 
     /**
      * Gets the line number associated with the given address.
-     * 
+     *
      * @param pc {@code >= 0;} the address to look up
      * @return {@code >= -1;} the associated line number, or {@code -1} if
      * none is known
@@ -146,7 +146,7 @@
 
         /**
          * Constructs an instance.
-         * 
+         *
          * @param startPc {@code >= 0;} start pc of this item
          * @param lineNumber {@code >= 0;} corresponding line number
          */
@@ -165,7 +165,7 @@
 
         /**
          * Gets the start pc of this item.
-         * 
+         *
          * @return the start pc
          */
         public int getStartPc() {
@@ -174,7 +174,7 @@
 
         /**
          * Gets the line number of this item.
-         * 
+         *
          * @return the line number
          */
         public int getLineNumber() {
diff --git a/dx/src/com/android/dx/cf/code/LocalVariableList.java b/dx/src/com/android/dx/cf/code/LocalVariableList.java
index 8f49a33..dbf8ba2 100644
--- a/dx/src/com/android/dx/cf/code/LocalVariableList.java
+++ b/dx/src/com/android/dx/cf/code/LocalVariableList.java
@@ -33,7 +33,7 @@
     /**
      * Returns an instance which is the concatenation of the two given
      * instances. The result is immutable.
-     * 
+     *
      * @param list1 {@code non-null;} first instance
      * @param list2 {@code non-null;} second instance
      * @return {@code non-null;} combined instance
@@ -69,7 +69,7 @@
      * any element whose {name, index, start, length} matches an
      * element in the signature list gets augmented with the
      * corresponding signature. The result is immutable.
-     * 
+     *
      * @param descriptorList {@code non-null;} list with descriptors
      * @param signatureList {@code non-null;} list with signatures
      * @return {@code non-null;} the merged result
@@ -88,7 +88,7 @@
                 item = item.withSignature(signature);
             }
             result.set(i, item);
-        }        
+        }
 
         result.setImmutable();
         return result;
@@ -96,7 +96,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param count the number of elements to be in the list
      */
     public LocalVariableList(int count) {
@@ -105,7 +105,7 @@
 
     /**
      * Gets the indicated item.
-     * 
+     *
      * @param n {@code >= 0;} which item
      * @return {@code null-ok;} the indicated item
      */
@@ -115,7 +115,7 @@
 
     /**
      * Sets the item at the given index.
-     * 
+     *
      * @param n {@code >= 0, < size();} which element
      * @param item {@code non-null;} the item
      */
@@ -129,10 +129,10 @@
 
     /**
      * Sets the item at the given index.
-     * 
+     *
      * <p><b>Note:</b> At least one of {@code descriptor} or
      * {@code signature} must be passed as non-null.</p>
-     * 
+     *
      * @param n {@code >= 0, < size();} which element
      * @param startPc {@code >= 0;} the start pc of this variable's scope
      * @param length {@code >= 0;} the length (in bytecodes) of this variable's
@@ -151,7 +151,7 @@
      * Gets the local variable information in this instance which matches
      * the given {@link com.android.dx.cf.code.LocalVariableList.Item}
      * in all respects but the type descriptor and signature, if any.
-     * 
+     *
      * @param item {@code non-null;} local variable information to match
      * @return {@code null-ok;} the corresponding local variable information stored
      * in this instance, or {@code null} if there is no matching
@@ -176,7 +176,7 @@
      * and local index, if any. <b>Note:</b> In standard classfiles, a
      * variable's start point is listed as the address of the instruction
      * <i>just past</i> the one that sets the variable.
-     * 
+     *
      * @param pc {@code >= 0;} the address to look up
      * @param index {@code >= 0;} the local variable index
      * @return {@code null-ok;} the associated local variable information, or
@@ -220,10 +220,10 @@
 
         /**
          * Constructs an instance.
-         * 
+         *
          * <p><b>Note:</b> At least one of {@code descriptor} or
          * {@code signature} must be passed as non-null.</p>
-         * 
+         *
          * @param startPc {@code >= 0;} the start pc of this variable's scope
          * @param length {@code >= 0;} the length (in bytecodes) of this variable's
          * scope
@@ -265,7 +265,7 @@
 
         /**
          * Gets the start pc of this variable's scope.
-         * 
+         *
          * @return {@code >= 0;} the start pc of this variable's scope
          */
         public int getStartPc() {
@@ -274,7 +274,7 @@
 
         /**
          * Gets the length (in bytecodes) of this variable's scope.
-         * 
+         *
          * @return {@code >= 0;} the length (in bytecodes) of this variable's scope
          */
         public int getLength() {
@@ -311,7 +311,7 @@
 
         /**
          * Gets the variable's local index.
-         * 
+         *
          * @return {@code >= 0;} the variable's local index
          */
         public int getIndex() {
@@ -321,7 +321,7 @@
         /**
          * Gets the variable's type descriptor. This is a convenient shorthand
          * for {@code Type.intern(getDescriptor().getString())}.
-         * 
+         *
          * @return {@code non-null;} the variable's type
          */
         public Type getType() {
@@ -331,7 +331,7 @@
         /**
          * Constructs and returns an instance which is identical to this
          * one, except that the signature is changed to the given value.
-         * 
+         *
          * @param newSignature {@code non-null;} the new signature
          * @return {@code non-null;} an appropriately-constructed instance
          */
@@ -343,7 +343,7 @@
         /**
          * Gets whether this instance matches (describes) the given
          * address and index.
-         * 
+         *
          * @param pc {@code >= 0;} the address in question
          * @param index {@code >= 0;} the local variable index in question
          * @return {@code true} iff this instance matches {@code pc}
@@ -359,7 +359,7 @@
          * Gets whether this instance matches (describes) the given
          * other instance exactly in all fields except type descriptor and
          * type signature.
-         * 
+         *
          * @param other {@code non-null;} the instance to compare to
          * @return {@code true} iff this instance matches
          */
diff --git a/dx/src/com/android/dx/cf/code/LocalsArray.java b/dx/src/com/android/dx/cf/code/LocalsArray.java
index b2c2689..75af047 100644
--- a/dx/src/com/android/dx/cf/code/LocalsArray.java
+++ b/dx/src/com/android/dx/cf/code/LocalsArray.java
@@ -26,7 +26,7 @@
 
 /**
  * Representation of an array of local variables, with Java semantics.
- * 
+ *
  * <p><b>Note:</b> For the most part, the documentation for this class
  * ignores the distinction between {@link Type} and {@link
  * TypeBearer}.</p>
@@ -37,14 +37,14 @@
      * Constructs an instance, explicitly indicating the mutability.
      *
      * @param mutable {@code true} if this instance is mutable
-     */   
+     */
     protected LocalsArray(boolean mutable) {
         super(mutable);
     }
 
     /**
      * Makes and returns a mutable copy of this instance.
-     * 
+     *
      * @return {@code non-null;} the copy
      */
     public abstract LocalsArray copy();
@@ -52,7 +52,7 @@
     /**
      * Annotates (adds context to) the given exception with information
      * about this instance.
-     * 
+     *
      * @param ex {@code non-null;} the exception to annotate
      */
     public abstract void annotate(ExceptionWithContext ex);
@@ -60,14 +60,14 @@
     /**
      * Replaces all the occurrences of the given uninitialized type in
      * this array with its initialized equivalent.
-     * 
+     *
      * @param type {@code non-null;} type to replace
      */
     public abstract void makeInitialized(Type type);
 
     /**
      * Gets the maximum number of locals this instance can refer to.
-     * 
+     *
      * @return the max locals
      */
     public abstract int getMaxLocals();
@@ -79,7 +79,7 @@
      * by the operation. In case of either category, if the <i>previous</i>
      * local contains a category-2 value, then it too is invalidated by
      * this operation.
-     * 
+     *
      * @param idx {@code >= 0, < getMaxLocals();} which local
      * @param type {@code non-null;} new type for the local at {@code idx}
      */
@@ -90,14 +90,14 @@
      * to that register spec (which includes type and optional name
      * information). This is identical to calling
      * {@code set(spec.getReg(), spec)}.
-     * 
+     *
      * @param spec {@code non-null;} register spec to use as the basis for the update
      */
     public abstract void set(RegisterSpec spec);
 
     /**
      * Invalidates the local at the given index.
-     * 
+     *
      * @param idx {@code >= 0, < getMaxLocals();} which local
      */
     public abstract void invalidate(int idx);
@@ -105,7 +105,7 @@
     /**
      * Gets the type stored at the given local index, or {@code null}
      * if the given local is uninitialized / invalid.
-     * 
+     *
      * @param idx {@code >= 0, < getMaxLocals();} which local
      * @return {@code null-ok;} the type of value stored in that local
      */
@@ -115,7 +115,7 @@
      * Gets the type stored at the given local index, only succeeding if
      * the given local contains a valid type (though it is allowed to
      * be an uninitialized instance).
-     * 
+     *
      * @param idx {@code >= 0, < getMaxLocals();} which local
      * @return {@code non-null;} the type of value stored in that local
      * @throws SimException thrown if {@code idx} is valid, but
@@ -126,7 +126,7 @@
     /**
      * Gets the type stored at the given local index, which is expected
      * to be an initialized category-1 value.
-     * 
+     *
      * @param idx {@code >= 0, < getMaxLocals();} which local
      * @return {@code non-null;} the type of value stored in that local
      * @throws SimException thrown if {@code idx} is valid, but
@@ -139,7 +139,7 @@
     /**
      * Gets the type stored at the given local index, which is expected
      * to be a category-2 value.
-     * 
+     *
      * @param idx {@code >= 0, < getMaxLocals();} which local
      * @return {@code non-null;} the type of value stored in that local
      * @throws SimException thrown if {@code idx} is valid, but
diff --git a/dx/src/com/android/dx/cf/code/LocalsArraySet.java b/dx/src/com/android/dx/cf/code/LocalsArraySet.java
index fa2acbe..5d03055 100644
--- a/dx/src/com/android/dx/cf/code/LocalsArraySet.java
+++ b/dx/src/com/android/dx/cf/code/LocalsArraySet.java
@@ -74,7 +74,7 @@
         super(primary.getMaxLocals() > 0);
 
         this.primary = primary;
-        this.secondaries = secondaries;        
+        this.secondaries = secondaries;
     }
 
     /**
diff --git a/dx/src/com/android/dx/cf/code/Machine.java b/dx/src/com/android/dx/cf/code/Machine.java
index aff50b2..72ba3b4 100644
--- a/dx/src/com/android/dx/cf/code/Machine.java
+++ b/dx/src/com/android/dx/cf/code/Machine.java
@@ -33,11 +33,11 @@
      * Gets the effective prototype of the method that this instance is
      * being used for. The <i>effective</i> prototype includes an initial
      * {@code this} argument for instance methods.
-     * 
+     *
      * @return {@code non-null;} the method prototype
      */
     public Prototype getPrototype();
-    
+
     /**
      * Clears the regular and auxiliary arguments area.
      */
diff --git a/dx/src/com/android/dx/cf/code/Merger.java b/dx/src/com/android/dx/cf/code/Merger.java
index 8da9a18..51c31c3 100644
--- a/dx/src/com/android/dx/cf/code/Merger.java
+++ b/dx/src/com/android/dx/cf/code/Merger.java
@@ -34,7 +34,7 @@
     /**
      * Merges two locals arrays. If the merged result is the same as the first
      * argument, then return the first argument (not a copy).
-     * 
+     *
      * @param locals1 {@code non-null;} a locals array
      * @param locals2 {@code non-null;} another locals array
      * @return {@code non-null;} the result of merging the two locals arrays
@@ -86,7 +86,7 @@
     /**
      * Merges two stacks. If the merged result is the same as the first
      * argument, then return the first argument (not a copy).
-     * 
+     *
      * @param stack1 {@code non-null;} a stack
      * @param stack2 {@code non-null;} another stack
      * @return {@code non-null;} the result of merging the two stacks
@@ -143,7 +143,7 @@
 
     /**
      * Merges two frame types.
-     * 
+     *
      * @param ft1 {@code non-null;} a frame type
      * @param ft2 {@code non-null;} another frame type
      * @return {@code non-null;} the result of merging the two types
@@ -212,7 +212,7 @@
      * type {@code Object} is the supertype of all reference
      * types and all arrays are assignable to
      * {@code Serializable} and {@code Cloneable}.
-     * 
+     *
      * @param supertypeBearer {@code non-null;} the supertype
      * @param subtypeBearer {@code non-null;} the subtype
      */
diff --git a/dx/src/com/android/dx/cf/code/ReturnAddress.java b/dx/src/com/android/dx/cf/code/ReturnAddress.java
index 47c6071..ee36450 100644
--- a/dx/src/com/android/dx/cf/code/ReturnAddress.java
+++ b/dx/src/com/android/dx/cf/code/ReturnAddress.java
@@ -33,7 +33,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param subroutineAddress {@code >= 0;} the start address of the
      * subroutine being returned from
      */
@@ -99,7 +99,7 @@
 
     /**
      * Gets the subroutine address.
-     * 
+     *
      * @return {@code >= 0;} the subroutine address
      */
     public int getSubroutineAddress() {
diff --git a/dx/src/com/android/dx/cf/code/RopperMachine.java b/dx/src/com/android/dx/cf/code/RopperMachine.java
index dd7fcd4..ebff24b 100644
--- a/dx/src/com/android/dx/cf/code/RopperMachine.java
+++ b/dx/src/com/android/dx/cf/code/RopperMachine.java
@@ -53,7 +53,7 @@
 
     /**
      * {@code non-null;} method constant for use in converting
-     * {@code multianewarray} instructions 
+     * {@code multianewarray} instructions
      */
     private static final CstMethodRef MULTIANEWARRAY_METHOD =
         new CstMethodRef(ARRAY_REFLECT_TYPE,
@@ -106,19 +106,19 @@
 
     /**
      * {@code null-ok;} the appropriate {@code return} op or {@code null}
-     * if it is not yet known 
+     * if it is not yet known
      */
     private Rop returnOp;
 
     /**
      * {@code null-ok;} the source position for the return block or {@code null}
-     * if it is not yet known 
+     * if it is not yet known
      */
     private SourcePosition returnPosition;
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param ropper {@code non-null;} ropper controlling this instance
      * @param method {@code non-null;} method being converted
      * @param advice {@code non-null;} translation advice to use
@@ -126,7 +126,7 @@
     public RopperMachine(Ropper ropper, ConcreteMethod method,
             TranslationAdvice advice) {
         super(method.getEffectiveDescriptor());
-        
+
         if (ropper == null) {
             throw new NullPointerException("ropper == null");
         }
@@ -153,7 +153,7 @@
     /**
      * Gets the instructions array. It is shared and gets modified by
      * subsequent calls to this instance.
-     * 
+     *
      * @return {@code non-null;} the instructions array
      */
     public ArrayList<Insn> getInsns() {
@@ -162,7 +162,7 @@
 
     /**
      * Gets the return opcode encountered, if any.
-     * 
+     *
      * @return {@code null-ok;} the return opcode
      */
     public Rop getReturnOp() {
@@ -171,7 +171,7 @@
 
     /**
      * Gets the return position, if known.
-     * 
+     *
      * @return {@code null-ok;} the return position
      */
     public SourcePosition getReturnPosition() {
@@ -200,7 +200,7 @@
     /**
      * Gets whether {@link #catches} was used. This indicates that the
      * last instruction in the block is one of the ones that can throw.
-     * 
+     *
      * @return whether {@code catches} has been used
      */
     public boolean wereCatchesUsed() {
@@ -210,7 +210,7 @@
     /**
      * Gets whether the block just processed ended with a
      * {@code return}.
-     * 
+     *
      * @return whether the block returns
      */
     public boolean returns() {
@@ -224,7 +224,7 @@
      * successor. This may return something other than
      * {@code -1} in the case of an instruction with no
      * successors at all (primary or otherwise).
-     * 
+     *
      * @return {@code >= -1;} the primary successor index
      */
     public int getPrimarySuccessorIndex() {
@@ -235,7 +235,7 @@
      * Gets how many extra blocks will be needed to represent the
      * block currently being translated. Each extra block should consist
      * of one instruction from the end of the original block.
-     * 
+     *
      * @return {@code >= 0;} the number of extra blocks needed
      */
     public int getExtraBlockCount() {
@@ -318,7 +318,7 @@
              * the "temporary stack" area defined for the method, and
              * then move stuff back down onto the main "stack" in the
              * arrangement specified by the stack op pattern.
-             * 
+             *
              * Note: This code ends up emitting a lot of what will
              * turn out to be superfluous moves (e.g., moving back and
              * forth to the same local when doing a dup); however,
@@ -350,7 +350,7 @@
                 stackPointer += type.getType().getCategory();
             }
             return;
-        }                
+        }
 
         TypeBearer destType = (dest != null) ? dest : Type.VOID;
         Constant cst = getAuxCst();
@@ -369,7 +369,7 @@
              * Add an array constructor for the int[] containing all the
              * dimensions.
              */
-            RegisterSpec dimsReg = 
+            RegisterSpec dimsReg =
                 RegisterSpec.make(dest.getNextReg(), Type.INT_ARRAY);
             rop = Rops.opFilledNewArray(Type.INT_ARRAY, sourceCount);
             insn = new ThrowingCstInsn(rop, pos, sources, catches,
@@ -383,7 +383,7 @@
 
             /*
              * Add a const-class instruction for the specified array
-             * class. 
+             * class.
              */
 
             /*
@@ -438,7 +438,7 @@
 
             RegisterSpec objectReg =
                 RegisterSpec.make(dest.getReg(), Type.OBJECT);
-            
+
             insn = new ThrowingCstInsn(
                     Rops.opInvokeStatic(MULTIANEWARRAY_METHOD.getPrototype()),
                     pos, RegisterSpecList.make(classReg, dimsReg),
@@ -609,7 +609,7 @@
          * action we take here is to convert these initialization
          * bytecodes into a single fill-array-data ROP which lays out
          * all the constant values in a table.
-         */ 
+         */
         if (initValues != null) {
             extraBlockCount++;
             insn = new FillArrayDataInsn(Rops.FILL_ARRAY_DATA, pos,
@@ -622,7 +622,7 @@
     /**
      * Helper for {@link #run}, which gets the list of sources for the.
      * instruction.
-     * 
+     *
      * @param opcode the opcode being translated
      * @param stackPointer {@code >= 0;} the stack pointer after the
      * instruction's arguments have been popped
@@ -634,7 +634,7 @@
         if (count == 0) {
             // We get an easy out if there aren't any sources.
             return RegisterSpecList.EMPTY;
-        } 
+        }
 
         int localIndex = getLocalIndex();
         RegisterSpecList sources;
@@ -696,7 +696,7 @@
 
     /**
      * Sets or updates the information about the return block.
-     * 
+     *
      * @param op {@code non-null;} the opcode to use
      * @param pos {@code non-null;} the position to use
      */
@@ -727,7 +727,7 @@
 
     /**
      * Gets the register opcode for the given Java opcode.
-     * 
+     *
      * @param jop {@code >= 0;} the Java opcode
      * @param cst {@code null-ok;} the constant argument, if any
      * @return {@code >= 0;} the corresponding register opcode
@@ -756,7 +756,7 @@
             case ByteOps.LDC2_W: {
                 return RegOps.CONST;
             }
-            case ByteOps.ILOAD: 
+            case ByteOps.ILOAD:
             case ByteOps.ISTORE: {
                 return RegOps.MOVE;
             }
diff --git a/dx/src/com/android/dx/cf/code/Simulator.java b/dx/src/com/android/dx/cf/code/Simulator.java
index 408e126..f96699e 100644
--- a/dx/src/com/android/dx/cf/code/Simulator.java
+++ b/dx/src/com/android/dx/cf/code/Simulator.java
@@ -48,7 +48,7 @@
     private static final String LOCAL_MISMATCH_ERROR =
         "This is symptomatic of .class transformation tools that ignore " +
         "local variable information.";
-    
+
     /** {@code non-null;} machine to use when simulating */
     private final Machine machine;
 
@@ -63,7 +63,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param machine {@code non-null;} machine to use when simulating
      * @param method {@code non-null;} method data to use
      */
@@ -85,7 +85,7 @@
     /**
      * Simulates the effect of executing the given basic block. This modifies
      * the passed-in frame to represent the end result.
-     * 
+     *
      * @param bb {@code non-null;} the basic block
      * @param frame {@code non-null;} frame to operate on
      */
@@ -109,7 +109,7 @@
     /**
      * Simulates the effect of the instruction at the given offset, by
      * making appropriate calls on the given frame.
-     * 
+     *
      * @param offset {@code >= 0;} offset of the instruction to simulate
      * @param frame {@code non-null;} frame to operate on
      * @return the length of the instruction, in bytes
@@ -139,7 +139,7 @@
         private final Machine machine;
 
         /**
-         * {@code null-ok;} frame to use; set with each call to 
+         * {@code null-ok;} frame to use; set with each call to
          * {@link Simulator#simulate}
          */
         private Frame frame;
@@ -157,7 +157,7 @@
 
         /**
          * Sets the frame to act on.
-         * 
+         *
          * @param frame {@code non-null;} the frame
          */
         public void setFrame(Frame frame) {
@@ -382,7 +382,7 @@
                     if (stack.peekType(0).isCategory2()) {
                         throw illegalTos();
                     }
-                    
+
                     if (stack.peekType(1).isCategory2()) {
                         // "form 2" in vmspec-2
                         machine.popArgs(frame, 2);
@@ -474,7 +474,7 @@
         /**
          * Checks whether the prototype is compatible with returning the
          * given type, and throws if not.
-         * 
+         *
          * @param encountered {@code non-null;} the encountered return type
          */
         private void checkReturnType(Type encountered) {
@@ -503,7 +503,7 @@
              * possible, we replace the type with the one indicated in
              * the local variable table, though we still need to check
              * to make sure it's valid for the opcode.
-             * 
+             *
              * The reason we use (offset + length) for the localOffset
              * for a store is because it is only after the store that
              * the local type becomes valid. On the other hand, the
@@ -599,7 +599,7 @@
                      * Get the instance prototype, and use it to direct
                      * the machine.
                      */
-                    Prototype prototype = 
+                    Prototype prototype =
                         ((CstMethodRef) cst).getPrototype(false);
                     machine.popArgs(frame, prototype);
                     break;
@@ -609,7 +609,7 @@
                      * Get the static prototype, and use it to direct
                      * the machine.
                      */
-                    Prototype prototype = 
+                    Prototype prototype =
                         ((CstMethodRef) cst).getPrototype(true);
                     machine.popArgs(frame, prototype);
                     break;
diff --git a/dx/src/com/android/dx/cf/code/SwitchList.java b/dx/src/com/android/dx/cf/code/SwitchList.java
index fdd1596..621d728 100644
--- a/dx/src/com/android/dx/cf/code/SwitchList.java
+++ b/dx/src/com/android/dx/cf/code/SwitchList.java
@@ -31,7 +31,7 @@
     /**
      * {@code non-null;} list of targets corresponding to the test values; there
      * is always one extra element in the target list, to hold the
-     * default target 
+     * default target
      */
     private final IntList targets;
 
@@ -40,7 +40,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param size {@code >= 0;} the number of elements to be in the table
      */
     public SwitchList(int size) {
@@ -60,7 +60,7 @@
 
     /**
      * Gets the size of the list.
-     * 
+     *
      * @return {@code >= 0;} the list size
      */
     public int size() {
@@ -69,9 +69,9 @@
 
     /**
      * Gets the indicated test value.
-     * 
+     *
      * @param n {@code >= 0;}, &lt; size(); which index
-     * @return the test value 
+     * @return the test value
      */
     public int getValue(int n) {
         return values.get(n);
@@ -80,7 +80,7 @@
     /**
      * Gets the indicated target. Asking for the target at {@code size()}
      * returns the default target.
-     * 
+     *
      * @param n {@code >= 0, <= size();} which index
      * @return {@code >= 0;} the target
      */
@@ -91,7 +91,7 @@
     /**
      * Gets the default target. This is just a shorthand for
      * {@code getTarget(size())}.
-     * 
+     *
      * @return {@code >= 0;} the default target
      */
     public int getDefaultTarget() {
@@ -101,7 +101,7 @@
     /**
      * Gets the list of all targets. This includes one extra element at the
      * end of the list, which holds the default target.
-     * 
+     *
      * @return {@code non-null;} the target list
      */
     public IntList getTargets() {
@@ -110,7 +110,7 @@
 
     /**
      * Gets the list of all case values.
-     * 
+     *
      * @return {@code non-null;} the case value list
      */
     public IntList getValues() {
@@ -120,7 +120,7 @@
     /**
      * Sets the default target. It is only valid to call this method
      * when all the non-default elements have been set.
-     * 
+     *
      * @param target {@code >= 0;} the absolute (not relative) default target
      * address
      */
@@ -140,7 +140,7 @@
 
     /**
      * Adds the given item.
-     * 
+     *
      * @param value the test value
      * @param target {@code >= 0;} the absolute (not relative) target address
      */
diff --git a/dx/src/com/android/dx/cf/code/ValueAwareMachine.java b/dx/src/com/android/dx/cf/code/ValueAwareMachine.java
index 43aab8a..de75db5 100644
--- a/dx/src/com/android/dx/cf/code/ValueAwareMachine.java
+++ b/dx/src/com/android/dx/cf/code/ValueAwareMachine.java
@@ -29,7 +29,7 @@
 public class ValueAwareMachine extends BaseMachine {
     /**
      * Constructs an instance.
-     * 
+     *
      * @param prototype {@code non-null;} the prototype for the associated
      * method
      */
@@ -96,7 +96,7 @@
             case ByteOps.IUSHR:
             case ByteOps.IAND:
             case ByteOps.IOR:
-            case ByteOps.IXOR: 
+            case ByteOps.IXOR:
             case ByteOps.IINC:
             case ByteOps.I2L:
             case ByteOps.I2F:
@@ -161,7 +161,7 @@
                 }
                 Type type = ((TypeBearer) getAuxCst()).getType();
                 if (type == Type.VOID) {
-                    clearResult();                    
+                    clearResult();
                 } else {
                     setResult(type);
                 }
diff --git a/dx/src/com/android/dx/cf/cst/ConstantPoolParser.java b/dx/src/com/android/dx/cf/cst/ConstantPoolParser.java
index 7cd9c9b..5eecfa6 100644
--- a/dx/src/com/android/dx/cf/cst/ConstantPoolParser.java
+++ b/dx/src/com/android/dx/cf/cst/ConstantPoolParser.java
@@ -53,7 +53,7 @@
     /**
      * -1 || &gt;= 10; the end offset of this constant pool in the
      * {@code byte[]} which it came from or {@code -1} if not
-     * yet parsed 
+     * yet parsed
      */
     private int endOffset;
 
@@ -62,7 +62,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param bytes {@code non-null;} the bytes of the file
      */
     public ConstantPoolParser(ByteArray bytes) {
@@ -76,7 +76,7 @@
 
     /**
      * Sets the parse observer for this instance.
-     * 
+     *
      * @param observer {@code null-ok;} the observer
      */
     public void setObserver(ParseObserver observer) {
@@ -86,7 +86,7 @@
     /**
      * Gets the end offset of this constant pool in the {@code byte[]}
      * which it came from.
-     * 
+     *
      * @return {@code >= 10;} the end offset
      */
     public int getEndOffset() {
@@ -96,7 +96,7 @@
 
     /**
      * Gets the actual constant pool.
-     * 
+     *
      * @return {@code non-null;} the constant pool
      */
     public StdConstantPool getPool() {
@@ -213,7 +213,7 @@
      * parsed, also storing it in the constant pool. This will also
      * have the side effect of parsing any entries the indicated one
      * depends on.
-     * 
+     *
      * @param idx which constant
      * @return {@code non-null;} the parsed constant
      */
@@ -314,7 +314,7 @@
 
     /**
      * Parses a utf8 constant.
-     * 
+     *
      * @param at offset to the start of the constant (where the tag byte is)
      * @return {@code non-null;} the parsed value
      */
diff --git a/dx/src/com/android/dx/cf/direct/AnnotationParser.java b/dx/src/com/android/dx/cf/direct/AnnotationParser.java
index 88e4cd2..ca38fc5 100644
--- a/dx/src/com/android/dx/cf/direct/AnnotationParser.java
+++ b/dx/src/com/android/dx/cf/direct/AnnotationParser.java
@@ -71,10 +71,10 @@
      * was parsed
      */
     private int parseCursor;
-    
+
     /**
      * Constructs an instance.
-     * 
+     *
      * @param cf {@code non-null;} class file to parse from
      * @param offset {@code >= 0;} offset into the class file data to parse at
      * @param length {@code >= 0;} number of bytes left in the attribute data
@@ -93,15 +93,15 @@
         this.input = bytes.makeDataInputStream();
         this.parseCursor = 0;
     }
-    
+
     /**
      * Parses an annotation value ({@code element_value}) attribute.
-     * 
+     *
      * @return {@code non-null;} the parsed constant value
      */
     public Constant parseValueAttribute() {
         Constant result;
-        
+
         try {
             result = parseValue();
 
@@ -118,14 +118,14 @@
 
     /**
      * Parses a parameter annotation attribute.
-     * 
+     *
      * @param visibility {@code non-null;} visibility of the parsed annotations
      * @return {@code non-null;} the parsed list of lists of annotations
      */
     public AnnotationsList parseParameterAttribute(
             AnnotationVisibility visibility) {
         AnnotationsList result;
-        
+
         try {
             result = parseAnnotationsList(visibility);
 
@@ -139,10 +139,10 @@
 
         return result;
     }
-    
+
     /**
      * Parses an annotation attribute, per se.
-     * 
+     *
      * @param visibility {@code non-null;} visibility of the parsed annotations
      * @return {@code non-null;} the list of annotations read from the attribute
      * data
@@ -150,7 +150,7 @@
     public Annotations parseAnnotationAttribute(
             AnnotationVisibility visibility) {
         Annotations result;
-        
+
         try {
             result = parseAnnotations(visibility);
 
@@ -167,7 +167,7 @@
 
     /**
      * Parses a list of annotation lists.
-     * 
+     *
      * @param visibility {@code non-null;} visibility of the parsed annotations
      * @return {@code non-null;} the list of annotation lists read from the attribute
      * data
@@ -202,7 +202,7 @@
 
     /**
      * Parses an annotation list.
-     * 
+     *
      * @param visibility {@code non-null;} visibility of the parsed annotations
      * @return {@code non-null;} the list of annotations read from the attribute
      * data
@@ -237,7 +237,7 @@
 
     /**
      * Parses a single annotation.
-     * 
+     *
      * @param visibility {@code non-null;} visibility of the parsed annotation
      * @return {@code non-null;} the parsed annotation
      */
@@ -274,18 +274,18 @@
         annotation.setImmutable();
         return annotation;
     }
-    
+
     /**
      * Parses a {@link NameValuePair}.
-     * 
+     *
      * @return {@code non-null;} the parsed element
      */
     private NameValuePair parseElement() throws IOException {
         requireLength(5);
-                
+
         int elementNameIndex = input.readUnsignedShort();
         CstUtf8 elementName = (CstUtf8) pool.get(elementNameIndex);
-                
+
         if (observer != null) {
             parsed(2, "element_name: " + elementName.toHuman());
             parsed(0, "value: ");
@@ -303,7 +303,7 @@
 
     /**
      * Parses an annotation value.
-     * 
+     *
      * @return {@code non-null;} the parsed value
      */
     private Constant parseValue() throws IOException {
@@ -352,7 +352,7 @@
                 int classInfoIndex = input.readUnsignedShort();
                 CstUtf8 value = (CstUtf8) pool.get(classInfoIndex);
                 Type type = Type.internReturnType(value.getString());
-                
+
                 if (observer != null) {
                     parsed(2, "class_info: " + type.toHuman());
                 }
@@ -370,7 +370,7 @@
                 int constNameIndex = input.readUnsignedShort();
                 CstUtf8 typeName = (CstUtf8) pool.get(typeNameIndex);
                 CstUtf8 constName = (CstUtf8) pool.get(constNameIndex);
-                
+
                 if (observer != null) {
                     parsed(2, "type_name: " + typeName.toHuman());
                     parsed(2, "const_name: " + constName.toHuman());
@@ -416,11 +416,11 @@
             }
         }
     }
-    
+
     /**
      * Helper for {@link #parseValue}, which parses a constant reference
      * and returns the referred-to constant value.
-     * 
+     *
      * @return {@code non-null;} the parsed value
      */
     private Constant parseConstant() throws IOException {
@@ -428,8 +428,8 @@
         Constant value = (Constant) pool.get(constValueIndex);
 
         if (observer != null) {
-            String human = (value instanceof CstUtf8) 
-                ? ((CstUtf8) value).toQuoted() 
+            String human = (value instanceof CstUtf8)
+                ? ((CstUtf8) value).toQuoted()
                 : value.toHuman();
             parsed(2, "constant_value: " + human);
         }
@@ -440,7 +440,7 @@
     /**
      * Helper which will throw an exception if the given number of bytes
      * is not available to be read.
-     * 
+     *
      * @param requiredLength the number of required bytes
      */
     private void requireLength(int requiredLength) throws IOException {
@@ -448,12 +448,12 @@
             throw new ParseException("truncated annotation attribute");
         }
     }
-    
+
     /**
      * Helper which indicates that some bytes were just parsed. This should
      * only be used (for efficiency sake) if the parse is known to be
      * observed.
-     * 
+     *
      * @param length {@code >= 0;} number of bytes parsed
      * @param message {@code non-null;} associated message
      */
@@ -465,7 +465,7 @@
     /**
      * Convenience wrapper that simply calls through to
      * {@code observer.changeIndent()}.
-     * 
+     *
      * @param indent the amount to change the indent by
      */
     private void changeIndent(int indent) {
diff --git a/dx/src/com/android/dx/cf/direct/AttributeFactory.java b/dx/src/com/android/dx/cf/direct/AttributeFactory.java
index d00a859..f98372c 100644
--- a/dx/src/com/android/dx/cf/direct/AttributeFactory.java
+++ b/dx/src/com/android/dx/cf/direct/AttributeFactory.java
@@ -57,7 +57,7 @@
      * indicated position in the given array. This method figures out
      * the name, and then does all the setup to call on to {@link #parse0},
      * which does the actual construction.
-     * 
+     *
      * @param cf {@code non-null;} class file to parse from
      * @param context context to parse in; one of the {@code CTX_*}
      * constants
@@ -96,7 +96,7 @@
             return parse0(cf, context, name.getString(), offset + 6, length,
                           observer);
         } catch (ParseException ex) {
-            ex.addContext("...while parsing " + 
+            ex.addContext("...while parsing " +
                     ((name != null) ? (name.toHuman() + " ") : "") +
                     "attribute at offset " + Hex.u4(offset));
             throw ex;
@@ -107,7 +107,7 @@
      * Parses attribute content. The base class implements this by constructing
      * an instance of {@link RawAttribute}. Subclasses are expected to
      * override this to do something better in most cases.
-     * 
+     *
      * @param cf {@code non-null;} class file to parse from
      * @param context context to parse in; one of the {@code CTX_*}
      * constants
diff --git a/dx/src/com/android/dx/cf/direct/ClassPathOpener.java b/dx/src/com/android/dx/cf/direct/ClassPathOpener.java
index 927e9bd..4e8c435 100644
--- a/dx/src/com/android/dx/cf/direct/ClassPathOpener.java
+++ b/dx/src/com/android/dx/cf/direct/ClassPathOpener.java
@@ -207,7 +207,7 @@
         byte[] buf = new byte[20000];
         boolean any = false;
 
-        ArrayList<? extends java.util.zip.ZipEntry> entriesList 
+        ArrayList<? extends java.util.zip.ZipEntry> entriesList
                 = Collections.list(zip.entries());
 
         if (sort) {
diff --git a/dx/src/com/android/dx/cf/direct/CodeObserver.java b/dx/src/com/android/dx/cf/direct/CodeObserver.java
index 952f1bc..efcc80b 100644
--- a/dx/src/com/android/dx/cf/direct/CodeObserver.java
+++ b/dx/src/com/android/dx/cf/direct/CodeObserver.java
@@ -47,7 +47,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param bytes {@code non-null;} actual array of bytecode
      * @param observer {@code non-null;} observer to inform of parsing
      */
@@ -198,7 +198,7 @@
 
     /**
      * Helper to produce the first bit of output for each instruction.
-     * 
+     *
      * @param offset the offset to the start of the instruction
      */
     private String header(int offset) {
@@ -220,7 +220,7 @@
     /**
      * Helper for {@link #visitConstant} where the constant is an
      * {@code int}.
-     * 
+     *
      * @param opcode the opcode
      * @param offset offset to the instruction
      * @param length instruction length
@@ -247,7 +247,7 @@
     /**
      * Helper for {@link #visitConstant} where the constant is a
      * {@code long}.
-     * 
+     *
      * @param opcode the opcode
      * @param offset offset to the instruction
      * @param length instruction length
@@ -271,7 +271,7 @@
     /**
      * Helper for {@link #visitConstant} where the constant is a
      * {@code float}.
-     * 
+     *
      * @param opcode the opcode
      * @param offset offset to the instruction
      * @param length instruction length
@@ -289,7 +289,7 @@
     /**
      * Helper for {@link #visitConstant} where the constant is a
      * {@code double}.
-     * 
+     *
      * @param opcode the opcode
      * @param offset offset to the instruction
      * @param length instruction length
diff --git a/dx/src/com/android/dx/cf/direct/DirectClassFile.java b/dx/src/com/android/dx/cf/direct/DirectClassFile.java
index ac227fa..b194572 100644
--- a/dx/src/com/android/dx/cf/direct/DirectClassFile.java
+++ b/dx/src/com/android/dx/cf/direct/DirectClassFile.java
@@ -46,18 +46,18 @@
 
     /**
      * minimum {@code .class} file major version
-     * 
+     *
      * The class file definition (vmspec/2nd-edition) says:
-     * 
+     *
      *     "Implementations of version 1.2 of the
      *     Java 2 platform can support class file
      *     formats of versions in the range 45.0
      *     through 46.0 inclusive."
-     * 
+     *
      * The class files generated by the build are currently
      * (as of 11/2006) reporting version 49.0 (0x31.0x00),
      * however, so we use that as our upper bound.
-     * 
+     *
      * Valid ranges are typically of the form
      * "A.0 through B.C inclusive" where A <= B and C >= 0,
      * which is why we don't have a CLASS_FILE_MIN_MINOR_VERSION.
@@ -72,7 +72,7 @@
 
     /**
      * {@code non-null;} the file path for the class, excluding any base directory
-     * specification 
+     * specification
      */
     private final String filePath;
 
@@ -83,19 +83,19 @@
      * whether to be strict about parsing; if
      * {@code false}, this avoids doing checks that only exist
      * for purposes of verification (such as magic number matching and
-     * path-package consistency checking) 
+     * path-package consistency checking)
      */
     private final boolean strictParse;
 
     /**
      * {@code null-ok;} the constant pool; only ever {@code null}
-     * before the constant pool is successfully parsed 
+     * before the constant pool is successfully parsed
      */
     private StdConstantPool pool;
 
     /**
      * the class file field {@code access_flags}; will be {@code -1}
-     * before the file is successfully parsed 
+     * before the file is successfully parsed
      */
     private int accessFlags;
 
@@ -108,33 +108,33 @@
 
     /**
      * {@code null-ok;} the class file field {@code super_class}, interpreted
-     * as a type constant if non-zero 
+     * as a type constant if non-zero
      */
     private CstType superClass;
 
     /**
      * {@code null-ok;} the class file field {@code interfaces}; only
      * ever {@code null} before the file is successfully
-     * parsed 
+     * parsed
      */
     private TypeList interfaces;
 
     /**
      * {@code null-ok;} the class file field {@code fields}; only ever
-     * {@code null} before the file is successfully parsed 
+     * {@code null} before the file is successfully parsed
      */
     private FieldList fields;
 
     /**
      * {@code null-ok;} the class file field {@code methods}; only ever
-     * {@code null} before the file is successfully parsed 
+     * {@code null} before the file is successfully parsed
      */
     private MethodList methods;
 
     /**
      * {@code null-ok;} the class file field {@code attributes}; only
      * ever {@code null} before the file is successfully
-     * parsed 
+     * parsed
      */
     private StdAttributeList attributes;
 
@@ -147,7 +147,7 @@
     /**
      * Returns the string form of an object or {@code "(none)"}
      * (rather than {@code "null"}) for {@code null}.
-     * 
+     *
      * @param obj {@code null-ok;} the object to stringify
      * @return {@code non-null;} the appropriate string form
      */
@@ -161,7 +161,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param bytes {@code non-null;} the bytes of the file
      * @param filePath {@code non-null;} the file path for the class,
      * excluding any base directory specification
@@ -188,7 +188,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param bytes {@code non-null;} the bytes of the file
      * @param filePath {@code non-null;} the file path for the class,
      * excluding any base directory specification
@@ -204,7 +204,7 @@
 
     /**
      * Sets the parse observer for this instance.
-     * 
+     *
      * @param observer {@code null-ok;} the observer
      */
     public void setObserver(ParseObserver observer) {
@@ -213,7 +213,7 @@
 
     /**
      * Sets the attribute factory to use.
-     * 
+     *
      * @param attributeFactory {@code non-null;} the attribute factory
      */
     public void setAttributeFactory(AttributeFactory attributeFactory) {
@@ -226,7 +226,7 @@
 
     /**
      * Gets the {@link ByteArray} that this instance's data comes from.
-     * 
+     *
      * @return {@code non-null;} the bytes
      */
     public ByteArray getBytes() {
@@ -318,7 +318,7 @@
      * translated to type constants. Instance construction will fail
      * if any of the (alleged) indices turn out not to refer to
      * constant pool entries of type {@code Class}.
-     * 
+     *
      * @param offset offset into {@link #bytes} for the start of the
      * data
      * @param size number of elements in the list (not number of bytes)
@@ -332,14 +332,14 @@
         if (pool == null) {
             throw new IllegalStateException("pool not yet initialized");
         }
-        
+
         return new DcfTypeList(bytes, offset, size, pool, observer);
     }
 
     /**
      * Gets the class file field {@code magic}, but without doing any
      * checks or parsing first.
-     * 
+     *
      * @return the magic value
      */
     public int getMagic0() {
@@ -349,7 +349,7 @@
     /**
      * Gets the class file field {@code minor_version}, but
      * without doing any checks or parsing first.
-     * 
+     *
      * @return the minor version
      */
     public int getMinorVersion0() {
@@ -359,7 +359,7 @@
     /**
      * Gets the class file field {@code major_version}, but
      * without doing any checks or parsing first.
-     * 
+     *
      * @return the major version
      */
     public int getMajorVersion0() {
@@ -404,7 +404,7 @@
     /**
      * Sees if the .class file header magic/version are within
      * range.
-     * 
+     *
      * @param magic the value of a classfile "magic" field
      * @param minorVersion the value of a classfile "minor_version" field
      * @param majorVersion the value of a classfile "major_version" field
@@ -479,7 +479,7 @@
 
         if (observer != null) {
             observer.parsed(bytes, at, 2,
-                            "access_flags: " + 
+                            "access_flags: " +
                             AccessFlags.classString(accessFlags));
             observer.parsed(bytes, at + 2, 2, "this_class: " + thisClass);
             observer.parsed(bytes, at + 4, 2, "super_class: " +
@@ -559,7 +559,7 @@
     private static class DcfTypeList implements TypeList {
         /** {@code non-null;} array containing the data */
         private final ByteArray bytes;
-        
+
         /** number of elements in the list (not number of bytes) */
         private final int size;
 
@@ -568,7 +568,7 @@
 
         /**
          * Constructs an instance.
-         * 
+         *
          * @param bytes {@code non-null;} original classfile's bytes
          * @param offset offset into {@link #bytes} for the start of the
          * data
@@ -628,6 +628,6 @@
         /** {@inheritDoc} */
         public TypeList withAddedType(Type type) {
             throw new UnsupportedOperationException("unsupported");
-        }        
+        }
     }
 }
diff --git a/dx/src/com/android/dx/cf/direct/FieldListParser.java b/dx/src/com/android/dx/cf/direct/FieldListParser.java
index 24ba7e0..2d8280d 100644
--- a/dx/src/com/android/dx/cf/direct/FieldListParser.java
+++ b/dx/src/com/android/dx/cf/direct/FieldListParser.java
@@ -33,7 +33,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param cf {@code non-null;} the class file to parse from
      * @param definer {@code non-null;} class being defined
      * @param offset offset in {@code bytes} to the start of the list
@@ -47,7 +47,7 @@
 
     /**
      * Gets the parsed list.
-     * 
+     *
      * @return {@code non-null;} the parsed list
      */
     public StdFieldList getList() {
diff --git a/dx/src/com/android/dx/cf/direct/MemberListParser.java b/dx/src/com/android/dx/cf/direct/MemberListParser.java
index a0023c6..91a5e1d 100644
--- a/dx/src/com/android/dx/cf/direct/MemberListParser.java
+++ b/dx/src/com/android/dx/cf/direct/MemberListParser.java
@@ -131,7 +131,7 @@
     /**
      * Gets the human-oriented name for what this instance is parsing.
      * Subclasses must override this method.
-     * 
+     *
      * @return {@code non-null;} the human oriented name
      */
     protected abstract String humanName();
@@ -148,7 +148,7 @@
     /**
      * Gets the {@code CTX_*} constant to use when parsing attributes.
      * Subclasses must override this method.
-     * 
+     *
      * @return {@code non-null;} the human oriented name
      */
     protected abstract int getAttributeContext();
diff --git a/dx/src/com/android/dx/cf/direct/MethodListParser.java b/dx/src/com/android/dx/cf/direct/MethodListParser.java
index 6ab1aba..9e3494e 100644
--- a/dx/src/com/android/dx/cf/direct/MethodListParser.java
+++ b/dx/src/com/android/dx/cf/direct/MethodListParser.java
@@ -33,7 +33,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param cf {@code non-null;} the class file to parse from
      * @param definer {@code non-null;} class being defined
      * @param offset offset in {@code bytes} to the start of the list
@@ -47,7 +47,7 @@
 
     /**
      * Gets the parsed list.
-     * 
+     *
      * @return {@code non-null;} the parsed list
      */
     public StdMethodList getList() {
diff --git a/dx/src/com/android/dx/cf/direct/StdAttributeFactory.java b/dx/src/com/android/dx/cf/direct/StdAttributeFactory.java
index da12a4e..a6a97af 100644
--- a/dx/src/com/android/dx/cf/direct/StdAttributeFactory.java
+++ b/dx/src/com/android/dx/cf/direct/StdAttributeFactory.java
@@ -366,7 +366,7 @@
 
         if (observer != null) {
             observer.parsed(bytes, offset, 2, "class: " + type);
-            observer.parsed(bytes, offset + 2, 2, "method: " + 
+            observer.parsed(bytes, offset + 2, 2, "method: " +
                             DirectClassFile.stringOrNone(method));
         }
 
@@ -439,13 +439,13 @@
             list.set(i, innerClass, outerClass, name, accessFlags);
             if (observer != null) {
                 observer.parsed(bytes, offset, 2,
-                                "inner_class: " + 
+                                "inner_class: " +
                                 DirectClassFile.stringOrNone(innerClass));
                 observer.parsed(bytes, offset + 2, 2,
-                                "  outer_class: " + 
+                                "  outer_class: " +
                                 DirectClassFile.stringOrNone(outerClass));
                 observer.parsed(bytes, offset + 4, 2,
-                                "  name: " + 
+                                "  name: " +
                                 DirectClassFile.stringOrNone(name));
                 observer.parsed(bytes, offset + 6, 2,
                                 "  access_flags: " +
@@ -548,7 +548,7 @@
     /**
      * Parse the table part of either a {@code LocalVariableTable}
      * or a {@code LocalVariableTypeTable}.
-     * 
+     *
      * @param bytes {@code non-null;} bytes to parse, which should <i>only</i>
      * contain the table data (no header)
      * @param pool {@code non-null;} constant pool to use
@@ -578,13 +578,13 @@
                 CstUtf8 type = (CstUtf8) pool.get(typeIdx);
                 CstUtf8 descriptor = null;
                 CstUtf8 signature = null;
-                
+
                 if (typeTable) {
                     signature = type;
                 } else {
                     descriptor = type;
                 }
-                
+
                 list.set(i, startPc, length, name,
                         descriptor, signature, index);
 
@@ -614,7 +614,7 @@
 
         AnnotationParser ap =
             new AnnotationParser(cf, offset, length, observer);
-        Annotations annotations = 
+        Annotations annotations =
             ap.parseAnnotationAttribute(AnnotationVisibility.BUILD);
 
         return new AttRuntimeInvisibleAnnotations(annotations, length);
@@ -631,7 +631,7 @@
 
         AnnotationParser ap =
             new AnnotationParser(cf, offset, length, observer);
-        Annotations annotations = 
+        Annotations annotations =
             ap.parseAnnotationAttribute(AnnotationVisibility.RUNTIME);
 
         return new AttRuntimeVisibleAnnotations(annotations, length);
@@ -730,7 +730,7 @@
     /**
      * Throws the right exception when a known attribute has a way too short
      * length.
-     * 
+     *
      * @return never
      * @throws ParseException always thrown
      */
@@ -741,7 +741,7 @@
     /**
      * Throws the right exception when a known attribute has a too short
      * length.
-     * 
+     *
      * @return never
      * @throws ParseException always thrown
      */
@@ -752,7 +752,7 @@
     /**
      * Throws the right exception when an attribute has an unexpected length
      * (given its contents).
-     * 
+     *
      * @param expected expected length
      * @return never
      * @throws ParseException always thrown
diff --git a/dx/src/com/android/dx/cf/iface/ClassFile.java b/dx/src/com/android/dx/cf/iface/ClassFile.java
index e37fec0..0f584ba 100644
--- a/dx/src/com/android/dx/cf/iface/ClassFile.java
+++ b/dx/src/com/android/dx/cf/iface/ClassFile.java
@@ -81,7 +81,7 @@
     public ConstantPool getConstantPool();
 
     /**
-     * Gets the field {@code interfaces} (along with 
+     * Gets the field {@code interfaces} (along with
      * {@code interfaces_count}).
      *
      * @return {@code non-null;} the list of interfaces
diff --git a/dx/src/com/android/dx/cf/iface/StdAttributeList.java b/dx/src/com/android/dx/cf/iface/StdAttributeList.java
index dd5dfd7..287b8c7 100644
--- a/dx/src/com/android/dx/cf/iface/StdAttributeList.java
+++ b/dx/src/com/android/dx/cf/iface/StdAttributeList.java
@@ -26,7 +26,7 @@
         implements AttributeList {
     /**
      * Constructs an instance. All indices initially contain {@code null}.
-     * 
+     *
      * @param size the size of the list
      */
     public StdAttributeList(int size) {
@@ -94,7 +94,7 @@
 
     /**
      * Sets the attribute at the given index.
-     * 
+     *
      * @param n {@code >= 0, < size();} which attribute
      * @param attribute {@code null-ok;} the attribute object
      */
diff --git a/dx/src/com/android/dx/cf/iface/StdField.java b/dx/src/com/android/dx/cf/iface/StdField.java
index c3a4da6..ef9873d 100644
--- a/dx/src/com/android/dx/cf/iface/StdField.java
+++ b/dx/src/com/android/dx/cf/iface/StdField.java
@@ -28,7 +28,7 @@
 public final class StdField extends StdMember implements Field {
     /**
      * Constructs an instance.
-     * 
+     *
      * @param definingClass {@code non-null;} the defining class
      * @param accessFlags access flags
      * @param nat {@code non-null;} member name and type (descriptor)
diff --git a/dx/src/com/android/dx/cf/iface/StdFieldList.java b/dx/src/com/android/dx/cf/iface/StdFieldList.java
index 044d6b7..f27bd22 100644
--- a/dx/src/com/android/dx/cf/iface/StdFieldList.java
+++ b/dx/src/com/android/dx/cf/iface/StdFieldList.java
@@ -25,7 +25,7 @@
 public final class StdFieldList extends FixedSizeList implements FieldList {
     /**
      * Constructs an instance. All indices initially contain {@code null}.
-     * 
+     *
      * @param size the size of the list
      */
     public StdFieldList(int size) {
@@ -39,7 +39,7 @@
 
     /**
      * Sets the field at the given index.
-     * 
+     *
      * @param n {@code >= 0, < size();} which field
      * @param field {@code null-ok;} the field object
      */
diff --git a/dx/src/com/android/dx/cf/iface/StdMember.java b/dx/src/com/android/dx/cf/iface/StdMember.java
index dfe45c3..9f15585 100644
--- a/dx/src/com/android/dx/cf/iface/StdMember.java
+++ b/dx/src/com/android/dx/cf/iface/StdMember.java
@@ -39,7 +39,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param definingClass {@code non-null;} the defining class
      * @param accessFlags access flags
      * @param nat {@code non-null;} member name and type (descriptor)
diff --git a/dx/src/com/android/dx/cf/iface/StdMethod.java b/dx/src/com/android/dx/cf/iface/StdMethod.java
index 15fd6e1..c511d7d 100644
--- a/dx/src/com/android/dx/cf/iface/StdMethod.java
+++ b/dx/src/com/android/dx/cf/iface/StdMethod.java
@@ -31,7 +31,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param definingClass {@code non-null;} the defining class
      * @param accessFlags access flags
      * @param nat {@code non-null;} member name and type (descriptor)
diff --git a/dx/src/com/android/dx/cf/iface/StdMethodList.java b/dx/src/com/android/dx/cf/iface/StdMethodList.java
index 521021e..417cdee 100644
--- a/dx/src/com/android/dx/cf/iface/StdMethodList.java
+++ b/dx/src/com/android/dx/cf/iface/StdMethodList.java
@@ -25,7 +25,7 @@
 public final class StdMethodList extends FixedSizeList implements MethodList {
     /**
      * Constructs an instance. All indices initially contain {@code null}.
-     * 
+     *
      * @param size the size of the list
      */
     public StdMethodList(int size) {
@@ -39,7 +39,7 @@
 
     /**
      * Sets the method at the given index.
-     * 
+     *
      * @param n {@code >= 0, < size();} which method
      * @param method {@code null-ok;} the method object
      */
diff --git a/dx/src/com/android/dx/command/Main.java b/dx/src/com/android/dx/command/Main.java
index 281a83e..626cf7a 100644
--- a/dx/src/com/android/dx/command/Main.java
+++ b/dx/src/com/android/dx/command/Main.java
@@ -50,7 +50,7 @@
         "    Dump classfiles, or transformations thereof, in a " +
         "human-oriented format.\n" +
         "  dx --junit [-wait] <TestClass>\n" +
-        "    Run the indicated unit test.\n" + 
+        "    Run the indicated unit test.\n" +
         "  dx -J<option> ... <arguments, in one of the above " +
         "forms>\n" +
         "    Pass VM-specific options to the virtual machine that " +
@@ -60,7 +60,7 @@
         ").\n" +
         "  dx --help\n" +
         "    Print this message.";
-        
+
     /**
      * This class is uninstantiable.
      */
@@ -117,7 +117,7 @@
         } catch (Throwable ex) {
             System.err.println("\nUNEXPECTED TOP-LEVEL ERROR:");
             ex.printStackTrace();
-            if ((ex instanceof NoClassDefFoundError) 
+            if ((ex instanceof NoClassDefFoundError)
                     || (ex instanceof NoSuchMethodError)) {
                 System.err.println(
                         "Note: You may be using an incompatible " +
@@ -126,7 +126,7 @@
                         "with recent releases of GCJ.)");
             }
             System.exit(3);
-        }            
+        }
 
         if (!gotCmd) {
             System.err.println("error: no command specified");
diff --git a/dx/src/com/android/dx/command/annotool/AnnotationLister.java b/dx/src/com/android/dx/command/annotool/AnnotationLister.java
index d3fb27c..a29e5ba 100644
--- a/dx/src/com/android/dx/command/annotool/AnnotationLister.java
+++ b/dx/src/com/android/dx/command/annotool/AnnotationLister.java
@@ -202,7 +202,7 @@
                 case CLASS:
                 case INNERCLASS:
                 case METHOD:
-                    matchPackages.add(packageName);                    
+                    matchPackages.add(packageName);
                     break;
                 case PACKAGE:
                     System.out.println(packageName.replace('/','.'));
diff --git a/dx/src/com/android/dx/command/annotool/Main.java b/dx/src/com/android/dx/command/annotool/Main.java
index 9fd1ac5..7661c3d 100644
--- a/dx/src/com/android/dx/command/annotool/Main.java
+++ b/dx/src/com/android/dx/command/annotool/Main.java
@@ -39,7 +39,7 @@
         InvalidArgumentException() {
             super();
         }
-        
+
         InvalidArgumentException(String s) {
             super(s);
         }
@@ -49,7 +49,7 @@
         CLASS,
         INNERCLASS,
         METHOD,
-        PACKAGE        
+        PACKAGE
     }
 
 
diff --git a/dx/src/com/android/dx/command/dexer/Main.java b/dx/src/com/android/dx/command/dexer/Main.java
index 5a9f417..8df1bea 100644
--- a/dx/src/com/android/dx/command/dexer/Main.java
+++ b/dx/src/com/android/dx/command/dexer/Main.java
@@ -244,7 +244,7 @@
             }
         });
 
-        return opener.process();     
+        return opener.process();
     }
 
     /**
@@ -294,7 +294,7 @@
         if (! args.coreLibrary) {
             checkClassName(name);
         }
-        
+
         try {
             ClassDefItem clazz =
                 CfTranslator.translate(name, bytes, args.cfOptions);
@@ -317,13 +317,13 @@
      * Check the class name to make sure it's not a "core library"
      * class. If there is a problem, this updates the error count and
      * throws an exception to stop processing.
-     * 
+     *
      * @param name {@code non-null;} the fully-qualified internal-form
      * class name
      */
     private static void checkClassName(String name) {
         boolean bogus = false;
-        
+
         if (name.startsWith("java/")) {
             bogus = true;
         } else if (name.startsWith("javax/")) {
@@ -348,7 +348,7 @@
          */
 
         DxConsole.err.println("\ntrouble processing \"" + name + "\":");
-        DxConsole.err.println("\n" + 
+        DxConsole.err.println("\n" +
                 "Attempt to include a core class (java.* or javax.*) in " +
                 "something other\n" +
                 "than a core library. It is likely that you have " +
@@ -690,7 +690,7 @@
             meth.debugPrint(pw, args.verboseDump);
 
             /*
-             * The (default) source file is an attribute of the class, but 
+             * The (default) source file is an attribute of the class, but
              * it's useful to see it in method dumps.
              */
             CstUtf8 sourceFile = clazz.getSourceFile();
@@ -732,7 +732,7 @@
     private static class StopProcessing extends RuntimeException {
         // This space intentionally left blank.
     }
-    
+
     /**
      * Command-line argument parser and access.
      */
diff --git a/dx/src/com/android/dx/command/dump/BaseDumper.java b/dx/src/com/android/dx/command/dump/BaseDumper.java
index d2c1e13..ad6540b 100644
--- a/dx/src/com/android/dx/command/dump/BaseDumper.java
+++ b/dx/src/com/android/dx/command/dump/BaseDumper.java
@@ -48,7 +48,7 @@
 
     /**
      * {@code non-null;} the file path for the class, excluding any base
-     * directory specification 
+     * directory specification
      */
     private final String filePath;
 
@@ -72,7 +72,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param bytes {@code non-null;} bytes of the (alleged) class file
      * on the left)
      * @param out {@code non-null;} where to dump to
@@ -157,7 +157,7 @@
     /**
      * Gets the current dump cursor (that is, the offset of the expected
      * next byte to dump).
-     * 
+     *
      * @return {@code >= 0;} the dump cursor
      */
     protected final int getAt() {
@@ -166,7 +166,7 @@
 
     /**
      * Sets the dump cursor to the indicated offset in the given array.
-     * 
+     *
      * @param arr {@code non-null;} array in question
      * @param offset {@code >= 0;} offset into the array
      */
@@ -176,7 +176,7 @@
 
     /**
      * Gets the array of {@code byte}s to process.
-     * 
+     *
      * @return {@code non-null;} the bytes
      */
     protected final byte[] getBytes() {
@@ -185,7 +185,7 @@
 
     /**
      * Gets the filesystem/jar path of the file being dumped.
-     * 
+     *
      * @return {@code non-null;} the path
      */
     protected final String getFilePath() {
@@ -194,7 +194,7 @@
 
     /**
      * Gets whether to be strict about parsing.
-     * 
+     *
      * @return whether to be strict about parsing
      */
     protected final boolean getStrictParse() {
@@ -203,7 +203,7 @@
 
     /**
      * Prints the given string to this instance's output stream.
-     * 
+     *
      * @param s {@code null-ok;} string to print
      */
     protected final void print(String s) {
@@ -213,7 +213,7 @@
     /**
      * Prints the given string to this instance's output stream, followed
      * by a newline.
-     * 
+     *
      * @param s {@code null-ok;} string to print
      */
     protected final void println(String s) {
@@ -222,7 +222,7 @@
 
     /**
      * Gets whether this dump is to include raw bytes.
-     * 
+     *
      * @return the raw bytes flag
      */
     protected final boolean getRawBytes() {
@@ -232,7 +232,7 @@
     /**
      * Gets the width of the first column of output. This is {@code 0}
      * unless raw bytes are being included in the output.
-     * 
+     *
      * @return {@code >= 0;} the width of the first column
      */
     protected final int getWidth1() {
@@ -245,7 +245,7 @@
 
     /**
      * Gets the width of the second column of output.
-     * 
+     *
      * @return {@code >= 0;} the width of the second column
      */
     protected final int getWidth2() {
@@ -255,7 +255,7 @@
 
     /**
      * Constructs a hex data dump of the given portion of {@link #bytes}.
-     * 
+     *
      * @param offset offset to start dumping at
      * @param len length to dump
      * @return {@code non-null;} the dump
@@ -267,7 +267,7 @@
     /**
      * Combines a pair of strings as two columns, or if this is one-column
      * output, format the otherwise-second column.
-     * 
+     *
      * @param s1 {@code non-null;} the first column's string
      * @param s2 {@code non-null;} the second column's string
      * @return {@code non-null;} the combined output
diff --git a/dx/src/com/android/dx/command/dump/BlockDumper.java b/dx/src/com/android/dx/command/dump/BlockDumper.java
index 0858eab..7a11888 100644
--- a/dx/src/com/android/dx/command/dump/BlockDumper.java
+++ b/dx/src/com/android/dx/command/dump/BlockDumper.java
@@ -55,7 +55,7 @@
 
     /**
      * {@code null-ok;} the class file object being constructed;
-     * becomes non-null during {@link #dump} 
+     * becomes non-null during {@link #dump}
      */
     protected DirectClassFile classFile;
 
@@ -71,7 +71,7 @@
     /**
      * Dumps the given array, interpreting it as a class file and dumping
      * methods with indications of block-level stuff.
-     * 
+     *
      * @param bytes {@code non-null;} bytes of the (alleged) class file
      * @param out {@code non-null;} where to dump to
      * @param filePath the file path for the class, excluding any base
@@ -189,7 +189,7 @@
         if (!shouldDumpMethod(name)) {
             return;
         }
-        
+
         ConcreteMethod meth = new ConcreteMethod((Method) member, classFile,
                                                  true, true);
 
@@ -202,7 +202,7 @@
 
     /**
      * Does a regular basic block dump.
-     * 
+     *
      * @param meth {@code non-null;} method data to dump
      */
     private void regularDump(ConcreteMethod meth) {
@@ -257,7 +257,7 @@
                 CstType exceptionClass = one.getExceptionClass();
                 parsed(bytes, end, 0,
                        "catch " +
-                       ((exceptionClass == CstType.OBJECT) ? "<any>" : 
+                       ((exceptionClass == CstType.OBJECT) ? "<any>" :
                         exceptionClass.toHuman()) + " -> " +
                        Hex.u2(one.getHandlerPc()));
             }
@@ -277,7 +277,7 @@
 
     /**
      * Does a registerizing dump.
-     * 
+     *
      * @param meth {@code non-null;} method data to dump
      */
     private void ropDump(ConcreteMethod meth) {
diff --git a/dx/src/com/android/dx/command/dump/SsaDumper.java b/dx/src/com/android/dx/command/dump/SsaDumper.java
index e5e9d97..de44c83 100644
--- a/dx/src/com/android/dx/command/dump/SsaDumper.java
+++ b/dx/src/com/android/dx/command/dump/SsaDumper.java
@@ -51,7 +51,7 @@
 public class SsaDumper extends BlockDumper {
     /**
      * Does the dump.
-     * 
+     *
      * @param bytes {@code non-null;} bytes of the original class file
      * @param out {@code non-null;} where to dump to
      * @param filePath the file path for the class, excluding any base
@@ -66,7 +66,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param bytes {@code non-null;} bytes of the original class file
      * @param out {@code non-null;} where to dump to
      * @param filePath the file path for the class, excluding any base
@@ -124,10 +124,10 @@
         sb.append('\n');
 
         ArrayList<SsaBasicBlock> blocks = ssaMeth.getBlocks();
-        ArrayList<SsaBasicBlock> sortedBlocks = 
+        ArrayList<SsaBasicBlock> sortedBlocks =
             (ArrayList<SsaBasicBlock>) blocks.clone();
         Collections.sort(sortedBlocks, SsaBasicBlock.LABEL_COMPARATOR);
-        
+
         for (SsaBasicBlock block : sortedBlocks) {
             sb.append("block ")
                     .append(Hex.u2(block.getRopLabel())).append('\n');
@@ -164,7 +164,7 @@
                     sb.append(Hex.u2(succLabelList.get(i)));
 
                     if (szSuccLabels != 1 && primary == succLabelList.get(i)) {
-                        sb.append(" *");                        
+                        sb.append(" *");
                     }
                     sb.append('\n');
                 }
diff --git a/dx/src/com/android/dx/dex/cf/AttributeTranslator.java b/dx/src/com/android/dx/dex/cf/AttributeTranslator.java
index 3e2dbdf..2508a59 100644
--- a/dx/src/com/android/dx/dex/cf/AttributeTranslator.java
+++ b/dx/src/com/android/dx/dex/cf/AttributeTranslator.java
@@ -84,7 +84,7 @@
      * combines both visible and invisible annotations into a single
      * result set and also adds in a system annotation for the
      * {@code Signature} attribute if present.
-     * 
+     *
      * @param attribs {@code non-null;} the attributes list to search in
      * @return {@code non-null;} the set of annotations, which may be empty
      */
@@ -107,7 +107,7 @@
      * class is an annotation class, then this also includes a
      * representation of all the {@code AnnotationDefault}
      * values.
-     * 
+     *
      * @param cf {@code non-null;} the class in question
      * @param args {@code non-null;} the high-level options
      * @return {@code non-null;} the set of annotations, which may be empty
@@ -149,7 +149,7 @@
      * Gets the annotations out of a given method, similar to {@link
      * #getAnnotations}, also including an annotation for the translation
      * of the method-specific attribute {@code Exceptions}.
-     * 
+     *
      * @param method {@code non-null;} the method in question
      * @return {@code non-null;} the set of annotations, which may be empty
      */
@@ -158,18 +158,18 @@
         TypeList exceptions = getExceptions(method);
 
         if (exceptions.size() != 0) {
-            Annotation throwsAnnotation = 
+            Annotation throwsAnnotation =
                 AnnotationUtils.makeThrows(exceptions);
             result = Annotations.combine(result, throwsAnnotation);
         }
 
         return result;
     }
-    
+
     /**
      * Helper method for {@link #getAnnotations} which just gets the
      * existing annotations, per se.
-     * 
+     *
      * @param attribs {@code non-null;} the attributes list to search in
      * @return {@code non-null;} the set of annotations, which may be empty
      */
@@ -201,7 +201,7 @@
     /**
      * Gets the {@code Signature} attribute out of a given
      * {@link AttributeList}, if any, translating it to an annotation.
-     * 
+     *
      * @param attribs {@code non-null;} the attributes list to search in
      * @return {@code null-ok;} the converted {@code Signature} annotation,
      * if there was an attribute to translate
@@ -223,7 +223,7 @@
      * If the class really has an enclosing method, this returns an
      * {@code EnclosingMethod} annotation; if not, this returns
      * an {@code EnclosingClass} annotation.
-     * 
+     *
      * @param attribs {@code non-null;} the attributes list to search in
      * @return {@code null-ok;} the converted {@code EnclosingMethod} or
      * {@code EnclosingClass} annotation, if there was an
@@ -260,7 +260,7 @@
      * {@link AttributeList}, if any, translating it to one or more of an
      * {@code InnerClass}, {@code EnclosingClass}, or
      * {@code MemberClasses} annotation.
-     * 
+     *
      * @param thisClass {@code non-null;} type representing the class being
      * processed
      * @param attribs {@code non-null;} the attributes list to search in
@@ -299,7 +299,7 @@
         }
 
         int membersSize = membersList.size();
-        
+
         if ((foundThisClass == null) && (membersSize == 0)) {
             return null;
         }
@@ -352,7 +352,7 @@
      * Gets the parameter annotations out of a given method. This
      * combines both visible and invisible annotations into a single
      * result set.
-     * 
+     *
      * @param method {@code non-null;} the method in question
      * @return {@code non-null;} the list of annotation sets, which may be
      * empty
@@ -389,7 +389,7 @@
      * Gets the {@code AnnotationDefault} attributes out of a
      * given class, if any, reforming them as an
      * {@code AnnotationDefault} annotation.
-     * 
+     *
      * @param cf {@code non-null;} the class in question
      * @return {@code null-ok;} an appropriately-constructed
      * {@code AnnotationDefault} annotation, if there were any
diff --git a/dx/src/com/android/dx/dex/cf/CfOptions.java b/dx/src/com/android/dx/dex/cf/CfOptions.java
index 8726223..468f0be 100644
--- a/dx/src/com/android/dx/dex/cf/CfOptions.java
+++ b/dx/src/com/android/dx/dex/cf/CfOptions.java
@@ -32,7 +32,7 @@
 
     /** whether strict file-name-vs-class-name checking should be done */
     public boolean strictNameCheck = true;
-    
+
     /** whether to do SSA/register optimization */
     public boolean optimize = false;
 
diff --git a/dx/src/com/android/dx/dex/cf/CfTranslator.java b/dx/src/com/android/dx/dex/cf/CfTranslator.java
index 8210e90..1a9aa47 100644
--- a/dx/src/com/android/dx/dex/cf/CfTranslator.java
+++ b/dx/src/com/android/dx/dex/cf/CfTranslator.java
@@ -126,7 +126,7 @@
         if (classAnnotations.size() != 0) {
             out.setClassAnnotations(classAnnotations);
         }
-        
+
         processFields(cf, out);
         processMethods(cf, args, out);
 
@@ -162,7 +162,7 @@
                     out.addInstanceField(fi);
                 }
 
-                Annotations annotations = 
+                Annotations annotations =
                     AttributeTranslator.getAnnotations(one.getAttributes());
                 if (annotations.size() != 0) {
                     out.addFieldAnnotations(field, annotations);
@@ -178,7 +178,7 @@
     /**
      * Helper for {@link #processFields}, which translates constants into
      * more specific types if necessary.
-     * 
+     *
      * @param constant {@code non-null;} the constant in question
      * @param type {@code non-null;} the desired type
      */
@@ -254,8 +254,8 @@
                     int paramSize;
 
                     paramSize = meth.getParameterWordCount(isStatic);
-    
-                    String canonicalName 
+
+                    String canonicalName
                             = thisClass.getClassType().getDescriptor()
                                 + "." + one.getName().getString();
 
@@ -307,7 +307,7 @@
                         accessFlags &= ~AccessFlags.ACC_SYNCHRONIZED;
                     }
                 }
-                
+
                 if (isConstructor) {
                     accessFlags |= AccessFlags.ACC_CONSTRUCTOR;
                 }
@@ -323,13 +323,13 @@
                     out.addVirtualMethod(mi);
                 }
 
-                Annotations annotations = 
+                Annotations annotations =
                     AttributeTranslator.getMethodAnnotations(one);
                 if (annotations.size() != 0) {
                     out.addMethodAnnotations(meth, annotations);
                 }
 
-                AnnotationsList list = 
+                AnnotationsList list =
                     AttributeTranslator.getParameterAnnotations(one);
                 if (list.size() != 0) {
                     out.addParameterAnnotations(meth, list);
@@ -366,7 +366,7 @@
          * for the current purpose.
          */
 
-        DalvCode.AssignIndicesCallback callback = 
+        DalvCode.AssignIndicesCallback callback =
             new DalvCode.AssignIndicesCallback() {
                 public int getIndex(Constant cst) {
                     // Everything is at index 0!
diff --git a/dx/src/com/android/dx/dex/cf/CodeStatistics.java b/dx/src/com/android/dx/dex/cf/CodeStatistics.java
index b692d77..33d03fd 100644
--- a/dx/src/com/android/dx/dex/cf/CodeStatistics.java
+++ b/dx/src/com/android/dx/dex/cf/CodeStatistics.java
@@ -75,7 +75,7 @@
 
     /**
      * Updates the number of original bytecode bytes processed.
-     * 
+     *
      * @param count {@code >= 0;} the number of bytes to add
      */
     public static void updateOriginalByteCount(int count) {
@@ -84,7 +84,7 @@
 
     /**
      * Updates the dex statistics.
-     * 
+     *
      * @param nonOptCode non-optimized code block
      * @param code optimized code block
      */
@@ -145,7 +145,7 @@
 
     /**
      * Prints out the collected statistics.
-     * 
+     *
      * @param out {@code non-null;} where to output to
      */
     public static void dumpStatistics(PrintStream out) {
diff --git a/dx/src/com/android/dx/dex/cf/OptimizerOptions.java b/dx/src/com/android/dx/dex/cf/OptimizerOptions.java
index fa606e3..a66421e 100644
--- a/dx/src/com/android/dx/dex/cf/OptimizerOptions.java
+++ b/dx/src/com/android/dx/dex/cf/OptimizerOptions.java
@@ -56,7 +56,7 @@
 
     /**
      * Loads the optimize/don't optimize lists from files.
-     * 
+     *
      * @param optimizeListFile Pathname
      * @param dontOptimizeListFile Pathname
      */
@@ -89,7 +89,7 @@
     /**
      * Loads a list of newline-separated strings into a new HashSet and returns
      * the HashSet.
-     * 
+     *
      * @param filename filename to process
      * @return set of all unique lines in the file
      */
diff --git a/dx/src/com/android/dx/dex/code/ArrayData.java b/dx/src/com/android/dx/dex/code/ArrayData.java
index 7698de1..145f2c2 100644
--- a/dx/src/com/android/dx/dex/code/ArrayData.java
+++ b/dx/src/com/android/dx/dex/code/ArrayData.java
@@ -25,12 +25,12 @@
 import java.util.ArrayList;
 
 /**
- * Pseudo-instruction which holds fill array data. 
+ * Pseudo-instruction which holds fill array data.
  */
 public final class ArrayData extends VariableSizeInsn {
     /**
      * {@code non-null;} address representing the instruction that uses this
-     * instance 
+     * instance
      */
     private final CodeAddress user;
 
@@ -49,7 +49,7 @@
     /**
      * Constructs an instance. The output address of this instance is initially
      * unknown ({@code -1}).
-     * 
+     *
      * @param position {@code non-null;} source position
      * @param user {@code non-null;} address representing the instruction that
      * uses this instance
diff --git a/dx/src/com/android/dx/dex/code/BlockAddresses.java b/dx/src/com/android/dx/dex/code/BlockAddresses.java
index e55f893..1a1d184 100644
--- a/dx/src/com/android/dx/dex/code/BlockAddresses.java
+++ b/dx/src/com/android/dx/dex/code/BlockAddresses.java
@@ -59,7 +59,7 @@
 
     /**
      * Gets the instance for the start of the given block.
-     * 
+     *
      * @param block {@code non-null;} the block in question
      * @return {@code non-null;} the appropriate instance
      */
@@ -69,7 +69,7 @@
 
     /**
      * Gets the instance for the start of the block with the given label.
-     * 
+     *
      * @param label {@code non-null;} the label of the block in question
      * @return {@code non-null;} the appropriate instance
      */
@@ -79,7 +79,7 @@
 
     /**
      * Gets the instance for the final instruction of the given block.
-     * 
+     *
      * @param block {@code non-null;} the block in question
      * @return {@code non-null;} the appropriate instance
      */
@@ -90,7 +90,7 @@
     /**
      * Gets the instance for the final instruction of the block with
      * the given label.
-     * 
+     *
      * @param label {@code non-null;} the label of the block in question
      * @return {@code non-null;} the appropriate instance
      */
@@ -101,7 +101,7 @@
     /**
      * Gets the instance for the end (address after the final instruction)
      * of the given block.
-     * 
+     *
      * @param block {@code non-null;} the block in question
      * @return {@code non-null;} the appropriate instance
      */
@@ -112,7 +112,7 @@
     /**
      * Gets the instance for the end (address after the final instruction)
      * of the block with the given label.
-     * 
+     *
      * @param label {@code non-null;} the label of the block in question
      * @return {@code non-null;} the appropriate instance
      */
diff --git a/dx/src/com/android/dx/dex/code/CatchBuilder.java b/dx/src/com/android/dx/dex/code/CatchBuilder.java
index d2ec3d7..90d2e8d 100644
--- a/dx/src/com/android/dx/dex/code/CatchBuilder.java
+++ b/dx/src/com/android/dx/dex/code/CatchBuilder.java
@@ -26,7 +26,7 @@
 public interface CatchBuilder {
     /**
      * Builds and returns the catch table for this instance.
-     * 
+     *
      * @return {@code non-null;} the constructed table
      */
     public CatchTable build();
@@ -34,14 +34,14 @@
     /**
      * Gets whether this instance has any catches at all (either typed
      * or catch-all).
-     * 
+     *
      * @return whether this instance has any catches at all
      */
     public boolean hasAnyCatches();
-    
+
     /**
      * Gets the set of catch types associated with this instance.
-     * 
+     *
      * @return {@code non-null;} the set of catch types
      */
     public HashSet<Type> getCatchTypes();
diff --git a/dx/src/com/android/dx/dex/code/CatchHandlerList.java b/dx/src/com/android/dx/dex/code/CatchHandlerList.java
index a8a97be..8472584 100644
--- a/dx/src/com/android/dx/dex/code/CatchHandlerList.java
+++ b/dx/src/com/android/dx/dex/code/CatchHandlerList.java
@@ -57,7 +57,7 @@
     /**
      * Get the human form of this instance, prefixed on each line
      * with the string.
-     * 
+     *
      * @param prefix {@code non-null;} the prefix for every line
      * @param header {@code non-null;} the header for the first line (after the
      * first prefix)
@@ -85,7 +85,7 @@
             } else {
                 sb.append(entry.getExceptionType().toHuman());
             }
-            
+
             sb.append(" -> ");
             sb.append(Hex.u2or4(entry.getHandler()));
         }
@@ -96,7 +96,7 @@
     /**
      * Returns whether or not this instance ends with a "catch-all"
      * handler.
-     * 
+     *
      * @return {@code true} if this instance ends with a "catch-all"
      * handler or {@code false} if not
      */
@@ -205,7 +205,7 @@
 
             return false;
         }
-        
+
         /** {@inheritDoc} */
         public int compareTo(Entry other) {
             if (handler < other.handler) {
@@ -216,10 +216,10 @@
 
             return exceptionType.compareTo(other.exceptionType);
         }
-        
+
         /**
          * Gets the exception type handled.
-         * 
+         *
          * @return {@code non-null;} the exception type
          */
         public CstType getExceptionType() {
@@ -228,7 +228,7 @@
 
         /**
          * Gets the handler address.
-         * 
+         *
          * @return {@code >= 0;} the handler address
          */
         public int getHandler() {
diff --git a/dx/src/com/android/dx/dex/code/CatchTable.java b/dx/src/com/android/dx/dex/code/CatchTable.java
index fd8e3a7..0ee890f 100644
--- a/dx/src/com/android/dx/dex/code/CatchTable.java
+++ b/dx/src/com/android/dx/dex/code/CatchTable.java
@@ -105,7 +105,7 @@
         /**
          * Constructs an instance.
          *
-         * @param start {@code >= 0;} start address 
+         * @param start {@code >= 0;} start address
          * @param end {@code > start;} end address (exclusive)
          * @param handlers {@code non-null;} list of catch handlers
          */
@@ -144,7 +144,7 @@
 
             return false;
         }
-        
+
         /** {@inheritDoc} */
         public int compareTo(Entry other) {
             if (start < other.start) {
@@ -152,7 +152,7 @@
             } else if (start > other.start) {
                 return 1;
             }
-            
+
             if (end < other.end) {
                 return -1;
             } else if (end > other.end) {
@@ -161,10 +161,10 @@
 
             return handlers.compareTo(other.handlers);
         }
-        
+
         /**
          * Gets the start address.
-         * 
+         *
          * @return {@code >= 0;} the start address
          */
         public int getStart() {
@@ -173,7 +173,7 @@
 
         /**
          * Gets the end address (exclusive).
-         * 
+         *
          * @return {@code > start;} the end address (exclusive)
          */
         public int getEnd() {
@@ -182,7 +182,7 @@
 
         /**
          * Gets the handlers.
-         * 
+         *
          * @return {@code non-null;} the handlers
          */
         public CatchHandlerList getHandlers() {
diff --git a/dx/src/com/android/dx/dex/code/CodeAddress.java b/dx/src/com/android/dx/dex/code/CodeAddress.java
index f25718e..5d26bd1 100644
--- a/dx/src/com/android/dx/dex/code/CodeAddress.java
+++ b/dx/src/com/android/dx/dex/code/CodeAddress.java
@@ -30,7 +30,7 @@
     /**
      * Constructs an instance. The output address of this instance is initially
      * unknown ({@code -1}).
-     * 
+     *
      * @param position {@code non-null;} source position
      */
     public CodeAddress(SourcePosition position) {
diff --git a/dx/src/com/android/dx/dex/code/CstInsn.java b/dx/src/com/android/dx/dex/code/CstInsn.java
index a579c5e..3f848c0 100644
--- a/dx/src/com/android/dx/dex/code/CstInsn.java
+++ b/dx/src/com/android/dx/dex/code/CstInsn.java
@@ -30,20 +30,20 @@
 
     /**
      * {@code >= -1;} the constant pool index for {@link #constant}, or
-     * {@code -1} if not yet set 
+     * {@code -1} if not yet set
      */
     private int index;
 
     /**
      * {@code >= -1;} the constant pool index for the class reference in
-     * {@link #constant} if any, or {@code -1} if not yet set 
+     * {@link #constant} if any, or {@code -1} if not yet set
      */
     private int classIndex;
 
     /**
      * Constructs an instance. The output address of this instance is
      * initially unknown ({@code -1}) as is the constant pool index.
-     * 
+     *
      * @param opcode the opcode; one of the constants from {@link Dops}
      * @param position {@code non-null;} source position
      * @param registers {@code non-null;} register list, including a
@@ -67,13 +67,13 @@
     /** {@inheritDoc} */
     @Override
     public DalvInsn withOpcode(Dop opcode) {
-        CstInsn result = 
+        CstInsn result =
             new CstInsn(opcode, getPosition(), getRegisters(), constant);
 
         if (index >= 0) {
             result.setIndex(index);
         }
-        
+
         if (classIndex >= 0) {
             result.setClassIndex(classIndex);
         }
@@ -90,7 +90,7 @@
         if (index >= 0) {
             result.setIndex(index);
         }
-        
+
         if (classIndex >= 0) {
             result.setClassIndex(classIndex);
         }
@@ -100,7 +100,7 @@
 
     /**
      * Gets the constant argument.
-     * 
+     *
      * @return {@code non-null;} the constant argument
      */
     public Constant getConstant() {
@@ -110,7 +110,7 @@
     /**
      * Gets the constant's index. It is only valid to call this after
      * {@link #setIndex} has been called.
-     * 
+     *
      * @return {@code >= 0;} the constant pool index
      */
     public int getIndex() {
@@ -123,9 +123,9 @@
 
     /**
      * Returns whether the constant's index has been set for this instance.
-     * 
+     *
      * @see #setIndex
-     * 
+     *
      * @return {@code true} iff the index has been set
      */
     public boolean hasIndex() {
@@ -135,7 +135,7 @@
     /**
      * Sets the constant's index. It is only valid to call this method once
      * per instance.
-     * 
+     *
      * @param index {@code >= 0;} the constant pool index
      */
     public void setIndex(int index) {
@@ -153,7 +153,7 @@
     /**
      * Gets the constant's class index. It is only valid to call this after
      * {@link #setClassIndex} has been called.
-     * 
+     *
      * @return {@code >= 0;} the constant's class's constant pool index
      */
     public int getClassIndex() {
@@ -167,9 +167,9 @@
     /**
      * Returns whether the constant's class index has been set for this
      * instance.
-     * 
+     *
      * @see #setClassIndex
-     * 
+     *
      * @return {@code true} iff the index has been set
      */
     public boolean hasClassIndex() {
@@ -182,7 +182,7 @@
      * reference constants have a class, so it is only on instances
      * with reference constants that this method should ever be
      * called. It is only valid to call this method once per instance.
-     * 
+     *
      * @param index {@code >= 0;} the constant's class's constant pool index
      */
     public void setClassIndex(int index) {
diff --git a/dx/src/com/android/dx/dex/code/DalvCode.java b/dx/src/com/android/dx/dex/code/DalvCode.java
index f911912..58f191b 100644
--- a/dx/src/com/android/dx/dex/code/DalvCode.java
+++ b/dx/src/com/android/dx/dex/code/DalvCode.java
@@ -28,7 +28,7 @@
 public final class DalvCode {
     /**
      * how much position info to preserve; one of the static
-     * constants in {@link PositionList} 
+     * constants in {@link PositionList}
      */
     private final int positionInfo;
 
@@ -46,13 +46,13 @@
 
     /**
      * {@code null-ok;} catch table; set in
-     * {@link #finishProcessingIfNecessary} 
+     * {@link #finishProcessingIfNecessary}
      */
     private CatchTable catches;
 
     /**
      * {@code null-ok;} source positions list; set in
-     * {@link #finishProcessingIfNecessary} 
+     * {@link #finishProcessingIfNecessary}
      */
     private PositionList positions;
 
@@ -119,16 +119,16 @@
      * Assign indices in all instructions that need them, using the
      * given callback to perform lookups. This must be called before
      * {@link #getInsns}.
-     * 
+     *
      * @param callback {@code non-null;} callback object
      */
     public void assignIndices(AssignIndicesCallback callback) {
         unprocessedInsns.assignIndices(callback);
     }
-    
+
     /**
      * Gets whether this instance has any position data to represent.
-     * 
+     *
      * @return {@code true} iff this instance has any position
      * data to represent
      */
@@ -136,10 +136,10 @@
         return (positionInfo != PositionList.NONE)
             && unprocessedInsns.hasAnyPositionInfo();
     }
-            
+
     /**
      * Gets whether this instance has any local variable data to represent.
-     * 
+     *
      * @return {@code true} iff this instance has any local variable
      * data to represent
      */
@@ -150,16 +150,16 @@
     /**
      * Gets whether this instance has any catches at all (either typed
      * or catch-all).
-     * 
+     *
      * @return whether this instance has any catches at all
      */
     public boolean hasAnyCatches() {
         return unprocessedCatches.hasAnyCatches();
     }
-    
+
     /**
      * Gets the set of catch types handled anywhere in the code.
-     * 
+     *
      * @return {@code non-null;} the set of catch types
      */
     public HashSet<Type> getCatchTypes() {
@@ -169,7 +169,7 @@
     /**
      * Gets the set of all constants referred to by instructions in
      * the code.
-     * 
+     *
      * @return {@code non-null;} the set of constants
      */
     public HashSet<Constant> getInsnConstants() {
@@ -178,7 +178,7 @@
 
     /**
      * Gets the list of instructions.
-     * 
+     *
      * @return {@code non-null;} the instruction list
      */
     public DalvInsnList getInsns() {
@@ -188,7 +188,7 @@
 
     /**
      * Gets the catch (exception handler) table.
-     * 
+     *
      * @return {@code non-null;} the catch table
      */
     public CatchTable getCatches() {
@@ -198,7 +198,7 @@
 
     /**
      * Gets the source positions list.
-     * 
+     *
      * @return {@code non-null;} the source positions list
      */
     public PositionList getPositions() {
@@ -208,7 +208,7 @@
 
     /**
      * Gets the source positions list.
-     * 
+     *
      * @return {@code non-null;} the source positions list
      */
     public LocalList getLocals() {
@@ -222,7 +222,7 @@
     public static interface AssignIndicesCallback {
         /**
          * Gets the index for the given constant.
-         * 
+         *
          * @param cst {@code non-null;} the constant
          * @return {@code >= -1;} the index or {@code -1} if the constant
          * shouldn't actually be reified with an index
diff --git a/dx/src/com/android/dx/dex/code/DalvInsn.java b/dx/src/com/android/dx/dex/code/DalvInsn.java
index 11ee55d..f203817 100644
--- a/dx/src/com/android/dx/dex/code/DalvInsn.java
+++ b/dx/src/com/android/dx/dex/code/DalvInsn.java
@@ -29,7 +29,7 @@
 public abstract class DalvInsn {
     /**
      * the actual output address of this instance, if known, or
-     * {@code -1} if not 
+     * {@code -1} if not
      */
     private int address;
 
@@ -44,7 +44,7 @@
 
     /**
      * Makes a move instruction, appropriate and ideal for the given arguments.
-     * 
+     *
      * @param position {@code non-null;} source position information
      * @param dest {@code non-null;} destination register
      * @param src {@code non-null;} source register
@@ -76,13 +76,13 @@
     /**
      * Constructs an instance. The output address of this instance is initially
      * unknown ({@code -1}).
-     * 
+     *
      * <p><b>Note:</b> In the unlikely event that an instruction takes
      * absolutely no registers (e.g., a {@code nop} or a
      * no-argument no-result static method call), then the given
      * register list may be passed as {@link
      * RegisterSpecList#EMPTY}.</p>
-     * 
+     *
      * @param opcode the opcode; one of the constants from {@link Dops}
      * @param position {@code non-null;} source position
      * @param registers {@code non-null;} register list, including a
@@ -141,7 +141,7 @@
 
     /**
      * Gets whether the address of this instruction is known.
-     * 
+     *
      * @see #getAddress
      * @see #setAddress
      */
@@ -152,9 +152,9 @@
     /**
      * Gets the output address of this instruction, if it is known. This throws
      * a {@code RuntimeException} if it has not yet been set.
-     * 
+     *
      * @see #setAddress
-     * 
+     *
      * @return {@code >= 0;} the output address
      */
     public final int getAddress() {
@@ -167,7 +167,7 @@
 
     /**
      * Gets the opcode.
-     * 
+     *
      * @return {@code non-null;} the opcode
      */
     public final Dop getOpcode() {
@@ -176,7 +176,7 @@
 
     /**
      * Gets the source position.
-     * 
+     *
      * @return {@code non-null;} the source position
      */
     public final SourcePosition getPosition() {
@@ -185,7 +185,7 @@
 
     /**
      * Gets the register list for this instruction.
-     * 
+     *
      * @return {@code non-null;} the registers
      */
     public final RegisterSpecList getRegisters() {
@@ -196,7 +196,7 @@
      * Returns whether this instance's opcode uses a result register.
      * This method is a convenient shorthand for
      * {@code getOpcode().hasResult()}.
-     * 
+     *
      * @return {@code true} iff this opcode uses a result register
      */
     public final boolean hasResult() {
@@ -209,7 +209,7 @@
      * sources (if any), that each source register is unique, and that
      * (to be explicit here) category-2 values take up two consecutive
      * registers.
-     * 
+     *
      * @return {@code >= 0;} the minimum distinct register requirement
      */
     public final int getMinimumRegisterRequirement() {
@@ -228,9 +228,9 @@
     /**
      * Gets the instruction prefix required, if any, to use in a high
      * register transformed version of this instance.
-     * 
+     *
      * @see #hrVersion
-     * 
+     *
      * @return {@code null-ok;} the prefix, if any
      */
     public DalvInsn hrPrefix() {
@@ -252,9 +252,9 @@
     /**
      * Gets the instruction suffix required, if any, to use in a high
      * register transformed version of this instance.
-     * 
+     *
      * @see #hrVersion
-     * 
+     *
      * @return {@code null-ok;} the suffix, if any
      */
     public DalvInsn hrSuffix() {
@@ -276,11 +276,11 @@
      * instance, and it is guaranteed that the number of low registers
      * used will be the number returned by {@link
      * #getMinimumRegisterRequirement}.
-     * 
+     *
      * @return {@code non-null;} the replacement
      */
     public DalvInsn hrVersion() {
-        RegisterSpecList regs = 
+        RegisterSpecList regs =
             registers.withSequentialRegisters(0, hasResult());
         return withRegisters(regs);
     }
@@ -288,7 +288,7 @@
     /**
      * Gets the short identifier for this instruction. This is its
      * address, if assigned, or its identity hashcode if not.
-     * 
+     *
      * @return {@code non-null;} the identifier
      */
     public final String identifierString() {
@@ -303,7 +303,7 @@
      * Returns the string form of this instance suitable for inclusion in
      * a human-oriented listing dump. This method will return {@code null}
      * if this instance should not appear in a listing.
-     * 
+     *
      * @param prefix {@code non-null;} prefix before the address; each follow-on
      * line will be indented to match as well
      * @param width {@code >= 0;} the width of the output or {@code 0} for
@@ -330,7 +330,7 @@
 
     /**
      * Sets the output address.
-     * 
+     *
      * @param address {@code >= 0;} the output address
      */
     public final void setAddress(int address) {
@@ -346,7 +346,7 @@
      * calculable if this instance's address is known, and it is equal
      * to the address plus the length of the instruction format of this
      * instance's opcode.
-     * 
+     *
      * @return {@code >= 0;} the next address
      */
     public final int getNextAddress() {
@@ -355,7 +355,7 @@
 
     /**
      * Gets the size of this instruction, in 16-bit code units.
-     * 
+     *
      * @return {@code >= 0;} the code size of this instruction
      */
     public abstract int codeSize();
@@ -363,7 +363,7 @@
     /**
      * Writes this instance to the given output. This method should
      * never annotate the output.
-     * 
+     *
      * @param out {@code non-null;} where to write to
      */
     public abstract void writeTo(AnnotatedOutput out);
@@ -371,7 +371,7 @@
     /**
      * Returns an instance that is just like this one, except that its
      * opcode is replaced by the one given, and its address is reset.
-     * 
+     *
      * @param opcode {@code non-null;} the new opcode
      * @return {@code non-null;} an appropriately-constructed instance
      */
@@ -381,7 +381,7 @@
      * Returns an instance that is just like this one, except that all
      * register references have been offset by the given delta, and its
      * address is reset.
-     * 
+     *
      * @param delta the amount to offset register references by
      * @return {@code non-null;} an appropriately-constructed instance
      */
@@ -391,7 +391,7 @@
      * Returns an instance that is just like this one, except that the
      * register list is replaced by the given one, and its address is
      * reset.
-     * 
+     *
      * @param registers {@code non-null;} new register list
      * @return {@code non-null;} an appropriately-constructed instance
      */
@@ -400,7 +400,7 @@
     /**
      * Gets the string form for any arguments to this instance. Subclasses
      * must override this.
-     * 
+     *
      * @return {@code null-ok;} the string version of any arguments or
      * {@code null} if there are none
      */
@@ -413,7 +413,7 @@
      * address and without respect for any output formatting. This
      * method should return {@code null} if this instance should
      * not appear in a listing.
-     * 
+     *
      * @param noteIndices whether to include an explicit notation of
      * constant pool indices
      * @return {@code null-ok;} the listing string
diff --git a/dx/src/com/android/dx/dex/code/DalvInsnList.java b/dx/src/com/android/dx/dex/code/DalvInsnList.java
index 5cf22f2..0f8c23d 100644
--- a/dx/src/com/android/dx/dex/code/DalvInsnList.java
+++ b/dx/src/com/android/dx/dex/code/DalvInsnList.java
@@ -45,7 +45,7 @@
     /**
      * Constructs and returns an immutable instance whose elements are
      * identical to the ones in the given list, in the same order.
-     * 
+     *
      * @param list {@code non-null;} the list to use for elements
      * @param regCount count, in register-units, of the number of registers
      * this code block requires.
@@ -64,10 +64,10 @@
         result.setImmutable();
         return result;
     }
-    
+
     /**
      * Constructs an instance. All indices initially contain {@code null}.
-     * 
+     *
      * @param size the size of the list
      */
     public DalvInsnList(int size, int regCount) {
@@ -79,7 +79,7 @@
      * Gets the element at the given index. It is an error to call
      * this with the index for an element which was never set; if you
      * do that, this will throw {@code NullPointerException}.
-     * 
+     *
      * @param n {@code >= 0, < size();} which index
      * @return {@code non-null;} element at that index
      */
@@ -89,7 +89,7 @@
 
     /**
      * Sets the instruction at the given index.
-     * 
+     *
      * @param n {@code >= 0, < size();} which index
      * @param insn {@code non-null;} the instruction to set at {@code n}
      */
@@ -101,7 +101,7 @@
      * Gets the size of this instance, in 16-bit code units. This will only
      * return a meaningful result if the instructions in this instance all
      * have valid addresses.
-     * 
+     *
      * @return {@code >= 0;} the size
      */
     public int codeSize() {
@@ -118,7 +118,7 @@
     /**
      * Writes all the instructions in this instance to the given output
      * destination.
-     * 
+     *
      * @param out {@code non-null;} where to write to
      */
     public void writeTo(AnnotatedOutput out) {
@@ -127,7 +127,7 @@
 
         if (out.annotates()) {
             boolean verbose = out.isVerbose();
-            
+
             for (int i = 0; i < sz; i++) {
                 DalvInsn insn = (DalvInsn) get0(i);
                 int codeBytes = insn.codeSize() * 2;
@@ -180,7 +180,7 @@
      * Gets the size of the outgoing arguments area required by this
      * method. This is equal to the largest argument word count of any
      * method referred to by this instance.
-     * 
+     *
      * @return {@code >= 0;} the required outgoing arguments size
      */
     public int getOutsSize() {
@@ -215,7 +215,7 @@
 
     /**
      * Does a human-friendly dump of this instance.
-     * 
+     *
      * @param out {@code non-null;} where to dump
      * @param prefix {@code non-null;} prefix to attach to each line of output
      * @param verbose whether to be verbose; verbose output includes
@@ -249,7 +249,7 @@
 
     /**
      * Does a human-friendly dump of this instance.
-     * 
+     *
      * @param out {@code non-null;} where to dump
      * @param prefix {@code non-null;} prefix to attach to each line of output
      * @param verbose whether to be verbose; verbose output includes
diff --git a/dx/src/com/android/dx/dex/code/Dop.java b/dx/src/com/android/dx/dex/code/Dop.java
index d1f92bf..2b2a08f 100644
--- a/dx/src/com/android/dx/dex/code/Dop.java
+++ b/dx/src/com/android/dx/dex/code/Dop.java
@@ -37,7 +37,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param opcode {@code DalvOps.MIN_VALUE..DalvOps.MAX_VALUE;} the opcode
      * value itself
      * @param family {@code DalvOps.MIN_VALUE..DalvOps.MAX_VALUE;} the opcode family
@@ -79,7 +79,7 @@
 
     /**
      * Gets the opcode value.
-     * 
+     *
      * @return {@code DalvOps.MIN_VALUE..DalvOps.MAX_VALUE;} the opcode value
      */
     public int getOpcode() {
@@ -89,7 +89,7 @@
     /**
      * Gets the opcode family. The opcode family is the unmarked (no
      * "/...") opcode that has equivalent semantics to this one.
-     * 
+     *
      * @return {@code DalvOps.MIN_VALUE..DalvOps.MAX_VALUE;} the opcode family
      */
     public int getFamily() {
@@ -98,7 +98,7 @@
 
     /**
      * Gets the instruction format.
-     * 
+     *
      * @return {@code non-null;} the instruction format
      */
     public InsnFormat getFormat() {
@@ -107,7 +107,7 @@
 
     /**
      * Returns whether this opcode uses a result register.
-     * 
+     *
      * @return {@code true} iff this opcode uses a result register
      */
     public boolean hasResult() {
@@ -116,7 +116,7 @@
 
     /**
      * Gets the opcode name.
-     * 
+     *
      * @return {@code non-null;} the opcode name
      */
     public String getName() {
@@ -126,7 +126,7 @@
     /**
      * Gets the opcode for the opposite test of this instance. This is only
      * valid for opcodes which are in fact tests.
-     * 
+     *
      * @return {@code non-null;} the opposite test
      */
     public Dop getOppositeTest() {
diff --git a/dx/src/com/android/dx/dex/code/Dops.java b/dx/src/com/android/dx/dex/code/Dops.java
index dfdaa73..0211a40 100644
--- a/dx/src/com/android/dx/dex/code/Dops.java
+++ b/dx/src/com/android/dx/dex/code/Dops.java
@@ -51,9 +51,9 @@
     private static final Dop[] DOPS;
 
     /**
-     * pseudo-opcode used for nonstandard formatted "instructions" 
+     * pseudo-opcode used for nonstandard formatted "instructions"
      * (which are mostly not actually instructions, though they do
-     * appear in instruction lists) 
+     * appear in instruction lists)
      */
     public static final Dop SPECIAL_FORMAT =
         new Dop(DalvOps.SPECIAL_FORMAT, DalvOps.SPECIAL_FORMAT,
@@ -1171,7 +1171,7 @@
 
     /**
      * Gets the {@link Dop} for the given opcode value.
-     * 
+     *
      * @param opcode {@code DalvOps.MIN_VALUE..DalvOps.MAX_VALUE;} the opcode value
      * @return {@code non-null;} the associated opcode instance
      */
@@ -1193,7 +1193,7 @@
     /**
      * Gets the {@link Dop} with the given family/format combination, if
      * any.
-     * 
+     *
      * @param family {@code DalvOps.MIN_VALUE..DalvOps.MAX_VALUE;} the opcode family
      * @param format {@code non-null;} the opcode's instruction format
      * @return {@code null-ok;} the corresponding opcode, or {@code null} if
@@ -1221,7 +1221,7 @@
 
     /**
      * Puts the given opcode into the table of all ops.
-     * 
+     *
      * @param opcode {@code non-null;} the opcode
      */
     private static void set(Dop opcode) {
diff --git a/dx/src/com/android/dx/dex/code/FixedSizeInsn.java b/dx/src/com/android/dx/dex/code/FixedSizeInsn.java
index 147937f..faed530 100644
--- a/dx/src/com/android/dx/dex/code/FixedSizeInsn.java
+++ b/dx/src/com/android/dx/dex/code/FixedSizeInsn.java
@@ -29,13 +29,13 @@
     /**
      * Constructs an instance. The output address of this instance is initially
      * unknown ({@code -1}).
-     * 
+     *
      * <p><b>Note:</b> In the unlikely event that an instruction takes
      * absolutely no registers (e.g., a {@code nop} or a
      * no-argument no-result * static method call), then the given
      * register list may be passed as {@link
      * RegisterSpecList#EMPTY}.</p>
-     * 
+     *
      * @param opcode the opcode; one of the constants from {@link Dops}
      * @param position {@code non-null;} source position
      * @param registers {@code non-null;} register list, including a
diff --git a/dx/src/com/android/dx/dex/code/HighRegisterPrefix.java b/dx/src/com/android/dx/dex/code/HighRegisterPrefix.java
index 9155367..6fab094 100644
--- a/dx/src/com/android/dx/dex/code/HighRegisterPrefix.java
+++ b/dx/src/com/android/dx/dex/code/HighRegisterPrefix.java
@@ -32,11 +32,11 @@
 public final class HighRegisterPrefix extends VariableSizeInsn {
     /** {@code null-ok;} cached instructions, if constructed */
     private SimpleInsn[] insns;
-    
+
     /**
      * Constructs an instance. The output address of this instance is initially
      * unknown ({@code -1}).
-     * 
+     *
      * @param position {@code non-null;} source position
      * @param registers {@code non-null;} source registers
      */
@@ -83,12 +83,12 @@
         if (insns != null) {
             return;
         }
-        
+
         RegisterSpecList registers = getRegisters();
         int sz = registers.size();
 
         insns = new SimpleInsn[sz];
-        
+
         for (int i = 0, outAt = 0; i < sz; i++) {
             RegisterSpec src = registers.get(i);
             insns[i] = moveInsnFor(src, outAt);
@@ -122,7 +122,7 @@
             if (i != 0) {
                 sb.append('\n');
             }
-            
+
             sb.append(insn.listingString0(noteIndices));
 
             outAt += src.getCategory();
diff --git a/dx/src/com/android/dx/dex/code/InsnFormat.java b/dx/src/com/android/dx/dex/code/InsnFormat.java
index ca6688b..17c127f 100644
--- a/dx/src/com/android/dx/dex/code/InsnFormat.java
+++ b/dx/src/com/android/dx/dex/code/InsnFormat.java
@@ -290,7 +290,7 @@
         if (! ci.hasIndex()) {
             return "";
         }
-        
+
         StringBuilder sb = new StringBuilder(20);
         int index = ci.getIndex();
 
@@ -302,7 +302,7 @@
         } else {
             sb.append(Hex.u4(index));
         }
-        
+
         return sb.toString();
     }
 
@@ -484,7 +484,7 @@
 
     /**
      * Writes one code unit to the given output destination.
-     * 
+     *
      * @param out {@code non-null;} where to write to
      * @param c0 code unit to write
      */
@@ -494,7 +494,7 @@
 
     /**
      * Writes two code units to the given output destination.
-     * 
+     *
      * @param out {@code non-null;} where to write to
      * @param c0 code unit to write
      * @param c1 code unit to write
@@ -506,7 +506,7 @@
 
     /**
      * Writes three code units to the given output destination.
-     * 
+     *
      * @param out {@code non-null;} where to write to
      * @param c0 code unit to write
      * @param c1 code unit to write
@@ -521,7 +521,7 @@
 
     /**
      * Writes four code units to the given output destination.
-     * 
+     *
      * @param out {@code non-null;} where to write to
      * @param c0 code unit to write
      * @param c1 code unit to write
@@ -538,7 +538,7 @@
 
     /**
      * Writes five code units to the given output destination.
-     * 
+     *
      * @param out {@code non-null;} where to write to
      * @param c0 code unit to write
      * @param c1 code unit to write
@@ -557,7 +557,7 @@
 
     /**
      * Writes six code units to the given output destination.
-     * 
+     *
      * @param out {@code non-null;} where to write to
      * @param c0 code unit to write
      * @param c1 code unit to write
diff --git a/dx/src/com/android/dx/dex/code/LocalEnd.java b/dx/src/com/android/dx/dex/code/LocalEnd.java
index 360a55c..1c2bf89 100644
--- a/dx/src/com/android/dx/dex/code/LocalEnd.java
+++ b/dx/src/com/android/dx/dex/code/LocalEnd.java
@@ -39,7 +39,7 @@
     /**
      * Constructs an instance. The output address of this instance is initially
      * unknown ({@code -1}).
-     * 
+     *
      * @param position {@code non-null;} source position
      * @param local {@code non-null;} register spec representing the local
      * variable introduced by this instance
@@ -69,7 +69,7 @@
     /**
      * Gets the register spec representing the local variable ended
      * by this instance.
-     * 
+     *
      * @return {@code non-null;} the register spec
      */
     public RegisterSpec getLocal() {
diff --git a/dx/src/com/android/dx/dex/code/LocalSnapshot.java b/dx/src/com/android/dx/dex/code/LocalSnapshot.java
index 409ad15..baeab4c 100644
--- a/dx/src/com/android/dx/dex/code/LocalSnapshot.java
+++ b/dx/src/com/android/dx/dex/code/LocalSnapshot.java
@@ -33,7 +33,7 @@
     /**
      * Constructs an instance. The output address of this instance is initially
      * unknown ({@code -1}).
-     * 
+     *
      * @param position {@code non-null;} source position
      * @param locals {@code non-null;} associated local variable state
      */
@@ -61,7 +61,7 @@
 
     /**
      * Gets the local state associated with this instance.
-     * 
+     *
      * @return {@code non-null;} the state
      */
     public RegisterSpecSet getLocals() {
diff --git a/dx/src/com/android/dx/dex/code/LocalStart.java b/dx/src/com/android/dx/dex/code/LocalStart.java
index ec70e30..9a17c5b 100644
--- a/dx/src/com/android/dx/dex/code/LocalStart.java
+++ b/dx/src/com/android/dx/dex/code/LocalStart.java
@@ -29,13 +29,13 @@
 public final class LocalStart extends ZeroSizeInsn {
     /**
      * {@code non-null;} register spec representing the local variable introduced
-     * by this instance 
+     * by this instance
      */
     private final RegisterSpec local;
 
     /**
      * Returns the local variable listing string for a single register spec.
-     * 
+     *
      * @param spec {@code non-null;} the spec to convert
      * @return {@code non-null;} the string form
      */
@@ -47,7 +47,7 @@
     /**
      * Constructs an instance. The output address of this instance is initially
      * unknown ({@code -1}).
-     * 
+     *
      * @param position {@code non-null;} source position
      * @param local {@code non-null;} register spec representing the local
      * variable introduced by this instance
@@ -77,7 +77,7 @@
     /**
      * Gets the register spec representing the local variable introduced
      * by this instance.
-     * 
+     *
      * @return {@code non-null;} the register spec
      */
     public RegisterSpec getLocal() {
diff --git a/dx/src/com/android/dx/dex/code/OddSpacer.java b/dx/src/com/android/dx/dex/code/OddSpacer.java
index 727def0..756a0e2 100644
--- a/dx/src/com/android/dx/dex/code/OddSpacer.java
+++ b/dx/src/com/android/dx/dex/code/OddSpacer.java
@@ -30,7 +30,7 @@
     /**
      * Constructs an instance. The output address of this instance is initially
      * unknown ({@code -1}).
-     * 
+     *
      * @param position {@code non-null;} source position
      */
     public OddSpacer(SourcePosition position) {
diff --git a/dx/src/com/android/dx/dex/code/OutputCollector.java b/dx/src/com/android/dx/dex/code/OutputCollector.java
index 2643373..d78e5fc 100644
--- a/dx/src/com/android/dx/dex/code/OutputCollector.java
+++ b/dx/src/com/android/dx/dex/code/OutputCollector.java
@@ -41,7 +41,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param initialCapacity {@code >= 0;} initial capacity of the output list
      * @param suffixInitialCapacity {@code >= 0;} initial capacity of the output
      * suffix
@@ -55,8 +55,8 @@
 
     /**
      * Adds an instruction to the output.
-     * 
-     * @param insn {@code non-null;} the instruction to add 
+     *
+     * @param insn {@code non-null;} the instruction to add
      */
     public void add(DalvInsn insn) {
         finisher.add(insn);
@@ -66,7 +66,7 @@
      * Reverses a branch which is buried a given number of instructions
      * backward in the output. It is illegal to call this unless the
      * indicated instruction really is a reversible branch.
-     * 
+     *
      * @param which how many instructions back to find the branch;
      * {@code 0} is the most recently added instruction,
      * {@code 1} is the instruction before that, etc.
@@ -78,8 +78,8 @@
 
     /**
      * Adds an instruction to the output suffix.
-     * 
-     * @param insn {@code non-null;} the instruction to add 
+     *
+     * @param insn {@code non-null;} the instruction to add
      */
     public void addSuffix(DalvInsn insn) {
         suffix.add(insn);
@@ -97,7 +97,7 @@
         if (suffix == null) {
             throw new UnsupportedOperationException("already processed");
         }
-        
+
         appendSuffixToOutput();
         return finisher;
     }
diff --git a/dx/src/com/android/dx/dex/code/OutputFinisher.java b/dx/src/com/android/dx/dex/code/OutputFinisher.java
index 5b1d533..4a51198 100644
--- a/dx/src/com/android/dx/dex/code/OutputFinisher.java
+++ b/dx/src/com/android/dx/dex/code/OutputFinisher.java
@@ -61,7 +61,7 @@
 
     /**
      * Constructs an instance. It initially contains no instructions.
-     * 
+     *
      * @param regCount {@code >= 0;} register count for the method
      * @param initialCapacity {@code >= 0;} initial capacity of the instructions
      * list
@@ -77,17 +77,17 @@
     /**
      * Returns whether any of the instructions added to this instance
      * come with position info.
-     * 
+     *
      * @return whether any of the instructions added to this instance
      * come with position info
      */
     public boolean hasAnyPositionInfo() {
         return hasAnyPositionInfo;
     }
-    
+
     /**
      * Returns whether this instance has any local variable information.
-     * 
+     *
      * @return whether this instance has any local variable information
      */
     public boolean hasAnyLocalInfo() {
@@ -97,7 +97,7 @@
     /**
      * Helper for {@link #add} which scrutinizes a single
      * instruction for local variable information.
-     * 
+     *
      * @param insn {@code non-null;} instruction to scrutinize
      * @return {@code true} iff the instruction refers to any
      * named locals
@@ -124,7 +124,7 @@
     /**
      * Helper for {@link #hasAnyLocalInfo} which scrutinizes a single
      * register spec.
-     * 
+     *
      * @param spec {@code non-null;} spec to scrutinize
      * @return {@code true} iff the spec refers to any
      * named locals
@@ -137,7 +137,7 @@
     /**
      * Returns the set of all constants referred to by instructions added
      * to this instance.
-     * 
+     *
      * @return {@code non-null;} the set of constants
      */
     public HashSet<Constant> getAllConstants() {
@@ -153,7 +153,7 @@
     /**
      * Helper for {@link #getAllConstants} which adds all the info for
      * a single instruction.
-     * 
+     *
      * @param result {@code non-null;} result set to add to
      * @param insn {@code non-null;} instruction to scrutinize
      */
@@ -186,7 +186,7 @@
         if (spec == null) {
             return;
         }
-        
+
         LocalItem local = spec.getLocalItem();
         CstUtf8 name = local.getName();
         CstUtf8 signature = local.getSignature();
@@ -207,8 +207,8 @@
 
     /**
      * Adds an instruction to the output.
-     * 
-     * @param insn {@code non-null;} the instruction to add 
+     *
+     * @param insn {@code non-null;} the instruction to add
      */
     public void add(DalvInsn insn) {
         insns.add(insn);
@@ -217,7 +217,7 @@
 
     /**
      * Inserts an instruction in the output at the given offset.
-     * 
+     *
      * @param at {@code >= 0;} what index to insert at
      * @param insn {@code non-null;} the instruction to insert
      */
@@ -229,7 +229,7 @@
     /**
      * Helper for {@link #add} and {@link #insert},
      * which updates the position and local info flags.
-     * 
+     *
      * @param insn {@code non-null;} an instruction that was just introduced
      */
     private void updateInfo(DalvInsn insn) {
@@ -251,7 +251,7 @@
      * Reverses a branch which is buried a given number of instructions
      * backward in the output. It is illegal to call this unless the
      * indicated instruction really is a reversible branch.
-     * 
+     *
      * @param which how many instructions back to find the branch;
      * {@code 0} is the most recently added instruction,
      * {@code 1} is the instruction before that, etc.
@@ -283,7 +283,7 @@
      * Assigns indices in all instructions that need them, using the
      * given callback to perform lookups. This should be called before
      * calling {@link #finishProcessingAndGetList}.
-     * 
+     *
      * @param callback {@code non-null;} callback object
      */
     public void assignIndices(DalvCode.AssignIndicesCallback callback) {
@@ -297,7 +297,7 @@
     /**
      * Helper for {@link #assignIndices} which does assignment for one
      * instruction.
-     * 
+     *
      * @param insn {@code non-null;} the instruction
      * @param callback {@code non-null;} the callback
      */
@@ -323,7 +323,7 @@
     /**
      * Does final processing on this instance and gets the output as
      * a {@link DalvInsnList}. Final processing consists of:
-     * 
+     *
      * <ul>
      *   <li>optionally renumbering registers (to make room as needed for
      *   expanded instructions)</li>
@@ -332,7 +332,7 @@
      *   constant pool index, or branch target size issues</li>
      *   <li>assigning final addresses</li>
      * </ul>
-     * 
+     *
      * <p><b>Note:</b> This method may only be called once per instance
      * of this class.</p>
      *
@@ -358,7 +358,7 @@
      * Helper for {@link #finishProcessingAndGetList}, which extracts
      * the format out of each instruction into a separate array, to be
      * further manipulated as things progress.
-     * 
+     *
      * @return {@code non-null;} the array of formats
      */
     private InsnFormat[] makeFormatsArray() {
@@ -378,12 +378,12 @@
      * them. It also updates the given {@code formats} array so
      * as to avoid extra work when constructing the massaged
      * instruction list.
-     * 
+     *
      * @param formats {@code non-null;} array of per-instruction format selections
      */
     private void reserveRegisters(InsnFormat[] formats) {
         int oldReservedCount = (reservedCount < 0) ? 0 : reservedCount;
-        
+
         /*
          * Call calculateReservedCount() and then perform register
          * reservation, repeatedly until no new reservations happen.
@@ -410,7 +410,7 @@
                     /*
                      * No need to call this.set() since the format and
                      * other info are the same.
-                     */ 
+                     */
                     insns.set(i, insn.withRegisterOffset(reservedDifference));
                 }
             }
@@ -427,7 +427,7 @@
      * registers that need to be reserved. It also updates the
      * {@code formats} list to help avoid extra work in future
      * register reservation passes.
-     * 
+     *
      * @param formats {@code non-null;} array of per-instruction format selections
      * @return {@code >= 0;} the count of reserved registers
      */
@@ -450,7 +450,7 @@
             if (originalFormat == newFormat) {
                 continue;
             }
-            
+
             if (newFormat == null) {
                 /*
                  * The instruction will need to be expanded, so reserve
@@ -499,7 +499,7 @@
         for (;;) {
             format = format.nextUp();
             if ((format == null) ||
-                    (format.isCompatible(insn) && 
+                    (format.isCompatible(insn) &&
                      (Dops.getOrNull(family, format) != null))) {
                 break;
             }
@@ -507,14 +507,14 @@
 
         return format;
     }
-    
+
     /**
      * Helper for {@link #finishProcessingAndGetList}, which goes
      * through each instruction in the output, making sure its opcode
      * can accomodate its arguments. In cases where the opcode is
      * unable to do so, this replaces the instruction with a larger
      * instruction with identical semantics that <i>will</i> work.
-     * 
+     *
      * <p>This method may also reserve a number of low-numbered
      * registers, renumbering the instructions' original registers, in
      * order to have register space available in which to move
@@ -522,11 +522,11 @@
      * multi-instruction sequences. This expansion is done when no
      * simple instruction format can be found for a given instruction that
      * is able to accomodate that instruction's registers.</p>
-     * 
+     *
      * <p>This method ignores issues of branch target size, since
      * final addresses aren't known at the point that this method is
      * called.</p>
-     * 
+     *
      * @param formats {@code non-null;} array of per-instruction format selections
      */
     private void massageInstructions(InsnFormat[] formats) {
@@ -565,7 +565,7 @@
      * couldn't be represented simply (due to register representation
      * problems) is expanded into a series of instances that together
      * perform the proper function.
-     * 
+     *
      * @param formats {@code non-null;} array of per-instruction format selections
      * @return {@code non-null;} the replacement list
      */
@@ -602,7 +602,7 @@
             if (prefix != null) {
                 result.add(prefix);
             }
-            
+
             if (currentFormat != originalFormat) {
                 dop = Dops.getOrNull(dop.getFamily(), currentFormat);
                 insn = insn.withOpcode(dop);
@@ -613,7 +613,7 @@
                 result.add(suffix);
             }
         }
-        
+
         return result;
     }
 
@@ -655,7 +655,7 @@
      * case of a conditional branch that doesn't fit, the sense of the
      * test is reversed in order to branch around a {@code goto}
      * to the original target.
-     * 
+     *
      * @return whether any branches had to be fixed
      */
     private boolean fixBranches() {
@@ -696,13 +696,13 @@
                  * It is a conditional: Reverse its sense, and arrange for
                  * it to branch around an absolute goto to the original
                  * branch target.
-                 * 
+                 *
                  * Note: An invariant of the list being processed is
                  * that every TargetInsn is followed by a CodeAddress.
                  * Hence, it is always safe to get the next element
                  * after a TargetInsn and cast it to CodeAddress, as
                  * is happening a few lines down.
-                 * 
+                 *
                  * Also note: Size gets incremented by one here, as we
                  * have -- in the net -- added one additional element
                  * to the list, so we increment i to match. The added
diff --git a/dx/src/com/android/dx/dex/code/PositionList.java b/dx/src/com/android/dx/dex/code/PositionList.java
index 41e3667..1e07e46 100644
--- a/dx/src/com/android/dx/dex/code/PositionList.java
+++ b/dx/src/com/android/dx/dex/code/PositionList.java
@@ -29,27 +29,27 @@
 
     /**
      * constant for {@link #make} to indicate that no actual position
-     * information should be returned 
+     * information should be returned
      */
     public static final int NONE = 1;
 
     /**
      * constant for {@link #make} to indicate that only line number
-     * transitions should be returned 
+     * transitions should be returned
      */
     public static final int LINES = 2;
 
     /**
      * constant for {@link #make} to indicate that only "important" position
      * information should be returned. This includes block starts and
-     * instructions that might throw. 
+     * instructions that might throw.
      */
     public static final int IMPORTANT = 3;
 
     /**
      * Extracts and returns the source position information out of an
      * instruction list.
-     * 
+     *
      * @param insns {@code non-null;} instructions to convert
      * @param howMuch how much information should be included; one of the
      * static constants defined by this class
@@ -113,7 +113,7 @@
 
     /**
      * Constructs an instance. All indices initially contain {@code null}.
-     * 
+     *
      * @param size {@code >= 0;} the size of the list
      */
     public PositionList(int size) {
@@ -124,7 +124,7 @@
      * Gets the element at the given index. It is an error to call
      * this with the index for an element which was never set; if you
      * do that, this will throw {@code NullPointerException}.
-     * 
+     *
      * @param n {@code >= 0, < size();} which index
      * @return {@code non-null;} element at that index
      */
@@ -134,7 +134,7 @@
 
     /**
      * Sets the entry at the given index.
-     * 
+     *
      * @param n {@code >= 0, < size();} which index
      * @param entry {@code non-null;} the entry to set at {@code n}
      */
@@ -154,7 +154,7 @@
 
         /**
          * Constructs an instance.
-         * 
+         *
          * @param address {@code >= 0;} address of this entry
          * @param position {@code non-null;} corresponding source position information
          */
@@ -173,7 +173,7 @@
 
         /**
          * Gets the address.
-         * 
+         *
          * @return {@code >= 0;} the address
          */
         public int getAddress() {
@@ -182,7 +182,7 @@
 
         /**
          * Gets the source position information.
-         * 
+         *
          * @return {@code non-null;} the position information
          */
         public SourcePosition getPosition() {
diff --git a/dx/src/com/android/dx/dex/code/RopToDop.java b/dx/src/com/android/dx/dex/code/RopToDop.java
index 0385467..d8fa1cc 100644
--- a/dx/src/com/android/dx/dex/code/RopToDop.java
+++ b/dx/src/com/android/dx/dex/code/RopToDop.java
@@ -277,7 +277,7 @@
     /**
      * Returns the dalvik opcode appropriate for the given register-based
      * instruction.
-     * 
+     *
      * @param insn {@code non-null;} the original instruction
      * @return the corresponding dalvik opcode; one of the constants in
      * {@link Dops}
@@ -297,16 +297,16 @@
         /*
          * There was no easy case for the rop, so look up the opcode, and
          * do something special for each:
-         * 
+         *
          * The move_exception, new_array, filled_new_array, and
          * invoke* opcodes won't be found in MAP, since they'll each
          * have different source and/or result register types / lists.
-         * 
+         *
          * The get* and put* opcodes for (non-long) integral types
          * aren't in the map, since the type signatures aren't
          * sufficient to distinguish between the types (the salient
          * source or result will always be just "int").
-         * 
+         *
          * And const instruction need to distinguish between strings and
          * classes.
          */
@@ -320,7 +320,7 @@
             case RegOps.INVOKE_INTERFACE: return Dops.INVOKE_INTERFACE;
             case RegOps.NEW_ARRAY:        return Dops.NEW_ARRAY;
             case RegOps.FILLED_NEW_ARRAY: return Dops.FILLED_NEW_ARRAY;
-            case RegOps.FILL_ARRAY_DATA:  return Dops.FILL_ARRAY_DATA; 
+            case RegOps.FILL_ARRAY_DATA:  return Dops.FILL_ARRAY_DATA;
             case RegOps.MOVE_RESULT: {
                 RegisterSpec resultReg = insn.getResult();
 
diff --git a/dx/src/com/android/dx/dex/code/RopTranslator.java b/dx/src/com/android/dx/dex/code/RopTranslator.java
index 9f47b13..a38ea11 100644
--- a/dx/src/com/android/dx/dex/code/RopTranslator.java
+++ b/dx/src/com/android/dx/dex/code/RopTranslator.java
@@ -51,7 +51,7 @@
 
     /**
      * how much position info to preserve; one of the static
-     * constants in {@link PositionList} 
+     * constants in {@link PositionList}
      */
     private final int positionInfo;
 
@@ -85,7 +85,7 @@
     /**
      * Translates a {@link RopMethod}. This may modify the given
      * input.
-     * 
+     *
      * @param method {@code non-null;} the original method
      * @param positionInfo how much position info to preserve; one of the
      * static constants in {@link PositionList}
@@ -104,7 +104,7 @@
 
     /**
      * Constructs an instance. This method is private. Use {@link #translate}.
-     * 
+     *
      * @param method {@code non-null;} the original method
      * @param positionInfo how much position info to preserve; one of the
      * static constants in {@link PositionList}
@@ -166,7 +166,7 @@
      * stack frame that matches dalvik's calling conventions. This will
      * alway result in "true" for methods that have run through the
      * SSA optimizer.
-     * 
+     *
      * @param paramSize size, in register units, of all the parameters
      * to this method
      */
@@ -198,7 +198,7 @@
 
     /**
      * Does the translation and returns the result.
-     * 
+     *
      * @return {@code non-null;} the result
      */
     private DalvCode translateAndGetResult() {
@@ -231,7 +231,7 @@
     /**
      * Helper for {@link #outputInstructions}, which does the processing
      * and output of one block.
-     * 
+     *
      * @param block {@code non-null;} the block to process and output
      * @param nextLabel {@code >= -1;} the next block that will be processed, or
      * {@code -1} if there is no next block
@@ -258,7 +258,7 @@
         // Insert the block end code address.
         output.add(addresses.getEnd(block));
 
-        // Set up for end-of-block activities. 
+        // Set up for end-of-block activities.
 
         int succ = block.getPrimarySuccessor();
         Insn lastInsn = block.getLastInsn();
@@ -391,7 +391,7 @@
                 if (preferredBlock == null) {
                     break;
                 }
-                
+
                 int preferred = preferredBlock.getLabel();
                 int primary = one.getPrimarySuccessor();
 
@@ -424,7 +424,7 @@
                     }
                 }
             }
-        }        
+        }
 
         if (at != sz) {
             // There was a duplicate block label.
@@ -494,13 +494,13 @@
 
         /**
          * {@code null-ok;} code address for the salient last instruction of the
-         * block (used before switches and throwing instructions) 
+         * block (used before switches and throwing instructions)
          */
         private CodeAddress lastAddress;
 
         /**
          * Constructs an instance.
-         * 
+         *
          * @param output {@code non-null;} destination for instruction output
          */
         public TranslationVisitor(OutputCollector output) {
@@ -509,7 +509,7 @@
 
         /**
          * Sets the block currently being worked on.
-         * 
+         *
          * @param block {@code non-null;} the block
          * @param lastAddress {@code non-null;} code address for the salient
          * last instruction of the block
@@ -672,7 +672,7 @@
                 return null;
             } else {
                 return insn.getResult();
-            }            
+            }
         }
 
         /** {@inheritDoc} */
@@ -707,7 +707,7 @@
                             "Insn with result/move-result-pseudo mismatch " +
                             insn);
                 }
-                
+
                 if ((rop.getOpcode() == RegOps.NEW_ARRAY) &&
                     (opcode.getOpcode() != DalvOps.NEW_ARRAY)) {
                     /*
@@ -745,7 +745,7 @@
                 throw new RuntimeException(
                         "Insn with result/move-result-pseudo mismatch" + insn);
             }
-            
+
             addOutput(lastAddress);
 
             DalvInsn di = new SimpleInsn(opcode, pos,
@@ -767,7 +767,7 @@
             CodeAddress dataAddress = new CodeAddress(pos);
             ArrayData dataInsn =
                 new ArrayData(pos, lastAddress, values, cst);
-            
+
             TargetInsn fillArrayDataInsn =
                 new TargetInsn(Dops.FILL_ARRAY_DATA, pos, getRegs(insn),
                         dataAddress);
@@ -779,10 +779,10 @@
             addOutputSuffix(dataAddress);
             addOutputSuffix(dataInsn);
         }
-        
+
         /**
          * Adds to the output.
-         * 
+         *
          * @param insn {@code non-null;} instruction to add
          */
         protected void addOutput(DalvInsn insn) {
@@ -791,7 +791,7 @@
 
         /**
          * Adds to the output suffix.
-         * 
+         *
          * @param insn {@code non-null;} instruction to add
          */
         protected void addOutputSuffix(DalvInsn insn) {
@@ -810,7 +810,7 @@
 
         /**
          * Constructs an instance.
-         * 
+         *
          * @param output {@code non-null;} destination for instruction output
          * @param locals {@code non-null;} the local variable info
          */
@@ -858,7 +858,7 @@
         /**
          * Adds a {@link LocalStart} to the output if the given
          * instruction in fact introduces a local variable.
-         * 
+         *
          * @param insn {@code non-null;} instruction in question
          */
         public void addIntroductionIfNecessary(Insn insn) {
@@ -868,5 +868,5 @@
                 addOutput(new LocalStart(insn.getPosition(), spec));
             }
         }
-    }    
+    }
 }
diff --git a/dx/src/com/android/dx/dex/code/SimpleInsn.java b/dx/src/com/android/dx/dex/code/SimpleInsn.java
index 5e7b259..8cdcc55 100644
--- a/dx/src/com/android/dx/dex/code/SimpleInsn.java
+++ b/dx/src/com/android/dx/dex/code/SimpleInsn.java
@@ -27,7 +27,7 @@
     /**
      * Constructs an instance. The output address of this instance is initially
      * unknown ({@code -1}).
-     * 
+     *
      * @param opcode the opcode; one of the constants from {@link Dops}
      * @param position {@code non-null;} source position
      * @param registers {@code non-null;} register list, including a
diff --git a/dx/src/com/android/dx/dex/code/StdCatchBuilder.java b/dx/src/com/android/dx/dex/code/StdCatchBuilder.java
index 6e3a169..1e7612e 100644
--- a/dx/src/com/android/dx/dex/code/StdCatchBuilder.java
+++ b/dx/src/com/android/dx/dex/code/StdCatchBuilder.java
@@ -34,7 +34,7 @@
 public final class StdCatchBuilder implements CatchBuilder {
     /** the maximum range of a single catch handler, in code units */
     private static final int MAX_CATCH_RANGE = 65535;
-    
+
     /** {@code non-null;} method to build the list for */
     private final RopMethod method;
 
@@ -43,11 +43,11 @@
 
     /** {@code non-null;} address objects for each block */
     private final BlockAddresses addresses;
-    
+
     /**
      * Constructs an instance. It merely holds onto its parameters for
      * a subsequent call to {@link #build}.
-     * 
+     *
      * @param method {@code non-null;} method to build the list for
      * @param order {@code non-null;} block output order
      * @param addresses {@code non-null;} address objects for each block
@@ -80,7 +80,7 @@
     public boolean hasAnyCatches() {
         BasicBlockList blocks = method.getBlocks();
         int size = blocks.size();
-        
+
         for (int i = 0; i < size; i++) {
             BasicBlock block = blocks.get(i);
             TypeList catches = block.getLastInsn().getCatches();
@@ -91,13 +91,13 @@
 
         return false;
     }
-    
+
     /** {@inheritDoc} */
     public HashSet<Type> getCatchTypes() {
         HashSet<Type> result = new HashSet<Type>(20);
         BasicBlockList blocks = method.getBlocks();
         int size = blocks.size();
-        
+
         for (int i = 0; i < size; i++) {
             BasicBlock block = blocks.get(i);
             TypeList catches = block.getLastInsn().getCatches();
@@ -113,7 +113,7 @@
 
     /**
      * Builds and returns the catch table for a given method.
-     * 
+     *
      * @param method {@code non-null;} method to build the list for
      * @param order {@code non-null;} block output order
      * @param addresses {@code non-null;} address objects for each block
@@ -128,7 +128,7 @@
         CatchHandlerList currentHandlers = CatchHandlerList.EMPTY;
         BasicBlock currentStartBlock = null;
         BasicBlock currentEndBlock = null;
-        
+
         for (int i = 0; i < len; i++) {
             BasicBlock block = blocks.labelToBlock(order[i]);
 
@@ -187,11 +187,11 @@
                         currentHandlers, addresses);
             resultList.add(entry);
         }
-        
+
         // Construct the final result.
 
         int resultSz = resultList.size();
-        
+
         if (resultSz == 0) {
             return CatchTable.EMPTY;
         }
@@ -208,7 +208,7 @@
 
     /**
      * Makes the {@link CatchHandlerList} for the given basic block.
-     * 
+     *
      * @param block {@code non-null;} block to get entries for
      * @param addresses {@code non-null;} address objects for each block
      * @return {@code non-null;} array of entries
@@ -249,7 +249,7 @@
                 break;
             }
         }
-        
+
         CatchHandlerList result = new CatchHandlerList(catchSize);
 
         for (int i = 0; i < catchSize; i++) {
@@ -291,7 +291,7 @@
      * Gets whether the address range for the given two blocks is valid
      * for a catch handler. This is true as long as the covered range is
      * under 65536 code units.
-     * 
+     *
      * @param start {@code non-null;} the start block for the range (inclusive)
      * @param end {@code non-null;} the start block for the range (also inclusive)
      * @param addresses {@code non-null;} address objects for each block
@@ -306,7 +306,7 @@
         if (end == null) {
             throw new NullPointerException("end == null");
         }
-        
+
         // See above about selection of instructions.
         int startAddress = addresses.getLast(start).getAddress();
         int endAddress = addresses.getEnd(end).getAddress();
diff --git a/dx/src/com/android/dx/dex/code/SwitchData.java b/dx/src/com/android/dx/dex/code/SwitchData.java
index e5a8da4..27a6342 100644
--- a/dx/src/com/android/dx/dex/code/SwitchData.java
+++ b/dx/src/com/android/dx/dex/code/SwitchData.java
@@ -30,7 +30,7 @@
 public final class SwitchData extends VariableSizeInsn {
     /**
      * {@code non-null;} address representing the instruction that uses this
-     * instance 
+     * instance
      */
     private final CodeAddress user;
 
@@ -39,7 +39,7 @@
 
     /**
      * {@code non-null;} corresponding list of code addresses; the branch
-     * target for each case 
+     * target for each case
      */
     private final CodeAddress[] targets;
 
@@ -49,7 +49,7 @@
     /**
      * Constructs an instance. The output address of this instance is initially
      * unknown ({@code -1}).
-     * 
+     *
      * @param position {@code non-null;} source position
      * @param user {@code non-null;} address representing the instruction that
      * uses this instance
@@ -150,7 +150,7 @@
 
     /**
      * Returns whether or not this instance's data will be output as packed.
-     * 
+     *
      * @return {@code true} iff the data is to be packed
      */
     public boolean isPacked() {
@@ -201,7 +201,7 @@
     /**
      * Gets the size of a packed table for the given cases, in 16-bit code
      * units.
-     * 
+     *
      * @param cases {@code non-null;} sorted list of cases
      * @return {@code >= -1;} the packed table size or {@code -1} if the
      * cases couldn't possibly be represented as a packed table
@@ -218,7 +218,7 @@
     /**
      * Gets the size of a sparse table for the given cases, in 16-bit code
      * units.
-     * 
+     *
      * @param cases {@code non-null;} sorted list of cases
      * @return {@code > 0;} the sparse table size
      */
@@ -230,7 +230,7 @@
 
     /**
      * Determines whether the given list of cases warrant being packed.
-     * 
+     *
      * @param cases {@code non-null;} sorted list of cases
      * @return {@code true} iff the table encoding the cases
      * should be packed
diff --git a/dx/src/com/android/dx/dex/code/TargetInsn.java b/dx/src/com/android/dx/dex/code/TargetInsn.java
index 0faaada..cbb5ff9 100644
--- a/dx/src/com/android/dx/dex/code/TargetInsn.java
+++ b/dx/src/com/android/dx/dex/code/TargetInsn.java
@@ -30,7 +30,7 @@
      * Constructs an instance. The output address of this instance is initially
      * unknown ({@code -1}), and the target is initially
      * {@code null}.
-     * 
+     *
      * @param opcode the opcode; one of the constants from {@link Dops}
      * @param position {@code non-null;} source position
      * @param registers {@code non-null;} register list, including a
@@ -67,7 +67,7 @@
      * {@code lt} test becomes a {@code ge}), and its branch
      * target is replaced by the one given, and all set-once values
      * associated with the class (such as its address) are reset.
-     * 
+     *
      * @param target {@code non-null;} the new branch target
      * @return {@code non-null;} an appropriately-constructed instance
      */
@@ -79,7 +79,7 @@
 
     /**
      * Gets the unique branch target of this instruction.
-     * 
+     *
      * @return {@code non-null;} the branch target
      */
     public CodeAddress getTarget() {
@@ -91,7 +91,7 @@
      * to call if the target instruction has been assigned an address,
      * and it is merely a convenient shorthand for
      * {@code getTarget().getAddress()}.
-     * 
+     *
      * @return {@code >= 0;} the target address
      */
     public int getTargetAddress() {
@@ -103,7 +103,7 @@
      * call if both this and the target instruction each has been assigned
      * an address, and it is merely a convenient shorthand for
      * {@code getTargetAddress() - getAddress()}.
-     * 
+     *
      * @return the branch offset
      */
     public int getTargetOffset() {
@@ -112,7 +112,7 @@
 
     /**
      * Returns whether the target offset is known.
-     * 
+     *
      * @return {@code true} if the target offset is known or
      * {@code false} if not
      */
diff --git a/dx/src/com/android/dx/dex/code/VariableSizeInsn.java b/dx/src/com/android/dx/dex/code/VariableSizeInsn.java
index 889a50c..06b40f7 100644
--- a/dx/src/com/android/dx/dex/code/VariableSizeInsn.java
+++ b/dx/src/com/android/dx/dex/code/VariableSizeInsn.java
@@ -26,7 +26,7 @@
     /**
      * Constructs an instance. The output address of this instance is initially
      * unknown ({@code -1}).
-     * 
+     *
      * @param position {@code non-null;} source position
      * @param registers {@code non-null;} source registers
      */
diff --git a/dx/src/com/android/dx/dex/code/ZeroSizeInsn.java b/dx/src/com/android/dx/dex/code/ZeroSizeInsn.java
index 198bebf..2cc157b 100644
--- a/dx/src/com/android/dx/dex/code/ZeroSizeInsn.java
+++ b/dx/src/com/android/dx/dex/code/ZeroSizeInsn.java
@@ -29,7 +29,7 @@
     /**
      * Constructs an instance. The output address of this instance is initially
      * unknown ({@code -1}).
-     * 
+     *
      * @param position {@code non-null;} source position
      */
     public ZeroSizeInsn(SourcePosition position) {
diff --git a/dx/src/com/android/dx/dex/code/form/Form22c.java b/dx/src/com/android/dx/dex/code/form/Form22c.java
index e77677f..423ccc8 100644
--- a/dx/src/com/android/dx/dex/code/form/Form22c.java
+++ b/dx/src/com/android/dx/dex/code/form/Form22c.java
@@ -83,7 +83,7 @@
         if (! unsignedFitsInShort(cpi)) {
             return false;
         }
-        
+
         Constant cst = ci.getConstant();
         return (cst instanceof CstType) ||
             (cst instanceof CstFieldRef);
diff --git a/dx/src/com/android/dx/dex/code/form/Form35c.java b/dx/src/com/android/dx/dex/code/form/Form35c.java
index 411e3c3..31b127d 100644
--- a/dx/src/com/android/dx/dex/code/form/Form35c.java
+++ b/dx/src/com/android/dx/dex/code/form/Form35c.java
@@ -112,7 +112,7 @@
         int r4 = (sz > 4) ? regs.get(4).getReg() : 0;
 
         write(out,
-              opcodeUnit(insn, 
+              opcodeUnit(insn,
                          makeByte(r4, sz)), // encode the fifth operand here
               (short) cpi,
               codeUnit(r0, r1, r2, r3));
@@ -123,9 +123,9 @@
      * category-2 values count as two words. Return {@code -1} if the
      * list requires more than five words or contains registers that need
      * more than a nibble to identify them.
-     * 
+     *
      * @param regs {@code non-null;} the register list in question
-     * @return {@code >= -1;} the number of words required, or {@code -1} 
+     * @return {@code >= -1;} the number of words required, or {@code -1}
      * if the list couldn't possibly fit in this format
      */
     private static int wordCount(RegisterSpecList regs) {
@@ -160,7 +160,7 @@
      * except that it splits category-2 registers into two explicit
      * entries. This returns the original list if no modification is
      * required
-     * 
+     *
      * @param orig {@code non-null;} the original list
      * @return {@code non-null;} the list with the described transformation
      */
diff --git a/dx/src/com/android/dx/dex/code/form/Form3rc.java b/dx/src/com/android/dx/dex/code/form/Form3rc.java
index 2d185cf..755ad76 100644
--- a/dx/src/com/android/dx/dex/code/form/Form3rc.java
+++ b/dx/src/com/android/dx/dex/code/form/Form3rc.java
@@ -69,7 +69,7 @@
                      */
                     lastReg = lastReg.withOffset(1);
                 }
-                
+
                 sb.append(regs.get(0).regString());
                 sb.append("..");
                 sb.append(lastReg.regString());
@@ -78,7 +78,7 @@
 
         sb.append("}, ");
         sb.append(cstString(insn));
-        
+
         return sb.toString();
     }
 
diff --git a/dx/src/com/android/dx/dex/file/AnnotationItem.java b/dx/src/com/android/dx/dex/file/AnnotationItem.java
index 08422bc..1febd9e 100644
--- a/dx/src/com/android/dx/dex/file/AnnotationItem.java
+++ b/dx/src/com/android/dx/dex/file/AnnotationItem.java
@@ -36,19 +36,19 @@
 public final class AnnotationItem extends OffsettedItem {
     /** annotation visibility constant: visible at build time only */
     private static final int VISIBILITY_BUILD = 0;
-    
+
     /** annotation visibility constant: visible at runtime */
     private static final int VISIBILITY_RUNTIME = 1;
 
     /** annotation visibility constant: visible at runtime only to system */
     private static final int VISIBILITY_SYSTEM = 2;
-    
+
     /** the required alignment for instances of this class */
     private static final int ALIGNMENT = 1;
 
     /** {@code non-null;} unique instance of {@link #TypeIdSorter} */
     private static final TypeIdSorter TYPE_ID_SORTER = new TypeIdSorter();
-    
+
     /** {@code non-null;} the annotation to represent */
     private final Annotation annotation;
 
@@ -87,7 +87,7 @@
      * Sorts an array of instances, in place, by type id index,
      * ignoring all other aspects of the elements. This is only valid
      * to use after type id indices are known.
-     * 
+     *
      * @param array {@code non-null;} array to sort
      */
     public static void sortByTypeIdIndex(AnnotationItem[] array) {
@@ -96,7 +96,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param annotation {@code non-null;} annotation to represent
      */
     public AnnotationItem(Annotation annotation) {
@@ -166,7 +166,7 @@
      * Write a (listing file) annotation for this instance to the given
      * output, that consumes no bytes of output. This is for annotating
      * a reference to this instance at the point of the reference.
-     * 
+     *
      * @param out {@code non-null;} where to output to
      * @param prefix {@code non-null;} prefix for each line of output
      */
@@ -204,7 +204,7 @@
                 throw new RuntimeException("shouldn't happen");
             }
         }
-        
+
         if (annotates) {
             /*
              * The output is to be annotated, so redo the work previously
diff --git a/dx/src/com/android/dx/dex/file/AnnotationSetItem.java b/dx/src/com/android/dx/dex/file/AnnotationSetItem.java
index 2ff005a..2187700 100644
--- a/dx/src/com/android/dx/dex/file/AnnotationSetItem.java
+++ b/dx/src/com/android/dx/dex/file/AnnotationSetItem.java
@@ -33,7 +33,7 @@
 
     /** {@code non-null;} the set of annotations */
     private final Annotations annotations;
-    
+
     /**
      * {@code non-null;} set of annotations as individual items in an array.
      * <b>Note:</b> The contents have to get sorted by type id before
@@ -43,7 +43,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param annotations {@code non-null;} set of annotations
      */
     public AnnotationSetItem(Annotations annotations) {
@@ -61,7 +61,7 @@
 
     /**
      * Gets the write size for the given set.
-     * 
+     *
      * @param annotations {@code non-null;} the set
      * @return {@code > 0;} the write size
      */
@@ -78,13 +78,13 @@
 
     /**
      * Gets the underlying annotations of this instance
-     * 
+     *
      * @return {@code non-null;} the annotations
      */
     public Annotations getAnnotations() {
         return annotations;
     }
-    
+
     /** {@inheritDoc} */
     @Override
     public int hashCode() {
@@ -140,11 +140,11 @@
         }
 
         out.writeInt(size);
-        
+
         for (int i = 0; i < size; i++) {
             AnnotationItem item = items[i];
             int offset = item.getAbsoluteOffset();
-            
+
             if (annotates) {
                 out.annotate(4, "  entries[" + Integer.toHexString(i) + "]: " +
                         Hex.u4(offset));
diff --git a/dx/src/com/android/dx/dex/file/AnnotationSetRefItem.java b/dx/src/com/android/dx/dex/file/AnnotationSetRefItem.java
index 1427e6a..53072d8 100644
--- a/dx/src/com/android/dx/dex/file/AnnotationSetRefItem.java
+++ b/dx/src/com/android/dx/dex/file/AnnotationSetRefItem.java
@@ -34,7 +34,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param annotations {@code non-null;} the annotation set to refer to
      */
     public AnnotationSetRefItem(AnnotationSetItem annotations) {
diff --git a/dx/src/com/android/dx/dex/file/AnnotationUtils.java b/dx/src/com/android/dx/dex/file/AnnotationUtils.java
index 8431d35..d500ec4 100644
--- a/dx/src/com/android/dx/dex/file/AnnotationUtils.java
+++ b/dx/src/com/android/dx/dex/file/AnnotationUtils.java
@@ -39,31 +39,31 @@
  */
 public final class AnnotationUtils {
     /** {@code non-null;} type for {@code AnnotationDefault} annotations */
-    private static final CstType ANNOTATION_DEFAULT_TYPE = 
+    private static final CstType ANNOTATION_DEFAULT_TYPE =
         CstType.intern(Type.intern("Ldalvik/annotation/AnnotationDefault;"));
 
     /** {@code non-null;} type for {@code EnclosingClass} annotations */
-    private static final CstType ENCLOSING_CLASS_TYPE = 
+    private static final CstType ENCLOSING_CLASS_TYPE =
         CstType.intern(Type.intern("Ldalvik/annotation/EnclosingClass;"));
 
     /** {@code non-null;} type for {@code EnclosingMethod} annotations */
-    private static final CstType ENCLOSING_METHOD_TYPE = 
+    private static final CstType ENCLOSING_METHOD_TYPE =
         CstType.intern(Type.intern("Ldalvik/annotation/EnclosingMethod;"));
 
     /** {@code non-null;} type for {@code InnerClass} annotations */
-    private static final CstType INNER_CLASS_TYPE = 
+    private static final CstType INNER_CLASS_TYPE =
         CstType.intern(Type.intern("Ldalvik/annotation/InnerClass;"));
 
     /** {@code non-null;} type for {@code MemberClasses} annotations */
-    private static final CstType MEMBER_CLASSES_TYPE = 
+    private static final CstType MEMBER_CLASSES_TYPE =
         CstType.intern(Type.intern("Ldalvik/annotation/MemberClasses;"));
 
     /** {@code non-null;} type for {@code Signature} annotations */
-    private static final CstType SIGNATURE_TYPE = 
+    private static final CstType SIGNATURE_TYPE =
         CstType.intern(Type.intern("Ldalvik/annotation/Signature;"));
 
     /** {@code non-null;} type for {@code Throws} annotations */
-    private static final CstType THROWS_TYPE = 
+    private static final CstType THROWS_TYPE =
         CstType.intern(Type.intern("Ldalvik/annotation/Throws;"));
 
     /** {@code non-null;} the UTF-8 constant {@code "accessFlags"} */
@@ -84,7 +84,7 @@
 
     /**
      * Constructs a standard {@code AnnotationDefault} annotation.
-     * 
+     *
      * @param defaults {@code non-null;} the defaults, itself as an annotation
      * @return {@code non-null;} the constructed annotation
      */
@@ -98,7 +98,7 @@
 
     /**
      * Constructs a standard {@code EnclosingClass} annotation.
-     * 
+     *
      * @param clazz {@code non-null;} the enclosing class
      * @return {@code non-null;} the annotation
      */
@@ -112,7 +112,7 @@
 
     /**
      * Constructs a standard {@code EnclosingMethod} annotation.
-     * 
+     *
      * @param method {@code non-null;} the enclosing method
      * @return {@code non-null;} the annotation
      */
@@ -126,7 +126,7 @@
 
     /**
      * Constructs a standard {@code InnerClass} annotation.
-     * 
+     *
      * @param name {@code null-ok;} the original name of the class, or
      * {@code null} to represent an anonymous class
      * @param accessFlags the original access flags
@@ -146,7 +146,7 @@
 
     /**
      * Constructs a standard {@code MemberClasses} annotation.
-     * 
+     *
      * @param types {@code non-null;} the list of (the types of) the member classes
      * @return {@code non-null;} the annotation
      */
@@ -160,7 +160,7 @@
 
     /**
      * Constructs a standard {@code Signature} annotation.
-     * 
+     *
      * @param signature {@code non-null;} the signature string
      * @return {@code non-null;} the annotation
      */
@@ -171,7 +171,7 @@
          * Split the string into pieces that are likely to be common
          * across many signatures and the rest of the file.
          */
-         
+
         String raw = signature.getString();
         int rawLength = raw.length();
         ArrayList<String> pieces = new ArrayList<String>(20);
@@ -214,7 +214,7 @@
         }
 
         list.setImmutable();
-        
+
         result.put(new NameValuePair(VALUE_UTF, new CstArray(list)));
         result.setImmutable();
         return result;
@@ -222,7 +222,7 @@
 
     /**
      * Constructs a standard {@code Throws} annotation.
-     * 
+     *
      * @param types {@code non-null;} the list of thrown types
      * @return {@code non-null;} the annotation
      */
@@ -236,7 +236,7 @@
 
     /**
      * Converts a {@link TypeList} to a {@link CstArray}.
-     * 
+     *
      * @param types {@code non-null;} the type list
      * @return {@code non-null;} the corresponding array constant
      */
diff --git a/dx/src/com/android/dx/dex/file/AnnotationsDirectoryItem.java b/dx/src/com/android/dx/dex/file/AnnotationsDirectoryItem.java
index d55195f..972d4e6 100644
--- a/dx/src/com/android/dx/dex/file/AnnotationsDirectoryItem.java
+++ b/dx/src/com/android/dx/dex/file/AnnotationsDirectoryItem.java
@@ -42,7 +42,7 @@
 
     /** {@code null-ok;} the class-level annotations, if any */
     private AnnotationSetItem classAnnotations;
-    
+
     /** {@code null-ok;} the annotated fields, if any */
     private ArrayList<FieldAnnotationStruct> fieldAnnotations;
 
@@ -63,7 +63,7 @@
         methodAnnotations = null;
         parameterAnnotations = null;
     }
-    
+
     /** {@inheritDoc} */
     @Override
     public ItemType itemType() {
@@ -72,7 +72,7 @@
 
     /**
      * Returns whether this item is empty (has no contents).
-     * 
+     *
      * @return {@code true} if this item is empty, or {@code false}
      * if not
      */
@@ -104,16 +104,16 @@
         if (classAnnotations == null) {
             return 0;
         }
-        
+
         return classAnnotations.hashCode();
     }
-    
+
     /**
      * {@inheritDoc}
-     * 
+     *
      * <p><b>Note:</b>: This throws an exception if this item is not
      * internable.</p>
-     * 
+     *
      * @see #isInternable
      */
     @Override
@@ -131,14 +131,14 @@
      * Sets the direct annotations on this instance. These are annotations
      * made on the class, per se, as opposed to on one of its members.
      * It is only valid to call this method at most once per instance.
-     * 
+     *
      * @param annotations {@code non-null;} annotations to set for this class
      */
     public void setClassAnnotations(Annotations annotations) {
         if (annotations == null) {
             throw new NullPointerException("annotations == null");
         }
-        
+
         if (classAnnotations != null) {
             throw new UnsupportedOperationException(
                     "class annotations already set");
@@ -149,7 +149,7 @@
 
     /**
      * Adds a field annotations item to this instance.
-     * 
+     *
      * @param field {@code non-null;} field in question
      * @param annotations {@code non-null;} associated annotations to add
      */
@@ -158,14 +158,14 @@
         if (fieldAnnotations == null) {
             fieldAnnotations = new ArrayList<FieldAnnotationStruct>();
         }
-        
+
         fieldAnnotations.add(new FieldAnnotationStruct(field,
                         new AnnotationSetItem(annotations)));
     }
 
     /**
      * Adds a method annotations item to this instance.
-     * 
+     *
      * @param method {@code non-null;} method in question
      * @param annotations {@code non-null;} associated annotations to add
      */
@@ -181,7 +181,7 @@
 
     /**
      * Adds a parameter annotations item to this instance.
-     * 
+     *
      * @param method {@code non-null;} method in question
      * @param list {@code non-null;} associated list of annotation sets to add
      */
@@ -197,7 +197,7 @@
     /**
      * Gets the method annotations for a given method, if any. This is
      * meant for use by debugging / dumping code.
-     * 
+     *
      * @param method {@code non-null;} the method
      * @return {@code null-ok;} the method annotations, if any
      */
@@ -205,7 +205,7 @@
         if (methodAnnotations == null) {
             return null;
         }
-        
+
         for (MethodAnnotationStruct item : methodAnnotations) {
             if (item.getMethod().equals(method)) {
                 return item.getAnnotations();
@@ -218,7 +218,7 @@
     /**
      * Gets the parameter annotations for a given method, if any. This is
      * meant for use by debugging / dumping code.
-     * 
+     *
      * @param method {@code non-null;} the method
      * @return {@code null-ok;} the parameter annotations, if any
      */
@@ -235,7 +235,7 @@
 
         return null;
     }
-    
+
     /** {@inheritDoc} */
     public void addContents(DexFile file) {
         MixedItemSection wordData = file.getWordData();
@@ -255,7 +255,7 @@
                 item.addContents(file);
             }
         }
-        
+
         if (parameterAnnotations != null) {
             for (ParameterAnnotationStruct item : parameterAnnotations) {
                 item.addContents(file);
@@ -338,7 +338,7 @@
     /**
      * Gets the list size of the given list, or {@code 0} if given
      * {@code null}.
-     * 
+     *
      * @param list {@code null-ok;} the list in question
      * @return {@code >= 0;} its size
      */
@@ -353,7 +353,7 @@
     /**
      * Prints out the contents of this instance, in a debugging-friendly
      * way. This is meant to be called from {@link ClassDefItem#debugPrint}.
-     * 
+     *
      * @param out {@code non-null;} where to output to
      */
     /*package*/ void debugPrint(PrintWriter out) {
@@ -374,12 +374,12 @@
                 out.println("    " + item.toHuman());
             }
         }
-        
+
         if (parameterAnnotations != null) {
             out.println("  parameter annotations:");
             for (ParameterAnnotationStruct item : parameterAnnotations) {
                 out.println("    " + item.toHuman());
             }
         }
-    }    
+    }
 }
diff --git a/dx/src/com/android/dx/dex/file/CatchStructs.java b/dx/src/com/android/dx/dex/file/CatchStructs.java
index 3412015..e07ec29 100644
--- a/dx/src/com/android/dx/dex/file/CatchStructs.java
+++ b/dx/src/com/android/dx/dex/file/CatchStructs.java
@@ -38,13 +38,13 @@
 public final class CatchStructs {
     /**
      * the size of a {@code try_item}: a {@code uint}
-     * and two {@code ushort}s 
+     * and two {@code ushort}s
      */
     private static final int TRY_ITEM_WRITE_SIZE = 4 + (2 * 2);
 
     /** {@code non-null;} code that contains the catches */
     private final DalvCode code;
-    
+
     /**
      * {@code null-ok;} the underlying table; set in
      * {@link #finishProcessingIfNecessary}
@@ -71,7 +71,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param code {@code non-null;} code that contains the catches
      */
     public CatchStructs(DalvCode code) {
@@ -93,7 +93,7 @@
 
     /**
      * Gets the size of the tries list, in entries.
-     * 
+     *
      * @return {@code >= 0;} the tries list size
      */
     public int triesSize() {
@@ -103,7 +103,7 @@
 
     /**
      * Does a human-friendly dump of this instance.
-     * 
+     *
      * @param out {@code non-null;} where to dump
      * @param prefix {@code non-null;} prefix to attach to each line of output
      */
@@ -113,7 +113,7 @@
 
     /**
      * Encodes the handler lists.
-     * 
+     *
      * @param file {@code non-null;} file this instance is part of
      */
     public void encode(DexFile file) {
@@ -136,13 +136,13 @@
             throw new UnsupportedOperationException(
                     "too many catch handlers");
         }
-        
+
         ByteArrayAnnotatedOutput out = new ByteArrayAnnotatedOutput();
 
         // Write out the handlers "header" consisting of its size in entries.
         encodedHandlerHeaderSize =
             out.writeUnsignedLeb128(handlerOffsets.size());
-        
+
         // Now write the lists out in order, noting the offset of each.
         for (Map.Entry<CatchHandlerList, Integer> mapping :
                  handlerOffsets.entrySet()) {
@@ -178,17 +178,17 @@
 
     /**
      * Gets the write size of this instance, in bytes.
-     * 
+     *
      * @return {@code >= 0;} the write size
      */
     public int writeSize() {
         return (triesSize() * TRY_ITEM_WRITE_SIZE) +
                 + encodedHandlers.length;
     }
-    
+
     /**
      * Writes this instance to the given stream.
-     * 
+     *
      * @param file {@code non-null;} file this instance is part of
      * @param out {@code non-null;} where to write to
      */
@@ -216,7 +216,7 @@
             out.writeShort(insnCount);
             out.writeShort(handlerOffsets.get(one.getHandlers()));
         }
-        
+
         out.write(encodedHandlers);
     }
 
@@ -224,7 +224,7 @@
      * Helper method to annotate or simply print the exception handlers.
      * Only one of {@code printTo} or {@code annotateTo} should
      * be non-null.
-     * 
+     *
      * @param prefix {@code non-null;} prefix for each line
      * @param printTo {@code null-ok;} where to print to
      * @param annotateTo {@code null-ok;} where to consume bytes and annotate to
@@ -272,7 +272,7 @@
 
         int lastOffset = 0;
         CatchHandlerList lastList = null;
-        
+
         for (Map.Entry<CatchHandlerList, Integer> mapping :
                  handlerOffsets.entrySet()) {
             CatchHandlerList list = mapping.getKey();
@@ -295,7 +295,7 @@
     /**
      * Helper for {@link #annotateEntries} to annotate a catch handler list
      * while consuming it.
-     * 
+     *
      * @param handlers {@code non-null;} handlers to annotate
      * @param offset {@code >= 0;} the offset of this handler
      * @param size {@code >= 1;} the number of bytes the handlers consume
diff --git a/dx/src/com/android/dx/dex/file/ClassDataItem.java b/dx/src/com/android/dx/dex/file/ClassDataItem.java
index 4823f9f..275ae99 100644
--- a/dx/src/com/android/dx/dex/file/ClassDataItem.java
+++ b/dx/src/com/android/dx/dex/file/ClassDataItem.java
@@ -43,7 +43,7 @@
 public final class ClassDataItem extends OffsettedItem {
     /** {@code non-null;} what class this data is for, just for listing generation */
     private final CstType thisClass;
-    
+
     /** {@code non-null;} list of static fields */
     private final ArrayList<EncodedField> staticFields;
 
@@ -71,7 +71,7 @@
     /**
      * Constructs an instance. Its sets of members are initially
      * empty.
-     * 
+     *
      * @param thisClass {@code non-null;} what class this data is for, just
      * for listing generation
      */
@@ -105,7 +105,7 @@
 
     /**
      * Returns whether this instance is empty.
-     * 
+     *
      * @return {@code true} if this instance is empty or
      * {@code false} if at least one element has been added to it
      */
@@ -116,7 +116,7 @@
 
     /**
      * Adds a static field.
-     * 
+     *
      * @param field {@code non-null;} the field to add
      * @param value {@code null-ok;} initial value for the field, if any
      */
@@ -136,7 +136,7 @@
 
     /**
      * Adds an instance field.
-     * 
+     *
      * @param field {@code non-null;} the field to add
      */
     public void addInstanceField(EncodedField field) {
@@ -149,7 +149,7 @@
 
     /**
      * Adds a direct ({@code static} and/or {@code private}) method.
-     * 
+     *
      * @param method {@code non-null;} the method to add
      */
     public void addDirectMethod(EncodedMethod method) {
@@ -162,7 +162,7 @@
 
     /**
      * Adds a virtual method.
-     * 
+     *
      * @param method {@code non-null;} the method to add
      */
     public void addVirtualMethod(EncodedMethod method) {
@@ -177,7 +177,7 @@
      * Gets all the methods in this class. The returned list is not linked
      * in any way to the underlying lists contained in this instance, but
      * the objects contained in the list are shared.
-     * 
+     *
      * @return {@code non-null;} list of all methods
      */
     public ArrayList<EncodedMethod> getMethods() {
@@ -194,7 +194,7 @@
     /**
      * Prints out the contents of this instance, in a debugging-friendly
      * way.
-     * 
+     *
      * @param out {@code non-null;} where to output to
      * @param verbose whether to be verbose with the output
      */
@@ -259,7 +259,7 @@
     /**
      * Gets a {@link CstArray} corresponding to {@link #staticValues} if
      * it contains any non-zero non-{@code null} values.
-     * 
+     *
      * @return {@code null-ok;} the corresponding constant or {@code null} if
      * there are no values to encode
      */
@@ -274,14 +274,14 @@
     /**
      * Gets a {@link CstArray} corresponding to {@link #staticValues} if
      * it contains any non-zero non-{@code null} values.
-     * 
+     *
      * @return {@code null-ok;} the corresponding constant or {@code null} if
      * there are no values to encode
      */
     private CstArray makeStaticValuesConstant() {
         // First sort the statics into their final order.
         Collections.sort(staticFields);
-        
+
         /*
          * Get the size of staticValues minus any trailing zeros/nulls (both
          * nulls per se as well as instances of CstKnownNull).
@@ -305,9 +305,9 @@
         if (size == 0) {
             return null;
         }
-        
+
         // There is something worth encoding, so build up a result.
-        
+
         CstArray.List list = new CstArray.List(size);
         for (int i = 0; i < size; i++) {
             EncodedField field = staticFields.get(i);
@@ -336,7 +336,7 @@
 
     /**
      * Writes out the encoded form of this instance.
-     * 
+     *
      * @param file {@code non-null;} file this instance is part of
      * @param out {@code non-null;} where to write to
      */
@@ -362,11 +362,11 @@
             out.endAnnotation();
         }
     }
-    
+
     /**
      * Helper for {@link #encodeOutput}, which writes out the given
      * size value, annotating it as well (if annotations are enabled).
-     * 
+     *
      * @param file {@code non-null;} file this instance is part of
      * @param out {@code non-null;} where to write to
      * @param label {@code non-null;} the label for the purposes of annotation
@@ -386,7 +386,7 @@
      * Helper for {@link #encodeOutput}, which writes out the given
      * list. It also annotates the items (if any and if annotations
      * are enabled).
-     * 
+     *
      * @param file {@code non-null;} file this instance is part of
      * @param out {@code non-null;} where to write to
      * @param label {@code non-null;} the label for the purposes of annotation
@@ -400,7 +400,7 @@
         if (size == 0) {
             return;
         }
-        
+
         if (out.annotates()) {
             out.annotate(0, "  " + label + ":");
         }
diff --git a/dx/src/com/android/dx/dex/file/ClassDefItem.java b/dx/src/com/android/dx/dex/file/ClassDefItem.java
index acd8cf5..4d1719b 100644
--- a/dx/src/com/android/dx/dex/file/ClassDefItem.java
+++ b/dx/src/com/android/dx/dex/file/ClassDefItem.java
@@ -53,7 +53,7 @@
 
     /**
      * {@code null-ok;} superclass or {@code null} if this class is a/the
-     * root class 
+     * root class
      */
     private final CstType superclass;
 
@@ -78,7 +78,7 @@
     /**
      * Constructs an instance. Its sets of members and annotations are
      * initially empty.
-     * 
+     *
      * @param thisClass {@code non-null;} type constant for this class
      * @param accessFlags access flags
      * @param superclass {@code null-ok;} superclass or {@code null} if
@@ -105,7 +105,7 @@
         this.thisClass = thisClass;
         this.accessFlags = accessFlags;
         this.superclass = superclass;
-        this.interfaces = 
+        this.interfaces =
             (interfaces.size() == 0) ? null :  new TypeListItem(interfaces);
         this.sourceFile = sourceFile;
         this.classData = new ClassDataItem(thisClass);
@@ -188,7 +188,7 @@
         if (annotates) {
             out.annotate(0, indexString() + ' ' + thisClass.toHuman());
             out.annotate(4, "  class_idx:           " + Hex.u4(classIdx));
-            out.annotate(4, "  access_flags:        " + 
+            out.annotate(4, "  access_flags:        " +
                          AccessFlags.classString(accessFlags));
             out.annotate(4, "  superclass_idx:      " + Hex.u4(superIdx) +
                          " // " + ((superclass == null) ? "<none>" :
@@ -222,7 +222,7 @@
 
     /**
      * Gets the constant corresponding to this class.
-     * 
+     *
      * @return {@code non-null;} the constant
      */
     public CstType getThisClass() {
@@ -231,7 +231,7 @@
 
     /**
      * Gets the access flags.
-     * 
+     *
      * @return the access flags
      */
     public int getAccessFlags() {
@@ -240,7 +240,7 @@
 
     /**
      * Gets the superclass.
-     * 
+     *
      * @return {@code null-ok;} the superclass or {@code null} if
      * this class is a/the root class
      */
@@ -250,7 +250,7 @@
 
     /**
      * Gets the list of interfaces implemented.
-     * 
+     *
      * @return {@code non-null;} the interfaces list
      */
     public TypeList getInterfaces() {
@@ -263,7 +263,7 @@
 
     /**
      * Gets the source file name.
-     * 
+     *
      * @return {@code null-ok;} the source file name or {@code null} if unknown
      */
     public CstUtf8 getSourceFile() {
@@ -272,7 +272,7 @@
 
     /**
      * Adds a static field.
-     * 
+     *
      * @param field {@code non-null;} the field to add
      * @param value {@code null-ok;} initial value for the field, if any
      */
@@ -282,7 +282,7 @@
 
     /**
      * Adds an instance field.
-     * 
+     *
      * @param field {@code non-null;} the field to add
      */
     public void addInstanceField(EncodedField field) {
@@ -291,7 +291,7 @@
 
     /**
      * Adds a direct ({@code static} and/or {@code private}) method.
-     * 
+     *
      * @param method {@code non-null;} the method to add
      */
     public void addDirectMethod(EncodedMethod method) {
@@ -300,7 +300,7 @@
 
     /**
      * Adds a virtual method.
-     * 
+     *
      * @param method {@code non-null;} the method to add
      */
     public void addVirtualMethod(EncodedMethod method) {
@@ -311,7 +311,7 @@
      * Gets all the methods in this class. The returned list is not linked
      * in any way to the underlying lists contained in this instance, but
      * the objects contained in the list are shared.
-     * 
+     *
      * @return {@code non-null;} list of all methods
      */
     public ArrayList<EncodedMethod> getMethods() {
@@ -322,7 +322,7 @@
      * Sets the direct annotations on this class. These are annotations
      * made on the class, per se, as opposed to on one of its members.
      * It is only valid to call this method at most once per instance.
-     * 
+     *
      * @param annotations {@code non-null;} annotations to set for this class
      */
     public void setClassAnnotations(Annotations annotations) {
@@ -331,7 +331,7 @@
 
     /**
      * Adds a field annotations item to this class.
-     * 
+     *
      * @param field {@code non-null;} field in question
      * @param annotations {@code non-null;} associated annotations to add
      */
@@ -342,7 +342,7 @@
 
     /**
      * Adds a method annotations item to this class.
-     * 
+     *
      * @param method {@code non-null;} method in question
      * @param annotations {@code non-null;} associated annotations to add
      */
@@ -353,7 +353,7 @@
 
     /**
      * Adds a parameter annotations item to this class.
-     * 
+     *
      * @param method {@code non-null;} method in question
      * @param list {@code non-null;} associated list of annotation sets to add
      */
@@ -365,7 +365,7 @@
     /**
      * Gets the method annotations for a given method, if any. This is
      * meant for use by debugging / dumping code.
-     * 
+     *
      * @param method {@code non-null;} the method
      * @return {@code null-ok;} the method annotations, if any
      */
@@ -376,18 +376,18 @@
     /**
      * Gets the parameter annotations for a given method, if any. This is
      * meant for use by debugging / dumping code.
-     * 
+     *
      * @param method {@code non-null;} the method
      * @return {@code null-ok;} the parameter annotations, if any
      */
     public AnnotationsList getParameterAnnotations(CstMethodRef method) {
         return annotationsDirectory.getParameterAnnotations(method);
     }
-    
+
     /**
      * Prints out the contents of this instance, in a debugging-friendly
      * way.
-     * 
+     *
      * @param out {@code non-null;} where to output to
      * @param verbose whether to be verbose with the output
      */
@@ -404,7 +404,7 @@
 
         classData.debugPrint(out, verbose);
         annotationsDirectory.debugPrint(pw);
-        
+
         pw.println("}");
     }
 }
diff --git a/dx/src/com/android/dx/dex/file/ClassDefsSection.java b/dx/src/com/android/dx/dex/file/ClassDefsSection.java
index e8efd57..1ca391f 100644
--- a/dx/src/com/android/dx/dex/file/ClassDefsSection.java
+++ b/dx/src/com/android/dx/dex/file/ClassDefsSection.java
@@ -42,7 +42,7 @@
 
     /**
      * Constructs an instance. The file offset is initially unknown.
-     * 
+     *
      * @param file {@code non-null;} file that this instance is part of
      */
     public ClassDefsSection(DexFile file) {
@@ -58,7 +58,7 @@
         if (orderedDefs != null) {
             return orderedDefs;
         }
-        
+
         return classDefs.values();
     }
 
@@ -83,7 +83,7 @@
 
     /**
      * Writes the portion of the file header that refers to this instance.
-     * 
+     *
      * @param out {@code non-null;} where to write
      */
     public void writeHeaderPart(AnnotatedOutput out) {
@@ -104,7 +104,7 @@
     /**
      * Adds an element to this instance. It is illegal to attempt to add more
      * than one class with the same name.
-     * 
+     *
      * @param clazz {@code non-null;} the class def to add
      */
     public void add(ClassDefItem clazz) {
@@ -148,7 +148,7 @@
     /**
      * Helper for {@link #orderItems}, which recursively assigns indices
      * to classes.
-     * 
+     *
      * @param type {@code null-ok;} type ref to assign, if any
      * @param idx {@code >= 0;} the next index to assign
      * @param maxDepth maximum recursion depth; if negative, this will
diff --git a/dx/src/com/android/dx/dex/file/CodeItem.java b/dx/src/com/android/dx/dex/file/CodeItem.java
index ab7abbe..a47f68a 100644
--- a/dx/src/com/android/dx/dex/file/CodeItem.java
+++ b/dx/src/com/android/dx/dex/file/CodeItem.java
@@ -62,7 +62,7 @@
 
     /**
      * {@code non-null;} list of possibly-thrown exceptions; just used in
-     * generating debugging output (listings) 
+     * generating debugging output (listings)
      */
     private final TypeList throwsList;
 
@@ -74,7 +74,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param ref {@code non-null;} method that this code implements
      * @param code {@code non-null;} the underlying code
      * @param isStatic whether this instance is for a {@code static}
@@ -148,7 +148,7 @@
 
     /**
      * Gets the reference to the method this instance implements.
-     * 
+     *
      * @return {@code non-null;} the method reference
      */
     public CstMethodRef getRef() {
@@ -157,7 +157,7 @@
 
     /**
      * Does a human-friendly dump of this instance.
-     * 
+     *
      * @param out {@code non-null;} where to dump
      * @param prefix {@code non-null;} per-line prefix to use
      * @param verbose whether to be verbose with the output
@@ -192,7 +192,7 @@
     protected void place0(Section addedTo, int offset) {
         final DexFile file = addedTo.getFile();
         int catchesSize;
-        
+
         /*
          * In order to get the catches and insns, all the code's
          * constants need to be assigned indices.
@@ -307,7 +307,7 @@
 
     /**
      * Get the in registers count.
-     * 
+     *
      * @return the count
      */
     private int getInsSize() {
@@ -316,7 +316,7 @@
 
     /**
      * Get the out registers count.
-     * 
+     *
      * @return the count
      */
     private int getOutsSize() {
@@ -325,7 +325,7 @@
 
     /**
      * Get the total registers count.
-     * 
+     *
      * @return the count
      */
     private int getRegistersSize() {
diff --git a/dx/src/com/android/dx/dex/file/DebugInfoDecoder.java b/dx/src/com/android/dx/dex/file/DebugInfoDecoder.java
index cd20055..e823816 100644
--- a/dx/src/com/android/dx/dex/file/DebugInfoDecoder.java
+++ b/dx/src/com/android/dx/dex/file/DebugInfoDecoder.java
@@ -73,7 +73,7 @@
 
     /** current decoding state: line number */
     private int line = 1;
-    
+
     /** current decoding state: bytecode address */
     private int address = 0;
 
@@ -102,7 +102,7 @@
         this.desc = ref.getPrototype();
         this.file = file;
         this.regSize = regSize;
-        
+
         positions = new ArrayList<PositionEntry>();
         locals = new ArrayList<LocalEntry>();
         this.codesize = codesize;
@@ -248,7 +248,7 @@
             throw new RuntimeException(
                     "Mismatch between parameters_size and prototype");
         }
-        
+
         if (!isStatic) {
             // Start off with implicit 'this' entry
             LocalEntry thisEntry =
@@ -353,7 +353,7 @@
                             throw new RuntimeException("nonsensical "
                                     + "END_LOCAL on dead register v" + reg);
                         }
-                        
+
                         le = new LocalEntry(address, false, reg,
                                 prevle.nameIndex, prevle.typeIndex,
                                 prevle.signatureIndex);
@@ -428,7 +428,7 @@
         DalvInsnList insns = code.getInsns();
         int codeSize = insns.codeSize();
         int countRegisters = insns.getRegistersSize();
-        
+
         try {
             validateEncode0(info, codeSize, countRegisters,
                     isStatic, ref, file, pl, ll);
@@ -441,7 +441,7 @@
                     "while processing " + ref.toHuman());
         }
     }
-    
+
     private static void validateEncode0(byte[] info, int codeSize,
             int countRegisters, boolean isStatic, CstMethodRef ref,
             DexFile file, PositionList pl, LocalList ll) {
@@ -516,7 +516,7 @@
                 }
             }
         }
-        
+
         int origSz = ll.size();
         int decodeAt = 0;
         boolean problem = false;
@@ -556,7 +556,7 @@
                 problem = true;
                 break;
             }
-            
+
             if (decodedEntry.isStart != origEntry.isStart()) {
                 System.err.println("local start/end mismatch at orig " + i +
                         " / decoded " + decodeAt);
@@ -569,7 +569,7 @@
              * parameter might not be marked as starting at 0 in the
              * original list.
              */
-            if ((decodedAddress != origEntry.getAddress()) 
+            if ((decodedAddress != origEntry.getAddress())
                     && !((decodedAddress == 0)
                             && (decodedEntry.reg >= paramBase))) {
                 System.err.println("local address mismatch at orig " + i +
diff --git a/dx/src/com/android/dx/dex/file/DebugInfoItem.java b/dx/src/com/android/dx/dex/file/DebugInfoItem.java
index 1c32bd7..6a41b18 100644
--- a/dx/src/com/android/dx/dex/file/DebugInfoItem.java
+++ b/dx/src/com/android/dx/dex/file/DebugInfoItem.java
@@ -36,7 +36,7 @@
 
     /** {@code non-null;} the code this item represents */
     private final DalvCode code;
-    
+
     private byte[] encoded;
 
     private final boolean isStatic;
@@ -80,7 +80,7 @@
                     "...while placing debug info for " + ref.toHuman());
         }
     }
-        
+
     /** {@inheritDoc} */
     @Override
     public String toHuman() {
@@ -99,7 +99,7 @@
      */
     public void annotateTo(DexFile file, AnnotatedOutput out, String prefix) {
         encode(file, prefix, null, out, false);
-    }    
+    }
 
     /**
      * Does a human-friendly dump of this instance.
diff --git a/dx/src/com/android/dx/dex/file/DexFile.java b/dx/src/com/android/dx/dex/file/DexFile.java
index a829fed..1cc9358 100644
--- a/dx/src/com/android/dx/dex/file/DexFile.java
+++ b/dx/src/com/android/dx/dex/file/DexFile.java
@@ -45,7 +45,7 @@
     /** {@code non-null;} word data section */
     private final MixedItemSection wordData;
 
-    /** 
+    /**
      * {@code non-null;} type lists section. This is word data, but separating
      * it from {@link #wordData} helps break what would otherwise be a
      * circular dependency between the that and {@link #protoIds}.
@@ -120,15 +120,15 @@
         classDefs = new ClassDefsSection(this);
         map = new MixedItemSection("map", this, 4, SortType.NONE);
 
-        /* 
+        /*
          * This is the list of sections in the order they appear in
          * the final output.
          */
         sections = new Section[] {
             header, stringIds, typeIds, protoIds, fieldIds, methodIds,
-            classDefs, wordData, typeLists, stringData, byteData, 
+            classDefs, wordData, typeLists, stringData, byteData,
             classData, map };
-        
+
         fileSize = -1;
         dumpWidth = 79;
     }
@@ -136,7 +136,7 @@
     /**
      * Adds a class to this instance. It is illegal to attempt to add more
      * than one class with the same name.
-     * 
+     *
      * @param clazz {@code non-null;} the class to add
      */
     public void add(ClassDefItem clazz) {
@@ -145,7 +145,7 @@
 
     /**
      * Gets the class definition with the given name, if any.
-     * 
+     *
      * @param name {@code non-null;} the class name to look for
      * @return {@code null-ok;} the class with the given name, or {@code null}
      * if there is no such class
@@ -163,7 +163,7 @@
     /**
      * Writes the contents of this instance as either a binary or a
      * human-readable form, or both.
-     * 
+     *
      * @param out {@code null-ok;} where to write to
      * @param humanOut {@code null-ok;} where to write human-oriented output to
      * @param verbose whether to be verbose when writing human-oriented output
@@ -185,12 +185,12 @@
     /**
      * Returns the contents of this instance as a {@code .dex} file,
      * in {@code byte[]} form.
-     * 
+     *
      * @param humanOut {@code null-ok;} where to write human-oriented output to
      * @param verbose whether to be verbose when writing human-oriented output
      * @return {@code non-null;} a {@code .dex} file for this instance
      */
-    public byte[] toDex(Writer humanOut, boolean verbose) 
+    public byte[] toDex(Writer humanOut, boolean verbose)
         throws IOException {
         boolean annotate = (humanOut != null);
         ByteArrayAnnotatedOutput result = toDex0(annotate, verbose);
@@ -204,7 +204,7 @@
 
     /**
      * Sets the maximum width of the human-oriented dump of the instance.
-     * 
+     *
      * @param dumpWidth {@code >= 40;} the width
      */
     public void setDumpWidth(int dumpWidth) {
@@ -217,10 +217,10 @@
 
     /**
      * Gets the total file size, if known.
-     * 
+     *
      * <p>This is package-scope in order to allow
      * the {@link HeaderSection} to set itself up properly.</p>
-     * 
+     *
      * @return {@code >= 0;} the total file size
      * @throws RuntimeException thrown if the file size is not yet known
      */
@@ -234,11 +234,11 @@
 
     /**
      * Gets the string data section.
-     * 
+     *
      * <p>This is package-scope in order to allow
      * the various {@link Item} instances to add items to the
      * instance.</p>
-     * 
+     *
      * @return {@code non-null;} the string data section
      */
     /*package*/ MixedItemSection getStringData() {
@@ -247,11 +247,11 @@
 
     /**
      * Gets the word data section.
-     * 
+     *
      * <p>This is package-scope in order to allow
      * the various {@link Item} instances to add items to the
      * instance.</p>
-     * 
+     *
      * @return {@code non-null;} the word data section
      */
     /*package*/ MixedItemSection getWordData() {
@@ -260,11 +260,11 @@
 
     /**
      * Gets the type lists section.
-     * 
+     *
      * <p>This is package-scope in order to allow
      * the various {@link Item} instances to add items to the
      * instance.</p>
-     * 
+     *
      * @return {@code non-null;} the word data section
      */
     /*package*/ MixedItemSection getTypeLists() {
@@ -273,10 +273,10 @@
 
     /**
      * Gets the map section.
-     * 
+     *
      * <p>This is package-scope in order to allow the header section
      * to query it.</p>
-     * 
+     *
      * @return {@code non-null;} the map section
      */
     /*package*/ MixedItemSection getMap() {
@@ -285,11 +285,11 @@
 
     /**
      * Gets the string identifiers section.
-     * 
+     *
      * <p>This is package-scope in order to allow
      * the various {@link Item} instances to add items to the
      * instance.</p>
-     * 
+     *
      * @return {@code non-null;} the string identifiers section
      */
     /*package*/ StringIdsSection getStringIds() {
@@ -298,11 +298,11 @@
 
     /**
      * Gets the class definitions section.
-     * 
+     *
      * <p>This is package-scope in order to allow
      * the various {@link Item} instances to add items to the
      * instance.</p>
-     * 
+     *
      * @return {@code non-null;} the class definitions section
      */
     /*package*/ ClassDefsSection getClassDefs() {
@@ -311,11 +311,11 @@
 
     /**
      * Gets the class data section.
-     * 
+     *
      * <p>This is package-scope in order to allow
      * the various {@link Item} instances to add items to the
      * instance.</p>
-     * 
+     *
      * @return {@code non-null;} the class data section
      */
     /*package*/ MixedItemSection getClassData() {
@@ -324,11 +324,11 @@
 
     /**
      * Gets the type identifiers section.
-     * 
+     *
      * <p>This is package-scope in order to allow
      * the various {@link Item} instances to add items to the
      * instance.</p>
-     * 
+     *
      * @return {@code non-null;} the class identifiers section
      */
     /*package*/ TypeIdsSection getTypeIds() {
@@ -337,11 +337,11 @@
 
     /**
      * Gets the prototype identifiers section.
-     * 
+     *
      * <p>This is package-scope in order to allow
      * the various {@link Item} instances to add items to the
      * instance.</p>
-     * 
+     *
      * @return {@code non-null;} the prototype identifiers section
      */
     /*package*/ ProtoIdsSection getProtoIds() {
@@ -350,11 +350,11 @@
 
     /**
      * Gets the field identifiers section.
-     * 
+     *
      * <p>This is package-scope in order to allow
      * the various {@link Item} instances to add items to the
      * instance.</p>
-     * 
+     *
      * @return {@code non-null;} the field identifiers section
      */
     /*package*/ FieldIdsSection getFieldIds() {
@@ -363,11 +363,11 @@
 
     /**
      * Gets the method identifiers section.
-     * 
+     *
      * <p>This is package-scope in order to allow
      * the various {@link Item} instances to add items to the
      * instance.</p>
-     * 
+     *
      * @return {@code non-null;} the method identifiers section
      */
     /*package*/ MethodIdsSection getMethodIds() {
@@ -390,10 +390,10 @@
     /**
      * Gets the first section of the file that is to be considered
      * part of the data section.
-     * 
+     *
      * <p>This is package-scope in order to allow the header section
      * to query it.</p>
-     * 
+     *
      * @return {@code non-null;} the section
      */
     /*package*/ Section getFirstDataSection() {
@@ -403,21 +403,21 @@
     /**
      * Gets the last section of the file that is to be considered
      * part of the data section.
-     * 
+     *
      * <p>This is package-scope in order to allow the header section
      * to query it.</p>
-     * 
+     *
      * @return {@code non-null;} the section
      */
     /*package*/ Section getLastDataSection() {
         return map;
     }
-    
+
     /**
      * Interns the given constant in the appropriate section of this
      * instance, or do nothing if the given constant isn't the sort
      * that should be interned.
-     * 
+     *
      * @param cst {@code non-null;} constant to possibly intern
      */
     /*package*/ void internIfAppropriate(Constant cst) {
@@ -444,7 +444,7 @@
      * {@code null} if it isn't such a constant. This will throw
      * an exception if the given constant <i>should</i> have been found
      * but wasn't.
-     * 
+     *
      * @param cst {@code non-null;} the constant to look up
      * @return {@code null-ok;} its corresponding item, if it has a corresponding
      * item, or {@code null} if it's not that sort of constant
@@ -468,7 +468,7 @@
     /**
      * Returns the contents of this instance as a {@code .dex} file,
      * in a {@link ByteArrayAnnotatedOutput} instance.
-     * 
+     *
      * @param annotate whether or not to keep annotations
      * @param verbose if annotating, whether to be verbose
      * @return {@code non-null;} a {@code .dex} file for this instance
@@ -524,7 +524,7 @@
                      */
                     ((MixedItemSection) one).placeItems();
                 }
-            
+
                 offset = placedAt + one.writeSize();
             } catch (RuntimeException ex) {
                 throw ExceptionWithContext.withContext(ex,
@@ -569,7 +569,7 @@
         }
 
         // Perform final bookkeeping.
-        
+
         calcSignature(barr);
         calcChecksum(barr);
 
@@ -585,7 +585,7 @@
 
     /**
      * Generates and returns statistics for all the items in the file.
-     * 
+     *
      * @return {@code non-null;} the statistics
      */
     public Statistics getStatistics() {
@@ -601,7 +601,7 @@
     /**
      * Calculates the signature for the {@code .dex} file in the
      * given array, and modify the array to contain it.
-     * 
+     *
      * @param bytes {@code non-null;} the bytes of the file
      */
     private static void calcSignature(byte[] bytes) {
@@ -629,7 +629,7 @@
     /**
      * Calculates the checksum for the {@code .dex} file in the
      * given array, and modify the array to contain it.
-     * 
+     *
      * @param bytes {@code non-null;} the bytes of the file
      */
     private static void calcChecksum(byte[] bytes) {
diff --git a/dx/src/com/android/dx/dex/file/EncodedArrayItem.java b/dx/src/com/android/dx/dex/file/EncodedArrayItem.java
index c55c6f5..4d904e7 100644
--- a/dx/src/com/android/dx/dex/file/EncodedArrayItem.java
+++ b/dx/src/com/android/dx/dex/file/EncodedArrayItem.java
@@ -47,7 +47,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param array {@code non-null;} array to represent
      */
     public EncodedArrayItem(CstArray array) {
diff --git a/dx/src/com/android/dx/dex/file/EncodedField.java b/dx/src/com/android/dx/dex/file/EncodedField.java
index 146a604..f2a8184 100644
--- a/dx/src/com/android/dx/dex/file/EncodedField.java
+++ b/dx/src/com/android/dx/dex/file/EncodedField.java
@@ -35,7 +35,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param field {@code non-null;} constant for the field
      * @param accessFlags access flags
      */
@@ -70,7 +70,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * <p><b>Note:</b> This compares the method constants only,
      * ignoring any associated code, because it should never be the
      * case that two different items with the same method constant
@@ -121,7 +121,7 @@
 
     /**
      * Gets the constant for the field.
-     * 
+     *
      * @return {@code non-null;} the constant
      */
     public CstFieldRef getRef() {
@@ -130,7 +130,7 @@
 
     /** {@inheritDoc} */
     @Override
-    public int encode(DexFile file, AnnotatedOutput out, 
+    public int encode(DexFile file, AnnotatedOutput out,
             int lastIndex, int dumpSeq) {
         int fieldIdx = file.getFieldIds().indexOf(field);
         int diff = fieldIdx - lastIndex;
diff --git a/dx/src/com/android/dx/dex/file/EncodedMember.java b/dx/src/com/android/dx/dex/file/EncodedMember.java
index 68119f3..5099325 100644
--- a/dx/src/com/android/dx/dex/file/EncodedMember.java
+++ b/dx/src/com/android/dx/dex/file/EncodedMember.java
@@ -65,14 +65,14 @@
 
     /**
      * Populates a {@link DexFile} with items from within this instance.
-     * 
+     *
      * @param file {@code non-null;} the file to populate
      */
     public abstract void addContents(DexFile file);
 
     /**
      * Encodes this instance to the given output.
-     * 
+     *
      * @param file {@code non-null;} file this instance is part of
      * @param out {@code non-null;} where to write to
      * @param lastIndex {@code >= 0;} the previous member index value encoded, or
@@ -81,6 +81,6 @@
      * annotation purposes
      * @return {@code >= 0;} the member index value that was encoded
      */
-    public abstract int encode(DexFile file, AnnotatedOutput out, 
+    public abstract int encode(DexFile file, AnnotatedOutput out,
             int lastIndex, int dumpSeq);
 }
diff --git a/dx/src/com/android/dx/dex/file/EncodedMethod.java b/dx/src/com/android/dx/dex/file/EncodedMethod.java
index dff1a07..1b0770f 100644
--- a/dx/src/com/android/dx/dex/file/EncodedMethod.java
+++ b/dx/src/com/android/dx/dex/file/EncodedMethod.java
@@ -30,20 +30,20 @@
 /**
  * Class that representats a method of a class.
  */
-public final class EncodedMethod extends EncodedMember 
+public final class EncodedMethod extends EncodedMember
         implements Comparable<EncodedMethod> {
     /** {@code non-null;} constant for the method */
     private final CstMethodRef method;
 
     /**
      * {@code null-ok;} code for the method, if the method is neither
-     * {@code abstract} nor {@code native} 
+     * {@code abstract} nor {@code native}
      */
     private final CodeItem code;
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param method {@code non-null;} constant for the method
      * @param accessFlags access flags
      * @param code {@code null-ok;} code for the method, if it is neither
@@ -80,7 +80,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * <p><b>Note:</b> This compares the method constants only,
      * ignoring any associated code, because it should never be the
      * case that two different items with the same method constant
@@ -147,7 +147,7 @@
 
     /**
      * Gets the constant for the method.
-     * 
+     *
      * @return {@code non-null;} the constant
      */
     public final CstMethodRef getRef() {
@@ -156,14 +156,14 @@
 
     /** {@inheritDoc} */
     @Override
-    public int encode(DexFile file, AnnotatedOutput out, 
+    public int encode(DexFile file, AnnotatedOutput out,
             int lastIndex, int dumpSeq) {
         int methodIdx = file.getMethodIds().indexOf(method);
         int diff = methodIdx - lastIndex;
         int accessFlags = getAccessFlags();
         int codeOff = OffsettedItem.getAbsoluteOffsetOr0(code);
         boolean hasCode = (codeOff != 0);
-        boolean shouldHaveCode = (accessFlags & 
+        boolean shouldHaveCode = (accessFlags &
                 (AccessFlags.ACC_ABSTRACT | AccessFlags.ACC_NATIVE)) == 0;
 
         /*
diff --git a/dx/src/com/android/dx/dex/file/FieldAnnotationStruct.java b/dx/src/com/android/dx/dex/file/FieldAnnotationStruct.java
index 6a76ca9..f363d41 100644
--- a/dx/src/com/android/dx/dex/file/FieldAnnotationStruct.java
+++ b/dx/src/com/android/dx/dex/file/FieldAnnotationStruct.java
@@ -35,7 +35,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param field {@code non-null;} the field in question
      * @param annotations {@code non-null;} the associated annotations
      */
@@ -57,13 +57,13 @@
     public int hashCode() {
         return field.hashCode();
     }
-    
+
     /** {@inheritDoc} */
     public boolean equals(Object other) {
         if (! (other instanceof FieldAnnotationStruct)) {
             return false;
         }
-        
+
         return field.equals(((FieldAnnotationStruct) other).field);
     }
 
@@ -104,7 +104,7 @@
 
     /**
      * Gets the field this item is for.
-     * 
+     *
      * @return {@code non-null;} the field
      */
     public CstFieldRef getField() {
@@ -113,7 +113,7 @@
 
     /**
      * Gets the associated annotations.
-     * 
+     *
      * @return {@code non-null;} the annotations
      */
     public Annotations getAnnotations() {
diff --git a/dx/src/com/android/dx/dex/file/FieldIdItem.java b/dx/src/com/android/dx/dex/file/FieldIdItem.java
index d6d01d5..ecb1d3d 100644
--- a/dx/src/com/android/dx/dex/file/FieldIdItem.java
+++ b/dx/src/com/android/dx/dex/file/FieldIdItem.java
@@ -24,7 +24,7 @@
 public final class FieldIdItem extends MemberIdItem {
     /**
      * Constructs an instance.
-     * 
+     *
      * @param field {@code non-null;} the constant for the field
      */
     public FieldIdItem(CstFieldRef field) {
@@ -48,7 +48,7 @@
 
     /**
      * Gets the field constant.
-     * 
+     *
      * @return {@code non-null;} the constant
      */
     public CstFieldRef getFieldRef() {
@@ -61,10 +61,10 @@
         TypeIdsSection typeIds = file.getTypeIds();
         return typeIds.indexOf(getFieldRef().getType());
     }
-        
+
     /** {@inheritDoc} */
     @Override
     protected String getTypoidName() {
         return "type_idx";
-    }    
+    }
 }
diff --git a/dx/src/com/android/dx/dex/file/FieldIdsSection.java b/dx/src/com/android/dx/dex/file/FieldIdsSection.java
index 59ef229..c320731 100644
--- a/dx/src/com/android/dx/dex/file/FieldIdsSection.java
+++ b/dx/src/com/android/dx/dex/file/FieldIdsSection.java
@@ -30,13 +30,13 @@
 public final class FieldIdsSection extends MemberIdsSection {
     /**
      * {@code non-null;} map from field constants to {@link
-     * FieldIdItem} instances 
+     * FieldIdItem} instances
      */
     private final TreeMap<CstFieldRef, FieldIdItem> fieldIds;
 
     /**
      * Constructs an instance. The file offset is initially unknown.
-     * 
+     *
      * @param file {@code non-null;} file that this instance is part of
      */
     public FieldIdsSection(DexFile file) {
@@ -71,7 +71,7 @@
 
     /**
      * Writes the portion of the file header that refers to this instance.
-     * 
+     *
      * @param out {@code non-null;} where to write
      */
     public void writeHeaderPart(AnnotatedOutput out) {
@@ -91,7 +91,7 @@
 
     /**
      * Interns an element into this instance.
-     * 
+     *
      * @param field {@code non-null;} the reference to intern
      * @return {@code non-null;} the interned reference
      */
@@ -115,7 +115,7 @@
     /**
      * Gets the index of the given reference, which must have been added
      * to this instance.
-     * 
+     *
      * @param ref {@code non-null;} the reference to look up
      * @return {@code >= 0;} the reference's index
      */
diff --git a/dx/src/com/android/dx/dex/file/HeaderItem.java b/dx/src/com/android/dx/dex/file/HeaderItem.java
index 6593859..f95ff44 100644
--- a/dx/src/com/android/dx/dex/file/HeaderItem.java
+++ b/dx/src/com/android/dx/dex/file/HeaderItem.java
@@ -48,7 +48,7 @@
     public ItemType itemType() {
         return ItemType.TYPE_HEADER_ITEM;
     }
-    
+
     /** {@inheritDoc} */
     @Override
     public int writeSize() {
@@ -70,7 +70,7 @@
         int dataOff = firstDataSection.getFileOffset();
         int dataSize = lastDataSection.getFileOffset() +
             lastDataSection.writeSize() - dataOff;
-        
+
         if (out.annotates()) {
             out.annotate(8, "magic: " + new CstUtf8(MAGIC).toQuoted());
             out.annotate(4, "checksum");
@@ -103,7 +103,7 @@
         out.writeZeroes(8);
 
         out.writeInt(mapOff);
-        
+
         // Write out each section's respective header part.
         file.getStringIds().writeHeaderPart(out);
         file.getTypeIds().writeHeaderPart(out);
diff --git a/dx/src/com/android/dx/dex/file/HeaderSection.java b/dx/src/com/android/dx/dex/file/HeaderSection.java
index 5bc6278..21da488 100644
--- a/dx/src/com/android/dx/dex/file/HeaderSection.java
+++ b/dx/src/com/android/dx/dex/file/HeaderSection.java
@@ -28,10 +28,10 @@
 public final class HeaderSection extends UniformItemSection {
     /** {@code non-null;} the list of the one item in the section */
     private final List<HeaderItem> list;
-    
+
     /**
      * Constructs an instance. The file offset is initially unknown.
-     * 
+     *
      * @param file {@code non-null;} file that this instance is part of
      */
     public HeaderSection(DexFile file) {
diff --git a/dx/src/com/android/dx/dex/file/IdItem.java b/dx/src/com/android/dx/dex/file/IdItem.java
index 5d7c9e3..1bd2b5f 100644
--- a/dx/src/com/android/dx/dex/file/IdItem.java
+++ b/dx/src/com/android/dx/dex/file/IdItem.java
@@ -24,13 +24,13 @@
 public abstract class IdItem extends IndexedItem {
     /**
      * {@code non-null;} the type constant for the defining class of
-     * the reference 
+     * the reference
      */
     private final CstType type;
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param type {@code non-null;} the type constant for the defining
      * class of the reference
      */
@@ -52,7 +52,7 @@
     /**
      * Gets the type constant for the defining class of the
      * reference.
-     * 
+     *
      * @return {@code non-null;} the type constant
      */
     public final CstType getDefiningClass() {
diff --git a/dx/src/com/android/dx/dex/file/IndexedItem.java b/dx/src/com/android/dx/dex/file/IndexedItem.java
index 32d69ea..9ba4783 100644
--- a/dx/src/com/android/dx/dex/file/IndexedItem.java
+++ b/dx/src/com/android/dx/dex/file/IndexedItem.java
@@ -33,7 +33,7 @@
 
     /**
      * Gets whether or not this instance has been assigned an index.
-     * 
+     *
      * @return {@code true} iff this instance has been assigned an index
      */
     public final boolean hasIndex() {
@@ -72,7 +72,7 @@
     /**
      * Gets the index of this item as a string, suitable for including in
      * annotations.
-     * 
+     *
      * @return {@code non-null;} the index string
      */
     public final String indexString() {
diff --git a/dx/src/com/android/dx/dex/file/Item.java b/dx/src/com/android/dx/dex/file/Item.java
index 057f218..cf2b380 100644
--- a/dx/src/com/android/dx/dex/file/Item.java
+++ b/dx/src/com/android/dx/dex/file/Item.java
@@ -32,15 +32,15 @@
 
     /**
      * Returns the item type for this instance.
-     * 
+     *
      * @return {@code non-null;} the item type
      */
     public abstract ItemType itemType();
-    
+
     /**
      * Returns the human name for the particular type of item this
      * instance is.
-     * 
+     *
      * @return {@code non-null;} the name
      */
     public final String typeName() {
@@ -49,7 +49,7 @@
 
     /**
      * Gets the size of this instance when written, in bytes.
-     * 
+     *
      * @return {@code >= 0;} the write size
      */
     public abstract int writeSize();
@@ -58,10 +58,10 @@
      * Populates a {@link DexFile} with items from within this instance.
      * This will <i>not</i> add an item to the file for this instance itself
      * (which should have been done by whatever refers to this instance).
-     * 
+     *
      * <p><b>Note:</b> Subclasses must override this to do something
      * appropriate.</p>
-     * 
+     *
      * @param file {@code non-null;} the file to populate
      */
     public abstract void addContents(DexFile file);
@@ -72,7 +72,7 @@
      * If this instance keeps track of its offset, then this method will
      * note the written offset and will also throw an exception if this
      * instance has already been written.
-     * 
+     *
      * @param file {@code non-null;} the file to use for reference
      * @param out {@code non-null;} where to write to
      */
diff --git a/dx/src/com/android/dx/dex/file/ItemType.java b/dx/src/com/android/dx/dex/file/ItemType.java
index 83843b7..2fe97ab 100644
--- a/dx/src/com/android/dx/dex/file/ItemType.java
+++ b/dx/src/com/android/dx/dex/file/ItemType.java
@@ -44,7 +44,7 @@
     TYPE_TYPE_ITEM(                 -1,     "type_item"),
     TYPE_EXCEPTION_HANDLER_ITEM(    -1,     "exception_handler_item"),
     TYPE_ANNOTATION_SET_REF_ITEM(   -1,     "annotation_set_ref_item");
-    
+
     /** value when represented in a {@link MapItem} */
     private final int mapValue;
 
@@ -53,10 +53,10 @@
 
     /** {@code non-null;} the short human name */
     private final String humanName;
-   
+
     /**
      * Constructs an instance.
-     * 
+     *
      * @param mapValue value when represented in a {@link MapItem}
      * @param typeName {@code non-null;} name of the type
      */
@@ -74,16 +74,16 @@
 
     /**
      * Gets the map value.
-     * 
+     *
      * @return the map value
      */
     public int getMapValue() {
         return mapValue;
     }
-    
+
     /**
      * Gets the type name.
-     * 
+     *
      * @return {@code non-null;} the type name
      */
     public String getTypeName() {
diff --git a/dx/src/com/android/dx/dex/file/MapItem.java b/dx/src/com/android/dx/dex/file/MapItem.java
index c728dd7..d78dc91 100644
--- a/dx/src/com/android/dx/dex/file/MapItem.java
+++ b/dx/src/com/android/dx/dex/file/MapItem.java
@@ -74,7 +74,7 @@
             throw new IllegalArgumentException(
                     "mapSection.items().size() != 0");
         }
-        
+
         ArrayList<MapItem> items = new ArrayList<MapItem>(50);
 
         for (Section section : sections) {
@@ -111,10 +111,10 @@
         mapSection.add(
                 new UniformListItem<MapItem>(ItemType.TYPE_MAP_LIST, items));
     }
-   
+
     /**
      * Constructs an instance.
-     * 
+     *
      * @param type {@code non-null;} item type this instance covers
      * @param section {@code non-null;} section this instance covers
      * @param firstItem {@code non-null;} first item covered
@@ -155,7 +155,7 @@
     /**
      * Constructs a self-referential instance. This instance is meant to
      * represent the section containing the {@code map_list}.
-     * 
+     *
      * @param section {@code non-null;} section this instance covers
      */
     private MapItem(Section section) {
@@ -231,5 +231,5 @@
         out.writeShort(0); // unused
         out.writeInt(itemCount);
         out.writeInt(offset);
-    }    
+    }
 }
diff --git a/dx/src/com/android/dx/dex/file/MemberIdItem.java b/dx/src/com/android/dx/dex/file/MemberIdItem.java
index 574d413..d3a61d4 100644
--- a/dx/src/com/android/dx/dex/file/MemberIdItem.java
+++ b/dx/src/com/android/dx/dex/file/MemberIdItem.java
@@ -34,7 +34,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param cst {@code non-null;} the constant for the member
      */
     public MemberIdItem(CstMemberRef cst) {
@@ -74,7 +74,7 @@
             out.annotate(2, String.format("  %-10s %s", getTypoidName() + ':',
                             Hex.u2(typoidIdx)));
             out.annotate(4, "  name_idx:  " + Hex.u4(nameIdx));
-        }            
+        }
 
         out.writeShort(classIdx);
         out.writeShort(typoidIdx);
@@ -85,24 +85,24 @@
      * Returns the index of the type-like thing associated with
      * this item, in order that it may be written out. Subclasses must
      * override this to get whatever it is they need to store.
-     * 
+     *
      * @param file {@code non-null;} the file being written
      * @return the index in question
      */
     protected abstract int getTypoidIdx(DexFile file);
-        
+
     /**
      * Returns the field name of the type-like thing associated with
      * this item, for listing-generating purposes. Subclasses must override
      * this.
-     * 
+     *
      * @return {@code non-null;} the name in question
      */
     protected abstract String getTypoidName();
 
     /**
      * Gets the member constant.
-     * 
+     *
      * @return {@code non-null;} the constant
      */
     public final CstMemberRef getRef() {
diff --git a/dx/src/com/android/dx/dex/file/MemberIdsSection.java b/dx/src/com/android/dx/dex/file/MemberIdsSection.java
index 20b1605..ef0d8cd 100644
--- a/dx/src/com/android/dx/dex/file/MemberIdsSection.java
+++ b/dx/src/com/android/dx/dex/file/MemberIdsSection.java
@@ -22,7 +22,7 @@
 public abstract class MemberIdsSection extends UniformItemSection {
     /**
      * Constructs an instance. The file offset is initially unknown.
-     * 
+     *
      * @param name {@code null-ok;} the name of this instance, for annotation
      * purposes
      * @param file {@code non-null;} file that this instance is part of
diff --git a/dx/src/com/android/dx/dex/file/MethodAnnotationStruct.java b/dx/src/com/android/dx/dex/file/MethodAnnotationStruct.java
index 3c254a1..38f7ce4 100644
--- a/dx/src/com/android/dx/dex/file/MethodAnnotationStruct.java
+++ b/dx/src/com/android/dx/dex/file/MethodAnnotationStruct.java
@@ -35,7 +35,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param method {@code non-null;} the method in question
      * @param annotations {@code non-null;} the associated annotations
      */
@@ -57,13 +57,13 @@
     public int hashCode() {
         return method.hashCode();
     }
-    
+
     /** {@inheritDoc} */
     public boolean equals(Object other) {
         if (! (other instanceof MethodAnnotationStruct)) {
             return false;
         }
-        
+
         return method.equals(((MethodAnnotationStruct) other).method);
     }
 
@@ -104,7 +104,7 @@
 
     /**
      * Gets the method this item is for.
-     * 
+     *
      * @return {@code non-null;} the method
      */
     public CstMethodRef getMethod() {
@@ -113,7 +113,7 @@
 
     /**
      * Gets the associated annotations.
-     * 
+     *
      * @return {@code non-null;} the annotations
      */
     public Annotations getAnnotations() {
diff --git a/dx/src/com/android/dx/dex/file/MethodIdItem.java b/dx/src/com/android/dx/dex/file/MethodIdItem.java
index bbd6c93..f2ff4f9 100644
--- a/dx/src/com/android/dx/dex/file/MethodIdItem.java
+++ b/dx/src/com/android/dx/dex/file/MethodIdItem.java
@@ -24,7 +24,7 @@
 public final class MethodIdItem extends MemberIdItem {
     /**
      * Constructs an instance.
-     * 
+     *
      * @param method {@code non-null;} the constant for the method
      */
     public MethodIdItem(CstBaseMethodRef method) {
@@ -48,7 +48,7 @@
 
     /**
      * Gets the method constant.
-     * 
+     *
      * @return {@code non-null;} the constant
      */
     public CstBaseMethodRef getMethodRef() {
@@ -61,10 +61,10 @@
         ProtoIdsSection protoIds = file.getProtoIds();
         return protoIds.indexOf(getMethodRef().getPrototype());
     }
-        
+
     /** {@inheritDoc} */
     @Override
     protected String getTypoidName() {
         return "proto_idx";
-    }    
+    }
 }
diff --git a/dx/src/com/android/dx/dex/file/MethodIdsSection.java b/dx/src/com/android/dx/dex/file/MethodIdsSection.java
index f3e7dee..fa0cd3c 100644
--- a/dx/src/com/android/dx/dex/file/MethodIdsSection.java
+++ b/dx/src/com/android/dx/dex/file/MethodIdsSection.java
@@ -30,13 +30,13 @@
 public final class MethodIdsSection extends MemberIdsSection {
     /**
      * {@code non-null;} map from method constants to {@link
-     * MethodIdItem} instances 
+     * MethodIdItem} instances
      */
     private final TreeMap<CstBaseMethodRef, MethodIdItem> methodIds;
 
     /**
      * Constructs an instance. The file offset is initially unknown.
-     * 
+     *
      * @param file {@code non-null;} file that this instance is part of
      */
     public MethodIdsSection(DexFile file) {
@@ -71,7 +71,7 @@
 
     /**
      * Writes the portion of the file header that refers to this instance.
-     * 
+     *
      * @param out {@code non-null;} where to write
      */
     public void writeHeaderPart(AnnotatedOutput out) {
@@ -91,7 +91,7 @@
 
     /**
      * Interns an element into this instance.
-     * 
+     *
      * @param method {@code non-null;} the reference to intern
      * @return {@code non-null;} the interned reference
      */
@@ -115,7 +115,7 @@
     /**
      * Gets the index of the given reference, which must have been added
      * to this instance.
-     * 
+     *
      * @param ref {@code non-null;} the reference to look up
      * @return {@code >= 0;} the reference's index
      */
diff --git a/dx/src/com/android/dx/dex/file/MixedItemSection.java b/dx/src/com/android/dx/dex/file/MixedItemSection.java
index 0929fe7..b885306 100644
--- a/dx/src/com/android/dx/dex/file/MixedItemSection.java
+++ b/dx/src/com/android/dx/dex/file/MixedItemSection.java
@@ -34,7 +34,7 @@
  * A section of a {@code .dex} file which consists of a sequence of
  * {@link OffsettedItem} objects, which may each be of a different concrete
  * class and/or size.
- * 
+ *
  * <b>Note:</b> It is invalid for an item in an instance of this class to
  * have a larger alignment requirement than the alignment of this instance.
  */
@@ -59,7 +59,7 @@
             return type1.compareTo(type2);
         }
     };
-    
+
     /** {@code non-null;} the items in this part */
     private final ArrayList<OffsettedItem> items;
 
@@ -77,7 +77,7 @@
 
     /**
      * Constructs an instance. The file offset is initially unknown.
-     * 
+     *
      * @param name {@code null-ok;} the name of this instance, for annotation
      * purposes
      * @param file {@code non-null;} file that this instance is part of
@@ -117,7 +117,7 @@
 
     /**
      * Gets the size of this instance, in items.
-     * 
+     *
      * @return {@code >= 0;} the size
      */
     public int size() {
@@ -133,7 +133,7 @@
         throwIfNotPrepared();
 
         if (writeSize == -1) {
-            throw new RuntimeException("write size not yet set");            
+            throw new RuntimeException("write size not yet set");
         }
 
         int sz = writeSize;
@@ -163,7 +163,7 @@
      * that it has been added to this instance. It is invalid to add the
      * same item to more than one instance, nor to add the same items
      * multiple times to a single instance.
-     * 
+     *
      * @param item {@code non-null;} the item to add
      */
     public void add(OffsettedItem item) {
@@ -186,7 +186,7 @@
      * Interns an item in this instance, returning the interned instance
      * (which may not be the one passed in). This will add the item if no
      * equal item has been added.
-     * 
+     *
      * @param item {@code non-null;} the item to intern
      * @return {@code non-null;} the equivalent interned instance
      */
@@ -194,7 +194,7 @@
         throwIfPrepared();
 
         OffsettedItem result = interns.get(item);
-        
+
         if (result != null) {
             return (T) result;
         }
@@ -206,7 +206,7 @@
 
     /**
      * Gets an item which was previously interned.
-     * 
+     *
      * @param item {@code non-null;} the item to look for
      * @return {@code non-null;} the equivalent already-interned instance
      */
@@ -214,7 +214,7 @@
         throwIfNotPrepared();
 
         OffsettedItem result = interns.get(item);
-        
+
         if (result != null) {
             return (T) result;
         }
@@ -226,7 +226,7 @@
      * Writes an index of contents of the items in this instance of the
      * given type. If there are none, this writes nothing. If there are any,
      * then the index is preceded by the given intro string.
-     * 
+     *
      * @param out {@code non-null;} where to write to
      * @param itemType {@code non-null;} the item type of interest
      * @param intro {@code non-null;} the introductory string for non-empty indices
@@ -250,7 +250,7 @@
         }
 
         out.annotate(0, intro);
-        
+
         for (Map.Entry<String, OffsettedItem> entry : index.entrySet()) {
             String label = entry.getKey();
             OffsettedItem item = entry.getValue();
diff --git a/dx/src/com/android/dx/dex/file/OffsettedItem.java b/dx/src/com/android/dx/dex/file/OffsettedItem.java
index c8e2d74..7721470 100644
--- a/dx/src/com/android/dx/dex/file/OffsettedItem.java
+++ b/dx/src/com/android/dx/dex/file/OffsettedItem.java
@@ -33,20 +33,20 @@
 
     /**
      * {@code null-ok;} section the item was added to, or {@code null} if
-     * not yet added 
+     * not yet added
      */
     private Section addedTo;
 
     /**
      * {@code >= -1;} assigned offset of the item from the start of its section,
-     * or {@code -1} if not yet assigned 
+     * or {@code -1} if not yet assigned
      */
     private int offset;
 
     /**
      * Gets the absolute offset of the given item, returning {@code 0}
      * if handed {@code null}.
-     * 
+     *
      * @param item {@code null-ok;} the item in question
      * @return {@code >= 0;} the item's absolute offset, or {@code 0}
      * if {@code item == null}
@@ -61,7 +61,7 @@
 
     /**
      * Constructs an instance. The offset is initially unassigned.
-     * 
+     *
      * @param alignment {@code > 0;} output alignment requirement; must be a
      * power of 2
      * @param writeSize {@code >= -1;} the size of this instance when written,
@@ -82,7 +82,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * Comparisons for this class are defined to be type-major (if the
      * types don't match then the objects are not equal), with
      * {@link #compareTo0} deciding same-type comparisons.
@@ -106,7 +106,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * Comparisons for this class are defined to be class-major (if the
      * classes don't match then the objects are not equal), with
      * {@link #compareTo0} deciding same-class comparisons.
@@ -130,7 +130,7 @@
      * Sets the write size of this item. This may only be called once
      * per instance, and only if the size was unknown upon instance
      * creation.
-     * 
+     *
      * @param writeSize {@code > 0;} the write size, in bytes
      */
     public final void setWriteSize(int writeSize) {
@@ -144,9 +144,9 @@
 
         this.writeSize = writeSize;
     }
-    
-    /** {@inheritDoc} 
-     * 
+
+    /** {@inheritDoc}
+     *
      * @throws UnsupportedOperationException thrown if the write size
      * is not yet known
      */
@@ -155,7 +155,7 @@
         if (writeSize < 0) {
             throw new UnsupportedOperationException("writeSize is unknown");
         }
-                
+
         return writeSize;
     }
 
@@ -181,7 +181,7 @@
     /**
      * Gets the relative item offset. The offset is from the start of
      * the section which the instance was written to.
-     * 
+     *
      * @return {@code >= 0;} the offset
      * @throws RuntimeException thrown if the offset is not yet known
      */
@@ -196,7 +196,7 @@
     /**
      * Gets the absolute item offset. The offset is from the start of
      * the file which the instance was written to.
-     * 
+     *
      * @return {@code >= 0;} the offset
      * @throws RuntimeException thrown if the offset is not yet known
      */
@@ -212,7 +212,7 @@
      * Indicates that this item has been added to the given section at
      * the given offset. It is only valid to call this method once per
      * instance.
-     * 
+     *
      * @param addedTo {@code non-null;} the section this instance has
      * been added to
      * @param offset {@code >= 0;} the desired offset from the start of the
@@ -247,7 +247,7 @@
     /**
      * Gets the alignment requirement of this instance. An instance should
      * only be written when so aligned.
-     * 
+     *
      * @return {@code > 0;} the alignment requirement; must be a power of 2
      */
     public final int getAlignment() {
@@ -257,7 +257,7 @@
     /**
      * Gets the absolute offset of this item as a string, suitable for
      * including in annotations.
-     * 
+     *
      * @return {@code non-null;} the offset string
      */
     public final String offsetString() {
@@ -266,7 +266,7 @@
 
     /**
      * Gets a short human-readable string representing this instance.
-     * 
+     *
      * @return {@code non-null;} the human form
      */
     public abstract String toHuman();
@@ -277,7 +277,7 @@
      * throw an exception (unsupported operation). If a particular
      * class needs to actually sort, then it should override this
      * method.
-     * 
+     *
      * @param other {@code non-null;} instance to compare to
      * @return {@code -1}, {@code 0}, or {@code 1}, depending
      * on the sort order of this instance and the other
@@ -293,7 +293,7 @@
      * override this method. In particular, if this instance did not
      * know its write size up-front, then this method is responsible
      * for setting it.
-     * 
+     *
      * @param addedTo {@code non-null;} the section this instance has been added to
      * @param offset {@code >= 0;} the offset from the start of the
      * section where this instance was placed
@@ -306,7 +306,7 @@
      * Performs the actual write of the contents of this instance to
      * the given data section. This is called by {@link #writeTo},
      * which will have taken care of ensuring alignment.
-     * 
+     *
      * @param file {@code non-null;} the file to use for reference
      * @param out {@code non-null;} where to write to
      */
diff --git a/dx/src/com/android/dx/dex/file/ParameterAnnotationStruct.java b/dx/src/com/android/dx/dex/file/ParameterAnnotationStruct.java
index 46d0450..078c219 100644
--- a/dx/src/com/android/dx/dex/file/ParameterAnnotationStruct.java
+++ b/dx/src/com/android/dx/dex/file/ParameterAnnotationStruct.java
@@ -41,7 +41,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param method {@code non-null;} the method in question
      * @param annotationsList {@code non-null;} the associated annotations list
      */
@@ -72,7 +72,7 @@
             AnnotationSetItem item = new AnnotationSetItem(annotations);
             arrayList.add(new AnnotationSetRefItem(item));
         }
-                
+
         this.annotationsItem = new UniformListItem<AnnotationSetRefItem>(
                 ItemType.TYPE_ANNOTATION_SET_REF_LIST, arrayList);
     }
@@ -81,13 +81,13 @@
     public int hashCode() {
         return method.hashCode();
     }
-    
+
     /** {@inheritDoc} */
     public boolean equals(Object other) {
         if (! (other instanceof ParameterAnnotationStruct)) {
             return false;
         }
-        
+
         return method.equals(((ParameterAnnotationStruct) other).method);
     }
 
@@ -143,7 +143,7 @@
 
     /**
      * Gets the method this item is for.
-     * 
+     *
      * @return {@code non-null;} the method
      */
     public CstMethodRef getMethod() {
@@ -152,7 +152,7 @@
 
     /**
      * Gets the associated annotations list.
-     * 
+     *
      * @return {@code non-null;} the annotations list
      */
     public AnnotationsList getAnnotationsList() {
diff --git a/dx/src/com/android/dx/dex/file/ProtoIdItem.java b/dx/src/com/android/dx/dex/file/ProtoIdItem.java
index afc227c..31cf8fb 100644
--- a/dx/src/com/android/dx/dex/file/ProtoIdItem.java
+++ b/dx/src/com/android/dx/dex/file/ProtoIdItem.java
@@ -45,7 +45,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param prototype {@code non-null;} the constant for the prototype
      */
     public ProtoIdItem(Prototype prototype) {
@@ -57,13 +57,13 @@
         this.shortForm = makeShortForm(prototype);
 
         StdTypeList parameters = prototype.getParameterTypes();
-        this.parameterTypes = (parameters.size() == 0) ? null 
+        this.parameterTypes = (parameters.size() == 0) ? null
             : new TypeListItem(parameters);
     }
 
     /**
      * Creates the short-form of the given prototype.
-     * 
+     *
      * @param prototype {@code non-null;} the prototype
      * @return {@code non-null;} the short form
      */
@@ -83,7 +83,7 @@
 
     /**
      * Gets the short-form character for the given type.
-     * 
+     *
      * @param type {@code non-null;} the type
      * @return the corresponding short-form character
      */
@@ -130,7 +130,7 @@
         int shortyIdx = file.getStringIds().indexOf(shortForm);
         int returnIdx = file.getTypeIds().indexOf(prototype.getReturnType());
         int paramsOff = OffsettedItem.getAbsoluteOffsetOr0(parameterTypes);
-            
+
         if (out.annotates()) {
             StringBuilder sb = new StringBuilder();
             sb.append(prototype.getReturnType().toHuman());
@@ -145,7 +145,7 @@
                 }
                 sb.append(params.getType(i).toHuman());
             }
-            
+
             sb.append(")");
             out.annotate(0, indexString() + ' ' + sb.toString());
             out.annotate(4, "  shorty_idx:      " + Hex.u4(shortyIdx) +
diff --git a/dx/src/com/android/dx/dex/file/ProtoIdsSection.java b/dx/src/com/android/dx/dex/file/ProtoIdsSection.java
index 8a95434..dc6e8ad 100644
--- a/dx/src/com/android/dx/dex/file/ProtoIdsSection.java
+++ b/dx/src/com/android/dx/dex/file/ProtoIdsSection.java
@@ -36,7 +36,7 @@
 
     /**
      * Constructs an instance. The file offset is initially unknown.
-     * 
+     *
      * @param file {@code non-null;} file that this instance is part of
      */
     public ProtoIdsSection(DexFile file) {
@@ -59,7 +59,7 @@
 
     /**
      * Writes the portion of the file header that refers to this instance.
-     * 
+     *
      * @param out {@code non-null;} where to write
      */
     public void writeHeaderPart(AnnotatedOutput out) {
@@ -83,7 +83,7 @@
 
     /**
      * Interns an element into this instance.
-     * 
+     *
      * @param prototype {@code non-null;} the prototype to intern
      * @return {@code non-null;} the interned reference
      */
@@ -107,7 +107,7 @@
     /**
      * Gets the index of the given prototype, which must have
      * been added to this instance.
-     * 
+     *
      * @param prototype {@code non-null;} the prototype to look up
      * @return {@code >= 0;} the reference's index
      */
diff --git a/dx/src/com/android/dx/dex/file/Section.java b/dx/src/com/android/dx/dex/file/Section.java
index f5b43af..3f04216 100644
--- a/dx/src/com/android/dx/dex/file/Section.java
+++ b/dx/src/com/android/dx/dex/file/Section.java
@@ -45,7 +45,7 @@
 
     /**
      * Validates an alignment.
-     * 
+     *
      * @param alignment the alignment
      * @throws IllegalArgumentException thrown if {@code alignment}
      * isn't a positive power of 2
@@ -89,9 +89,9 @@
         return file;
     }
 
-    /** 
+    /**
      * Gets the alignment for this instance's final output.
-     * 
+     *
      * @return {@code > 0;} the alignment
      */
     public final int getAlignment() {
@@ -144,7 +144,7 @@
      * @param out {@code non-null;} where to write to
      */
     public final void writeTo(AnnotatedOutput out) {
-        throwIfNotPrepared();        
+        throwIfNotPrepared();
         align(out);
 
         int cursor = out.getCursor();
@@ -173,7 +173,7 @@
      * start of this instance's output. This is only valid to call
      * once this instance has been assigned a file offset (via {@link
      * #setFileOffset}).
-     * 
+     *
      * @param relative {@code >= 0;} the relative offset
      * @return {@code >= 0;} the corresponding absolute file offset
      */
@@ -194,10 +194,10 @@
      * be contained in this section. This is only valid to call
      * once this instance has been assigned a file offset (via {@link
      * #setFileOffset}).
-     * 
+     *
      * <p><b>Note:</b> Subclasses must implement this as appropriate for
      * their contents.</p>
-     * 
+     *
      * @param item {@code non-null;} the item in question
      * @return {@code >= 0;} the item's absolute file offset
      */
@@ -257,7 +257,7 @@
 
     /**
      * Aligns the output of the given data to the alignment of this instance.
-     * 
+     *
      * @param out {@code non-null;} the output to align
      */
     protected final void align(AnnotatedOutput out) {
@@ -271,14 +271,14 @@
      * offset matches the actual cursor {@code out} or that the
      * file offset was not previously assigned, in which case it gets
      * assigned to {@code out}'s cursor.
-     * 
+     *
      * @param out {@code non-null;} where to write to
      */
     protected abstract void writeTo0(AnnotatedOutput out);
 
     /**
      * Returns the name of this section, for annotation purposes.
-     * 
+     *
      * @return {@code null-ok;} name of this part, for annotation purposes
      */
     protected final String getName() {
diff --git a/dx/src/com/android/dx/dex/file/Statistics.java b/dx/src/com/android/dx/dex/file/Statistics.java
index 9a2efb3..62e1832 100644
--- a/dx/src/com/android/dx/dex/file/Statistics.java
+++ b/dx/src/com/android/dx/dex/file/Statistics.java
@@ -38,7 +38,7 @@
 
     /**
      * Adds the given item to the statistics.
-     * 
+     *
      * @param item {@code non-null;} the item to add
      */
     public void add(Item item) {
@@ -54,7 +54,7 @@
 
     /**
      * Adds the given list of items to the statistics.
-     * 
+     *
      * @param list {@code non-null;} the list of items to add
      */
     public void addAll(Section list) {
@@ -66,7 +66,7 @@
 
     /**
      * Writes the statistics as an annotation.
-     * 
+     *
      * @param out {@code non-null;} where to write to
      */
     public final void writeAnnotation(AnnotatedOutput out) {
@@ -126,7 +126,7 @@
 
         /**
          * Constructs an instance for the given item.
-         * 
+         *
          * @param item {@code non-null;} item in question
          * @param name {@code non-null;} type name to use
          */
@@ -142,7 +142,7 @@
 
         /**
          * Incorporates a new item. This assumes the type name matches.
-         * 
+         *
          * @param item {@code non-null;} item to incorporate
          */
         public void add(Item item) {
@@ -162,7 +162,7 @@
 
         /**
          * Writes this instance as an annotation.
-         * 
+         *
          * @param out {@code non-null;} where to write to
          */
         public void writeAnnotation(AnnotatedOutput out) {
diff --git a/dx/src/com/android/dx/dex/file/StringDataItem.java b/dx/src/com/android/dx/dex/file/StringDataItem.java
index b9eeb9b..80dbced 100644
--- a/dx/src/com/android/dx/dex/file/StringDataItem.java
+++ b/dx/src/com/android/dx/dex/file/StringDataItem.java
@@ -31,7 +31,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param value {@code non-null;} the string value
      */
     public StringDataItem(CstUtf8 value) {
@@ -42,13 +42,13 @@
 
     /**
      * Gets the write size for a given value.
-     * 
+     *
      * @param value {@code non-null;} the string value
      * @return {@code >= 2}; the write size, in bytes
      */
     private static int writeSize(CstUtf8 value) {
         int utf16Size = value.getUtf16Size();
-        
+
         // The +1 is for the '\0' termination byte.
         return Leb128Utils.unsignedLeb128Size(utf16Size)
             + value.getUtf8Size() + 1;
@@ -73,7 +73,7 @@
         int utf16Size = value.getUtf16Size();
 
         if (out.annotates()) {
-            out.annotate(Leb128Utils.unsignedLeb128Size(utf16Size), 
+            out.annotate(Leb128Utils.unsignedLeb128Size(utf16Size),
                     "utf16_size: " + Hex.u4(utf16Size));
             out.annotate(bytes.size() + 1, value.toQuoted());
         }
diff --git a/dx/src/com/android/dx/dex/file/StringIdItem.java b/dx/src/com/android/dx/dex/file/StringIdItem.java
index 401a0be..cd0d57b 100644
--- a/dx/src/com/android/dx/dex/file/StringIdItem.java
+++ b/dx/src/com/android/dx/dex/file/StringIdItem.java
@@ -36,7 +36,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param value {@code non-null;} the string value
      */
     public StringIdItem(CstUtf8 value) {
@@ -109,7 +109,7 @@
 
     /**
      * Gets the string value.
-     * 
+     *
      * @return {@code non-null;} the value
      */
     public CstUtf8 getValue() {
@@ -118,7 +118,7 @@
 
     /**
      * Gets the associated data object for this instance, if known.
-     * 
+     *
      * @return {@code null-ok;} the associated data object or {@code null}
      * if not yet known
      */
diff --git a/dx/src/com/android/dx/dex/file/StringIdsSection.java b/dx/src/com/android/dx/dex/file/StringIdsSection.java
index b2e8683..9039f43 100644
--- a/dx/src/com/android/dx/dex/file/StringIdsSection.java
+++ b/dx/src/com/android/dx/dex/file/StringIdsSection.java
@@ -33,13 +33,13 @@
         extends UniformItemSection {
     /**
      * {@code non-null;} map from string constants to {@link
-     * StringIdItem} instances 
+     * StringIdItem} instances
      */
     private final TreeMap<CstUtf8, StringIdItem> strings;
 
     /**
      * Constructs an instance. The file offset is initially unknown.
-     * 
+     *
      * @param file {@code non-null;} file that this instance is part of
      */
     public StringIdsSection(DexFile file) {
@@ -78,7 +78,7 @@
 
     /**
      * Writes the portion of the file header that refers to this instance.
-     * 
+     *
      * @param out {@code non-null;} where to write
      */
     public void writeHeaderPart(AnnotatedOutput out) {
@@ -98,7 +98,7 @@
 
     /**
      * Interns an element into this instance.
-     * 
+     *
      * @param string {@code non-null;} the string to intern, as a regular Java
      * {@code String}
      * @return {@code non-null;} the interned string
@@ -110,7 +110,7 @@
 
     /**
      * Interns an element into this instance.
-     * 
+     *
      * @param string {@code non-null;} the string to intern, as a {@link CstString}
      * @return {@code non-null;} the interned string
      */
@@ -121,7 +121,7 @@
 
     /**
      * Interns an element into this instance.
-     * 
+     *
      * @param string {@code non-null;} the string to intern, as a constant
      * @return {@code non-null;} the interned string
      */
@@ -131,7 +131,7 @@
 
     /**
      * Interns an element into this instance.
-     * 
+     *
      * @param string {@code non-null;} the string to intern
      * @return {@code non-null;} the interned string
      */
@@ -155,7 +155,7 @@
 
     /**
      * Interns the components of a name-and-type into this instance.
-     * 
+     *
      * @param nat {@code non-null;} the name-and-type
      */
     public void intern(CstNat nat) {
@@ -166,7 +166,7 @@
     /**
      * Gets the index of the given string, which must have been added
      * to this instance.
-     * 
+     *
      * @param string {@code non-null;} the string to look up
      * @return {@code >= 0;} the string's index
      */
@@ -189,7 +189,7 @@
     /**
      * Gets the index of the given string, which must have been added
      * to this instance.
-     * 
+     *
      * @param string {@code non-null;} the string to look up
      * @return {@code >= 0;} the string's index
      */
diff --git a/dx/src/com/android/dx/dex/file/TypeIdItem.java b/dx/src/com/android/dx/dex/file/TypeIdItem.java
index 01b1417..c257e00 100644
--- a/dx/src/com/android/dx/dex/file/TypeIdItem.java
+++ b/dx/src/com/android/dx/dex/file/TypeIdItem.java
@@ -30,7 +30,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param type {@code non-null;} the constant for the type
      */
     public TypeIdItem(CstType type) {
diff --git a/dx/src/com/android/dx/dex/file/TypeIdsSection.java b/dx/src/com/android/dx/dex/file/TypeIdsSection.java
index b1b9c58..bcc8250 100644
--- a/dx/src/com/android/dx/dex/file/TypeIdsSection.java
+++ b/dx/src/com/android/dx/dex/file/TypeIdsSection.java
@@ -36,7 +36,7 @@
 
     /**
      * Constructs an instance. The file offset is initially unknown.
-     * 
+     *
      * @param file {@code non-null;} file that this instance is part of
      */
     public TypeIdsSection(DexFile file) {
@@ -72,7 +72,7 @@
 
     /**
      * Writes the portion of the file header that refers to this instance.
-     * 
+     *
      * @param out {@code non-null;} where to write
      */
     public void writeHeaderPart(AnnotatedOutput out) {
@@ -96,7 +96,7 @@
 
     /**
      * Interns an element into this instance.
-     * 
+     *
      * @param type {@code non-null;} the type to intern
      * @return {@code non-null;} the interned reference
      */
@@ -119,7 +119,7 @@
 
     /**
      * Interns an element into this instance.
-     * 
+     *
      * @param type {@code non-null;} the type to intern
      * @return {@code non-null;} the interned reference
      */
@@ -144,7 +144,7 @@
     /**
      * Gets the index of the given type, which must have
      * been added to this instance.
-     * 
+     *
      * @param type {@code non-null;} the type to look up
      * @return {@code >= 0;} the reference's index
      */
@@ -167,7 +167,7 @@
     /**
      * Gets the index of the given type, which must have
      * been added to this instance.
-     * 
+     *
      * @param type {@code non-null;} the type to look up
      * @return {@code >= 0;} the reference's index
      */
diff --git a/dx/src/com/android/dx/dex/file/TypeListItem.java b/dx/src/com/android/dx/dex/file/TypeListItem.java
index 3278aef..b815dd3 100644
--- a/dx/src/com/android/dx/dex/file/TypeListItem.java
+++ b/dx/src/com/android/dx/dex/file/TypeListItem.java
@@ -41,7 +41,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param list {@code non-null;} the actual list
      */
     public TypeListItem(TypeList list) {
@@ -80,7 +80,7 @@
 
     /**
      * Gets the underlying list.
-     * 
+     *
      * @return {@code non-null;} the list
      */
     public TypeList getList() {
@@ -109,7 +109,7 @@
         for (int i = 0; i < sz; i++) {
             out.writeShort(typeIds.indexOf(list.getType(i)));
         }
-    }    
+    }
 
     /** {@inheritDoc} */
     @Override
diff --git a/dx/src/com/android/dx/dex/file/UniformItemSection.java b/dx/src/com/android/dx/dex/file/UniformItemSection.java
index e182438..d8c09ab 100644
--- a/dx/src/com/android/dx/dex/file/UniformItemSection.java
+++ b/dx/src/com/android/dx/dex/file/UniformItemSection.java
@@ -29,7 +29,7 @@
 public abstract class UniformItemSection extends Section {
     /**
      * Constructs an instance. The file offset is initially unknown.
-     * 
+     *
      * @param name {@code null-ok;} the name of this instance, for annotation
      * purposes
      * @param file {@code non-null;} file that this instance is part of
@@ -59,7 +59,7 @@
      * will throw an exception if the constant is not found, including
      * if this instance isn't the sort that maps constants to {@link
      * IndexedItem} instances.
-     * 
+     *
      * @param cst {@code non-null;} constant to look for
      * @return {@code non-null;} the corresponding item found in this instance
      */
diff --git a/dx/src/com/android/dx/dex/file/UniformListItem.java b/dx/src/com/android/dx/dex/file/UniformListItem.java
index 3c1f4d3..88919c7 100644
--- a/dx/src/com/android/dx/dex/file/UniformListItem.java
+++ b/dx/src/com/android/dx/dex/file/UniformListItem.java
@@ -26,12 +26,12 @@
  * Class that represents a contiguous list of uniform items. Each
  * item in the list, in particular, must have the same write size and
  * alignment.
- * 
+ *
  * <p>This class inherits its alignment from its items, bumped up to
  * {@code 4} if the items have a looser alignment requirement. If
  * it is more than {@code 4}, then there will be a gap after the
  * output list size (which is four bytes) and before the first item.</p>
- * 
+ *
  * @param <T> type of element contained in an instance
  */
 public final class UniformListItem<T extends OffsettedItem>
@@ -41,14 +41,14 @@
 
     /** {@code non-null;} the item type */
     private final ItemType itemType;
-    
+
     /** {@code non-null;} the contents */
     private final List<T> items;
 
     /**
      * Constructs an instance. It is illegal to modify the given list once
      * it is used to construct an instance of this class.
-     * 
+     *
      * @param itemType {@code non-null;} the type of the item
      * @param items {@code non-null and non-empty;} list of items to represent
      */
@@ -67,7 +67,7 @@
      * Helper for {@link #UniformListItem}, which returns the alignment
      * requirement implied by the given list. See the header comment for
      * more details.
-     * 
+     *
      * @param items {@code non-null;} list of items being represented
      * @return {@code >= 4;} the alignment requirement
      */
@@ -81,12 +81,12 @@
         } catch (NullPointerException ex) {
             // Translate the exception.
             throw new NullPointerException("items == null");
-        }            
+        }
     }
 
     /**
      * Calculates the write size for the given list.
-     * 
+     *
      * @param items {@code non-null;} the list in question
      * @return {@code >= 0;} the write size
      */
@@ -147,7 +147,7 @@
 
     /**
      * Gets the underlying list of items.
-     * 
+     *
      * @return {@code non-null;} the list
      */
     public final List<T> getItems() {
@@ -179,7 +179,7 @@
                             "item alignment mismatch");
                 }
             }
-            
+
             offset = i.place(addedTo, offset) + size;
         }
     }
@@ -203,7 +203,7 @@
 
     /**
      * Get the size of the header of this list.
-     * 
+     *
      * @return {@code >= 0;} the header size
      */
     private int headerSize() {
diff --git a/dx/src/com/android/dx/dex/file/ValueEncoder.java b/dx/src/com/android/dx/dex/file/ValueEncoder.java
index f7e364a..fba64a7 100644
--- a/dx/src/com/android/dx/dex/file/ValueEncoder.java
+++ b/dx/src/com/android/dx/dex/file/ValueEncoder.java
@@ -100,10 +100,10 @@
 
     /** {@code non-null;} output stream to write to */
     private final AnnotatedOutput out;
-    
+
     /**
      * Construct an instance.
-     * 
+     *
      * @param file {@code non-null;} file being written
      * @param out {@code non-null;} output stream to write to
      */
@@ -122,7 +122,7 @@
 
     /**
      * Writes out the encoded form of the given constant.
-     * 
+     *
      * @param cst {@code non-null;} the constant to write
      */
     public void writeConstant(Constant cst) {
@@ -208,7 +208,7 @@
 
     /**
      * Gets the value type for the given constant.
-     * 
+     *
      * @param cst {@code non-null;} the constant
      * @return the value type; one of the {@code VALUE_*} constants
      * defined by this class
@@ -276,7 +276,7 @@
         if (annotates) {
             out.annotate("  size: " + Hex.u4(size));
         }
-        
+
         out.writeUnsignedLeb128(size);
 
         for (int i = 0; i < size; i++) {
@@ -300,7 +300,7 @@
      * (debugging) annotations and {@code topLevel} is
      * {@code true}, then this method will write (debugging)
      * annotations.
-     * 
+     *
      * @param annotation {@code non-null;} annotation instance to write
      * @param topLevel {@code true} iff the given annotation is the
      * top-level annotation or {@code false} if it is a sub-annotation
@@ -318,7 +318,7 @@
             out.annotate("  type_idx: " + Hex.u4(typeIdx) + " // " +
                     type.toHuman());
         }
-                    
+
         out.writeUnsignedLeb128(typeIds.indexOf(annotation.getType()));
 
         Collection<NameValuePair> pairs = annotation.getNameValuePairs();
@@ -335,7 +335,7 @@
             CstUtf8 name = pair.getName();
             int nameIdx = stringIds.indexOf(name);
             Constant value = pair.getValue();
-            
+
             if (annotates) {
                 out.annotate(0, "  elements[" + at + "]:");
                 at++;
@@ -356,11 +356,11 @@
             out.endAnnotation();
         }
     }
-    
+
     /**
      * Gets the colloquial type name and human form of the type of the
      * given constant, when used as an encoded value.
-     * 
+     *
      * @param cst {@code non-null;} the constant
      * @return {@code non-null;} its type name and human form
      */
@@ -383,7 +383,7 @@
     /**
      * Helper for {@link #writeConstant}, which writes out the value
      * for any signed integral type.
-     * 
+     *
      * @param type the type constant
      * @param value {@code long} bits of the value
      */
@@ -420,7 +420,7 @@
     /**
      * Helper for {@link #writeConstant}, which writes out the value
      * for any unsigned integral type.
-     * 
+     *
      * @param type the type constant
      * @param value {@code long} bits of the value
      */
@@ -430,7 +430,7 @@
         if (requiredBits == 0) {
             requiredBits = 1;
         }
-        
+
         // Round up the requiredBits to a number of bytes.
         int requiredBytes = (requiredBits + 0x07) >> 3;
 
@@ -451,7 +451,7 @@
     /**
      * Helper for {@link #writeConstant}, which writes out a
      * right-zero-extended value.
-     * 
+     *
      * @param type the type constant
      * @param value {@code long} bits of the value
      */
@@ -461,7 +461,7 @@
         if (requiredBits == 0) {
             requiredBits = 1;
         }
-        
+
         // Round up the requiredBits to a number of bytes.
         int requiredBytes = (requiredBits + 0x07) >> 3;
 
@@ -488,7 +488,7 @@
      * contents for a particular {@link Annotation}, calling itself
      * recursively should it encounter a nested annotation.
      *
-     * @param file {@code non-null;} the file to add to 
+     * @param file {@code non-null;} the file to add to
      * @param annotation {@code non-null;} the annotation to add contents for
      */
     public static void addContents(DexFile file, Annotation annotation) {
@@ -496,7 +496,7 @@
         StringIdsSection stringIds = file.getStringIds();
 
         typeIds.intern(annotation.getType());
-        
+
         for (NameValuePair pair : annotation.getNameValuePairs()) {
             stringIds.intern(pair.getName());
             addContents(file, pair.getValue());
@@ -509,8 +509,8 @@
      * should it encounter a {@link CstArray} and calling {@link
      * #addContents(DexFile,Annotation)} recursively should it
      * encounter a {@link CstAnnotation}.
-     * 
-     * @param file {@code non-null;} the file to add to 
+     *
+     * @param file {@code non-null;} the file to add to
      * @param cst {@code non-null;} the constant to add contents for
      */
     public static void addContents(DexFile file, Constant cst) {
diff --git a/dx/src/com/android/dx/rop/annotation/Annotation.java b/dx/src/com/android/dx/rop/annotation/Annotation.java
index 6154c61..ad6d67e 100644
--- a/dx/src/com/android/dx/rop/annotation/Annotation.java
+++ b/dx/src/com/android/dx/rop/annotation/Annotation.java
@@ -39,7 +39,7 @@
  * associated type and additionally consist of a set of (name, value)
  * pairs, where the names are unique.
  */
-public final class Annotation extends MutabilityControl 
+public final class Annotation extends MutabilityControl
         implements Comparable<Annotation>, ToHuman {
     /** {@code non-null;} type of the annotation */
     private final CstType type;
@@ -49,10 +49,10 @@
 
     /** {@code non-null;} map from names to {@link NameValuePair} instances */
     private final TreeMap<CstUtf8, NameValuePair> elements;
-    
+
     /**
      * Construct an instance. It initially contains no elements.
-     * 
+     *
      * @param type {@code non-null;} type of the annotation
      * @param visibility {@code non-null;} the visibility of the annotation
      */
@@ -136,7 +136,7 @@
     public String toString() {
         return toHuman();
     }
-    
+
     /** {@inheritDoc} */
     public String toHuman() {
         StringBuilder sb = new StringBuilder();
@@ -164,7 +164,7 @@
 
     /**
      * Gets the type of this instance.
-     * 
+     *
      * @return {@code non-null;} the type
      */
     public CstType getType() {
@@ -173,7 +173,7 @@
 
     /**
      * Gets the visibility of this instance.
-     * 
+     *
      * @return {@code non-null;} the visibility
      */
     public AnnotationVisibility getVisibility() {
@@ -184,12 +184,12 @@
      * Put an element into the set of (name, value) pairs for this instance.
      * If there is a preexisting element with the same name, it will be
      * replaced by this method.
-     * 
+     *
      * @param pair {@code non-null;} the (name, value) pair to place into this instance
      */
     public void put(NameValuePair pair) {
         throwIfImmutable();
-        
+
         if (pair == null) {
             throw new NullPointerException("pair == null");
         }
@@ -201,12 +201,12 @@
      * Add an element to the set of (name, value) pairs for this instance.
      * It is an error to call this method if there is a preexisting element
      * with the same name.
-     * 
+     *
      * @param pair {@code non-null;} the (name, value) pair to add to this instance
      */
     public void add(NameValuePair pair) {
         throwIfImmutable();
-        
+
         if (pair == null) {
             throw new NullPointerException("pair == null");
         }
@@ -216,14 +216,14 @@
         if (elements.get(name) != null) {
             throw new IllegalArgumentException("name already added: " + name);
         }
-        
+
         elements.put(name, pair);
     }
 
     /**
      * Gets the set of name-value pairs contained in this instance. The
      * result is always unmodifiable.
-     * 
+     *
      * @return {@code non-null;} the set of name-value pairs
      */
     public Collection<NameValuePair> getNameValuePairs() {
diff --git a/dx/src/com/android/dx/rop/annotation/AnnotationVisibility.java b/dx/src/com/android/dx/rop/annotation/AnnotationVisibility.java
index 26246bb..c717b8c 100644
--- a/dx/src/com/android/dx/rop/annotation/AnnotationVisibility.java
+++ b/dx/src/com/android/dx/rop/annotation/AnnotationVisibility.java
@@ -32,7 +32,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param human {@code non-null;} the human-oriented string representation
      */
     private AnnotationVisibility(String human) {
diff --git a/dx/src/com/android/dx/rop/annotation/Annotations.java b/dx/src/com/android/dx/rop/annotation/Annotations.java
index dcb74a1..807d5d4 100644
--- a/dx/src/com/android/dx/rop/annotation/Annotations.java
+++ b/dx/src/com/android/dx/rop/annotation/Annotations.java
@@ -27,7 +27,7 @@
 /**
  * List of {@link Annotation} instances.
  */
-public final class Annotations extends MutabilityControl 
+public final class Annotations extends MutabilityControl
         implements Comparable<Annotations> {
     /** {@code non-null;} immutable empty instance */
     public static final Annotations EMPTY = new Annotations();
@@ -35,7 +35,7 @@
     static {
         EMPTY.setImmutable();
     }
-    
+
     /** {@code non-null;} map from types to annotations */
     private final TreeMap<CstType, Annotation> annotations;
 
@@ -43,7 +43,7 @@
      * Constructs an immutable instance which is the combination of the
      * two given instances. The two instances must contain disjoint sets
      * of types.
-     * 
+     *
      * @param a1 {@code non-null;} an instance
      * @param a2 {@code non-null;} the other instance
      * @return {@code non-null;} the combination
@@ -58,12 +58,12 @@
 
         return result;
     }
-            
+
     /**
      * Constructs an immutable instance which is the combination of the
      * given instance with the given additional annotation. The latter's
      * type must not already appear in the former.
-     * 
+     *
      * @param annotations {@code non-null;} the instance to augment
      * @param annotation {@code non-null;} the additional annotation
      * @return {@code non-null;} the combination
@@ -79,7 +79,7 @@
 
         return result;
     }
-            
+
     /**
      * Constructs an empty instance.
      */
@@ -148,10 +148,10 @@
         sb.append("}");
         return sb.toString();
     }
-    
+
     /**
      * Gets the number of elements in this instance.
-     * 
+     *
      * @return {@code >= 0;} the size
      */
     public int size() {
@@ -161,7 +161,7 @@
     /**
      * Adds an element to this instance. There must not already be an
      * element of the same type.
-     * 
+     *
      * @param annotation {@code non-null;} the element to add
      * @throws IllegalArgumentException thrown if there is a duplicate type
      */
@@ -173,7 +173,7 @@
         }
 
         CstType type = annotation.getType();
-        
+
         if (annotations.containsKey(type)) {
             throw new IllegalArgumentException("duplicate type: " +
                     type.toHuman());
@@ -185,7 +185,7 @@
     /**
      * Adds all of the elements of the given instance to this one. The
      * instances must not have any duplicate types.
-     * 
+     *
      * @param toAdd {@code non-null;} the annotations to add
      * @throws IllegalArgumentException thrown if there is a duplicate type
      */
@@ -204,7 +204,7 @@
     /**
      * Gets the set of annotations contained in this instance. The
      * result is always unmodifiable.
-     * 
+     *
      * @return {@code non-null;} the set of annotations
      */
     public Collection<Annotation> getAnnotations() {
diff --git a/dx/src/com/android/dx/rop/annotation/AnnotationsList.java b/dx/src/com/android/dx/rop/annotation/AnnotationsList.java
index 0f4207b..b97b385 100644
--- a/dx/src/com/android/dx/rop/annotation/AnnotationsList.java
+++ b/dx/src/com/android/dx/rop/annotation/AnnotationsList.java
@@ -25,13 +25,13 @@
         extends FixedSizeList {
     /** {@code non-null;} immutable empty instance */
     public static final AnnotationsList EMPTY = new AnnotationsList(0);
-    
+
     /**
      * Constructs an immutable instance which is the combination of
      * the two given instances. The two instances must each have the
      * same number of elements, and each pair of elements must contain
      * disjoint sets of types.
-     * 
+     *
      * @param list1 {@code non-null;} an instance
      * @param list2 {@code non-null;} the other instance
      * @return {@code non-null;} the combination
@@ -58,7 +58,7 @@
 
     /**
      * Constructs an instance. All indices initially contain {@code null}.
-     * 
+     *
      * @param size the size of the list
      */
     public AnnotationsList(int size) {
@@ -69,7 +69,7 @@
      * Gets the element at the given index. It is an error to call
      * this with the index for an element which was never set; if you
      * do that, this will throw {@code NullPointerException}.
-     * 
+     *
      * @param n {@code >= 0, < size();} which index
      * @return {@code non-null;} element at that index
      */
@@ -80,7 +80,7 @@
     /**
      * Sets the element at the given index. The given element must be
      * immutable.
-     * 
+     *
      * @param n {@code >= 0, < size();} which index
      * @param a {@code null-ok;} the element to set at {@code n}
      */
diff --git a/dx/src/com/android/dx/rop/annotation/NameValuePair.java b/dx/src/com/android/dx/rop/annotation/NameValuePair.java
index 7137a60..39a9dfd 100644
--- a/dx/src/com/android/dx/rop/annotation/NameValuePair.java
+++ b/dx/src/com/android/dx/rop/annotation/NameValuePair.java
@@ -29,10 +29,10 @@
 
     /** {@code non-null;} the value */
     private final Constant value;
-    
+
     /**
      * Construct an instance.
-     * 
+     *
      * @param name {@code non-null;} the name
      * @param value {@code non-null;} the value
      */
@@ -49,7 +49,7 @@
         if (value instanceof CstUtf8) {
             throw new IllegalArgumentException("bad value: " + value);
         }
-        
+
         this.name = name;
         this.value = value;
     }
@@ -63,7 +63,7 @@
     public int hashCode() {
         return name.hashCode() * 31 + value.hashCode();
     }
-    
+
     /** {@inheritDoc} */
     public boolean equals(Object other) {
         if (! (other instanceof NameValuePair)) {
@@ -78,7 +78,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * <p>Instances of this class compare in name-major and value-minor
      * order.</p>
      */
@@ -90,20 +90,20 @@
         }
 
         return value.compareTo(other.value);
-    }    
+    }
 
     /**
      * Gets the name.
-     * 
+     *
      * @return {@code non-null;} the name
      */
     public CstUtf8 getName() {
         return name;
     }
-    
+
     /**
      * Gets the value.
-     * 
+     *
      * @return {@code non-null;} the value
      */
     public Constant getValue() {
diff --git a/dx/src/com/android/dx/rop/code/AccessFlags.java b/dx/src/com/android/dx/rop/code/AccessFlags.java
index b76b610..2d84fe8 100644
--- a/dx/src/com/android/dx/rop/code/AccessFlags.java
+++ b/dx/src/com/android/dx/rop/code/AccessFlags.java
@@ -51,7 +51,7 @@
 
     /**
      * class with new-style {@code invokespecial} for superclass
-     * method access 
+     * method access
      */
     public static final int ACC_SUPER = 0x0020;
 
@@ -78,7 +78,7 @@
 
     /**
      * method with strict floating point ({@code strictfp})
-     * behavior 
+     * behavior
      */
     public static final int ACC_STRICT = 0x0800;
 
@@ -90,7 +90,7 @@
 
     /**
      * class is an enumerated type; field is an element of an enumerated
-     * type 
+     * type
      */
     public static final int ACC_ENUM = 0x4000;
 
@@ -145,7 +145,7 @@
     /**
      * Returns a human-oriented string representing the given access flags,
      * as defined on classes (not fields or methods).
-     * 
+     *
      * @param flags the flags
      * @return {@code non-null;} human-oriented string
      */
@@ -156,7 +156,7 @@
     /**
      * Returns a human-oriented string representing the given access flags,
      * as defined on inner classes.
-     * 
+     *
      * @param flags the flags
      * @return {@code non-null;} human-oriented string
      */
@@ -167,7 +167,7 @@
     /**
      * Returns a human-oriented string representing the given access flags,
      * as defined on fields (not classes or methods).
-     * 
+     *
      * @param flags the flags
      * @return {@code non-null;} human-oriented string
      */
@@ -178,7 +178,7 @@
     /**
      * Returns a human-oriented string representing the given access flags,
      * as defined on methods (not classes or fields).
-     * 
+     *
      * @param flags the flags
      * @return {@code non-null;} human-oriented string
      */
@@ -189,7 +189,7 @@
     /**
      * Returns whether the flag {@code ACC_PUBLIC} is on in the given
      * flags.
-     * 
+     *
      * @param flags the flags to check
      * @return the value of the {@code ACC_PUBLIC} flag
      */
@@ -200,7 +200,7 @@
     /**
      * Returns whether the flag {@code ACC_PROTECTED} is on in the given
      * flags.
-     * 
+     *
      * @param flags the flags to check
      * @return the value of the {@code ACC_PROTECTED} flag
      */
@@ -211,7 +211,7 @@
     /**
      * Returns whether the flag {@code ACC_PRIVATE} is on in the given
      * flags.
-     * 
+     *
      * @param flags the flags to check
      * @return the value of the {@code ACC_PRIVATE} flag
      */
@@ -222,18 +222,18 @@
     /**
      * Returns whether the flag {@code ACC_STATIC} is on in the given
      * flags.
-     * 
+     *
      * @param flags the flags to check
      * @return the value of the {@code ACC_STATIC} flag
      */
     public static boolean isStatic(int flags) {
         return (flags & ACC_STATIC) != 0;
     }
-    
+
     /**
      * Returns whether the flag {@code ACC_SYNCHRONIZED} is on in
      * the given flags.
-     * 
+     *
      * @param flags the flags to check
      * @return the value of the {@code ACC_SYNCHRONIZED} flag
      */
@@ -244,7 +244,7 @@
     /**
      * Returns whether the flag {@code ACC_ABSTRACT} is on in the given
      * flags.
-     * 
+     *
      * @param flags the flags to check
      * @return the value of the {@code ACC_ABSTRACT} flag
      */
@@ -255,7 +255,7 @@
     /**
      * Returns whether the flag {@code ACC_NATIVE} is on in the given
      * flags.
-     * 
+     *
      * @param flags the flags to check
      * @return the value of the {@code ACC_NATIVE} flag
      */
@@ -266,7 +266,7 @@
     /**
      * Returns whether the flag {@code ACC_ANNOTATION} is on in the given
      * flags.
-     * 
+     *
      * @param flags the flags to check
      * @return the value of the {@code ACC_ANNOTATION} flag
      */
@@ -277,7 +277,7 @@
     /**
      * Returns whether the flag {@code ACC_DECLARED_SYNCHRONIZED} is
      * on in the given flags.
-     * 
+     *
      * @param flags the flags to check
      * @return the value of the {@code ACC_DECLARED_SYNCHRONIZED} flag
      */
@@ -288,7 +288,7 @@
     /**
      * Helper to return a human-oriented string representing the given
      * access flags.
-     * 
+     *
      * @param flags the defined flags
      * @param mask mask for the "defined" bits
      * @param what what the flags represent (one of {@code CONV_*})
diff --git a/dx/src/com/android/dx/rop/code/BasicBlock.java b/dx/src/com/android/dx/rop/code/BasicBlock.java
index 7bb2d9b..d6ee886 100644
--- a/dx/src/com/android/dx/rop/code/BasicBlock.java
+++ b/dx/src/com/android/dx/rop/code/BasicBlock.java
@@ -33,20 +33,20 @@
 
     /**
      * {@code non-null;} full list of successors that this block may
-     * branch to 
+     * branch to
      */
     private final IntList successors;
 
     /**
      * {@code >= -1;} the primary / standard-flow / "default" successor, or
      * {@code -1} if this block has no successors (that is, it
-     * exits the function/method) 
+     * exits the function/method)
      */
     private final int primarySuccessor;
 
     /**
      * Constructs an instance. The predecessor set is set to {@code null}.
-     * 
+     *
      * @param label {@code >= 0;} target label for this block
      * @param insns {@code non-null;} list of instructions in this block
      * @param successors {@code non-null;} full list of successors that this
@@ -114,7 +114,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * Instances of this class compare by identity. That is,
      * {@code x.equals(y)} is only true if {@code x == y}.
      */
@@ -125,7 +125,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * Return the identity hashcode of this instance. This is proper,
      * since instances of this class compare by identity (see {@link #equals}).
      */
@@ -136,7 +136,7 @@
 
     /**
      * Gets the target label of this block.
-     * 
+     *
      * @return {@code >= 0;} the label
      */
     public int getLabel() {
@@ -145,7 +145,7 @@
 
     /**
      * Gets the list of instructions inside this block.
-     * 
+     *
      * @return {@code non-null;} the instruction list
      */
     public InsnList getInsns() {
@@ -154,7 +154,7 @@
 
     /**
      * Gets the list of successors that this block may branch to.
-     * 
+     *
      * @return {@code non-null;} the successors list
      */
     public IntList getSuccessors() {
@@ -163,7 +163,7 @@
 
     /**
      * Gets the primary successor of this block.
-     * 
+     *
      * @return {@code >= -1;} the primary successor, or {@code -1} if this
      * block has no successors at all
      */
@@ -174,7 +174,7 @@
     /**
      * Gets the secondary successor of this block. It is only valid to call
      * this method on blocks that have exactly two successors.
-     * 
+     *
      * @return {@code >= 0;} the secondary successor
      */
     public int getSecondarySuccessor() {
@@ -194,7 +194,7 @@
     /**
      * Gets the first instruction of this block. This is just a
      * convenient shorthand for {@code getInsns().get(0)}.
-     * 
+     *
      * @return {@code non-null;} the first instruction
      */
     public Insn getFirstInsn() {
@@ -204,7 +204,7 @@
     /**
      * Gets the last instruction of this block. This is just a
      * convenient shorthand for {@code getInsns().getLast()}.
-     * 
+     *
      * @return {@code non-null;} the last instruction
      */
     public Insn getLastInsn() {
@@ -214,7 +214,7 @@
     /**
      * Returns whether this block might throw an exception. This is
      * just a convenient shorthand for {@code getLastInsn().canThrow()}.
-     * 
+     *
      * @return {@code true} iff this block might throw an
      * exception
      */
@@ -227,7 +227,7 @@
      * This is just a shorthand for inspecting the last instruction in
      * the block to see if it could throw, and if so, whether it in fact
      * has any associated handlers.
-     * 
+     *
      * @return {@code true} iff this block has any associated
      * exception handlers
      */
@@ -255,7 +255,7 @@
      * Returns an instance that is identical to this one, except that
      * the registers in each instruction are offset by the given
      * amount.
-     * 
+     *
      * @param delta the amount to offset register numbers by
      * @return {@code non-null;} an appropriately-constructed instance
      */
diff --git a/dx/src/com/android/dx/rop/code/BasicBlockList.java b/dx/src/com/android/dx/rop/code/BasicBlockList.java
index 0627425..ea7b497 100644
--- a/dx/src/com/android/dx/rop/code/BasicBlockList.java
+++ b/dx/src/com/android/dx/rop/code/BasicBlockList.java
@@ -28,14 +28,14 @@
 public final class BasicBlockList extends LabeledList {
     /**
      * {@code >= -1;} the count of registers required by this method or
-     * {@code -1} if not yet calculated 
+     * {@code -1} if not yet calculated
      */
     private int regCount;
 
     /**
      * Constructs an instance. All indices initially contain {@code null},
      * and the first-block label is initially {@code -1}.
-     * 
+     *
      * @param size the size of the list
      */
     public BasicBlockList(int size) {
@@ -46,7 +46,7 @@
 
     /**
      * Constructs a mutable copy for {@code getMutableCopy()}.
-     * 
+     *
      * @param old block to copy
      */
     private BasicBlockList (BasicBlockList old) {
@@ -59,7 +59,7 @@
      * Gets the element at the given index. It is an error to call
      * this with the index for an element which was never set; if you
      * do that, this will throw {@code NullPointerException}.
-     * 
+     *
      * @param n {@code >= 0, < size();} which index
      * @return {@code non-null;} element at that index
      */
@@ -69,13 +69,13 @@
 
     /**
      * Sets the basic block at the given index.
-     * 
+     *
      * @param n {@code >= 0, < size();} which index
      * @param bb {@code null-ok;} the element to set at {@code n}
      */
     public void set(int n, BasicBlock bb) {
         super.set(n, bb);
-        
+
         // Reset regCount, since it will need to be recalculated.
         regCount = -1;
     }
@@ -85,7 +85,7 @@
      * the maximum of register-number-plus-category referred to by this
      * instance's instructions (indirectly through {@link BasicBlock}
      * instances).
-     * 
+     *
      * @return {@code >= 0;} the register count
      */
     public int getRegCount() {
@@ -101,7 +101,7 @@
     /**
      * Gets the total instruction count for this instance. This is the
      * sum of the instruction counts of each block.
-     * 
+     *
      * @return {@code >= 0;} the total instruction count
      */
     public int getInstructionCount() {
@@ -168,7 +168,7 @@
 
     /**
      * Visits each instruction of each block in the list, in order.
-     * 
+     *
      * @param visitor {@code non-null;} visitor to use
      */
     public void forEachInsn(Insn.Visitor visitor) {
@@ -186,7 +186,7 @@
      * the registers in each instruction are offset by the given
      * amount. Mutability of the result is inherited from the
      * original.
-     * 
+     *
      * @param delta the amount to offset register numbers by
      * @return {@code non-null;} an appropriately-constructed instance
      */
@@ -223,7 +223,7 @@
      * Otherwise, if the block has a primay successor, then that is
      * the preferred successor. If the block has no successors, then
      * this returns {@code null}.
-     * 
+     *
      * @param block {@code non-null;} the block in question
      * @return {@code null-ok;} the preferred successor, if any
      */
@@ -251,7 +251,7 @@
     /**
      * Compares the catches of two blocks for equality. This includes
      * both the catch types and target labels.
-     * 
+     *
      * @param block1 {@code non-null;} one block to compare
      * @param block2 {@code non-null;} the other block to compare
      * @return {@code true} if the two blocks' non-primary successors
@@ -283,7 +283,7 @@
              */
             return false;
         }
-            
+
         for (int i = 0; i < size; i++) {
             int label1 = succ1.get(i);
             int label2 = succ2.get(i);
@@ -325,7 +325,7 @@
 
         /**
          * Gets the register count.
-         * 
+         *
          * @return {@code >= 0;} the count
          */
         public int getRegCount() {
@@ -364,7 +364,7 @@
 
         /**
          * Helper for all the {@code visit*} methods.
-         * 
+         *
          * @param insn {@code non-null;} instruction being visited
          */
         private void visit(Insn insn) {
@@ -384,7 +384,7 @@
 
         /**
          * Processes the given register spec.
-         * 
+         *
          * @param spec {@code non-null;} the register spec
          */
         private void processReg(RegisterSpec spec) {
@@ -394,5 +394,5 @@
                 regCount = reg;
             }
         }
-    }    
+    }
 }
diff --git a/dx/src/com/android/dx/rop/code/ConservativeTranslationAdvice.java b/dx/src/com/android/dx/rop/code/ConservativeTranslationAdvice.java
index 1ecf02c..6c48acf 100644
--- a/dx/src/com/android/dx/rop/code/ConservativeTranslationAdvice.java
+++ b/dx/src/com/android/dx/rop/code/ConservativeTranslationAdvice.java
@@ -32,7 +32,7 @@
     private ConservativeTranslationAdvice() {
         // This space intentionally left blank.
     }
-    
+
     /** {@inheritDoc} */
     public boolean hasConstantOperation(Rop opcode,
             RegisterSpec sourceA, RegisterSpec sourceB) {
diff --git a/dx/src/com/android/dx/rop/code/CstInsn.java b/dx/src/com/android/dx/rop/code/CstInsn.java
index 26df1a9..d7de2f4 100644
--- a/dx/src/com/android/dx/rop/code/CstInsn.java
+++ b/dx/src/com/android/dx/rop/code/CstInsn.java
@@ -28,7 +28,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param opcode {@code non-null;} the opcode
      * @param position {@code non-null;} source position
      * @param result {@code null-ok;} spec for the result, if any
@@ -54,7 +54,7 @@
 
     /**
      * Gets the constant.
-     * 
+     *
      * @return {@code non-null;} the constant
      */
     public Constant getConstant() {
diff --git a/dx/src/com/android/dx/rop/code/Exceptions.java b/dx/src/com/android/dx/rop/code/Exceptions.java
index f99a760..1e27a8c 100644
--- a/dx/src/com/android/dx/rop/code/Exceptions.java
+++ b/dx/src/com/android/dx/rop/code/Exceptions.java
@@ -29,7 +29,7 @@
 
     /**
      * {@code non-null;} the type
-     * {@code java.lang.ArrayIndexOutOfBoundsException} 
+     * {@code java.lang.ArrayIndexOutOfBoundsException}
      */
     public static final Type TYPE_ArrayIndexOutOfBoundsException =
         Type.intern("Ljava/lang/ArrayIndexOutOfBoundsException;");
@@ -47,7 +47,7 @@
 
     /**
      * {@code non-null;} the type
-     * {@code java.lang.IllegalMonitorStateException} 
+     * {@code java.lang.IllegalMonitorStateException}
      */
     public static final Type TYPE_IllegalMonitorStateException =
         Type.intern("Ljava/lang/IllegalMonitorStateException;");
@@ -79,7 +79,7 @@
 
     /**
      * {@code non-null;} the list {@code [java.lang.Error,
-     * java.lang.NegativeArraySizeException]} 
+     * java.lang.NegativeArraySizeException]}
      */
     public static final StdTypeList LIST_Error_NegativeArraySizeException =
         StdTypeList.make(TYPE_Error, TYPE_NegativeArraySizeException);
diff --git a/dx/src/com/android/dx/rop/code/FillArrayDataInsn.java b/dx/src/com/android/dx/rop/code/FillArrayDataInsn.java
index 0fc7d2b..ed9345d 100644
--- a/dx/src/com/android/dx/rop/code/FillArrayDataInsn.java
+++ b/dx/src/com/android/dx/rop/code/FillArrayDataInsn.java
@@ -41,7 +41,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param opcode {@code non-null;} the opcode
      * @param position {@code non-null;} source position
      * @param sources {@code non-null;} specs for all the sources
diff --git a/dx/src/com/android/dx/rop/code/Insn.java b/dx/src/com/android/dx/rop/code/Insn.java
index 77ab9c0..dad2852 100644
--- a/dx/src/com/android/dx/rop/code/Insn.java
+++ b/dx/src/com/android/dx/rop/code/Insn.java
@@ -44,7 +44,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param opcode {@code non-null;} the opcode
      * @param position {@code non-null;} source position
      * @param result {@code null-ok;} spec for the result, if any
@@ -72,7 +72,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * Instances of this class compare by identity. That is,
      * {@code x.equals(y)} is only true if {@code x == y}.
      */
@@ -83,7 +83,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * This implementation returns the identity hashcode of this
      * instance. This is proper, since instances of this class compare
      * by identity (see {@link #equals}).
@@ -101,7 +101,7 @@
 
     /**
      * Gets a human-oriented (and slightly lossy) string for this instance.
-     * 
+     *
      * @return {@code non-null;} the human string form
      */
     public String toHuman() {
@@ -111,7 +111,7 @@
     /**
      * Gets an "inline" string portion for toHuman(), if available. This
      * is the portion that appears after the Rop opcode
-     * 
+     *
      * @return {@code null-ok;} if non-null, the inline text for toHuman()
      */
     public String getInlineString() {
@@ -120,7 +120,7 @@
 
     /**
      * Gets the opcode.
-     * 
+     *
      * @return {@code non-null;} the opcode
      */
     public final Rop getOpcode() {
@@ -129,7 +129,7 @@
 
     /**
      * Gets the source position.
-     * 
+     *
      * @return {@code non-null;} the source position
      */
     public final SourcePosition getPosition() {
@@ -139,7 +139,7 @@
     /**
      * Gets the result spec, if any. A return value of {@code null}
      * means this instruction returns nothing.
-     * 
+     *
      * @return {@code null-ok;} the result spec, if any
      */
     public final RegisterSpec getResult() {
@@ -151,7 +151,7 @@
      * instruction, or null if no local variable assignment occurs. This
      * may be the result register, or for {@code mark-local} insns
      * it may be the source.
-     * 
+     *
      * @return {@code null-ok;} a named register spec or null
      */
     public final RegisterSpec getLocalAssignment() {
@@ -177,7 +177,7 @@
 
     /**
      * Gets the source specs.
-     * 
+     *
      * @return {@code non-null;} the source specs
      */
     public final RegisterSpecList getSources() {
@@ -187,7 +187,7 @@
     /**
      * Gets whether this instruction can possibly throw an exception. This
      * is just a convenient wrapper for {@code getOpcode().canThrow()}.
-     * 
+     *
      * @return {@code true} iff this instruction can possibly throw
      */
     public final boolean canThrow() {
@@ -201,7 +201,7 @@
      * throw or if it merely doesn't handle any of its possible
      * exceptions. To determine whether this instruction can throw,
      * use {@link #canThrow}.
-     * 
+     *
      * @return {@code non-null;} the catches list
      */
     public abstract TypeList getCatches();
@@ -209,7 +209,7 @@
     /**
      * Calls the appropriate method on the given visitor, depending on the
      * class of this instance. Subclasses must override this.
-     * 
+     *
      * @param visitor {@code non-null;} the visitor to call on
      */
     public abstract void accept(Visitor visitor);
@@ -220,7 +220,7 @@
      * method throws an exception if this instance can't possibly
      * throw. To determine whether this instruction can throw, use
      * {@link #canThrow}.
-     * 
+     *
      * @param type {@code non-null;} type to append to the catch list
      * @return {@code non-null;} an appropriately-constructed instance
      */
@@ -229,7 +229,7 @@
     /**
      * Returns an instance that is just like this one, except that all
      * register references have been offset by the given delta.
-     * 
+     *
      * @param delta the amount to offset register references by
      * @return {@code non-null;} an appropriately-constructed instance
      */
@@ -241,7 +241,7 @@
      * source (if it is a constant) is represented directly rather than
      * as a register reference. {@code this} is returned in cases where
      * the translation is not possible.
-     * 
+     *
      * @return {@code non-null;} an appropriately-constructed instance
      */
     public Insn withLastSourceLiteral() {
@@ -274,7 +274,7 @@
      * to be an identity compare. Insn's are {@code contentEquals()}
      * if they have the same opcode, registers, source position, and other
      * metadata.
-     * 
+     *
      * @return true in the case described above
      */
     public boolean contentEquals(Insn b) {
@@ -300,7 +300,7 @@
     /**
      * Returns the string form of this instance, with the given bit added in
      * the standard location for an inline argument.
-     * 
+     *
      * @param extra {@code null-ok;} the inline argument string
      * @return {@code non-null;} the string form
      */
@@ -333,7 +333,7 @@
     /**
      * Returns the human string form of this instance, with the given
      * bit added in the standard location for an inline argument.
-     * 
+     *
      * @param extra {@code null-ok;} the inline argument string
      * @return {@code non-null;} the human string form
      */
@@ -379,35 +379,35 @@
     public static interface Visitor {
         /**
          * Visits a {@link PlainInsn}.
-         * 
+         *
          * @param insn {@code non-null;} the instruction to visit
          */
         public void visitPlainInsn(PlainInsn insn);
 
         /**
          * Visits a {@link PlainCstInsn}.
-         * 
+         *
          * @param insn {@code non-null;} the instruction to visit
          */
         public void visitPlainCstInsn(PlainCstInsn insn);
 
         /**
          * Visits a {@link SwitchInsn}.
-         * 
+         *
          * @param insn {@code non-null;} the instruction to visit
          */
         public void visitSwitchInsn(SwitchInsn insn);
 
         /**
          * Visits a {@link ThrowingCstInsn}.
-         * 
+         *
          * @param insn {@code non-null;} the instruction to visit
          */
         public void visitThrowingCstInsn(ThrowingCstInsn insn);
 
         /**
          * Visits a {@link ThrowingInsn}.
-         * 
+         *
          * @param insn {@code non-null;} the instruction to visit
          */
         public void visitThrowingInsn(ThrowingInsn insn);
diff --git a/dx/src/com/android/dx/rop/code/InsnList.java b/dx/src/com/android/dx/rop/code/InsnList.java
index 493f7fc..88abd72 100644
--- a/dx/src/com/android/dx/rop/code/InsnList.java
+++ b/dx/src/com/android/dx/rop/code/InsnList.java
@@ -57,7 +57,7 @@
     /**
      * Gets the last instruction. This is just a convenient shorthand for
      * {@code get(size() - 1)}.
-     * 
+     *
      * @return {@code non-null;} the last instruction
      */
     public Insn getLast() {
@@ -91,7 +91,7 @@
         int sz = size();
 
         if (sz != b.size()) return false;
-        
+
         for (int i = 0; i < sz; i++) {
             if (!get(i).contentEquals(b.get(i))) {
                 return false;
@@ -106,7 +106,7 @@
      * the registers in each instruction are offset by the given
      * amount. Mutability of the result is inherited from the
      * original.
-     * 
+     *
      * @param delta the amount to offset register numbers by
      * @return {@code non-null;} an appropriately-constructed instance
      */
diff --git a/dx/src/com/android/dx/rop/code/LocalItem.java b/dx/src/com/android/dx/rop/code/LocalItem.java
index 7d6bebe..82b227c 100644
--- a/dx/src/com/android/dx/rop/code/LocalItem.java
+++ b/dx/src/com/android/dx/rop/code/LocalItem.java
@@ -68,7 +68,7 @@
         return 0 == compareTo(local);
     }
 
-    /** 
+    /**
      * Compares two strings like String.compareTo(), excepts treats a null
      * as the least-possible string value.
      *
diff --git a/dx/src/com/android/dx/rop/code/LocalVariableExtractor.java b/dx/src/com/android/dx/rop/code/LocalVariableExtractor.java
index db142c2..c2c4021 100644
--- a/dx/src/com/android/dx/rop/code/LocalVariableExtractor.java
+++ b/dx/src/com/android/dx/rop/code/LocalVariableExtractor.java
@@ -38,7 +38,7 @@
 
     /**
      * Extracts out all the local variable information from the given method.
-     * 
+     *
      * @param method {@code non-null;} the method to extract from
      * @return {@code non-null;} the extracted information
      */
@@ -49,7 +49,7 @@
 
     /**
      * Constructs an instance. This method is private. Use {@link #extract}.
-     * 
+     *
      * @param method {@code non-null;} the method to extract from
      */
     private LocalVariableExtractor(RopMethod method) {
@@ -68,7 +68,7 @@
 
     /**
      * Does the extraction.
-     * 
+     *
      * @return {@code non-null;} the extracted information
      */
     private LocalVariableInfo doit() {
@@ -78,14 +78,14 @@
             Bits.clear(workSet, label);
             processBlock(label);
         }
-        
+
         resultInfo.setImmutable();
         return resultInfo;
     }
 
     /**
      * Processes a single block.
-     * 
+     *
      * @param label {@code >= 0;} label of the block to process
      */
     private void processBlock(int label) {
@@ -158,7 +158,7 @@
                 if (previous != null
                         && (previous.getReg() != result.getReg())) {
 
-                    primaryState.remove(previous);                    
+                    primaryState.remove(previous);
                 }
 
                 resultInfo.addAssignment(insn, result);
diff --git a/dx/src/com/android/dx/rop/code/LocalVariableInfo.java b/dx/src/com/android/dx/rop/code/LocalVariableInfo.java
index fa5e7cc..99a10ee 100644
--- a/dx/src/com/android/dx/rop/code/LocalVariableInfo.java
+++ b/dx/src/com/android/dx/rop/code/LocalVariableInfo.java
@@ -33,14 +33,14 @@
     /**
      * {@code non-null;} {@link RegisterSpecSet} to use when indicating a block
      * that has no locals; it is empty and immutable but has an appropriate
-     * max size for the method 
+     * max size for the method
      */
     private final RegisterSpecSet emptySet;
 
     /**
      * {@code non-null;} array consisting of register sets representing the
      * sets of variables already assigned upon entry to each block,
-     * where array indices correspond to block labels 
+     * where array indices correspond to block labels
      */
     private final RegisterSpecSet[] blockStarts;
 
@@ -49,7 +49,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param method {@code non-null;} the method being represented by this instance
      */
     public LocalVariableInfo(RopMethod method) {
@@ -72,7 +72,7 @@
     /**
      * Sets the register set associated with the start of the block with
      * the given label.
-     * 
+     *
      * @param label {@code >= 0;} the block label
      * @param specs {@code non-null;} the register set to associate with the block
      */
@@ -97,7 +97,7 @@
      * is the same as calling {@link #setStarts}. Otherwise, this will
      * merge the two sets and call {@link #setStarts} on the result of the
      * merge.
-     * 
+     *
      * @param label {@code >= 0;} the block label
      * @param specs {@code non-null;} the register set to merge into the start set
      * for the block
@@ -131,7 +131,7 @@
      * Gets the register set associated with the start of the block
      * with the given label. This returns an empty set with the appropriate
      * max size if no set was associated with the block in question.
-     * 
+     *
      * @param label {@code >= 0;} the block label
      * @return {@code non-null;} the associated register set
      */
@@ -145,7 +145,7 @@
      * Gets the register set associated with the start of the given
      * block. This is just convenient shorthand for
      * {@code getStarts(block.getLabel())}.
-     * 
+     *
      * @param block {@code non-null;} the block in question
      * @return {@code non-null;} the associated register set
      */
@@ -158,7 +158,7 @@
      * start of the block with the given label. This returns a
      * newly-allocated empty {@link RegisterSpecSet} of appropriate
      * max size if there is not yet any set associated with the block.
-     * 
+     *
      * @param label {@code >= 0;} the block label
      * @return {@code non-null;} the associated register set
      */
@@ -173,13 +173,13 @@
      * Adds an assignment association for the given instruction and
      * register spec. This throws an exception if the instruction
      * doesn't actually perform a named variable assignment.
-     * 
+     *
      * <b>Note:</b> Although the instruction contains its own spec for
      * the result, it still needs to be passed in explicitly to this
      * method, since the spec that is stored here should always have a
      * simple type and the one in the instruction can be an arbitrary
      * {@link TypeBearer} (such as a constant value).
-     * 
+     *
      * @param insn {@code non-null;} the instruction in question
      * @param spec {@code non-null;} the associated register spec
      */
@@ -200,7 +200,7 @@
     /**
      * Gets the named register being assigned by the given instruction, if
      * previously stored in this instance.
-     * 
+     *
      * @param insn {@code non-null;} instruction in question
      * @return {@code null-ok;} the named register being assigned, if any
      */
@@ -210,7 +210,7 @@
 
     /**
      * Gets the number of assignments recorded by this instance.
-     * 
+     *
      * @return {@code >= 0;} the number of assignments
      */
     public int getAssignmentCount() {
@@ -234,7 +234,7 @@
     /**
      * Helper method, to get the starts for a label, throwing the
      * right exception for range problems.
-     * 
+     *
      * @param label {@code >= 0;} the block label
      * @return {@code null-ok;} associated register set or {@code null} if there
      * is none
diff --git a/dx/src/com/android/dx/rop/code/PlainCstInsn.java b/dx/src/com/android/dx/rop/code/PlainCstInsn.java
index 7a3ac38..fffa76b 100644
--- a/dx/src/com/android/dx/rop/code/PlainCstInsn.java
+++ b/dx/src/com/android/dx/rop/code/PlainCstInsn.java
@@ -29,7 +29,7 @@
         extends CstInsn {
     /**
      * Constructs an instance.
-     * 
+     *
      * @param opcode {@code non-null;} the opcode
      * @param position {@code non-null;} source position
      * @param result {@code null-ok;} spec for the result, if any
diff --git a/dx/src/com/android/dx/rop/code/PlainInsn.java b/dx/src/com/android/dx/rop/code/PlainInsn.java
index d1db646..3fd2ba5 100644
--- a/dx/src/com/android/dx/rop/code/PlainInsn.java
+++ b/dx/src/com/android/dx/rop/code/PlainInsn.java
@@ -30,7 +30,7 @@
         extends Insn {
     /**
      * Constructs an instance.
-     * 
+     *
      * @param opcode {@code non-null;} the opcode
      * @param position {@code non-null;} source position
      * @param result {@code null-ok;} spec for the result, if any
@@ -50,13 +50,13 @@
         if (result != null && opcode.getBranchingness() != Rop.BRANCH_NONE) {
             // move-result-pseudo is required here
             throw new IllegalArgumentException
-                    ("can't mix branchingness with result");            
+                    ("can't mix branchingness with result");
         }
     }
 
     /**
      * Constructs a single-source instance.
-     * 
+     *
      * @param opcode {@code non-null;} the opcode
      * @param position {@code non-null;} source position
      * @param result {@code null-ok;} spec for the result, if any
diff --git a/dx/src/com/android/dx/rop/code/RegOps.java b/dx/src/com/android/dx/rop/code/RegOps.java
index 2084a69..bdf9342 100644
--- a/dx/src/com/android/dx/rop/code/RegOps.java
+++ b/dx/src/com/android/dx/rop/code/RegOps.java
@@ -20,7 +20,7 @@
 
 /**
  * All the register-based opcodes, and related utilities.
- * 
+ *
  * <p><b>Note:</b> Opcode descriptions use a rough pseudocode. {@code r}
  * is the result register, {@code x} is the first argument,
  * {@code y} is the second argument, and {@code z} is the
@@ -93,7 +93,7 @@
 
     /**
      * {@code T: any numeric type; r,x,y: T :: r = x % y}
-     * (Java-style remainder) 
+     * (Java-style remainder)
      */
     public static final int REM = 18;
 
@@ -116,13 +116,13 @@
 
     /**
      * {@code T: any integral type; r,x: T; y: int :: r = x >> y}
-     * (signed right-shift) 
+     * (signed right-shift)
      */
     public static final int SHR = 24;
 
     /**
      * {@code T: any integral type; r,x: T; y: int :: r = x >>> y}
-     * (unsigned right-shift) 
+     * (unsigned right-shift)
      */
     public static final int USHR = 25;
 
@@ -133,38 +133,38 @@
      * {@code T: any numeric type; r: int; x,y: T :: r = (x == y) ? 0
      * : (x > y) ? 1 : -1} (Java-style "cmpl" where a NaN is
      * considered "less than" all other values; also used for integral
-     * comparisons) 
+     * comparisons)
      */
     public static final int CMPL = 27;
 
     /**
      * {@code T: any floating point type; r: int; x,y: T :: r = (x == y) ? 0
      * : (x < y) ? -1 : 1} (Java-style "cmpg" where a NaN is
-     * considered "greater than" all other values) 
+     * considered "greater than" all other values)
      */
     public static final int CMPG = 28;
 
     /**
      * {@code T: any numeric type; U: any numeric type; r: T; x: U ::
      * r = (T) x} (numeric type conversion between the four
-     * "real" numeric types) 
+     * "real" numeric types)
      */
     public static final int CONV = 29;
 
     /**
      * {@code r,x: int :: r = (x << 24) >> 24} (Java-style
-     * convert int to byte) 
+     * convert int to byte)
      */
     public static final int TO_BYTE = 30;
 
     /**
-     * {@code r,x: int :: r = x & 0xffff} (Java-style convert int to char) 
+     * {@code r,x: int :: r = x & 0xffff} (Java-style convert int to char)
      */
     public static final int TO_CHAR = 31;
 
     /**
      * {@code r,x: int :: r = (x << 16) >> 16} (Java-style
-     * convert int to short) 
+     * convert int to short)
      */
     public static final int TO_SHORT = 32;
 
@@ -191,7 +191,7 @@
 
     /**
      * {@code T: any non-array object type :: r =
-     * alloc(T)} (allocate heap space for an object) 
+     * alloc(T)} (allocate heap space for an object)
      */
     public static final int NEW_INSTANCE = 40;
 
@@ -206,7 +206,7 @@
 
     /**
      * {@code T: any object type; x: Object :: (T) x} (can
-     * throw {@code ClassCastException}) 
+     * throw {@code ClassCastException})
      */
     public static final int CHECK_CAST = 43;
 
@@ -223,13 +223,13 @@
 
     /**
      * {@code T: any type; r: T; f: static field spec of type T :: r =
-     * f} 
+     * f}
      */
     public static final int GET_STATIC = 46;
 
     /**
      * {@code T: any type; x: T; y: Object; f: instance field spec of type
-     * T :: y.f = x} 
+     * T :: y.f = x}
      */
     public static final int PUT_FIELD = 47;
 
@@ -241,35 +241,35 @@
     /**
      * {@code Tr, T0, T1...: any types; r: Tr; m: static method spec;
      * y0: T0; y1: T1 ... :: r = m(y0, y1, ...)} (call static
-     * method) 
+     * method)
      */
     public static final int INVOKE_STATIC = 49;
 
     /**
      * {@code Tr, T0, T1...: any types; r: Tr; x: Object; m: instance method
      * spec; y0: T0; y1: T1 ... :: r = x.m(y0, y1, ...)} (call normal
-     * virtual method) 
+     * virtual method)
      */
     public static final int INVOKE_VIRTUAL = 50;
 
     /**
      * {@code Tr, T0, T1...: any types; r: Tr; x: Object; m: instance method
      * spec; y0: T0; y1: T1 ... :: r = x.m(y0, y1, ...)} (call
-     * superclass virtual method) 
+     * superclass virtual method)
      */
     public static final int INVOKE_SUPER = 51;
 
     /**
      * {@code Tr, T0, T1...: any types; r: Tr; x: Object; m: instance method
      * spec; y0: T0; y1: T1 ... :: r = x.m(y0, y1, ...)} (call
-     * direct/special method) 
+     * direct/special method)
      */
     public static final int INVOKE_DIRECT = 52;
 
     /**
      * {@code Tr, T0, T1...: any types; r: Tr; x: Object; m: interface
      * (instance) method spec; y0: T0; y1: T1 ... :: r = x.m(y0, y1,
-     * ...)} (call interface method) 
+     * ...)} (call interface method)
      */
     public static final int INVOKE_INTERFACE = 53;
 
@@ -305,7 +305,7 @@
 
     /**
      * Gets the name of the given opcode.
-     * 
+     *
      * @param opcode {@code >= 0, <= 255;} the opcode
      * @return {@code non-null;} its name
      */
diff --git a/dx/src/com/android/dx/rop/code/RegisterSpec.java b/dx/src/com/android/dx/rop/code/RegisterSpec.java
index 1f14767..f1ac563 100644
--- a/dx/src/com/android/dx/rop/code/RegisterSpec.java
+++ b/dx/src/com/android/dx/rop/code/RegisterSpec.java
@@ -76,7 +76,7 @@
      * Returns an instance for the given register number and type, with
      * no variable info. This method is allowed to return shared
      * instances (but doesn't necessarily do so).
-     * 
+     *
      * @param reg {@code >= 0;} the register number
      * @param type {@code non-null;} the type (or possibly actual value) which
      * is loaded from or stored to the indicated register
@@ -126,7 +126,7 @@
 
     /**
      * Gets the string form for the given register number.
-     * 
+     *
      * @param reg {@code >= 0;} the register number
      * @return {@code non-null;} the string form
      */
@@ -137,7 +137,7 @@
     /**
      * Constructs an instance. This constructor is private. Use
      * {@link #make}.
-     * 
+     *
      * @param reg {@code >= 0;} the register number
      * @param type {@code non-null;} the type (or possibly actual value) which
      * is loaded from or stored to the indicated register
@@ -177,7 +177,7 @@
      * registers. That is, this compares {@code getType()} on the types
      * to ignore whatever arbitrary extra stuff might be carried around
      * by an outer {@link TypeBearer}.
-     * 
+     *
      * @param other {@code null-ok;} spec to compare to
      * @return {@code true} iff {@code this} and {@code other} are equal
      * in the stated way
@@ -194,7 +194,7 @@
      * Like {@link #equalsUsingSimpleType} but ignoring the register number.
      * This is useful to determine if two instances refer to the "same"
      * local variable.
-     * 
+     *
      * @param other {@code null-ok;} spec to compare to
      * @return {@code true} iff {@code this} and {@code other} are equal
      * in the stated way
@@ -212,7 +212,7 @@
     /**
      * Helper for {@link #equals} and {@link #ForComparison.equals},
      * which actually does the test.
-     * 
+     *
      * @param reg value of the instance variable, for another instance
      * @param type value of the instance variable, for another instance
      * @param local value of the instance variable, for another instance
@@ -229,7 +229,7 @@
     /**
      * Compares by (in priority order) register number, unwrapped type
      * (that is types not {@link TypeBearer}s, and local info.
-     * 
+     *
      * @param other {@code non-null;} spec to compare to
      * @return {@code -1..1;} standard result of comparison
      */
@@ -253,7 +253,7 @@
         }
 
         return this.local.compareTo(other.local);
-    }    
+    }
 
     /** {@inheritDoc} */
     @Override
@@ -264,7 +264,7 @@
     /**
      * Helper for {@link #hashCode} and {@link #ForComparison.hashCode},
      * which actually does the calculation.
-     * 
+     *
      * @param reg value of the instance variable
      * @param type value of the instance variable
      * @param local value of the instance variable
@@ -315,7 +315,7 @@
 
     /**
      * Gets the register number.
-     * 
+     *
      * @return {@code >= 0;} the register number
      */
     public int getReg() {
@@ -325,7 +325,7 @@
     /**
      * Gets the type (or actual value) which is loaded from or stored
      * to the register associated with this instance.
-     * 
+     *
      * @return {@code non-null;} the type
      */
     public TypeBearer getTypeBearer() {
@@ -348,7 +348,7 @@
      * (category) of the type used. Among other things, this may also
      * be used to determine the minimum required register count
      * implied by this instance.
-     * 
+     *
      * @return {@code >= 0;} the required registers size
      */
     public int getNextReg() {
@@ -358,7 +358,7 @@
     /**
      * Gets the category of this instance's type. This is just a convenient
      * shorthand for {@code getType().getCategory()}.
-     * 
+     *
      * @see #isCategory1
      * @see #isCategory2
      * @return {@code 1..2;} the category of this instance's type
@@ -370,7 +370,7 @@
     /**
      * Gets whether this instance's type is category 1. This is just a
      * convenient shorthand for {@code getType().isCategory1()}.
-     * 
+     *
      * @see #getCategory
      * @see #isCategory2
      * @return whether or not this instance's type is of category 1
@@ -382,7 +382,7 @@
     /**
      * Gets whether this instance's type is category 2. This is just a
      * convenient shorthand for {@code getType().isCategory2()}.
-     * 
+     *
      * @see #getCategory
      * @see #isCategory1
      * @return whether or not this instance's type is of category 2
@@ -393,7 +393,7 @@
 
     /**
      * Gets the string form for just the register number of this instance.
-     * 
+     *
      * @return {@code non-null;} the register string form
      */
     public String regString() {
@@ -403,7 +403,7 @@
     /**
      * Returns an instance that is the intersection between this instance
      * and the given one, if any. The intersection is defined as follows:
-     * 
+     *
      * <ul>
      *   <li>If {@code other} is {@code null}, then the result
      *     is {@code null}.
@@ -420,7 +420,7 @@
      *     of the intersection is the local info of this instance. Otherwise,
      *     the local info of the intersection is {@code null}.</li>
      * </ul>
-     * 
+     *
      * @param other {@code null-ok;} instance to intersect with (or {@code null})
      * @param localPrimary whether local variables are primary to the
      * intersection; if {@code true}, then the only non-null
@@ -470,7 +470,7 @@
     /**
      * Returns an instance that is identical to this one, except that the
      * register number is replaced by the given one.
-     * 
+     *
      * @param newReg {@code >= 0;} the new register number
      * @return {@code non-null;} an appropriately-constructed instance
      */
@@ -496,7 +496,7 @@
     /**
      * Returns an instance that is identical to this one, except that the
      * register number is offset by the given amount.
-     * 
+     *
      * @param delta the amount to offset the register number by
      * @return {@code non-null;} an appropriately-constructed instance
      */
@@ -507,13 +507,13 @@
 
         return withReg(reg + delta);
     }
-    
+
     /**
      * Returns an instance that is identical to this one, except that
      * the type bearer is replaced by the actual underlying type
      * (thereby stripping off non-type information) with any
      * initialization information stripped away as well.
-     * 
+     *
      * @return {@code non-null;} an appropriately-constructed instance
      */
     public RegisterSpec withSimpleType() {
@@ -557,7 +557,7 @@
 
     /**
      * Helper for {@link #toString} and {@link #toHuman}.
-     * 
+     *
      * @param human whether to be human-oriented
      * @return {@code non-null;} the string form
      */
@@ -594,7 +594,7 @@
     private static class ForComparison {
         /** {@code >= 0;} register number */
         private int reg;
-        
+
         /** {@code non-null;} type loaded or stored */
         private TypeBearer type;
 
@@ -606,7 +606,7 @@
 
         /**
          * Set all the instance variables.
-         * 
+         *
          * @param reg {@code >= 0;} the register number
          * @param type {@code non-null;} the type (or possibly actual
          * value) which is loaded from or stored to the indicated
@@ -623,7 +623,7 @@
         /**
          * Construct a {@code RegisterSpec} of this instance's
          * contents.
-         * 
+         *
          * @return {@code non-null;} an appropriately-constructed instance
          */
         public RegisterSpec toRegisterSpec() {
diff --git a/dx/src/com/android/dx/rop/code/RegisterSpecList.java b/dx/src/com/android/dx/rop/code/RegisterSpecList.java
index 5a02a8d..e900787 100644
--- a/dx/src/com/android/dx/rop/code/RegisterSpecList.java
+++ b/dx/src/com/android/dx/rop/code/RegisterSpecList.java
@@ -30,7 +30,7 @@
 
     /**
      * Makes a single-element instance.
-     * 
+     *
      * @param spec {@code non-null;} the element
      * @return {@code non-null;} an appropriately-constructed instance
      */
@@ -42,7 +42,7 @@
 
     /**
      * Makes a two-element instance.
-     * 
+     *
      * @param spec0 {@code non-null;} the first element
      * @param spec1 {@code non-null;} the second element
      * @return {@code non-null;} an appropriately-constructed instance
@@ -57,7 +57,7 @@
 
     /**
      * Makes a three-element instance.
-     * 
+     *
      * @param spec0 {@code non-null;} the first element
      * @param spec1 {@code non-null;} the second element
      * @param spec2 {@code non-null;} the third element
@@ -74,7 +74,7 @@
 
     /**
      * Makes a four-element instance.
-     * 
+     *
      * @param spec0 {@code non-null;} the first element
      * @param spec1 {@code non-null;} the second element
      * @param spec2 {@code non-null;} the third element
@@ -94,7 +94,7 @@
 
     /**
      * Constructs an instance. All indices initially contain {@code null}.
-     * 
+     *
      * @param size the size of the list
      */
     public RegisterSpecList(int size) {
@@ -122,12 +122,12 @@
     public TypeList withAddedType(Type type) {
         throw new UnsupportedOperationException("unsupported");
     }
-    
+
     /**
      * Gets the indicated element. It is an error to call this with the
      * index for an element which was never set; if you do that, this
      * will throw {@code NullPointerException}.
-     * 
+     *
      * @param n {@code >= 0, < size();} which element
      * @return {@code non-null;} the indicated element
      */
@@ -174,12 +174,12 @@
             }
         }
 
-        return -1;        
+        return -1;
     }
-    
+
     /**
      * Sets the element at the given index.
-     * 
+     *
      * @param n {@code >= 0, < size();} which element
      * @param spec {@code non-null;} the value to store
      */
@@ -192,7 +192,7 @@
      * instance. This is equal to the highest register number referred
      * to plus the widest width (largest category) of the type used in
      * that register.
-     * 
+     *
      * @return {@code >= 0;} the required registers size
      */
     public int getRegistersSize() {
@@ -216,7 +216,7 @@
      * Returns a new instance, which is the same as this instance,
      * except that it has an additional element prepended to the original.
      * Mutability of the result is inherited from the original.
-     * 
+     *
      * @param spec {@code non-null;} the new first spec (to prepend)
      * @return {@code non-null;} an appropriately-constructed instance
      */
@@ -240,7 +240,7 @@
      * Returns a new instance, which is the same as this instance,
      * except that its first element is removed. Mutability of the
      * result is inherited from the original.
-     * 
+     *
      * @return {@code non-null;} an appropriately-constructed instance
      */
     public RegisterSpecList withoutFirst() {
@@ -267,7 +267,7 @@
      * Returns a new instance, which is the same as this instance,
      * except that its last element is removed. Mutability of the
      * result is inherited from the original.
-     * 
+     *
      * @return {@code non-null;} an appropriately-constructed instance
      */
     public RegisterSpecList withoutLast() {
@@ -294,7 +294,7 @@
      * Returns an instance that is identical to this one, except that
      * all register numbers are offset by the given amount. Mutability
      * of the result is inherited from the original.
-     * 
+     *
      * @param delta the amount to offset the register numbers by
      * @return {@code non-null;} an appropriately-constructed instance
      */
@@ -325,8 +325,8 @@
     /**
      * Returns an instance that is identical to this one, except that
      * all register numbers are renumbered sequentially from the given
-     * base, with the first number duplicated if indicated. 
-     * 
+     * base, with the first number duplicated if indicated.
+     *
      * @param base the base register number
      * @param duplicateFirst whether to duplicate the first number
      * @return {@code non-null;} an appropriately-constructed instance
diff --git a/dx/src/com/android/dx/rop/code/RegisterSpecSet.java b/dx/src/com/android/dx/rop/code/RegisterSpecSet.java
index 68009d9..d16a82a 100644
--- a/dx/src/com/android/dx/rop/code/RegisterSpecSet.java
+++ b/dx/src/com/android/dx/rop/code/RegisterSpecSet.java
@@ -31,7 +31,7 @@
     /**
      * {@code non-null;} array of register specs, where each element is
      * {@code null} or is an instance whose {@code reg}
-     * matches the array index 
+     * matches the array index
      */
     private final RegisterSpec[] specs;
 
@@ -40,7 +40,7 @@
 
     /**
      * Constructs an instance. The instance is initially empty.
-     * 
+     *
      * @param maxSize {@code >= 0;} the maximum register number (exclusive) that
      * may be represented in this instance
      */
@@ -120,13 +120,13 @@
 
         sb.append('}');
         return sb.toString();
-    }       
+    }
 
     /**
      * Gets the maximum number of registers that may be in this instance, which
      * is also the maximum-plus-one of register numbers that may be
      * represented.
-     * 
+     *
      * @return {@code >= 0;} the maximum size
      */
     public int getMaxSize() {
@@ -135,7 +135,7 @@
 
     /**
      * Gets the current size of this instance.
-     * 
+     *
      * @return {@code >= 0;} the size
      */
     public int size() {
@@ -159,7 +159,7 @@
 
     /**
      * Gets the element with the given register number, if any.
-     * 
+     *
      * @param reg {@code >= 0;} the desired register number
      * @return {@code null-ok;} the element with the given register number or
      * {@code null} if there is none
@@ -177,7 +177,7 @@
      * Gets the element with the same register number as the given
      * spec, if any. This is just a convenient shorthand for
      * {@code get(spec.getReg())}.
-     * 
+     *
      * @param spec {@code non-null;} spec with the desired register number
      * @return {@code null-ok;} the element with the matching register number or
      * {@code null} if there is none
@@ -191,13 +191,13 @@
      * given local (type, name, and signature), or {@code null} if there is
      * none. This ignores the register number of the given spec but
      * matches on everything else.
-     * 
+     *
      * @param spec {@code non-null;} local to look for
      * @return {@code null-ok;} first register found that matches, if any
      */
     public RegisterSpec findMatchingLocal(RegisterSpec spec) {
         int length = specs.length;
-        
+
         for (int reg = 0; reg < length; reg++) {
             RegisterSpec s = specs[reg];
 
@@ -222,10 +222,10 @@
      */
     public RegisterSpec localItemToSpec(LocalItem local) {
         int length = specs.length;
-        
+
         for (int reg = 0; reg < length; reg++) {
             RegisterSpec spec = specs[reg];
-            
+
             if ((spec != null) && local.equals(spec.getLocalItem())) {
                 return spec;
             }
@@ -257,7 +257,7 @@
      * previous element is nullified. Finally, if the given spec is for
      * a category-2 register, then the immediately subsequent element
      * is nullified.
-     * 
+     *
      * @param spec {@code non-null;} the register spec to put in the instance
      */
     public void put(RegisterSpec spec) {
@@ -292,7 +292,7 @@
 
     /**
      * Put the entire contents of the given set into this one.
-     * 
+     *
      * @param set {@code non-null;} the set to put into this instance
      */
     public void putAll(RegisterSpecSet set) {
@@ -311,7 +311,7 @@
      * instance. The intersection consists of the pairwise
      * {@link RegisterSpec#intersect} of corresponding elements from
      * this instance and the given one where both are non-null.
-     * 
+     *
      * @param other {@code non-null;} set to intersect with
      * @param localPrimary whether local variables are primary to
      * the intersection; if {@code true}, then the only non-null
@@ -350,7 +350,7 @@
      * Returns an instance that is identical to this one, except that
      * all register numbers are offset by the given amount. Mutability
      * of the result is inherited from the original.
-     * 
+     *
      * @param delta the amount to offset the register numbers by
      * @return {@code non-null;} an appropriately-constructed instance
      */
@@ -376,7 +376,7 @@
 
     /**
      * Makes and return a mutable copy of this instance.
-     * 
+     *
      * @return {@code non-null;} the mutable copy
      */
     public RegisterSpecSet mutableCopy() {
diff --git a/dx/src/com/android/dx/rop/code/Rop.java b/dx/src/com/android/dx/rop/code/Rop.java
index fbd9a16..8224584 100644
--- a/dx/src/com/android/dx/rop/code/Rop.java
+++ b/dx/src/com/android/dx/rop/code/Rop.java
@@ -54,7 +54,7 @@
 
     /**
      * {@code non-null;} result type of this operation; {@link Type#VOID} for
-     * no-result operations 
+     * no-result operations
      */
     private final Type result;
 
@@ -66,7 +66,7 @@
 
     /**
      * the branchingness of this op; one of the {@code BRANCH_*}
-     * constants in this class 
+     * constants in this class
      */
     private final int branchingness;
 
@@ -79,7 +79,7 @@
     /**
      * Constructs an instance. This method is private. Use one of the
      * public constructors.
-     * 
+     *
      * @param opcode the opcode; one of the constants in {@link RegOps}
      * @param result {@code non-null;} result type of this operation; {@link
      * Type#VOID} for no-result operations
@@ -125,9 +125,9 @@
     }
 
     /**
-     * Constructs an instance. The constructed instance is never a 
+     * Constructs an instance. The constructed instance is never a
      * call-like op (see {@link #isCallLike}).
-     * 
+     *
      * @param opcode the opcode; one of the constants in {@link RegOps}
      * @param result {@code non-null;} result type of this operation; {@link
      * Type#VOID} for no-result operations
@@ -145,9 +145,9 @@
     }
 
     /**
-     * Constructs a no-exception instance. The constructed instance is never a 
+     * Constructs a no-exception instance. The constructed instance is never a
      * call-like op (see {@link #isCallLike}).
-     * 
+     *
      * @param opcode the opcode; one of the constants in {@link RegOps}
      * @param result {@code non-null;} result type of this operation; {@link
      * Type#VOID} for no-result operations
@@ -166,7 +166,7 @@
      * Constructs a non-branching no-exception instance. The
      * {@code branchingness} is always {@code BRANCH_NONE},
      * and it is never a call-like op (see {@link #isCallLike}).
-     * 
+     *
      * @param opcode the opcode; one of the constants in {@link RegOps}
      * @param result {@code non-null;} result type of this operation; {@link
      * Type#VOID} for no-result operations
@@ -182,7 +182,7 @@
      * Constructs a non-empty exceptions instance. Its
      * {@code branchingness} is always {@code BRANCH_THROW},
      * but it is never a call-like op (see {@link #isCallLike}).
-     * 
+     *
      * @param opcode the opcode; one of the constants in {@link RegOps}
      * @param result {@code non-null;} result type of this operation; {@link
      * Type#VOID} for no-result operations
@@ -201,7 +201,7 @@
      * Constructs a non-nicknamed instance with non-empty exceptions, which
      * is always a call-like op (see {@link #isCallLike}). Its
      * {@code branchingness} is always {@code BRANCH_THROW}.
-     * 
+     *
      * @param opcode the opcode; one of the constants in {@link RegOps}
      * @param sources {@code non-null;} types of all the sources of this operation
      * @param exceptions {@code non-null;} list of possible types thrown by this
@@ -306,7 +306,7 @@
 
     /**
      * Gets the opcode.
-     * 
+     *
      * @return the opcode
      */
     public int getOpcode() {
@@ -316,7 +316,7 @@
     /**
      * Gets the result type. A return value of {@link Type#VOID}
      * means this operation returns nothing.
-     * 
+     *
      * @return {@code null-ok;} the result spec
      */
     public Type getResult() {
@@ -325,7 +325,7 @@
 
     /**
      * Gets the source types.
-     * 
+     *
      * @return {@code non-null;} the source types
      */
     public TypeList getSources() {
@@ -334,7 +334,7 @@
 
     /**
      * Gets the list of exception types that might be thrown.
-     * 
+     *
      * @return {@code non-null;} the list of exception types
      */
     public TypeList getExceptions() {
@@ -343,7 +343,7 @@
 
     /**
      * Gets the branchingness of this instance.
-     * 
+     *
      * @return the branchingness
      */
     public int getBranchingness() {
@@ -352,7 +352,7 @@
 
     /**
      * Gets whether this opcode is a function/method call or similar.
-     * 
+     *
      * @return {@code true} iff this opcode is call-like
      */
     public boolean isCallLike() {
@@ -383,7 +383,7 @@
     /**
      * Gets the nickname. If this instance has no nickname, this returns
      * the result of calling {@link #toString}.
-     * 
+     *
      * @return {@code non-null;} the nickname
      */
     public String getNickname() {
@@ -398,7 +398,7 @@
      * Gets whether this operation can possibly throw an exception. This
      * is just a convenient wrapper for
      * {@code getExceptions().size() != 0}.
-     * 
+     *
      * @return {@code true} iff this operation can possibly throw
      */
     public final boolean canThrow() {
diff --git a/dx/src/com/android/dx/rop/code/RopMethod.java b/dx/src/com/android/dx/rop/code/RopMethod.java
index 3957532..591d325 100644
--- a/dx/src/com/android/dx/rop/code/RopMethod.java
+++ b/dx/src/com/android/dx/rop/code/RopMethod.java
@@ -32,19 +32,19 @@
 
     /**
      * {@code null-ok;} array of predecessors for each block, indexed by block
-     * label 
+     * label
      */
     private IntList[] predecessors;
 
     /**
      * {@code null-ok;} the predecessors for the implicit "exit" block, that is
-     * the labels for the blocks that return, if calculated 
+     * the labels for the blocks that return, if calculated
      */
     private IntList exitPredecessors;
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param blocks {@code non-null;} basic block list of the method
      * @param firstLabel {@code >= 0;} the label of the first block to execute
      */
@@ -66,7 +66,7 @@
 
     /**
      * Gets the basic block list for this method.
-     * 
+     *
      * @return {@code non-null;} the list
      */
     public BasicBlockList getBlocks() {
@@ -76,7 +76,7 @@
     /**
      * Gets the label for the first block in the method that this list
      * represents.
-     * 
+     *
      * @return {@code >= 0;} the first-block label
      */
     public int getFirstLabel() {
@@ -86,7 +86,7 @@
     /**
      * Gets the predecessors associated with the given block. This throws
      * an exception if there is no block with the given label.
-     * 
+     *
      * @param label {@code >= 0;} the label of the block in question
      * @return {@code non-null;} the predecessors of that block
      */
@@ -106,7 +106,7 @@
 
     /**
      * Gets the exit predecessors for this instance.
-     * 
+     *
      * @return {@code non-null;} the exit predecessors
      */
     public IntList getExitPredecessors() {
@@ -122,7 +122,7 @@
      * Returns an instance that is identical to this one, except that
      * the registers in each instruction are offset by the given
      * amount.
-     * 
+     *
      * @param delta the amount to offset register numbers by
      * @return {@code non-null;} an appropriately-constructed instance
      */
diff --git a/dx/src/com/android/dx/rop/code/Rops.java b/dx/src/com/android/dx/rop/code/Rops.java
index 15c2e17..9085ff4 100644
--- a/dx/src/com/android/dx/rop/code/Rops.java
+++ b/dx/src/com/android/dx/rop/code/Rops.java
@@ -201,7 +201,7 @@
                 Rop.BRANCH_IF, "if-ne-object");
 
     /** {@code x: int :: goto switchtable[x]} */
-    public static final Rop SWITCH = 
+    public static final Rop SWITCH =
         new Rop(RegOps.SWITCH, Type.VOID, StdTypeList.INT, Rop.BRANCH_SWITCH,
                 "switch");
 
@@ -575,21 +575,21 @@
 
     /**
      * {@code r,x: int :: r = (x << 24) >> 24} (Java-style
-     * convert int to byte) 
+     * convert int to byte)
      */
-    public static final Rop TO_BYTE = 
+    public static final Rop TO_BYTE =
         new Rop(RegOps.TO_BYTE, Type.INT, StdTypeList.INT, "to-byte");
 
     /**
      * {@code r,x: int :: r = x & 0xffff} (Java-style
-     * convert int to char) 
+     * convert int to char)
      */
     public static final Rop TO_CHAR =
         new Rop(RegOps.TO_CHAR, Type.INT, StdTypeList.INT, "to-char");
 
     /**
      * {@code r,x: int :: r = (x << 16) >> 16} (Java-style
-     * convert int to short) 
+     * convert int to short)
      */
     public static final Rop TO_SHORT =
         new Rop(RegOps.TO_SHORT, Type.INT, StdTypeList.INT, "to-short");
@@ -646,110 +646,110 @@
                 "monitor-exit");
 
     /** {@code r,y: int; x: int[] :: r = x[y]} */
-    public static final Rop AGET_INT = 
+    public static final Rop AGET_INT =
         new Rop(RegOps.AGET, Type.INT, StdTypeList.INTARR_INT,
                 Exceptions.LIST_Error_Null_ArrayIndexOutOfBounds,
                 "aget-int");
 
     /** {@code r: long; x: long[]; y: int :: r = x[y]} */
-    public static final Rop AGET_LONG = 
+    public static final Rop AGET_LONG =
         new Rop(RegOps.AGET, Type.LONG, StdTypeList.LONGARR_INT,
                 Exceptions.LIST_Error_Null_ArrayIndexOutOfBounds,
                 "aget-long");
 
     /** {@code r: float; x: float[]; y: int :: r = x[y]} */
-    public static final Rop AGET_FLOAT = 
+    public static final Rop AGET_FLOAT =
         new Rop(RegOps.AGET, Type.FLOAT, StdTypeList.FLOATARR_INT,
                 Exceptions.LIST_Error_Null_ArrayIndexOutOfBounds,
                 "aget-float");
 
     /** {@code r: double; x: double[]; y: int :: r = x[y]} */
-    public static final Rop AGET_DOUBLE = 
+    public static final Rop AGET_DOUBLE =
         new Rop(RegOps.AGET, Type.DOUBLE, StdTypeList.DOUBLEARR_INT,
                 Exceptions.LIST_Error_Null_ArrayIndexOutOfBounds,
                 "aget-double");
 
     /** {@code r: Object; x: Object[]; y: int :: r = x[y]} */
-    public static final Rop AGET_OBJECT = 
+    public static final Rop AGET_OBJECT =
         new Rop(RegOps.AGET, Type.OBJECT, StdTypeList.OBJECTARR_INT,
                 Exceptions.LIST_Error_Null_ArrayIndexOutOfBounds,
                 "aget-object");
 
     /** {@code r: boolean; x: boolean[]; y: int :: r = x[y]} */
-    public static final Rop AGET_BOOLEAN = 
+    public static final Rop AGET_BOOLEAN =
         new Rop(RegOps.AGET, Type.INT, StdTypeList.BOOLEANARR_INT,
                 Exceptions.LIST_Error_Null_ArrayIndexOutOfBounds,
                 "aget-boolean");
 
     /** {@code r: byte; x: byte[]; y: int :: r = x[y]} */
-    public static final Rop AGET_BYTE = 
+    public static final Rop AGET_BYTE =
         new Rop(RegOps.AGET, Type.INT, StdTypeList.BYTEARR_INT,
                 Exceptions.LIST_Error_Null_ArrayIndexOutOfBounds, "aget-byte");
 
     /** {@code r: char; x: char[]; y: int :: r = x[y]} */
-    public static final Rop AGET_CHAR = 
+    public static final Rop AGET_CHAR =
         new Rop(RegOps.AGET, Type.INT, StdTypeList.CHARARR_INT,
                 Exceptions.LIST_Error_Null_ArrayIndexOutOfBounds, "aget-char");
 
     /** {@code r: short; x: short[]; y: int :: r = x[y]} */
-    public static final Rop AGET_SHORT = 
+    public static final Rop AGET_SHORT =
         new Rop(RegOps.AGET, Type.INT, StdTypeList.SHORTARR_INT,
                 Exceptions.LIST_Error_Null_ArrayIndexOutOfBounds,
                 "aget-short");
 
     /** {@code x,z: int; y: int[] :: y[z] = x} */
-    public static final Rop APUT_INT = 
+    public static final Rop APUT_INT =
         new Rop(RegOps.APUT, Type.VOID, StdTypeList.INT_INTARR_INT,
                 Exceptions.LIST_Error_Null_ArrayIndexOutOfBounds, "aput-int");
 
     /** {@code x: long; y: long[]; z: int :: y[z] = x} */
-    public static final Rop APUT_LONG = 
+    public static final Rop APUT_LONG =
         new Rop(RegOps.APUT, Type.VOID, StdTypeList.LONG_LONGARR_INT,
                 Exceptions.LIST_Error_Null_ArrayIndexOutOfBounds, "aput-long");
 
     /** {@code x: float; y: float[]; z: int :: y[z] = x} */
-    public static final Rop APUT_FLOAT = 
+    public static final Rop APUT_FLOAT =
         new Rop(RegOps.APUT, Type.VOID, StdTypeList.FLOAT_FLOATARR_INT,
                 Exceptions.LIST_Error_Null_ArrayIndexOutOfBounds,
                 "aput-float");
 
     /** {@code x: double; y: double[]; z: int :: y[z] = x} */
-    public static final Rop APUT_DOUBLE = 
+    public static final Rop APUT_DOUBLE =
         new Rop(RegOps.APUT, Type.VOID, StdTypeList.DOUBLE_DOUBLEARR_INT,
                 Exceptions.LIST_Error_Null_ArrayIndexOutOfBounds,
                 "aput-double");
 
     /** {@code x: Object; y: Object[]; z: int :: y[z] = x} */
-    public static final Rop APUT_OBJECT = 
+    public static final Rop APUT_OBJECT =
         new Rop(RegOps.APUT, Type.VOID, StdTypeList.OBJECT_OBJECTARR_INT,
                 Exceptions.LIST_Error_Null_ArrayIndex_ArrayStore,
                 "aput-object");
 
     /** {@code x: boolean; y: boolean[]; z: int :: y[z] = x} */
-    public static final Rop APUT_BOOLEAN = 
+    public static final Rop APUT_BOOLEAN =
         new Rop(RegOps.APUT, Type.VOID, StdTypeList.INT_BOOLEANARR_INT,
                 Exceptions.LIST_Error_Null_ArrayIndex_ArrayStore,
                 "aput-boolean");
 
     /** {@code x: byte; y: byte[]; z: int :: y[z] = x} */
-    public static final Rop APUT_BYTE = 
+    public static final Rop APUT_BYTE =
         new Rop(RegOps.APUT, Type.VOID, StdTypeList.INT_BYTEARR_INT,
                 Exceptions.LIST_Error_Null_ArrayIndex_ArrayStore, "aput-byte");
 
     /** {@code x: char; y: char[]; z: int :: y[z] = x} */
-    public static final Rop APUT_CHAR = 
+    public static final Rop APUT_CHAR =
         new Rop(RegOps.APUT, Type.VOID, StdTypeList.INT_CHARARR_INT,
                 Exceptions.LIST_Error_Null_ArrayIndex_ArrayStore, "aput-char");
 
     /** {@code x: short; y: short[]; z: int :: y[z] = x} */
-    public static final Rop APUT_SHORT = 
+    public static final Rop APUT_SHORT =
         new Rop(RegOps.APUT, Type.VOID, StdTypeList.INT_SHORTARR_INT,
                 Exceptions.LIST_Error_Null_ArrayIndex_ArrayStore,
                 "aput-short");
 
     /**
      * {@code T: any non-array object type :: r =
-     * alloc(T)} (allocate heap space for an object) 
+     * alloc(T)} (allocate heap space for an object)
      */
     public static final Rop NEW_INSTANCE =
         new Rop(RegOps.NEW_INSTANCE, Type.OBJECT, StdTypeList.EMPTY,
@@ -805,9 +805,9 @@
 
     /**
      * {@code T: any non-array object type; x: Object :: (T) x} (can
-     * throw {@code ClassCastException}) 
+     * throw {@code ClassCastException})
      */
-    public static final Rop CHECK_CAST = 
+    public static final Rop CHECK_CAST =
         new Rop(RegOps.CHECK_CAST, Type.VOID, StdTypeList.OBJECT,
                 Exceptions.LIST_Error_ClassCastException, "check-cast");
 
@@ -815,7 +815,7 @@
      * {@code T: any non-array object type; x: Object :: x instanceof
      * T}. Note: This is listed as throwing {@code Error}
      * explicitly because the op <i>can</i> throw, but there are no
-     * other predefined exceptions for it. 
+     * other predefined exceptions for it.
      */
     public static final Rop INSTANCE_OF =
         new Rop(RegOps.INSTANCE_OF, Type.INT, StdTypeList.OBJECT,
@@ -823,7 +823,7 @@
 
     /**
      * {@code r: int; x: Object; f: instance field spec of
-     * type int :: r = x.f} 
+     * type int :: r = x.f}
      */
     public static final Rop GET_FIELD_INT =
         new Rop(RegOps.GET_FIELD, Type.INT, StdTypeList.OBJECT,
@@ -831,7 +831,7 @@
 
     /**
      * {@code r: long; x: Object; f: instance field spec of
-     * type long :: r = x.f} 
+     * type long :: r = x.f}
      */
     public static final Rop GET_FIELD_LONG =
         new Rop(RegOps.GET_FIELD, Type.LONG, StdTypeList.OBJECT,
@@ -839,7 +839,7 @@
 
     /**
      * {@code r: float; x: Object; f: instance field spec of
-     * type float :: r = x.f} 
+     * type float :: r = x.f}
      */
     public static final Rop GET_FIELD_FLOAT =
         new Rop(RegOps.GET_FIELD, Type.FLOAT, StdTypeList.OBJECT,
@@ -848,7 +848,7 @@
 
     /**
      * {@code r: double; x: Object; f: instance field spec of
-     * type double :: r = x.f} 
+     * type double :: r = x.f}
      */
     public static final Rop GET_FIELD_DOUBLE =
         new Rop(RegOps.GET_FIELD, Type.DOUBLE, StdTypeList.OBJECT,
@@ -857,7 +857,7 @@
 
     /**
      * {@code r: Object; x: Object; f: instance field spec of
-     * type Object :: r = x.f} 
+     * type Object :: r = x.f}
      */
     public static final Rop GET_FIELD_OBJECT =
         new Rop(RegOps.GET_FIELD, Type.OBJECT, StdTypeList.OBJECT,
@@ -866,7 +866,7 @@
 
     /**
      * {@code r: boolean; x: Object; f: instance field spec of
-     * type boolean :: r = x.f} 
+     * type boolean :: r = x.f}
      */
     public static final Rop GET_FIELD_BOOLEAN =
         new Rop(RegOps.GET_FIELD, Type.INT, StdTypeList.OBJECT,
@@ -875,7 +875,7 @@
 
     /**
      * {@code r: byte; x: Object; f: instance field spec of
-     * type byte :: r = x.f} 
+     * type byte :: r = x.f}
      */
     public static final Rop GET_FIELD_BYTE =
         new Rop(RegOps.GET_FIELD, Type.INT, StdTypeList.OBJECT,
@@ -884,7 +884,7 @@
 
     /**
      * {@code r: char; x: Object; f: instance field spec of
-     * type char :: r = x.f} 
+     * type char :: r = x.f}
      */
     public static final Rop GET_FIELD_CHAR =
         new Rop(RegOps.GET_FIELD, Type.INT, StdTypeList.OBJECT,
@@ -893,7 +893,7 @@
 
     /**
      * {@code r: short; x: Object; f: instance field spec of
-     * type short :: r = x.f} 
+     * type short :: r = x.f}
      */
     public static final Rop GET_FIELD_SHORT =
         new Rop(RegOps.GET_FIELD, Type.INT, StdTypeList.OBJECT,
@@ -947,7 +947,7 @@
 
     /**
      * {@code x: int; y: Object; f: instance field spec of type
-     * int :: y.f = x} 
+     * int :: y.f = x}
      */
     public static final Rop PUT_FIELD_INT =
         new Rop(RegOps.PUT_FIELD, Type.VOID, StdTypeList.INT_OBJECT,
@@ -955,7 +955,7 @@
 
     /**
      * {@code x: long; y: Object; f: instance field spec of type
-     * long :: y.f = x} 
+     * long :: y.f = x}
      */
     public static final Rop PUT_FIELD_LONG =
         new Rop(RegOps.PUT_FIELD, Type.VOID, StdTypeList.LONG_OBJECT,
@@ -963,7 +963,7 @@
 
     /**
      * {@code x: float; y: Object; f: instance field spec of type
-     * float :: y.f = x} 
+     * float :: y.f = x}
      */
     public static final Rop PUT_FIELD_FLOAT =
         new Rop(RegOps.PUT_FIELD, Type.VOID, StdTypeList.FLOAT_OBJECT,
@@ -972,7 +972,7 @@
 
     /**
      * {@code x: double; y: Object; f: instance field spec of type
-     * double :: y.f = x} 
+     * double :: y.f = x}
      */
     public static final Rop PUT_FIELD_DOUBLE =
         new Rop(RegOps.PUT_FIELD, Type.VOID, StdTypeList.DOUBLE_OBJECT,
@@ -981,7 +981,7 @@
 
     /**
      * {@code x: Object; y: Object; f: instance field spec of type
-     * Object :: y.f = x} 
+     * Object :: y.f = x}
      */
     public static final Rop PUT_FIELD_OBJECT =
         new Rop(RegOps.PUT_FIELD, Type.VOID, StdTypeList.OBJECT_OBJECT,
@@ -990,7 +990,7 @@
 
     /**
      * {@code x: int; y: Object; f: instance field spec of type
-     * boolean :: y.f = x} 
+     * boolean :: y.f = x}
      */
     public static final Rop PUT_FIELD_BOOLEAN =
         new Rop(RegOps.PUT_FIELD, Type.VOID, StdTypeList.INT_OBJECT,
@@ -999,7 +999,7 @@
 
     /**
      * {@code x: int; y: Object; f: instance field spec of type
-     * byte :: y.f = x} 
+     * byte :: y.f = x}
      */
     public static final Rop PUT_FIELD_BYTE =
         new Rop(RegOps.PUT_FIELD, Type.VOID, StdTypeList.INT_OBJECT,
@@ -1008,7 +1008,7 @@
 
     /**
      * {@code x: int; y: Object; f: instance field spec of type
-     * char :: y.f = x} 
+     * char :: y.f = x}
      */
     public static final Rop PUT_FIELD_CHAR =
         new Rop(RegOps.PUT_FIELD, Type.VOID, StdTypeList.INT_OBJECT,
@@ -1017,7 +1017,7 @@
 
     /**
      * {@code x: int; y: Object; f: instance field spec of type
-     * short :: y.f = x} 
+     * short :: y.f = x}
      */
     public static final Rop PUT_FIELD_SHORT =
         new Rop(RegOps.PUT_FIELD, Type.VOID, StdTypeList.INT_OBJECT,
@@ -1106,12 +1106,12 @@
      * Returns the appropriate rop for the given opcode, destination,
      * and sources. The result is typically, but not necessarily, a
      * shared instance.
-     * 
+     *
      * <p><b>Note:</b> This method does not do complete error checking on
      * its arguments, and so it may return an instance which seemed "right
      * enough" even though in actuality the passed arguments don't quite
      * match what is returned. TODO: Revisit this issue.</p>
-     * 
+     *
      * @param opcode the opcode
      * @param dest {@code non-null;} destination (result) type, or
      * {@link Type#VOID} if none
@@ -1239,7 +1239,7 @@
     /**
      * Returns the appropriate {@code move} rop for the given type. The
      * result is a shared instance.
-     * 
+     *
      * @param type {@code non-null;} type of value being moved
      * @return {@code non-null;} an appropriate instance
      */
@@ -1259,7 +1259,7 @@
     /**
      * Returns the appropriate {@code move-param} rop for the
      * given type. The result is a shared instance.
-     * 
+     *
      * @param type {@code non-null;} type of value being moved
      * @return {@code non-null;} an appropriate instance
      */
@@ -1278,7 +1278,7 @@
     /**
      * Returns the appropriate {@code move-exception} rop for the
      * given type. The result may be a shared instance.
-     * 
+     *
      * @param type {@code non-null;} type of the exception
      * @return {@code non-null;} an appropriate instance
      */
@@ -1314,7 +1314,7 @@
     /**
      * Returns the appropriate {@code const} rop for the given
      * type. The result is a shared instance.
-     * 
+     *
      * @param type {@code non-null;} type of the constant
      * @return {@code non-null;} an appropriate instance
      */
@@ -1337,7 +1337,7 @@
     /**
      * Returns the appropriate {@code if-eq} rop for the given
      * sources. The result is a shared instance.
-     * 
+     *
      * @param types {@code non-null;} source types
      * @return {@code non-null;} an appropriate instance
      */
@@ -1349,7 +1349,7 @@
     /**
      * Returns the appropriate {@code if-ne} rop for the given
      * sources. The result is a shared instance.
-     * 
+     *
      * @param types {@code non-null;} source types
      * @return {@code non-null;} an appropriate instance
      */
@@ -1361,7 +1361,7 @@
     /**
      * Returns the appropriate {@code if-lt} rop for the given
      * sources. The result is a shared instance.
-     * 
+     *
      * @param types {@code non-null;} source types
      * @return {@code non-null;} an appropriate instance
      */
@@ -1372,7 +1372,7 @@
     /**
      * Returns the appropriate {@code if-ge} rop for the given
      * sources. The result is a shared instance.
-     * 
+     *
      * @param types {@code non-null;} source types
      * @return {@code non-null;} an appropriate instance
      */
@@ -1383,7 +1383,7 @@
     /**
      * Returns the appropriate {@code if-gt} rop for the given
      * sources. The result is a shared instance.
-     * 
+     *
      * @param types {@code non-null;} source types
      * @return {@code non-null;} an appropriate instance
      */
@@ -1394,7 +1394,7 @@
     /**
      * Returns the appropriate {@code if-le} rop for the given
      * sources. The result is a shared instance.
-     * 
+     *
      * @param types {@code non-null;} source types
      * @return {@code non-null;} an appropriate instance
      */
@@ -1406,7 +1406,7 @@
      * Helper for all the {@code if*}-related methods, which
      * checks types and picks one of the four variants, throwing if
      * there's a problem.
-     * 
+     *
      * @param types {@code non-null;} the types
      * @param intZ {@code non-null;} the int-to-0 comparison
      * @param objZ {@code null-ok;} the object-to-null comparison
@@ -1454,7 +1454,7 @@
     /**
      * Returns the appropriate {@code add} rop for the given
      * types. The result is a shared instance.
-     * 
+     *
      * @param types {@code non-null;} types of the sources
      * @return {@code non-null;} an appropriate instance
      */
@@ -1467,7 +1467,7 @@
     /**
      * Returns the appropriate {@code sub} rop for the given
      * types. The result is a shared instance.
-     * 
+     *
      * @param types {@code non-null;} types of the sources
      * @return {@code non-null;} an appropriate instance
      */
@@ -1480,7 +1480,7 @@
     /**
      * Returns the appropriate {@code mul} rop for the given
      * types. The result is a shared instance.
-     * 
+     *
      * @param types {@code non-null;} types of the sources
      * @return {@code non-null;} an appropriate instance
      */
@@ -1493,7 +1493,7 @@
     /**
      * Returns the appropriate {@code div} rop for the given
      * types. The result is a shared instance.
-     * 
+     *
      * @param types {@code non-null;} types of the sources
      * @return {@code non-null;} an appropriate instance
      */
@@ -1506,7 +1506,7 @@
     /**
      * Returns the appropriate {@code rem} rop for the given
      * types. The result is a shared instance.
-     * 
+     *
      * @param types {@code non-null;} types of the sources
      * @return {@code non-null;} an appropriate instance
      */
@@ -1519,7 +1519,7 @@
     /**
      * Returns the appropriate {@code and} rop for the given
      * types. The result is a shared instance.
-     * 
+     *
      * @param types {@code non-null;} types of the sources
      * @return {@code non-null;} an appropriate instance
      */
@@ -1531,7 +1531,7 @@
     /**
      * Returns the appropriate {@code or} rop for the given
      * types. The result is a shared instance.
-     * 
+     *
      * @param types {@code non-null;} types of the sources
      * @return {@code non-null;} an appropriate instance
      */
@@ -1543,7 +1543,7 @@
     /**
      * Returns the appropriate {@code xor} rop for the given
      * types. The result is a shared instance.
-     * 
+     *
      * @param types {@code non-null;} types of the sources
      * @return {@code non-null;} an appropriate instance
      */
@@ -1555,7 +1555,7 @@
     /**
      * Returns the appropriate {@code shl} rop for the given
      * types. The result is a shared instance.
-     * 
+     *
      * @param types {@code non-null;} types of the sources
      * @return {@code non-null;} an appropriate instance
      */
@@ -1567,7 +1567,7 @@
     /**
      * Returns the appropriate {@code shr} rop for the given
      * types. The result is a shared instance.
-     * 
+     *
      * @param types {@code non-null;} types of the sources
      * @return {@code non-null;} an appropriate instance
      */
@@ -1579,7 +1579,7 @@
     /**
      * Returns the appropriate {@code ushr} rop for the given
      * types. The result is a shared instance.
-     * 
+     *
      * @param types {@code non-null;} types of the sources
      * @return {@code non-null;} an appropriate instance
      */
@@ -1591,7 +1591,7 @@
     /**
      * Returns the appropriate binary arithmetic rop for the given type
      * and arguments. The result is a shared instance.
-     * 
+     *
      * @param types {@code non-null;} sources of the operation
      * @param int1 {@code non-null;} the int-to-constant rop
      * @param long1 {@code non-null;} the long-to-constant rop
@@ -1640,7 +1640,7 @@
     /**
      * Returns the appropriate {@code neg} rop for the given type. The
      * result is a shared instance.
-     * 
+     *
      * @param type {@code non-null;} type of value being operated on
      * @return {@code non-null;} an appropriate instance
      */
@@ -1658,7 +1658,7 @@
     /**
      * Returns the appropriate {@code not} rop for the given type. The
      * result is a shared instance.
-     * 
+     *
      * @param type {@code non-null;} type of value being operated on
      * @return {@code non-null;} an appropriate instance
      */
@@ -1674,7 +1674,7 @@
     /**
      * Returns the appropriate {@code cmpl} rop for the given type. The
      * result is a shared instance.
-     * 
+     *
      * @param type {@code non-null;} type of value being compared
      * @return {@code non-null;} an appropriate instance
      */
@@ -1691,7 +1691,7 @@
     /**
      * Returns the appropriate {@code cmpg} rop for the given type. The
      * result is a shared instance.
-     * 
+     *
      * @param type {@code non-null;} type of value being compared
      * @return {@code non-null;} an appropriate instance
      */
@@ -1707,7 +1707,7 @@
     /**
      * Returns the appropriate {@code conv} rop for the given types. The
      * result is a shared instance.
-     * 
+     *
      * @param dest {@code non-null;} target value type
      * @param source {@code non-null;} source value type
      * @return {@code non-null;} an appropriate instance
@@ -1752,7 +1752,7 @@
     /**
      * Returns the appropriate {@code return} rop for the given type. The
      * result is a shared instance.
-     * 
+     *
      * @param type {@code non-null;} type of value being returned
      * @return {@code non-null;} an appropriate instance
      */
@@ -1772,7 +1772,7 @@
     /**
      * Returns the appropriate {@code aget} rop for the given type. The
      * result is a shared instance.
-     * 
+     *
      * @param type {@code non-null;} element type of array being accessed
      * @return {@code non-null;} an appropriate instance
      */
@@ -1795,7 +1795,7 @@
     /**
      * Returns the appropriate {@code aput} rop for the given type. The
      * result is a shared instance.
-     * 
+     *
      * @param type {@code non-null;} element type of array being accessed
      * @return {@code non-null;} an appropriate instance
      */
@@ -1818,7 +1818,7 @@
     /**
      * Returns the appropriate {@code new-array} rop for the given
      * type. The result is a shared instance.
-     * 
+     *
      * @param arrayType {@code non-null;} array type of array being created
      * @return {@code non-null;} an appropriate instance
      */
@@ -1848,7 +1848,7 @@
     /**
      * Returns the appropriate {@code filled-new-array} rop for the given
      * type. The result may be a shared instance.
-     * 
+     *
      * @param arrayType {@code non-null;} type of array being created
      * @param count {@code >= 0;} number of elements that the array should have
      * @return {@code non-null;} an appropriate instance
@@ -1880,7 +1880,7 @@
     /**
      * Returns the appropriate {@code get-field} rop for the given
      * type. The result is a shared instance.
-     * 
+     *
      * @param type {@code non-null;} type of the field in question
      * @return {@code non-null;} an appropriate instance
      */
@@ -1903,7 +1903,7 @@
     /**
      * Returns the appropriate {@code put-field} rop for the given
      * type. The result is a shared instance.
-     * 
+     *
      * @param type {@code non-null;} type of the field in question
      * @return {@code non-null;} an appropriate instance
      */
@@ -1926,7 +1926,7 @@
     /**
      * Returns the appropriate {@code get-static} rop for the given
      * type. The result is a shared instance.
-     * 
+     *
      * @param type {@code non-null;} type of the field in question
      * @return {@code non-null;} an appropriate instance
      */
@@ -1949,7 +1949,7 @@
     /**
      * Returns the appropriate {@code put-static} rop for the given
      * type. The result is a shared instance.
-     * 
+     *
      * @param type {@code non-null;} type of the field in question
      * @return {@code non-null;} an appropriate instance
      */
@@ -1972,7 +1972,7 @@
     /**
      * Returns the appropriate {@code invoke-static} rop for the
      * given type. The result is typically a newly-allocated instance.
-     * 
+     *
      * @param meth {@code non-null;} descriptor of the method
      * @return {@code non-null;} an appropriate instance
      */
@@ -1985,7 +1985,7 @@
     /**
      * Returns the appropriate {@code invoke-virtual} rop for the
      * given type. The result is typically a newly-allocated instance.
-     * 
+     *
      * @param meth {@code non-null;} descriptor of the method, including the
      * {@code this} parameter
      * @return {@code non-null;} an appropriate instance
@@ -1999,7 +1999,7 @@
     /**
      * Returns the appropriate {@code invoke-super} rop for the
      * given type. The result is typically a newly-allocated instance.
-     * 
+     *
      * @param meth {@code non-null;} descriptor of the method, including the
      * {@code this} parameter
      * @return {@code non-null;} an appropriate instance
@@ -2013,7 +2013,7 @@
     /**
      * Returns the appropriate {@code invoke-direct} rop for the
      * given type. The result is typically a newly-allocated instance.
-     * 
+     *
      * @param meth {@code non-null;} descriptor of the method, including the
      * {@code this} parameter
      * @return {@code non-null;} an appropriate instance
@@ -2027,7 +2027,7 @@
     /**
      * Returns the appropriate {@code invoke-interface} rop for the
      * given type. The result is typically a newly-allocated instance.
-     * 
+     *
      * @param meth {@code non-null;} descriptor of the method, including the
      * {@code this} parameter
      * @return {@code non-null;} an appropriate instance
@@ -2037,7 +2037,7 @@
                        meth.getParameterFrameTypes(),
                        StdTypeList.THROWABLE);
     }
-    
+
     /**
      * Returns the appropriate {@code mark-local} rop for the given type.
      * The result is a shared instance.
@@ -2066,7 +2066,7 @@
 
     /**
      * Throws the right exception to complain about a bogus type.
-     * 
+     *
      * @param type {@code non-null;} the bad type
      * @return never
      */
@@ -2076,7 +2076,7 @@
 
     /**
      * Throws the right exception to complain about a bogus list of types.
-     * 
+     *
      * @param types {@code non-null;} the bad types
      * @return never
      */
diff --git a/dx/src/com/android/dx/rop/code/SourcePosition.java b/dx/src/com/android/dx/rop/code/SourcePosition.java
index f32caa1..f7a7961 100644
--- a/dx/src/com/android/dx/rop/code/SourcePosition.java
+++ b/dx/src/com/android/dx/rop/code/SourcePosition.java
@@ -33,19 +33,19 @@
 
     /**
      * {@code >= -1;} the bytecode address, or {@code -1} if that
-     * information is unknown 
+     * information is unknown
      */
     private final int address;
 
     /**
      * {@code >= -1;} the line number, or {@code -1} if that
-     * information is unknown 
+     * information is unknown
      */
     private final int line;
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param sourceFile {@code null-ok;} name of the file of origin or
      * {@code null} if unknown
      * @param address {@code >= -1;} original bytecode address or {@code -1}
@@ -117,7 +117,7 @@
     /**
      * Returns whether the lines match between this instance and
      * the one given.
-     * 
+     *
      * @param other {@code non-null;} the instance to compare to
      * @return {@code true} iff the lines match
      */
@@ -128,7 +128,7 @@
     /**
      * Returns whether the lines and files match between this instance and
      * the one given.
-     * 
+     *
      * @param other {@code non-null;} the instance to compare to
      * @return {@code true} iff the lines and files match
      */
@@ -140,7 +140,7 @@
 
     /**
      * Gets the source file, if known.
-     * 
+     *
      * @return {@code null-ok;} the source file or {@code null} if unknown
      */
     public CstUtf8 getSourceFile() {
@@ -149,7 +149,7 @@
 
     /**
      * Gets the original bytecode address.
-     * 
+     *
      * @return {@code >= -1;} the address or {@code -1} if unknown
      */
     public int getAddress() {
@@ -158,7 +158,7 @@
 
     /**
      * Gets the original line number.
-     * 
+     *
      * @return {@code >= -1;} the original line number or {@code -1} if
      * unknown
      */
diff --git a/dx/src/com/android/dx/rop/code/SwitchInsn.java b/dx/src/com/android/dx/rop/code/SwitchInsn.java
index 586205b..31bb94d 100644
--- a/dx/src/com/android/dx/rop/code/SwitchInsn.java
+++ b/dx/src/com/android/dx/rop/code/SwitchInsn.java
@@ -31,7 +31,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param opcode {@code non-null;} the opcode
      * @param position {@code non-null;} source position
      * @param result {@code null-ok;} spec for the result, if any
@@ -110,7 +110,7 @@
 
     /**
      * Gets the list of switch cases.
-     * 
+     *
      * @return {@code non-null;} the case list
      */
     public IntList getCases() {
diff --git a/dx/src/com/android/dx/rop/code/ThrowingCstInsn.java b/dx/src/com/android/dx/rop/code/ThrowingCstInsn.java
index b14e758..cdd21d1 100644
--- a/dx/src/com/android/dx/rop/code/ThrowingCstInsn.java
+++ b/dx/src/com/android/dx/rop/code/ThrowingCstInsn.java
@@ -31,7 +31,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param opcode {@code non-null;} the opcode
      * @param position {@code non-null;} source position
      * @param sources {@code non-null;} specs for all the sources
diff --git a/dx/src/com/android/dx/rop/code/ThrowingInsn.java b/dx/src/com/android/dx/rop/code/ThrowingInsn.java
index 78dc874..6561d41 100644
--- a/dx/src/com/android/dx/rop/code/ThrowingInsn.java
+++ b/dx/src/com/android/dx/rop/code/ThrowingInsn.java
@@ -33,7 +33,7 @@
     /**
      * Gets the string form of a register spec list to be used as a catches
      * list.
-     * 
+     *
      * @param catches {@code non-null;} the catches list
      * @return {@code non-null;} the string form
      */
@@ -53,7 +53,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param opcode {@code non-null;} the opcode
      * @param position {@code non-null;} source position
      * @param sources {@code non-null;} specs for all the sources
diff --git a/dx/src/com/android/dx/rop/cst/Constant.java b/dx/src/com/android/dx/rop/cst/Constant.java
index 64231d3..3ef035e 100644
--- a/dx/src/com/android/dx/rop/cst/Constant.java
+++ b/dx/src/com/android/dx/rop/cst/Constant.java
@@ -42,7 +42,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * This compares in class-major and value-minor order.
      */
     public final int compareTo(Constant other) {
@@ -59,7 +59,7 @@
     /**
      * Compare the values of this and another instance, which are guaranteed
      * to be of the same class. Subclasses must implement this.
-     * 
+     *
      * @param other {@code non-null;} the instance to compare to
      * @return {@code -1}, {@code 0}, or {@code 1}, as usual
      * for a comparison
diff --git a/dx/src/com/android/dx/rop/cst/CstAnnotation.java b/dx/src/com/android/dx/rop/cst/CstAnnotation.java
index 1385798..8cdf1df 100644
--- a/dx/src/com/android/dx/rop/cst/CstAnnotation.java
+++ b/dx/src/com/android/dx/rop/cst/CstAnnotation.java
@@ -24,7 +24,7 @@
 public final class CstAnnotation extends Constant {
     /** {@code non-null;} the actual annotation */
     private final Annotation annotation;
-    
+
     /**
      * Constructs an instance.
      *
@@ -87,7 +87,7 @@
 
     /**
      * Get the underlying annotation.
-     * 
+     *
      * @return {@code non-null;} the annotation
      */
     public Annotation getAnnotation() {
diff --git a/dx/src/com/android/dx/rop/cst/CstArray.java b/dx/src/com/android/dx/rop/cst/CstArray.java
index 8b521bd..cb7d54d 100644
--- a/dx/src/com/android/dx/rop/cst/CstArray.java
+++ b/dx/src/com/android/dx/rop/cst/CstArray.java
@@ -26,7 +26,7 @@
 public final class CstArray extends Constant {
     /** {@code non-null;} the actual list of contents */
     private final List list;
-    
+
     /**
      * Constructs an instance.
      *
@@ -89,7 +89,7 @@
 
     /**
      * Get the underlying list.
-     * 
+     *
      * @return {@code non-null;} the list
      */
     public List getList() {
@@ -104,7 +104,7 @@
         /**
          * Constructs an instance. All indices initially contain
          * {@code null}.
-         * 
+         *
          * @param size the size of the list
          */
         public List(int size) {
@@ -139,7 +139,7 @@
          * Gets the element at the given index. It is an error to call
          * this with the index for an element which was never set; if you
          * do that, this will throw {@code NullPointerException}.
-         * 
+         *
          * @param n {@code >= 0, < size();} which index
          * @return {@code non-null;} element at that index
          */
@@ -149,7 +149,7 @@
 
         /**
          * Sets the element at the given index.
-         * 
+         *
          * @param n {@code >= 0, < size();} which index
          * @param a {@code null-ok;} the element to set at {@code n}
          */
diff --git a/dx/src/com/android/dx/rop/cst/CstBaseMethodRef.java b/dx/src/com/android/dx/rop/cst/CstBaseMethodRef.java
index 039d7ed..5b0aeb6 100644
--- a/dx/src/com/android/dx/rop/cst/CstBaseMethodRef.java
+++ b/dx/src/com/android/dx/rop/cst/CstBaseMethodRef.java
@@ -99,7 +99,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * In this case, this method returns the <i>return type</i> of this method.
      *
      * @return {@code non-null;} the method's return type
@@ -117,7 +117,7 @@
      * {@code getPrototype().getParameterTypes().getWordCount()},
      * plus {@code 1} if the method is to be treated as an
      * instance method.
-     * 
+     *
      * @param isStatic whether the method should be considered static
      * @return {@code >= 0;} the argument word count
      */
diff --git a/dx/src/com/android/dx/rop/cst/CstBoolean.java b/dx/src/com/android/dx/rop/cst/CstBoolean.java
index 8c290ef..5ff858a 100644
--- a/dx/src/com/android/dx/rop/cst/CstBoolean.java
+++ b/dx/src/com/android/dx/rop/cst/CstBoolean.java
@@ -32,7 +32,7 @@
     /**
      * Makes an instance for the given value. This will return an
      * already-allocated instance.
-     * 
+     *
      * @param value the {@code boolean} value
      * @return {@code non-null;} the appropriate instance
      */
@@ -43,7 +43,7 @@
     /**
      * Makes an instance for the given {@code int} value. This
      * will return an already-allocated instance.
-     * 
+     *
      * @param value must be either {@code 0} or {@code 1}
      * @return {@code non-null;} the appropriate instance
      */
@@ -59,7 +59,7 @@
 
     /**
      * Constructs an instance. This constructor is private; use {@link #make}.
-     * 
+     *
      * @param value the {@code boolean} value
      */
     private CstBoolean(boolean value) {
@@ -90,7 +90,7 @@
 
     /**
      * Gets the {@code boolean} value.
-     * 
+     *
      * @return the value
      */
     public boolean getValue() {
diff --git a/dx/src/com/android/dx/rop/cst/CstByte.java b/dx/src/com/android/dx/rop/cst/CstByte.java
index a8af9f7..fc8f58f 100644
--- a/dx/src/com/android/dx/rop/cst/CstByte.java
+++ b/dx/src/com/android/dx/rop/cst/CstByte.java
@@ -26,11 +26,11 @@
         extends CstLiteral32 {
     /** {@code non-null;} the value {@code 0} as an instance of this class */
     public static final CstByte VALUE_0 = make((byte) 0);
-    
+
     /**
      * Makes an instance for the given value. This may (but does not
      * necessarily) return an already-allocated instance.
-     * 
+     *
      * @param value the {@code byte} value
      */
     public static CstByte make(byte value) {
@@ -41,7 +41,7 @@
      * Makes an instance for the given {@code int} value. This
      * may (but does not necessarily) return an already-allocated
      * instance.
-     * 
+     *
      * @param value the value, which must be in range for a {@code byte}
      * @return {@code non-null;} the appropriate instance
      */
@@ -49,7 +49,7 @@
         byte cast = (byte) value;
 
         if (cast != value) {
-            throw new IllegalArgumentException("bogus byte value: " + 
+            throw new IllegalArgumentException("bogus byte value: " +
                     value);
         }
 
@@ -58,7 +58,7 @@
 
     /**
      * Constructs an instance. This constructor is private; use {@link #make}.
-     * 
+     *
      * @param value the {@code byte} value
      */
     private CstByte(byte value) {
@@ -90,7 +90,7 @@
 
     /**
      * Gets the {@code byte} value.
-     * 
+     *
      * @return the value
      */
     public byte getValue() {
diff --git a/dx/src/com/android/dx/rop/cst/CstChar.java b/dx/src/com/android/dx/rop/cst/CstChar.java
index 0a87cbc..21d8b67 100644
--- a/dx/src/com/android/dx/rop/cst/CstChar.java
+++ b/dx/src/com/android/dx/rop/cst/CstChar.java
@@ -30,7 +30,7 @@
     /**
      * Makes an instance for the given value. This may (but does not
      * necessarily) return an already-allocated instance.
-     * 
+     *
      * @param value the {@code char} value
      */
     public static CstChar make(char value) {
@@ -41,7 +41,7 @@
      * Makes an instance for the given {@code int} value. This
      * may (but does not necessarily) return an already-allocated
      * instance.
-     * 
+     *
      * @param value the value, which must be in range for a {@code char}
      * @return {@code non-null;} the appropriate instance
      */
@@ -49,7 +49,7 @@
         char cast = (char) value;
 
         if (cast != value) {
-            throw new IllegalArgumentException("bogus char value: " + 
+            throw new IllegalArgumentException("bogus char value: " +
                     value);
         }
 
@@ -58,7 +58,7 @@
 
     /**
      * Constructs an instance. This constructor is private; use {@link #make}.
-     * 
+     *
      * @param value the {@code char} value
      */
     private CstChar(char value) {
@@ -90,7 +90,7 @@
 
     /**
      * Gets the {@code char} value.
-     * 
+     *
      * @return the value
      */
     public char getValue() {
diff --git a/dx/src/com/android/dx/rop/cst/CstDouble.java b/dx/src/com/android/dx/rop/cst/CstDouble.java
index df4a2cf..8f1766f 100644
--- a/dx/src/com/android/dx/rop/cst/CstDouble.java
+++ b/dx/src/com/android/dx/rop/cst/CstDouble.java
@@ -35,7 +35,7 @@
     /**
      * Makes an instance for the given value. This may (but does not
      * necessarily) return an already-allocated instance.
-     * 
+     *
      * @param bits the {@code double} value as {@code long} bits
      */
     public static CstDouble make(long bits) {
@@ -48,7 +48,7 @@
 
     /**
      * Constructs an instance. This constructor is private; use {@link #make}.
-     * 
+     *
      * @param bits the {@code double} value as {@code long} bits
      */
     private CstDouble(long bits) {
@@ -81,7 +81,7 @@
 
     /**
      * Gets the {@code double} value.
-     * 
+     *
      * @return the value
      */
     public double getValue() {
diff --git a/dx/src/com/android/dx/rop/cst/CstEnumRef.java b/dx/src/com/android/dx/rop/cst/CstEnumRef.java
index 78cab9d..641ab3f 100644
--- a/dx/src/com/android/dx/rop/cst/CstEnumRef.java
+++ b/dx/src/com/android/dx/rop/cst/CstEnumRef.java
@@ -25,7 +25,7 @@
 public final class CstEnumRef extends CstMemberRef {
     /** {@code null-ok;} the corresponding field ref, lazily initialized */
     private CstFieldRef fieldRef;
-    
+
     /**
      * Constructs an instance.
      *
@@ -45,8 +45,8 @@
     }
 
     /**
-     * {@inheritDoc} 
-     * 
+     * {@inheritDoc}
+     *
      * <b>Note:</b> This returns the enumerated type.
      */
     public Type getType() {
@@ -55,7 +55,7 @@
 
     /**
      * Get a {@link CstFieldRef} that corresponds with this instance.
-     * 
+     *
      * @return {@code non-null;} the corresponding field reference
      */
     public CstFieldRef getFieldRef() {
diff --git a/dx/src/com/android/dx/rop/cst/CstFieldRef.java b/dx/src/com/android/dx/rop/cst/CstFieldRef.java
index 497531f..06f0b15 100644
--- a/dx/src/com/android/dx/rop/cst/CstFieldRef.java
+++ b/dx/src/com/android/dx/rop/cst/CstFieldRef.java
@@ -28,7 +28,7 @@
      * primitive type. For example, if given {@link Type#INT}, this
      * method returns an instance corresponding to the field
      * {@code java.lang.Integer.TYPE}.
-     * 
+     *
      * @param primitiveType {@code non-null;} the primitive type
      * @return {@code non-null;} the corresponding static field
      */
@@ -39,7 +39,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param definingClass {@code non-null;} the type of the defining class
      * @param nat {@code non-null;} the name-and-type
      */
@@ -55,7 +55,7 @@
 
     /**
      * Returns the type of this field.
-     * 
+     *
      * @return {@code non-null;} the field's type
      */
     public Type getType() {
diff --git a/dx/src/com/android/dx/rop/cst/CstFloat.java b/dx/src/com/android/dx/rop/cst/CstFloat.java
index 531a20d..0a2354a 100644
--- a/dx/src/com/android/dx/rop/cst/CstFloat.java
+++ b/dx/src/com/android/dx/rop/cst/CstFloat.java
@@ -36,7 +36,7 @@
     /**
      * Makes an instance for the given value. This may (but does not
      * necessarily) return an already-allocated instance.
-     * 
+     *
      * @param bits the {@code float} value as {@code int} bits
      */
     public static CstFloat make(int bits) {
@@ -49,7 +49,7 @@
 
     /**
      * Constructs an instance. This constructor is private; use {@link #make}.
-     * 
+     *
      * @param bits the {@code float} value as {@code int} bits
      */
     private CstFloat(int bits) {
@@ -82,7 +82,7 @@
 
     /**
      * Gets the {@code float} value.
-     * 
+     *
      * @return the value
      */
     public float getValue() {
diff --git a/dx/src/com/android/dx/rop/cst/CstInteger.java b/dx/src/com/android/dx/rop/cst/CstInteger.java
index 8fae4fa..3691fc0 100644
--- a/dx/src/com/android/dx/rop/cst/CstInteger.java
+++ b/dx/src/com/android/dx/rop/cst/CstInteger.java
@@ -51,7 +51,7 @@
     /**
      * Makes an instance for the given value. This may (but does not
      * necessarily) return an already-allocated instance.
-     * 
+     *
      * @param value the {@code int} value
      * @return {@code non-null;} the appropriate instance
      */
@@ -75,7 +75,7 @@
 
     /**
      * Constructs an instance. This constructor is private; use {@link #make}.
-     * 
+     *
      * @param value the {@code int} value
      */
     private CstInteger(int value) {
@@ -107,7 +107,7 @@
 
     /**
      * Gets the {@code int} value.
-     * 
+     *
      * @return the value
      */
     public int getValue() {
diff --git a/dx/src/com/android/dx/rop/cst/CstInterfaceMethodRef.java b/dx/src/com/android/dx/rop/cst/CstInterfaceMethodRef.java
index 55a7599..8b8cb30 100644
--- a/dx/src/com/android/dx/rop/cst/CstInterfaceMethodRef.java
+++ b/dx/src/com/android/dx/rop/cst/CstInterfaceMethodRef.java
@@ -23,13 +23,13 @@
         extends CstBaseMethodRef {
     /**
      * {@code null-ok;} normal {@link CstMethodRef} that corresponds to this
-     * instance, if calculated 
+     * instance, if calculated
      */
     private CstMethodRef methodRef;
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param definingClass {@code non-null;} the type of the defining class
      * @param nat {@code non-null;} the name-and-type
      */
@@ -47,7 +47,7 @@
     /**
      * Gets a normal (non-interface) {@link CstMethodRef} that corresponds to
      * this instance.
-     * 
+     *
      * @return {@code non-null;} an appropriate instance
      */
     public CstMethodRef toMethodRef() {
diff --git a/dx/src/com/android/dx/rop/cst/CstKnownNull.java b/dx/src/com/android/dx/rop/cst/CstKnownNull.java
index 09dde1b..a80322c 100644
--- a/dx/src/com/android/dx/rop/cst/CstKnownNull.java
+++ b/dx/src/com/android/dx/rop/cst/CstKnownNull.java
@@ -88,7 +88,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * As "literal bits," a known-null is always represented as the
      * number zero.
      */
@@ -99,7 +99,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * As "literal bits," a known-null is always represented as the
      * number zero.
      */
diff --git a/dx/src/com/android/dx/rop/cst/CstLiteral32.java b/dx/src/com/android/dx/rop/cst/CstLiteral32.java
index c6e3021..042cbd9 100644
--- a/dx/src/com/android/dx/rop/cst/CstLiteral32.java
+++ b/dx/src/com/android/dx/rop/cst/CstLiteral32.java
@@ -26,7 +26,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param bits the value as {@code int} bits
      */
     /*package*/ CstLiteral32(int bits) {
diff --git a/dx/src/com/android/dx/rop/cst/CstLiteral64.java b/dx/src/com/android/dx/rop/cst/CstLiteral64.java
index d0b27d2..94cfa8c 100644
--- a/dx/src/com/android/dx/rop/cst/CstLiteral64.java
+++ b/dx/src/com/android/dx/rop/cst/CstLiteral64.java
@@ -26,7 +26,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param bits the value as {@code long} bits
      */
     /*package*/ CstLiteral64(long bits) {
diff --git a/dx/src/com/android/dx/rop/cst/CstLiteralBits.java b/dx/src/com/android/dx/rop/cst/CstLiteralBits.java
index 6415487..8bf13a2 100644
--- a/dx/src/com/android/dx/rop/cst/CstLiteralBits.java
+++ b/dx/src/com/android/dx/rop/cst/CstLiteralBits.java
@@ -45,7 +45,7 @@
      * Gets the value as {@code long} bits. If this instance contains
      * fewer bits than fit in a {@code long}, then the result of this
      * method is the sign extension of the value.
-     * 
+     *
      * @return the bits
      */
     public abstract long getLongBits();
@@ -60,7 +60,7 @@
         if (! fitsInInt()) {
             return false;
         }
-        
+
         int bits = getIntBits();
         return (short) bits == bits;
     }
diff --git a/dx/src/com/android/dx/rop/cst/CstLong.java b/dx/src/com/android/dx/rop/cst/CstLong.java
index c89a339..d159529 100644
--- a/dx/src/com/android/dx/rop/cst/CstLong.java
+++ b/dx/src/com/android/dx/rop/cst/CstLong.java
@@ -33,7 +33,7 @@
     /**
      * Makes an instance for the given value. This may (but does not
      * necessarily) return an already-allocated instance.
-     * 
+     *
      * @param value the {@code long} value
      */
     public static CstLong make(long value) {
@@ -46,7 +46,7 @@
 
     /**
      * Constructs an instance. This constructor is private; use {@link #make}.
-     * 
+     *
      * @param value the {@code long} value
      */
     private CstLong(long value) {
@@ -78,7 +78,7 @@
 
     /**
      * Gets the {@code long} value.
-     * 
+     *
      * @return the value
      */
     public long getValue() {
diff --git a/dx/src/com/android/dx/rop/cst/CstMemberRef.java b/dx/src/com/android/dx/rop/cst/CstMemberRef.java
index bae47c2..0791087 100644
--- a/dx/src/com/android/dx/rop/cst/CstMemberRef.java
+++ b/dx/src/com/android/dx/rop/cst/CstMemberRef.java
@@ -28,7 +28,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param definingClass {@code non-null;} the type of the defining class
      * @param nat {@code non-null;} the name-and-type
      */
@@ -53,7 +53,7 @@
         }
 
         CstMemberRef otherRef = (CstMemberRef) other;
-        return definingClass.equals(otherRef.definingClass) && 
+        return definingClass.equals(otherRef.definingClass) &&
             nat.equals(otherRef.nat);
     }
 
@@ -104,7 +104,7 @@
 
     /**
      * Gets the type of the defining class.
-     * 
+     *
      * @return {@code non-null;} the type of defining class
      */
     public final CstType getDefiningClass() {
@@ -113,7 +113,7 @@
 
     /**
      * Gets the defining name-and-type.
-     * 
+     *
      * @return {@code non-null;} the name-and-type
      */
     public final CstNat getNat() {
diff --git a/dx/src/com/android/dx/rop/cst/CstMethodRef.java b/dx/src/com/android/dx/rop/cst/CstMethodRef.java
index 77c97e9..075bc7c 100644
--- a/dx/src/com/android/dx/rop/cst/CstMethodRef.java
+++ b/dx/src/com/android/dx/rop/cst/CstMethodRef.java
@@ -23,7 +23,7 @@
         extends CstBaseMethodRef {
     /**
      * Constructs an instance.
-     * 
+     *
      * @param definingClass {@code non-null;} the type of the defining class
      * @param nat {@code non-null;} the name-and-type
      */
diff --git a/dx/src/com/android/dx/rop/cst/CstNat.java b/dx/src/com/android/dx/rop/cst/CstNat.java
index 5270fd2..8a2c591 100644
--- a/dx/src/com/android/dx/rop/cst/CstNat.java
+++ b/dx/src/com/android/dx/rop/cst/CstNat.java
@@ -25,7 +25,7 @@
     /**
      * {@code non-null;} the instance for name {@code TYPE} and descriptor
      * {@code java.lang.Class}, which is useful when dealing with
-     * wrapped primitives 
+     * wrapped primitives
      */
     public static final CstNat PRIMITIVE_TYPE_NAT =
         new CstNat(new CstUtf8("TYPE"),
@@ -39,7 +39,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param name {@code non-null;} the name
      * @param descriptor {@code non-null;} the descriptor
      */
@@ -64,7 +64,7 @@
         }
 
         CstNat otherNat = (CstNat) other;
-        return name.equals(otherNat.name) && 
+        return name.equals(otherNat.name) &&
             descriptor.equals(otherNat.descriptor);
     }
 
@@ -107,7 +107,7 @@
 
     /**
      * Gets the name.
-     * 
+     *
      * @return {@code non-null;} the name
      */
     public CstUtf8 getName() {
@@ -116,7 +116,7 @@
 
     /**
      * Gets the descriptor.
-     * 
+     *
      * @return {@code non-null;} the descriptor
      */
     public CstUtf8 getDescriptor() {
@@ -126,7 +126,7 @@
     /**
      * Returns an unadorned but human-readable version of the name-and-type
      * value.
-     * 
+     *
      * @return {@code non-null;} the human form
      */
     public String toHuman() {
@@ -137,7 +137,7 @@
      * Gets the field type corresponding to this instance's descriptor.
      * This method is only valid to call if the descriptor in fact describes
      * a field (and not a method).
-     * 
+     *
      * @return {@code non-null;} the field type
      */
     public Type getFieldType() {
@@ -148,7 +148,7 @@
      * Gets whether this instance has the name of a standard instance
      * initialization method. This is just a convenient shorthand for
      * {@code getName().getString().equals("<init>")}.
-     * 
+     *
      * @return {@code true} iff this is a reference to an
      * instance initialization method
      */
@@ -160,7 +160,7 @@
      * Gets whether this instance has the name of a standard class
      * initialization method. This is just a convenient shorthand for
      * {@code getName().getString().equals("<clinit>")}.
-     * 
+     *
      * @return {@code true} iff this is a reference to an
      * instance initialization method
      */
diff --git a/dx/src/com/android/dx/rop/cst/CstShort.java b/dx/src/com/android/dx/rop/cst/CstShort.java
index 4ac2f68..5be1022 100644
--- a/dx/src/com/android/dx/rop/cst/CstShort.java
+++ b/dx/src/com/android/dx/rop/cst/CstShort.java
@@ -30,7 +30,7 @@
     /**
      * Makes an instance for the given value. This may (but does not
      * necessarily) return an already-allocated instance.
-     * 
+     *
      * @param value the {@code short} value
      * @return {@code non-null;} the appropriate instance
      */
@@ -42,7 +42,7 @@
      * Makes an instance for the given {@code int} value. This
      * may (but does not necessarily) return an already-allocated
      * instance.
-     * 
+     *
      * @param value the value, which must be in range for a {@code short}
      * @return {@code non-null;} the appropriate instance
      */
@@ -50,7 +50,7 @@
         short cast = (short) value;
 
         if (cast != value) {
-            throw new IllegalArgumentException("bogus short value: " + 
+            throw new IllegalArgumentException("bogus short value: " +
                     value);
         }
 
@@ -59,7 +59,7 @@
 
     /**
      * Constructs an instance. This constructor is private; use {@link #make}.
-     * 
+     *
      * @param value the {@code short} value
      */
     private CstShort(short value) {
@@ -91,7 +91,7 @@
 
     /**
      * Gets the {@code short} value.
-     * 
+     *
      * @return the value
      */
     public short getValue() {
diff --git a/dx/src/com/android/dx/rop/cst/CstString.java b/dx/src/com/android/dx/rop/cst/CstString.java
index ce00f52..7dbfa02 100644
--- a/dx/src/com/android/dx/rop/cst/CstString.java
+++ b/dx/src/com/android/dx/rop/cst/CstString.java
@@ -28,7 +28,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param string {@code non-null;} the string value
      */
     public CstString(CstUtf8 string) {
@@ -41,7 +41,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param string {@code non-null;} the string value
      */
     public CstString(String string) {
@@ -100,7 +100,7 @@
 
     /**
      * Gets the string value.
-     * 
+     *
      * @return {@code non-null;} the string value
      */
     public CstUtf8 getString() {
diff --git a/dx/src/com/android/dx/rop/cst/CstType.java b/dx/src/com/android/dx/rop/cst/CstType.java
index 6dc9867..593adf8 100644
--- a/dx/src/com/android/dx/rop/cst/CstType.java
+++ b/dx/src/com/android/dx/rop/cst/CstType.java
@@ -96,7 +96,7 @@
      * class corresponding to a given primitive type. For example, if
      * given {@link Type#INT}, this method returns the class reference
      * {@code java.lang.Integer}.
-     * 
+     *
      * @param primitiveType {@code non-null;} the primitive type
      * @return {@code non-null;} the corresponding wrapper class
      */
@@ -118,7 +118,7 @@
 
     /**
      * Returns an interned instance of this class for the given type.
-     * 
+     *
      * @param type {@code non-null;} the underlying type
      * @return {@code non-null;} an appropriately-constructed instance
      */
@@ -135,7 +135,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param type {@code non-null;} the underlying type
      */
     public CstType(Type type) {
@@ -208,7 +208,7 @@
      * Gets the underlying type (as opposed to the type corresponding
      * to this instance as a constant, which is always
      * {@code Class}).
-     * 
+     *
      * @return {@code non-null;} the type corresponding to the name
      */
     public Type getClassType() {
@@ -217,14 +217,14 @@
 
     /**
      * Gets the type descriptor for this instance.
-     * 
+     *
      * @return {@code non-null;} the descriptor
      */
     public CstUtf8 getDescriptor() {
         if (descriptor == null) {
             descriptor = new CstUtf8(type.getDescriptor());
         }
-        
+
         return descriptor;
     }
 }
diff --git a/dx/src/com/android/dx/rop/cst/CstUtf8.java b/dx/src/com/android/dx/rop/cst/CstUtf8.java
index 2c7a1df..5cfc1f3 100644
--- a/dx/src/com/android/dx/rop/cst/CstUtf8.java
+++ b/dx/src/com/android/dx/rop/cst/CstUtf8.java
@@ -23,12 +23,12 @@
  * Constants of type {@code CONSTANT_Utf8_info}.
  */
 public final class CstUtf8 extends Constant {
-    /** 
+    /**
      * {@code non-null;} instance representing {@code ""}, that is, the
-     * empty string 
+     * empty string
      */
     public static final CstUtf8 EMPTY_STRING = new CstUtf8("");
-    
+
     /** {@code non-null;} the UTF-8 value as a string */
     private final String string;
 
@@ -39,7 +39,7 @@
      * Converts a string into its Java-style UTF-8 form. Java-style UTF-8
      * differs from normal UTF-8 in the handling of character '\0' and
      * surrogate pairs.
-     * 
+     *
      * @param string {@code non-null;} the string to convert
      * @return {@code non-null;} the UTF-8 bytes for it
      */
@@ -72,7 +72,7 @@
 
     /**
      * Converts an array of UTF-8 bytes into a string.
-     * 
+     *
      * @param bytes {@code non-null;} the bytes to convert
      * @return {@code non-null;} the converted string
      */
@@ -161,7 +161,7 @@
     /**
      * Helper for {@link #utf8BytesToString}, which throws the right
      * exception for a bogus utf-8 byte.
-     * 
+     *
      * @param value the byte value
      * @param offset the file offset
      * @return never
@@ -174,7 +174,7 @@
 
     /**
      * Constructs an instance from a {@code String}.
-     * 
+     *
      * @param string {@code non-null;} the UTF-8 value as a string
      */
     public CstUtf8(String string) {
@@ -188,7 +188,7 @@
 
     /**
      * Constructs an instance from some UTF-8 bytes.
-     * 
+     *
      * @param bytes {@code non-null;} array of the UTF-8 bytes
      */
     public CstUtf8(ByteArray bytes) {
@@ -266,7 +266,7 @@
                          */
                         char nextChar =
                             (i < (len - 1)) ? string.charAt(i + 1) : 0;
-                        boolean displayZero = 
+                        boolean displayZero =
                             (nextChar >= '0') && (nextChar <= '7');
                         sb.append('\\');
                         for (int shift = 6; shift >= 0; shift -= 3) {
@@ -298,7 +298,7 @@
     /**
      * Gets the value as a human-oriented string, surrounded by double
      * quotes.
-     * 
+     *
      * @return {@code non-null;} the quoted string
      */
     public String toQuoted() {
@@ -309,7 +309,7 @@
      * Gets the value as a human-oriented string, surrounded by double
      * quotes, but ellipsizes the result if it is longer than the given
      * maximum length
-     * 
+     *
      * @param maxLength {@code >= 5;} the maximum length of the string to return
      * @return {@code non-null;} the quoted string
      */
@@ -331,7 +331,7 @@
     /**
      * Gets the UTF-8 value as a string.
      * The returned string is always already interned.
-     * 
+     *
      * @return {@code non-null;} the UTF-8 value as a string
      */
     public String getString() {
@@ -340,7 +340,7 @@
 
     /**
      * Gets the UTF-8 value as UTF-8 encoded bytes.
-     * 
+     *
      * @return {@code non-null;} an array of the UTF-8 bytes
      */
     public ByteArray getBytes() {
@@ -350,7 +350,7 @@
     /**
      * Gets the size of this instance as UTF-8 code points. That is,
      * get the number of bytes in the UTF-8 encoding of this instance.
-     * 
+     *
      * @return {@code >= 0;} the UTF-8 size
      */
     public int getUtf8Size() {
@@ -362,10 +362,10 @@
      * get the number of 16-bit chars in the UTF-16 encoding of this
      * instance. This is the same as the {@code length} of the
      * Java {@code String} representation of this instance.
-     * 
+     *
      * @return {@code >= 0;} the UTF-16 size
      */
     public int getUtf16Size() {
         return string.length();
-    }   
+    }
 }
diff --git a/dx/src/com/android/dx/rop/cst/StdConstantPool.java b/dx/src/com/android/dx/rop/cst/StdConstantPool.java
index 82c3ab7..244395d 100644
--- a/dx/src/com/android/dx/rop/cst/StdConstantPool.java
+++ b/dx/src/com/android/dx/rop/cst/StdConstantPool.java
@@ -31,7 +31,7 @@
 
     /**
      * Constructs an instance. All indices initially contain {@code null}.
-     * 
+     *
      * @param size the size of the pool; this corresponds to the
      * class file field {@code constant_pool_count}, and is in fact
      * always at least one more than the actual size of the constant pool,
@@ -89,7 +89,7 @@
 
     /**
      * Sets the entry at the given index.
-     * 
+     *
      * @param n {@code >= 1, < size();} which entry
      * @param cst {@code null-ok;} the constant to store
      */
@@ -127,7 +127,7 @@
 
     /**
      * Throws the right exception for an invalid cpi.
-     * 
+     *
      * @param idx the bad cpi
      * @return never
      * @throws ExceptionWithContext always thrown
diff --git a/dx/src/com/android/dx/rop/cst/TypedConstant.java b/dx/src/com/android/dx/rop/cst/TypedConstant.java
index 823d9c4..c250c46 100644
--- a/dx/src/com/android/dx/rop/cst/TypedConstant.java
+++ b/dx/src/com/android/dx/rop/cst/TypedConstant.java
@@ -25,7 +25,7 @@
         extends Constant implements TypeBearer {
     /**
      * {@inheritDoc}
-     * 
+     *
      * This implentation always returns {@code this}.
      */
     public final TypeBearer getFrameType() {
diff --git a/dx/src/com/android/dx/rop/cst/Zeroes.java b/dx/src/com/android/dx/rop/cst/Zeroes.java
index 8bed657..7250b5a 100644
--- a/dx/src/com/android/dx/rop/cst/Zeroes.java
+++ b/dx/src/com/android/dx/rop/cst/Zeroes.java
@@ -28,10 +28,10 @@
     private Zeroes() {
         // This space intentionally left blank.
     }
-     
+
     /**
      * Gets the "zero" (or {@code null}) value for the given type.
-     * 
+     *
      * @param type {@code non-null;} the type in question
      * @return {@code non-null;} its "zero" value
      */
diff --git a/dx/src/com/android/dx/rop/type/Prototype.java b/dx/src/com/android/dx/rop/type/Prototype.java
index 7e6ab59..cbd5328 100644
--- a/dx/src/com/android/dx/rop/type/Prototype.java
+++ b/dx/src/com/android/dx/rop/type/Prototype.java
@@ -41,10 +41,10 @@
     private StdTypeList parameterFrameTypes;
 
     /**
-     * Returns the unique instance corresponding to the 
+     * Returns the unique instance corresponding to the
      * given method descriptor. See vmspec-2 sec4.3.3 for details on the
      * field descriptor syntax.
-     * 
+     *
      * @param descriptor {@code non-null;} the descriptor
      * @return {@code non-null;} the corresponding instance
      * @throws IllegalArgumentException thrown if the descriptor has
@@ -110,7 +110,7 @@
      * populate with parsed parameter types, and which also ensures
      * that there is a '(' at the start of the descriptor and a
      * single ')' somewhere before the end.
-     * 
+     *
      * @param descriptor {@code non-null;} the descriptor string
      * @return {@code non-null;} array large enough to hold all parsed parameter
      * types, but which is likely actually larger than needed
@@ -155,7 +155,7 @@
      * on the given definer, name, and flags. For example, an init
      * method has an uninitialized object of type {@code definer}
      * as its first argument.
-     * 
+     *
      * @param descriptor {@code non-null;} the descriptor string
      * @param definer {@code non-null;} class the method is defined on
      * @param isStatic whether this is a static method
@@ -180,7 +180,7 @@
     /**
      * Interns an instance which consists of the given number of
      * {@code int}s along with the given return type
-     * 
+     *
      * @param returnType {@code non-null;} the return type
      * @param count {@code > 0;} the number of elements in the prototype
      * @return {@code non-null;} the interned instance
@@ -206,7 +206,7 @@
     /**
      * Constructs an instance. This is a private constructor; use one
      * of the public static methods to get instances.
-     * 
+     *
      * @param descriptor {@code non-null;} the descriptor string
      */
     private Prototype(String descriptor, Type returnType,
@@ -258,7 +258,7 @@
         if (this == other) {
             return 0;
         }
-        
+
         /*
          * The return type is the major order, and then args in order,
          * and then the shorter list comes first (similar to string
@@ -303,7 +303,7 @@
 
     /**
      * Gets the descriptor string.
-     * 
+     *
      * @return {@code non-null;} the descriptor
      */
     public String getDescriptor() {
@@ -312,7 +312,7 @@
 
     /**
      * Gets the return type.
-     * 
+     *
      * @return {@code non-null;} the return type
      */
     public Type getReturnType() {
@@ -321,7 +321,7 @@
 
     /**
      * Gets the list of parameter types.
-     * 
+     *
      * @return {@code non-null;} the list of parameter types
      */
     public StdTypeList getParameterTypes() {
@@ -333,7 +333,7 @@
      * types. The difference between the two lists (if any) is that all
      * "intlike" types (see {@link Type#isIntlike}) are replaced by
      * {@link Type#INT}.
-     * 
+     *
      * @return {@code non-null;} the list of parameter frame types
      */
     public StdTypeList getParameterFrameTypes() {
@@ -359,7 +359,7 @@
      * Returns a new interned instance, which is the same as this instance,
      * except that it has an additional parameter prepended to the original's
      * argument list.
-     * 
+     *
      * @param param {@code non-null;} the new first parameter
      * @return {@code non-null;} an appropriately-constructed instance
      */
@@ -379,7 +379,7 @@
      * Puts the given instance in the intern table if it's not already
      * there. If a conflicting value is already in the table, then leave it.
      * Return the interned value.
-     * 
+     *
      * @param desc {@code non-null;} instance to make interned
      * @return {@code non-null;} the actual interned object
      */
diff --git a/dx/src/com/android/dx/rop/type/StdTypeList.java b/dx/src/com/android/dx/rop/type/StdTypeList.java
index a023812..fe6647c0 100644
--- a/dx/src/com/android/dx/rop/type/StdTypeList.java
+++ b/dx/src/com/android/dx/rop/type/StdTypeList.java
@@ -163,7 +163,7 @@
 
     /**
      * Makes a single-element instance.
-     * 
+     *
      * @param type {@code non-null;} the element
      * @return {@code non-null;} an appropriately-constructed instance
      */
@@ -175,7 +175,7 @@
 
     /**
      * Makes a two-element instance.
-     * 
+     *
      * @param type0 {@code non-null;} the first element
      * @param type1 {@code non-null;} the second element
      * @return {@code non-null;} an appropriately-constructed instance
@@ -189,7 +189,7 @@
 
     /**
      * Makes a three-element instance.
-     * 
+     *
      * @param type0 {@code non-null;} the first element
      * @param type1 {@code non-null;} the second element
      * @param type2 {@code non-null;} the third element
@@ -205,7 +205,7 @@
 
     /**
      * Makes a four-element instance.
-     * 
+     *
      * @param type0 {@code non-null;} the first element
      * @param type1 {@code non-null;} the second element
      * @param type2 {@code non-null;} the third element
@@ -226,7 +226,7 @@
      * Returns the given list as a comma-separated list of human forms. This
      * is a static method so as to work on arbitrary {@link TypeList}
      * instances.
-     * 
+     *
      * @param list {@code non-null;} the list to convert
      * @return {@code non-null;} the human form
      */
@@ -236,7 +236,7 @@
         if (size == 0) {
             return "<empty>";
         }
-        
+
         StringBuffer sb = new StringBuffer(100);
 
         for (int i = 0; i < size; i++) {
@@ -253,7 +253,7 @@
      * Returns a hashcode of the contents of the given list. This
      * is a static method so as to work on arbitrary {@link TypeList}
      * instances.
-     * 
+     *
      * @param list {@code non-null;} the list to inspect
      * @return {@code non-null;} the hash code
      */
@@ -267,12 +267,12 @@
 
         return hash;
     }
-    
+
     /**
      * Compares the contents of the given two instances for equality. This
      * is a static method so as to work on arbitrary {@link TypeList}
      * instances.
-     * 
+     *
      * @param list1 {@code non-null;} one list to compare
      * @param list2 {@code non-null;} another list to compare
      * @return whether the two lists contain corresponding equal elements
@@ -297,7 +297,7 @@
      * Compares the contents of the given two instances for ordering. This
      * is a static method so as to work on arbitrary {@link TypeList}
      * instances.
-     * 
+     *
      * @param list1 {@code non-null;} one list to compare
      * @param list2 {@code non-null;} another list to compare
      * @return the order of the two lists
@@ -322,10 +322,10 @@
             return 1;
         }
     }
-    
+
     /**
      * Constructs an instance. All indices initially contain {@code null}.
-     * 
+     *
      * @param size the size of the list
      */
     public StdTypeList(int size) {
@@ -367,7 +367,7 @@
      * Gets the indicated element. It is an error to call this with the
      * index for an element which was never set; if you do that, this
      * will throw {@code NullPointerException}.
-     * 
+     *
      * @param n {@code >= 0, < size();} which element
      * @return {@code non-null;} the indicated element
      */
@@ -377,7 +377,7 @@
 
     /**
      * Sets the type at the given index.
-     * 
+     *
      * @param n {@code >= 0, < size();} which element
      * @param type {@code non-null;} the type to store
      */
@@ -389,7 +389,7 @@
      * Returns a new instance, which is the same as this instance,
      * except that it has an additional type prepended to the
      * original.
-     * 
+     *
      * @param type {@code non-null;} the new first element
      * @return {@code non-null;} an appropriately-constructed instance
      */
diff --git a/dx/src/com/android/dx/rop/type/Type.java b/dx/src/com/android/dx/rop/type/Type.java
index 64c3c30..16b16f5 100644
--- a/dx/src/com/android/dx/rop/type/Type.java
+++ b/dx/src/com/android/dx/rop/type/Type.java
@@ -28,7 +28,7 @@
  */
 public final class Type implements TypeBearer, Comparable<Type> {
     /** {@code non-null;} intern table mapping string descriptors to instances */
-    private static final HashMap<String, Type> internTable = 
+    private static final HashMap<String, Type> internTable =
         new HashMap<String, Type>(500);
 
     /** basic type constant for {@code void} */
@@ -147,63 +147,63 @@
     /**
      * {@code non-null;} instance representing {@code java.lang.Boolean}; the
      * suffix on the name helps disambiguate this from the instance
-     * representing a primitive type 
+     * representing a primitive type
      */
     public static final Type BOOLEAN_CLASS = intern("Ljava/lang/Boolean;");
 
     /**
      * {@code non-null;} instance representing {@code java.lang.Byte}; the
      * suffix on the name helps disambiguate this from the instance
-     * representing a primitive type 
+     * representing a primitive type
      */
     public static final Type BYTE_CLASS = intern("Ljava/lang/Byte;");
 
     /**
      * {@code non-null;} instance representing {@code java.lang.Character}; the
      * suffix on the name helps disambiguate this from the instance
-     * representing a primitive type 
+     * representing a primitive type
      */
     public static final Type CHARACTER_CLASS = intern("Ljava/lang/Character;");
 
     /**
      * {@code non-null;} instance representing {@code java.lang.Double}; the
      * suffix on the name helps disambiguate this from the instance
-     * representing a primitive type 
+     * representing a primitive type
      */
     public static final Type DOUBLE_CLASS = intern("Ljava/lang/Double;");
 
     /**
      * {@code non-null;} instance representing {@code java.lang.Float}; the
      * suffix on the name helps disambiguate this from the instance
-     * representing a primitive type 
+     * representing a primitive type
      */
     public static final Type FLOAT_CLASS = intern("Ljava/lang/Float;");
 
     /**
      * {@code non-null;} instance representing {@code java.lang.Integer}; the
      * suffix on the name helps disambiguate this from the instance
-     * representing a primitive type 
+     * representing a primitive type
      */
     public static final Type INTEGER_CLASS = intern("Ljava/lang/Integer;");
 
     /**
      * {@code non-null;} instance representing {@code java.lang.Long}; the
      * suffix on the name helps disambiguate this from the instance
-     * representing a primitive type 
+     * representing a primitive type
      */
     public static final Type LONG_CLASS = intern("Ljava/lang/Long;");
 
     /**
      * {@code non-null;} instance representing {@code java.lang.Short}; the
      * suffix on the name helps disambiguate this from the instance
-     * representing a primitive type 
+     * representing a primitive type
      */
     public static final Type SHORT_CLASS = intern("Ljava/lang/Short;");
 
     /**
      * {@code non-null;} instance representing {@code java.lang.Void}; the
      * suffix on the name helps disambiguate this from the instance
-     * representing a primitive type 
+     * representing a primitive type
      */
     public static final Type VOID_CLASS = intern("Ljava/lang/Void;");
 
@@ -239,7 +239,7 @@
 
     /**
      * basic type corresponding to this type; one of the
-     * {@code BT_*} constants 
+     * {@code BT_*} constants
      */
     private final int basicType;
 
@@ -247,32 +247,32 @@
      * {@code >= -1;} for an uninitialized type, bytecode index that this
      * instance was allocated at; {@code Integer.MAX_VALUE} if it
      * was an incoming uninitialized instance; {@code -1} if this
-     * is an <i>inititialized</i> instance 
+     * is an <i>inititialized</i> instance
      */
     private final int newAt;
 
     /**
      * {@code null-ok;} the internal-form class name corresponding to this type, if
      * calculated; only valid if {@code this} is a reference type and
-     * additionally not a return address 
+     * additionally not a return address
      */
     private String className;
 
     /**
      * {@code null-ok;} the type corresponding to an array of this type, if
-     * calculated 
+     * calculated
      */
     private Type arrayType;
 
     /**
      * {@code null-ok;} the type corresponding to elements of this type, if
-     * calculated; only valid if {@code this} is an array type 
+     * calculated; only valid if {@code this} is an array type
      */
     private Type componentType;
 
     /**
      * {@code null-ok;} the type corresponding to the initialized version of
-     * this type, if this instance is in fact an uninitialized type 
+     * this type, if this instance is in fact an uninitialized type
      */
     private Type initializedType;
 
@@ -282,7 +282,7 @@
      * field descriptor syntax. This method does <i>not</i> allow
      * {@code "V"} (that is, type {@code void}) as a valid
      * descriptor.
-     * 
+     *
      * @param descriptor {@code non-null;} the descriptor
      * @return {@code non-null;} the corresponding instance
      * @throws IllegalArgumentException thrown if the descriptor has
@@ -339,8 +339,8 @@
             char c = descriptor.charAt(i);
             switch (c) {
                 case '[':
-                case ';': 
-                case '.': 
+                case ';':
+                case '.':
                 case '(':
                 case ')': {
                     throw new IllegalArgumentException("bad descriptor");
@@ -365,7 +365,7 @@
      * given descriptor, allowing {@code "V"} to return the type
      * for {@code void}. Other than that one caveat, this method
      * is identical to {@link #intern}.
-     * 
+     *
      * @param descriptor {@code non-null;} the descriptor
      * @return {@code non-null;} the corresponding instance
      * @throws IllegalArgumentException thrown if the descriptor has
@@ -391,7 +391,7 @@
      * calling {@code intern(name)} if {@code name} begins
      * with {@code "["} and calling {@code intern("L" + name + ";")}
      * in all other cases.
-     * 
+     *
      * @param name {@code non-null;} the name of the class whose type is desired
      * @return {@code non-null;} the corresponding type
      * @throws IllegalArgumentException thrown if the name has
@@ -413,7 +413,7 @@
      * Constructs an instance corresponding to an "uninitialized type."
      * This is a private constructor; use one of the public static
      * methods to get instances.
-     * 
+     *
      * @param descriptor {@code non-null;} the field descriptor for the type
      * @param basicType basic type corresponding to this type; one of the
      * {@code BT_*} constants
@@ -444,7 +444,7 @@
      * Constructs an instance corresponding to an "initialized type."
      * This is a private constructor; use one of the public static
      * methods to get instances.
-     * 
+     *
      * @param descriptor {@code non-null;} the field descriptor for the type
      * @param basicType basic type corresponding to this type; one of the
      * {@code BT_*} constants
@@ -559,7 +559,7 @@
 
     /**
      * Gets the descriptor.
-     * 
+     *
      * @return {@code non-null;} the descriptor
      */
     public String getDescriptor() {
@@ -571,7 +571,7 @@
      * form. This method is only valid if this instance is for a
      * normal reference type (that is, a reference type and
      * additionally not a return address).
-     * 
+     *
      * @return {@code non-null;} the internal-form class name
      */
     public String getClassName() {
@@ -594,7 +594,7 @@
     /**
      * Gets the category. Most instances are category 1. {@code long}
      * and {@code double} are the only category 2 types.
-     * 
+     *
      * @see #isCategory1
      * @see #isCategory2
      * @return the category
@@ -612,7 +612,7 @@
 
     /**
      * Returns whether or not this is a category 1 type.
-     * 
+     *
      * @see #getCategory
      * @see #isCategory2
      * @return whether or not this is a category 1 type
@@ -630,7 +630,7 @@
 
     /**
      * Returns whether or not this is a category 2 type.
-     * 
+     *
      * @see #getCategory
      * @see #isCategory1
      * @return whether or not this is a category 2 type
@@ -650,7 +650,7 @@
      * Gets whether this type is "intlike." An intlike type is one which, when
      * placed on a stack or in a local, is automatically converted to an
      * {@code int}.
-     * 
+     *
      * @return whether this type is "intlike"
      */
     public boolean isIntlike() {
@@ -670,7 +670,7 @@
     /**
      * Gets whether this type is a primitive type. All types are either
      * primitive or reference types.
-     * 
+     *
      * @return whether this type is primitive
      */
     public boolean isPrimitive() {
@@ -696,7 +696,7 @@
      * reference type is a reference type that is not a return
      * address. This method is just convenient shorthand for
      * {@code getBasicType() == Type.BT_OBJECT}.
-     * 
+     *
      * @return whether this type is a normal reference type
      */
     public boolean isReference() {
@@ -707,7 +707,7 @@
      * Gets whether this type is an array type. If this method returns
      * {@code true}, then it is safe to use {@link #getComponentType}
      * to determine the component type.
-     * 
+     *
      * @return whether this type is an array type
      */
     public boolean isArray() {
@@ -717,7 +717,7 @@
     /**
      * Gets whether this type is an array type or is a known-null, and
      * hence is compatible with array types.
-     * 
+     *
      * @return whether this type is an array type
      */
     public boolean isArrayOrKnownNull() {
@@ -729,7 +729,7 @@
      * uninitialized instance is what one gets back from the {@code new}
      * opcode, and remains uninitialized until a valid constructor is
      * invoked on it.
-     * 
+     *
      * @return whether this type is "uninitialized"
      */
     public boolean isUninitialized() {
@@ -742,7 +742,7 @@
      * type is an uninitialized incoming parameter (i.e., the
      * {@code this} of an {@code <init>} method) or
      * {@code -1} if this type is in fact <i>initialized</i>.
-     * 
+     *
      * @return {@code >= -1;} the allocation bytecode index
      */
     public int getNewAt() {
@@ -752,7 +752,7 @@
     /**
      * Gets the initialized type corresponding to this instance, but only
      * if this instance is in fact an uninitialized object type.
-     * 
+     *
      * @return {@code non-null;} the initialized type
      */
     public Type getInitializedType() {
@@ -766,7 +766,7 @@
 
     /**
      * Gets the type corresponding to an array of this type.
-     * 
+     *
      * @return {@code non-null;} the array type
      */
     public Type getArrayType() {
@@ -780,7 +780,7 @@
     /**
      * Gets the component type of this type. This method is only valid on
      * array types.
-     * 
+     *
      * @return {@code non-null;} the component type
      */
     public Type getComponentType() {
@@ -799,7 +799,7 @@
      * Returns a new interned instance which is identical to this one, except
      * it is indicated as uninitialized and allocated at the given bytecode
      * index. This instance must be an initialized object type.
-     * 
+     *
      * @param newAt {@code >= 0;} the allocation bytecode index
      * @return {@code non-null;} an appropriately-constructed instance
      */
@@ -837,7 +837,7 @@
      * Puts the given instance in the intern table if it's not already
      * there. If a conflicting value is already in the table, then leave it.
      * Return the interned value.
-     * 
+     *
      * @param type {@code non-null;} instance to make interned
      * @return {@code non-null;} the actual interned object
      */
diff --git a/dx/src/com/android/dx/rop/type/TypeBearer.java b/dx/src/com/android/dx/rop/type/TypeBearer.java
index 2f2f274..b03dbaf 100644
--- a/dx/src/com/android/dx/rop/type/TypeBearer.java
+++ b/dx/src/com/android/dx/rop/type/TypeBearer.java
@@ -55,10 +55,10 @@
      * is the same as calling {@code getFrameType()} unless this
      * instance is an int-like type, in which case this method returns
      * {@code BT_INT}.
-     * 
+     *
      * @see #getBasicType
      * @see #getFrameType
-     * 
+     *
      * @return the basic frame type; one of the {@code BT_*} constants
      * defined by {@link Type}
      */
@@ -66,7 +66,7 @@
 
     /**
      * Returns whether this instance represents a constant value.
-     * 
+     *
      * @return {@code true} if this instance represents a constant value
      * and {@code false} if not
      */
diff --git a/dx/src/com/android/dx/rop/type/TypeList.java b/dx/src/com/android/dx/rop/type/TypeList.java
index e82cca7..de2d62e 100644
--- a/dx/src/com/android/dx/rop/type/TypeList.java
+++ b/dx/src/com/android/dx/rop/type/TypeList.java
@@ -25,12 +25,12 @@
      * {@code TypeList} interface itself doesn't provide any
      * means of mutation, but that doesn't mean that there isn't an
      * extra-interface way of mutating an instance.
-     * 
+     *
      * @return {@code true} if this instance is mutable or
      * {@code false} if it is immutable
      */
     public boolean isMutable();
-    
+
     /**
      * Gets the size of this list.
      *
@@ -52,7 +52,7 @@
      * Gets the number of 32-bit words required to hold instances of
      * all the elements of this list. This is a sum of the widths (categories)
      * of all the elements.
-     * 
+     *
      * @return {@code >= 0;} the required number of words
      */
     public int getWordCount();
@@ -61,7 +61,7 @@
      * Returns a new instance which is identical to this one, except that
      * the given item is appended to the end and it is guaranteed to be
      * immutable.
-     * 
+     *
      * @param type {@code non-null;} item to append
      * @return {@code non-null;} an appropriately-constructed instance
      */
diff --git a/dx/src/com/android/dx/ssa/BasicRegisterMapper.java b/dx/src/com/android/dx/ssa/BasicRegisterMapper.java
index fdabaab..83045b2 100644
--- a/dx/src/com/android/dx/ssa/BasicRegisterMapper.java
+++ b/dx/src/com/android/dx/ssa/BasicRegisterMapper.java
@@ -33,7 +33,7 @@
 
     /**
      * Creates a new OneToOneRegisterMapper.
-     * 
+     *
      * @param countOldRegisters the number of registers in the old name space
      */
     public BasicRegisterMapper(int countOldRegisters) {
diff --git a/dx/src/com/android/dx/ssa/ConstCollector.java b/dx/src/com/android/dx/ssa/ConstCollector.java
index 03252d1..7aa512d 100644
--- a/dx/src/com/android/dx/ssa/ConstCollector.java
+++ b/dx/src/com/android/dx/ssa/ConstCollector.java
@@ -71,7 +71,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param ssaMethod {@code non-null;} method to process
      */
     private ConstCollector(SsaMethod ssaMethod) {
@@ -86,7 +86,7 @@
 
         ArrayList<TypedConstant> constantList
                 = getConstsSortedByCountUse();
-    
+
         int toCollect = Math.min(constantList.size(), MAX_COLLECTED_CONSTANTS);
 
         SsaBasicBlock start = ssaMeth.getEntryBlock();
@@ -126,7 +126,7 @@
 
                 SsaBasicBlock resultBlock
                         = constBlock.insertNewSuccessor(successorBlock);
-                PlainInsn insn 
+                PlainInsn insn
                     = new PlainInsn(
                             Rops.opMoveResultPseudo(result.getTypeBearer()),
                             SourcePosition.NO_INFO,
@@ -184,7 +184,7 @@
                 }
                 /*
                  * We can't move any throwable const whose throw will be
-                 * caught, so don't count them.                 
+                 * caught, so don't count them.
                  */
                 if (insn.getBlock().getSuccessors().cardinality() > 1) {
                     continue;
@@ -255,7 +255,7 @@
      * variable, then insert a mark-local for {@code newReg} just below
      * it. We expect the definition of  {@code origReg} to ultimately
      * be removed by the dead code eliminator
-     * 
+     *
      * @param origReg {@code non-null;} original register
      * @param newReg {@code non-null;} new register that will replace
      * {@code origReg}
@@ -338,7 +338,7 @@
 
             if (ssaMeth.isRegALocal(origReg)) {
                 if (!COLLECT_ONE_LOCAL) {
-                    continue;                    
+                    continue;
                 } else {
                     /*
                      * TODO: If the same local gets the same cst
diff --git a/dx/src/com/android/dx/ssa/DeadCodeRemover.java b/dx/src/com/android/dx/ssa/DeadCodeRemover.java
index ec960b8..2a29050 100644
--- a/dx/src/com/android/dx/ssa/DeadCodeRemover.java
+++ b/dx/src/com/android/dx/ssa/DeadCodeRemover.java
@@ -53,7 +53,7 @@
 
     /**
      * Process a method with the dead-code remver
-     * 
+     *
      * @param ssaMethod method to process
      */
     public static void process(SsaMethod ssaMethod) {
@@ -63,7 +63,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param ssaMethod method to process
      */
     private DeadCodeRemover(SsaMethod ssaMethod) {
@@ -127,7 +127,7 @@
     /**
      * Returns true if the only uses of this register form a circle of
      * operations with no side effects.
-     * 
+     *
      * @param regV register to examine
      * @param set a set of registers that we've already determined
      * are only used as sources in operations with no side effect or null
@@ -179,7 +179,7 @@
             return true;
         }
 
-        return insn.hasSideEffect();        
+        return insn.hasSideEffect();
     }
 
     /**
diff --git a/dx/src/com/android/dx/ssa/DomFront.java b/dx/src/com/android/dx/ssa/DomFront.java
index 3005015..941a317 100644
--- a/dx/src/com/android/dx/ssa/DomFront.java
+++ b/dx/src/com/android/dx/ssa/DomFront.java
@@ -37,7 +37,7 @@
     private final SsaMethod meth;
 
     private final ArrayList<SsaBasicBlock> nodes;
-    
+
     private final DomInfo[] domInfos;
 
     /**
@@ -55,8 +55,8 @@
     }
 
     /**
-     * Constructs instance. Call {@link DomFront#run} to process. 
-     * 
+     * Constructs instance. Call {@link DomFront#run} to process.
+     *
      * @param meth {@code non-null;} method to process
      */
     public DomFront(SsaMethod meth) {
@@ -98,7 +98,7 @@
         }
 
         buildDomTree();
-        
+
         if (DEBUG) {
             debugPrintDomChildren();
         }
@@ -153,6 +153,9 @@
 
         for (int i = 0; i < szNodes; i++) {
             DomInfo info = domInfos[i];
+
+            if (info.idom == -1) continue;
+
             SsaBasicBlock domParent = nodes.get(info.idom);
             domParent.addDomChild(nodes.get(i));
         }
@@ -182,6 +185,8 @@
                          * added label to, since we must be at a part
                          * of the dom tree we have seen before.
                          */
+                        if (runnerIndex == -1) break;
+
                         DomInfo runnerInfo = domInfos[runnerIndex];
 
                         if (runnerInfo.dominanceFrontiers.has(b)) {
diff --git a/dx/src/com/android/dx/ssa/Dominators.java b/dx/src/com/android/dx/ssa/Dominators.java
index f7d7da6..503e857 100644
--- a/dx/src/com/android/dx/ssa/Dominators.java
+++ b/dx/src/com/android/dx/ssa/Dominators.java
@@ -60,7 +60,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param meth {@code non-null;} method to process
      * @param domInfos {@code non-null;} the raw dominator info
      * @param postdom true for postdom information, false for normal dom info
@@ -78,7 +78,7 @@
     /**
      * Constructs a fully-initialized instance. (This method exists so as
      * to avoid calling a large amount of code in the constructor.)
-     * 
+     *
      * @param meth {@code non-null;} method to process
      * @param domInfos {@code non-null;} the raw dominator info
      * @param postdom true for postdom information, false for normal dom info
@@ -109,7 +109,7 @@
 
     /**
      * Performs path compress on the DFS info.
-     * 
+     *
      * @param in Basic block whose DFS info we are path compressing.
      */
     private void compress(SsaBasicBlock in) {
@@ -120,7 +120,7 @@
             ArrayList<SsaBasicBlock> worklist = new ArrayList<SsaBasicBlock>();
             HashSet<SsaBasicBlock> visited = new HashSet<SsaBasicBlock>();
             worklist.add(in);
-            
+
             while (!worklist.isEmpty()) {
                 int wsize = worklist.size();
                 SsaBasicBlock v = worklist.get(wsize - 1);
@@ -164,7 +164,7 @@
     /**
      * Performs dominator/post-dominator calculation for the control
      * flow graph.
-     * 
+     *
      * @param meth {@code non-null;} method to analyze
      */
     private void run() {
@@ -175,7 +175,7 @@
             vertex.add(root);
             domInfos[root.getIndex()].idom = root.getIndex();
         }
-        
+
         /*
          * First we perform a DFS numbering of the blocks, by
          * numbering the dfs tree roots.
diff --git a/dx/src/com/android/dx/ssa/EscapeAnalysis.java b/dx/src/com/android/dx/ssa/EscapeAnalysis.java
new file mode 100644
index 0000000..d270857
--- /dev/null
+++ b/dx/src/com/android/dx/ssa/EscapeAnalysis.java
@@ -0,0 +1,843 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.dx.ssa;
+
+import com.android.dx.rop.code.Exceptions;
+import com.android.dx.rop.code.FillArrayDataInsn;
+import com.android.dx.rop.code.Insn;
+import com.android.dx.rop.code.PlainCstInsn;
+import com.android.dx.rop.code.PlainInsn;
+import com.android.dx.rop.code.RegOps;
+import com.android.dx.rop.code.RegisterSpec;
+import com.android.dx.rop.code.RegisterSpecList;
+import com.android.dx.rop.code.Rop;
+import com.android.dx.rop.code.Rops;
+import com.android.dx.rop.code.ThrowingCstInsn;
+import com.android.dx.rop.code.ThrowingInsn;
+import com.android.dx.rop.cst.Constant;
+import com.android.dx.rop.cst.CstLiteralBits;
+import com.android.dx.rop.cst.CstMethodRef;
+import com.android.dx.rop.cst.CstNat;
+import com.android.dx.rop.cst.CstType;
+import com.android.dx.rop.cst.CstUtf8;
+import com.android.dx.rop.cst.TypedConstant;
+import com.android.dx.rop.cst.Zeroes;
+import com.android.dx.rop.type.StdTypeList;
+import com.android.dx.rop.type.Type;
+import com.android.dx.rop.type.TypeBearer;
+
+import java.util.ArrayList;
+import java.util.BitSet;
+import java.util.HashSet;
+import java.util.List;
+
+/**
+ * Simple intraprocedural escape analysis. Finds new arrays that don't escape
+ * the method they are created in and replaces the array values with registers.
+ */
+public class EscapeAnalysis {
+    /**
+     * Struct used to generate and maintain escape analysis results.
+     */
+    static class EscapeSet {
+        /** set containing all registers related to an object */
+        BitSet regSet;
+        /** escape state of the object */
+        EscapeState escape;
+        /** list of objects that are put into this object */
+        ArrayList<EscapeSet> childSets;
+        /** list of objects that this object is put into */
+        ArrayList<EscapeSet> parentSets;
+        /** flag to indicate this object is a scalar replaceable array */
+        boolean replaceableArray;
+
+        /**
+         * Constructs an instance of an EscapeSet
+         *
+         * @param reg the SSA register that defines the object
+         * @param size the number of registers in the method
+         * @param escState the lattice value to initially set this to
+         */
+        EscapeSet(int reg, int size, EscapeState escState) {
+            regSet = new BitSet(size);
+            regSet.set(reg);
+            escape = escState;
+            childSets = new ArrayList<EscapeSet>();
+            parentSets = new ArrayList<EscapeSet>();
+            replaceableArray = false;
+        }
+    }
+
+    /**
+     * Lattice values used to indicate escape state for an object. Analysis can
+     * only raise escape state values, not lower them.
+     *
+     * TOP - Used for objects that haven't been analyzed yet
+     * NONE - Object does not escape, and is eligible for scalar replacement.
+     * METHOD - Object remains local to method, but can't be scalar replaced.
+     * INTER - Object is passed between methods. (treated as globally escaping
+     *         since this is an intraprocedural analysis)
+     * GLOBAL - Object escapes globally.
+     */
+    public enum EscapeState {
+        TOP, NONE, METHOD, INTER, GLOBAL
+    }
+
+    /** method we're processing */
+    private SsaMethod ssaMeth;
+    /** ssaMeth.getRegCount() */
+    private int regCount;
+    /** Lattice values for each object register group */
+    private ArrayList<EscapeSet> latticeValues;
+
+    /**
+     * Constructs an instance.
+     *
+     * @param ssaMeth method to process
+     */
+    private EscapeAnalysis(SsaMethod ssaMeth) {
+        this.ssaMeth = ssaMeth;
+        this.regCount = ssaMeth.getRegCount();
+        this.latticeValues = new ArrayList<EscapeSet>();
+    }
+
+    /**
+     * Finds the index in the lattice for a particular register.
+     * Returns the size of the lattice if the register wasn't found.
+     *
+     * @param reg {@code non-null;} register being looked up
+     * @return index of the register or size of the lattice if it wasn't found.
+     */
+    private int findSetIndex(RegisterSpec reg) {
+        int i;
+        for (i = 0; i < latticeValues.size(); i++) {
+            EscapeSet e = latticeValues.get(i);
+            if (e.regSet.get(reg.getReg())) {
+                return i;
+            }
+        }
+        return i;
+    }
+
+    /**
+     * Finds the corresponding instruction for a given move result
+     *
+     * @param moveInsn {@code non-null;} a move result instruction
+     * @return {@code non-null;} the instruction that produces the result for
+     * the move
+     */
+    private SsaInsn getInsnForMove(SsaInsn moveInsn) {
+        int pred = moveInsn.getBlock().getPredecessors().nextSetBit(0);
+        ArrayList<SsaInsn> predInsns = ssaMeth.getBlocks().get(pred).getInsns();
+        return predInsns.get(predInsns.size()-1);
+    }
+
+    /**
+     * Finds the corresponding move result for a given instruction
+     *
+     * @param insn {@code non-null;} an instruction that must always be
+     * followed by a move result
+     * @return {@code non-null;} the move result for the given instruction
+     */
+    private SsaInsn getMoveForInsn(SsaInsn insn) {
+        int succ = insn.getBlock().getSuccessors().nextSetBit(0);
+        ArrayList<SsaInsn> succInsns = ssaMeth.getBlocks().get(succ).getInsns();
+        return succInsns.get(0);
+    }
+
+    /**
+     * Creates a link in the lattice between two EscapeSets due to a put
+     * instruction. The object being put is the child and the object being put
+     * into is the parent. A child set must always have an escape state at
+     * least as high as its parent.
+     *
+     * @param parentSet {@code non-null;} the EscapeSet for the object being put
+     * into
+     * @param childSet {@code non-null;} the EscapeSet for the object being put
+     */
+    private void addEdge(EscapeSet parentSet, EscapeSet childSet) {
+        if (!childSet.parentSets.contains(parentSet)) {
+            childSet.parentSets.add(parentSet);
+        }
+        if (!parentSet.childSets.contains(childSet)) {
+            parentSet.childSets.add(childSet);
+        }
+    }
+
+    /**
+     * Merges all links in the lattice among two EscapeSets. On return, the
+     * newNode will have its old links as well as all links from the oldNode.
+     * The oldNode has all its links removed.
+     *
+     * @param newNode {@code non-null;} the EscapeSet to merge all links into
+     * @param oldNode {@code non-null;} the EscapeSet to remove all links from
+     */
+    private void replaceNode(EscapeSet newNode, EscapeSet oldNode) {
+        for (EscapeSet e : oldNode.parentSets) {
+            e.childSets.remove(oldNode);
+            e.childSets.add(newNode);
+            newNode.parentSets.add(e);
+        }
+        for (EscapeSet e : oldNode.childSets) {
+            e.parentSets.remove(oldNode);
+            e.parentSets.add(newNode);
+            newNode.childSets.add(e);
+        }
+    }
+
+    /**
+     * Performs escape analysis on a method. Finds scalar replaceable arrays and
+     * replaces them with equivalent registers.
+     *
+     * @param ssaMethod {@code non-null;} method to process
+     */
+    public static void process(SsaMethod ssaMethod) {
+        new EscapeAnalysis(ssaMethod).run();
+    }
+
+    /**
+     * Process a single instruction, looking for new objects resulting from
+     * move result or move param.
+     *
+     * @param insn {@code non-null;} instruction to process
+     */
+    private void processInsn(SsaInsn insn) {
+        int op = insn.getOpcode().getOpcode();
+        RegisterSpec result = insn.getResult();
+        EscapeSet escSet;
+
+        // Identify new objects
+        if (op == RegOps.MOVE_RESULT_PSEUDO &&
+                result.getTypeBearer().getBasicType() == Type.BT_OBJECT) {
+            // Handle objects generated through move_result_pseudo
+            escSet = processMoveResultPseudoInsn(insn);
+            processRegister(result, escSet);
+        } else if (op == RegOps.MOVE_PARAM &&
+                      result.getTypeBearer().getBasicType() == Type.BT_OBJECT) {
+            // Track method arguments that are objects
+            escSet = new EscapeSet(result.getReg(), regCount, EscapeState.NONE);
+            latticeValues.add(escSet);
+            processRegister(result, escSet);
+        } else if (op == RegOps.MOVE_RESULT &&
+                result.getTypeBearer().getBasicType() == Type.BT_OBJECT) {
+            // Track method return values that are objects
+            escSet = new EscapeSet(result.getReg(), regCount, EscapeState.NONE);
+            latticeValues.add(escSet);
+            processRegister(result, escSet);
+        }
+    }
+
+    /**
+     * Determine the origin of a move result pseudo instruction that generates
+     * an object. Creates a new EscapeSet for the new object accordingly.
+     *
+     * @param insn {@code non-null;} move result pseudo instruction to process
+     * @return {@code non-null;} an EscapeSet for the object referred to by the
+     * move result pseudo instruction
+     */
+    private EscapeSet processMoveResultPseudoInsn(SsaInsn insn) {
+        RegisterSpec result = insn.getResult();
+        SsaInsn prevSsaInsn = getInsnForMove(insn);
+        int prevOpcode = prevSsaInsn.getOpcode().getOpcode();
+        EscapeSet escSet;
+        RegisterSpec prevSource;
+
+        switch(prevOpcode) {
+           // New instance / Constant
+            case RegOps.NEW_INSTANCE:
+            case RegOps.CONST:
+                escSet = new EscapeSet(result.getReg(), regCount,
+                                           EscapeState.NONE);
+                break;
+            // New array
+            case RegOps.NEW_ARRAY:
+            case RegOps.FILLED_NEW_ARRAY:
+                prevSource = prevSsaInsn.getSources().get(0);
+                if (prevSource.getTypeBearer().isConstant()) {
+                    // New fixed array
+                    escSet = new EscapeSet(result.getReg(), regCount,
+                                               EscapeState.NONE);
+                    escSet.replaceableArray = true;
+                } else {
+                    // New variable array
+                    escSet = new EscapeSet(result.getReg(), regCount,
+                                               EscapeState.GLOBAL);
+                }
+                break;
+            // Loading a static object
+            case RegOps.GET_STATIC:
+                escSet = new EscapeSet(result.getReg(), regCount,
+                                           EscapeState.GLOBAL);
+                break;
+            // Type cast / load an object from a field or array
+            case RegOps.CHECK_CAST:
+            case RegOps.GET_FIELD:
+            case RegOps.AGET:
+                prevSource = prevSsaInsn.getSources().get(0);
+                int setIndex = findSetIndex(prevSource);
+
+                // Set should already exist, try to find it
+                if (setIndex != latticeValues.size()) {
+                    escSet = latticeValues.get(setIndex);
+                    escSet.regSet.set(result.getReg());
+                    return escSet;
+                }
+
+                // Set not found, must be either null or unknown
+                if (prevSource.getType() == Type.KNOWN_NULL) {
+                    escSet = new EscapeSet(result.getReg(), regCount,
+                                               EscapeState.NONE);
+               } else {
+                    escSet = new EscapeSet(result.getReg(), regCount,
+                                               EscapeState.GLOBAL);
+                }
+                break;
+            default:
+                return null;
+        }
+
+        // Add the newly created escSet to the lattice and return it
+        latticeValues.add(escSet);
+        return escSet;
+    }
+
+    /**
+     * Iterate through all the uses of a new object.
+     *
+     * @param result {@code non-null;} register where new object is stored
+     * @param escSet {@code non-null;} EscapeSet for the new object
+     */
+    private void processRegister(RegisterSpec result, EscapeSet escSet) {
+        ArrayList<RegisterSpec> regWorklist = new ArrayList<RegisterSpec>();
+        regWorklist.add(result);
+
+        // Go through the worklist
+        while (!regWorklist.isEmpty()) {
+            int listSize = regWorklist.size() - 1;
+            RegisterSpec def = regWorklist.remove(listSize);
+            List<SsaInsn> useList = ssaMeth.getUseListForRegister(def.getReg());
+
+            // Handle all the uses of this register
+            for (SsaInsn use : useList) {
+                Rop useOpcode = use.getOpcode();
+
+                if (useOpcode == null) {
+                    // Handle phis
+                    processPhiUse(use, escSet, regWorklist);
+                } else {
+                    // Handle other opcodes
+                    processUse(def, use, escSet, regWorklist);
+                }
+            }
+        }
+    }
+
+    /**
+     * Handles phi uses of new objects. Will merge together the sources of a phi
+     * into a single EscapeSet. Adds the result of the phi to the worklist so
+     * its uses can be followed.
+     *
+     * @param use {@code non-null;} phi use being processed
+     * @param escSet {@code non-null;} EscapeSet for the object
+     * @param regWorklist {@code non-null;} worklist of instructions left to
+     * process for this object
+     */
+    private void processPhiUse(SsaInsn use, EscapeSet escSet,
+                                   ArrayList<RegisterSpec> regWorklist) {
+        int setIndex = findSetIndex(use.getResult());
+        if (setIndex != latticeValues.size()) {
+            // Check if result is in a set already
+            EscapeSet mergeSet = latticeValues.get(setIndex);
+            if (mergeSet != escSet) {
+                // If it is, merge the sets and states, then delete the copy
+                escSet.replaceableArray = false;
+                escSet.regSet.or(mergeSet.regSet);
+                if (escSet.escape.compareTo(mergeSet.escape) < 0) {
+                    escSet.escape = mergeSet.escape;
+                }
+                replaceNode(escSet, mergeSet);
+                latticeValues.remove(setIndex);
+            }
+        } else {
+            // If no set is found, add it to this escSet and the worklist
+            escSet.regSet.set(use.getResult().getReg());
+            regWorklist.add(use.getResult());
+        }
+    }
+
+    /**
+     * Handles non-phi uses of new objects. Checks to see how instruction is
+     * used and updates the escape state accordingly.
+     *
+     * @param def {@code non-null;} register holding definition of new object
+     * @param use {@code non-null;} use of object being processed
+     * @param escSet {@code non-null;} EscapeSet for the object
+     * @param regWorklist {@code non-null;} worklist of instructions left to
+     * process for this object
+     */
+    private void processUse(RegisterSpec def, SsaInsn use, EscapeSet escSet,
+                                ArrayList<RegisterSpec> regWorklist) {
+        int useOpcode = use.getOpcode().getOpcode();
+        switch (useOpcode) {
+            case RegOps.MOVE:
+                // Follow uses of the move by adding it to the worklist
+                escSet.regSet.set(use.getResult().getReg());
+                regWorklist.add(use.getResult());
+                break;
+            case RegOps.IF_EQ:
+            case RegOps.IF_NE:
+            case RegOps.CHECK_CAST:
+                // Compared objects can't be replaced, so promote if necessary
+                if (escSet.escape.compareTo(EscapeState.METHOD) < 0) {
+                    escSet.escape = EscapeState.METHOD;
+                }
+                break;
+            case RegOps.APUT:
+                // For array puts, check for a constant array index
+                RegisterSpec putIndex = use.getSources().get(2);
+                if (!putIndex.getTypeBearer().isConstant()) {
+                    // If not constant, array can't be replaced
+                    escSet.replaceableArray = false;
+                }
+                // Intentional fallthrough
+            case RegOps.PUT_FIELD:
+                // Skip non-object puts
+                RegisterSpec putValue = use.getSources().get(0);
+                if (putValue.getTypeBearer().getBasicType() != Type.BT_OBJECT) {
+                    break;
+                }
+                escSet.replaceableArray = false;
+
+                // Raise 1st object's escape state to 2nd if 2nd is higher
+                RegisterSpecList sources = use.getSources();
+                if (sources.get(0).getReg() == def.getReg()) {
+                    int setIndex = findSetIndex(sources.get(1));
+                    if (setIndex != latticeValues.size()) {
+                        EscapeSet parentSet = latticeValues.get(setIndex);
+                        addEdge(parentSet, escSet);
+                        if (escSet.escape.compareTo(parentSet.escape) < 0) {
+                            escSet.escape = parentSet.escape;
+                        }
+                    }
+                } else {
+                    int setIndex = findSetIndex(sources.get(0));
+                    if (setIndex != latticeValues.size()) {
+                        EscapeSet childSet = latticeValues.get(setIndex);
+                        addEdge(escSet, childSet);
+                        if (childSet.escape.compareTo(escSet.escape) < 0) {
+                            childSet.escape = escSet.escape;
+                        }
+                    }
+                }
+                break;
+            case RegOps.AGET:
+                // For array gets, check for a constant array index
+                RegisterSpec getIndex = use.getSources().get(1);
+                if (!getIndex.getTypeBearer().isConstant()) {
+                    // If not constant, array can't be replaced
+                    escSet.replaceableArray = false;
+                }
+                break;
+            case RegOps.PUT_STATIC:
+                // Static puts cause an object to escape globally
+                escSet.escape = EscapeState.GLOBAL;
+                break;
+            case RegOps.INVOKE_STATIC:
+            case RegOps.INVOKE_VIRTUAL:
+            case RegOps.INVOKE_SUPER:
+            case RegOps.INVOKE_DIRECT:
+            case RegOps.INVOKE_INTERFACE:
+            case RegOps.RETURN:
+            case RegOps.THROW:
+                // These operations cause an object to escape interprocedurally
+                escSet.escape = EscapeState.INTER;
+                break;
+            default:
+                break;
+        }
+    }
+
+    /**
+     * Performs scalar replacement on all eligible arrays.
+     */
+    private void scalarReplacement() {
+        // Iterate through lattice, looking for non-escaping replaceable arrays
+        for (EscapeSet escSet : latticeValues) {
+            if (!escSet.replaceableArray || escSet.escape != EscapeState.NONE) {
+                continue;
+            }
+
+            // Get the instructions for the definition and move of the array
+            int e = escSet.regSet.nextSetBit(0);
+            SsaInsn def = ssaMeth.getDefinitionForRegister(e);
+            SsaInsn prev = getInsnForMove(def);
+
+            // Create a map for the new registers that will be created
+            TypeBearer lengthReg = prev.getSources().get(0).getTypeBearer();
+            int length = ((CstLiteralBits) lengthReg).getIntBits();
+            ArrayList<RegisterSpec> newRegs =
+                new ArrayList<RegisterSpec>(length);
+            HashSet<SsaInsn> deletedInsns = new HashSet<SsaInsn>();
+
+            // Replace the definition of the array with registers
+            replaceDef(def, prev, length, newRegs);
+
+            // Mark definition instructions for deletion
+            deletedInsns.add(prev);
+            deletedInsns.add(def);
+
+            // Go through all uses of the array
+            List<SsaInsn> useList = ssaMeth.getUseListForRegister(e);
+            for (SsaInsn use : useList) {
+                // Replace the use with scalars and then mark it for deletion
+                replaceUse(use, prev, newRegs, deletedInsns);
+                deletedInsns.add(use);
+            }
+
+            // Delete all marked instructions
+            ssaMeth.deleteInsns(deletedInsns);
+            ssaMeth.onInsnsChanged();
+
+            // Convert the method back to SSA form
+            SsaConverter.updateSsaMethod(ssaMeth, regCount);
+
+            // Propagate and remove extra moves added by scalar replacement
+            movePropagate();
+        }
+    }
+
+    /**
+     * Replaces the instructions that define an array with equivalent registers.
+     * For each entry in the array, a register is created, initialized to zero.
+     * A mapping between this register and the corresponding array index is
+     * added.
+     *
+     * @param def {@code non-null;} move result instruction for array
+     * @param prev {@code non-null;} instruction for instantiating new array
+     * @param length size of the new array
+     * @param newRegs {@code non-null;} mapping of array indices to new
+     * registers to be populated
+     */
+    private void replaceDef(SsaInsn def, SsaInsn prev, int length,
+                                ArrayList<RegisterSpec> newRegs) {
+        Type resultType = def.getResult().getType();
+
+        // Create new zeroed out registers for each element in the array
+        for (int i = 0; i < length; i++) {
+            Constant newZero = Zeroes.zeroFor(resultType.getComponentType());
+            TypedConstant typedZero = (TypedConstant) newZero;
+            RegisterSpec newReg =
+                RegisterSpec.make(ssaMeth.makeNewSsaReg(), typedZero);
+            newRegs.add(newReg);
+            insertPlainInsnBefore(def, RegisterSpecList.EMPTY, newReg,
+                                      RegOps.CONST, newZero);
+        }
+    }
+
+    /**
+     * Replaces the use for a scalar replaceable array. Gets and puts become
+     * move instructions, and array lengths and fills are handled. Can also
+     * identify ArrayIndexOutOfBounds exceptions and throw them if detected.
+     *
+     * @param use {@code non-null;} move result instruction for array
+     * @param prev {@code non-null;} instruction for instantiating new array
+     * @param newRegs {@code non-null;} mapping of array indices to new
+     * registers
+     * @param deletedInsns {@code non-null;} set of instructions marked for
+     * deletion
+     */
+    private void replaceUse(SsaInsn use, SsaInsn prev,
+                                ArrayList<RegisterSpec> newRegs,
+                                HashSet<SsaInsn> deletedInsns) {
+        int index;
+        int length = newRegs.size();
+        SsaInsn next;
+        RegisterSpecList sources;
+        RegisterSpec source, result;
+        CstLiteralBits indexReg;
+
+        switch (use.getOpcode().getOpcode()) {
+            case RegOps.AGET:
+                // Replace array gets with moves
+                next = getMoveForInsn(use);
+                sources = use.getSources();
+                indexReg = ((CstLiteralBits) sources.get(1).getTypeBearer());
+                index = indexReg.getIntBits();
+                if (index < length) {
+                    source = newRegs.get(index);
+                    result = source.withReg(next.getResult().getReg());
+                    insertPlainInsnBefore(next, RegisterSpecList.make(source),
+                                              result, RegOps.MOVE, null);
+                } else {
+                    // Throw an exception if the index is out of bounds
+                    insertExceptionThrow(next, sources.get(1), deletedInsns);
+                    deletedInsns.add(next.getBlock().getInsns().get(2));
+                }
+                deletedInsns.add(next);
+                break;
+            case RegOps.APUT:
+                // Replace array puts with moves
+                sources = use.getSources();
+                indexReg = ((CstLiteralBits) sources.get(2).getTypeBearer());
+                index = indexReg.getIntBits();
+                if (index < length) {
+                    source = sources.get(0);
+                    result = source.withReg(newRegs.get(index).getReg());
+                    insertPlainInsnBefore(use, RegisterSpecList.make(source),
+                                              result, RegOps.MOVE, null);
+                    // Update the newReg entry to mark value as unknown now
+                    newRegs.set(index, result.withSimpleType());
+                } else {
+                    // Throw an exception if the index is out of bounds
+                    insertExceptionThrow(use, sources.get(2), deletedInsns);
+                }
+                break;
+            case RegOps.ARRAY_LENGTH:
+                // Replace array lengths with const instructions
+                TypeBearer lengthReg = prev.getSources().get(0).getTypeBearer();
+                //CstInteger lengthReg = CstInteger.make(length);
+                next = getMoveForInsn(use);
+                insertPlainInsnBefore(next, RegisterSpecList.EMPTY,
+                                          next.getResult(), RegOps.CONST,
+                                          (Constant) lengthReg);
+                deletedInsns.add(next);
+                break;
+            case RegOps.MARK_LOCAL:
+                // Remove mark local instructions
+                break;
+            case RegOps.FILL_ARRAY_DATA:
+                // Create const instructions for each fill value
+                Insn ropUse = use.getOriginalRopInsn();
+                FillArrayDataInsn fill = (FillArrayDataInsn) ropUse;
+                ArrayList<Constant> constList = fill.getInitValues();
+                for (int i = 0; i < length; i++) {
+                    RegisterSpec newFill =
+                        RegisterSpec.make(newRegs.get(i).getReg(),
+                                              (TypeBearer) constList.get(i));
+                    insertPlainInsnBefore(use, RegisterSpecList.EMPTY, newFill,
+                                              RegOps.CONST, constList.get(i));
+                    // Update the newRegs to hold the new const value
+                    newRegs.set(i, newFill);
+                }
+                break;
+            default:
+        }
+    }
+
+    /**
+     * Identifies extra moves added by scalar replacement and propagates the
+     * source of the move to any users of the result.
+     */
+    private void movePropagate() {
+        for (int i = 0; i < ssaMeth.getRegCount(); i++) {
+            SsaInsn insn = ssaMeth.getDefinitionForRegister(i);
+
+            // Look for move instructions only
+            if (insn == null || insn.getOpcode() == null ||
+                insn.getOpcode().getOpcode() != RegOps.MOVE) {
+                continue;
+            }
+
+            final ArrayList<SsaInsn>[] useList = ssaMeth.getUseListCopy();
+            final RegisterSpec source = insn.getSources().get(0);
+            final RegisterSpec result = insn.getResult();
+
+            // Ignore moves that weren't added due to scalar replacement
+            if (source.getReg() < regCount && result.getReg() < regCount) {
+                continue;
+            }
+
+            // Create a mapping from source to result
+            RegisterMapper mapper = new RegisterMapper() {
+                @Override
+                public int getNewRegisterCount() {
+                    return ssaMeth.getRegCount();
+                }
+
+                @Override
+                public RegisterSpec map(RegisterSpec registerSpec) {
+                    if (registerSpec.getReg() == result.getReg()) {
+                        return source;
+                    }
+
+                    return registerSpec;
+                }
+            };
+
+            // Modify all uses of the move to use the source of the move instead
+            for (SsaInsn use : useList[result.getReg()]) {
+                use.mapSourceRegisters(mapper);
+            }
+        }
+    }
+
+    /**
+     * Runs escape analysis and scalar replacement of arrays.
+     */
+    private void run() {
+        ssaMeth.forEachBlockDepthFirstDom(new SsaBasicBlock.Visitor() {
+            public void visitBlock (SsaBasicBlock block,
+                    SsaBasicBlock unused) {
+                block.forEachInsn(new SsaInsn.Visitor() {
+                    public void visitMoveInsn(NormalSsaInsn insn) {
+                        // do nothing
+                    }
+
+                    public void visitPhiInsn(PhiInsn insn) {
+                        // do nothing
+                    }
+
+                    public void visitNonMoveInsn(NormalSsaInsn insn) {
+                        processInsn(insn);
+                    }
+                });
+            }
+        });
+
+        // Go through lattice and promote fieldSets as necessary
+        for (EscapeSet e : latticeValues) {
+            if (e.escape != EscapeState.NONE) {
+                for (EscapeSet field : e.childSets) {
+                    if (e.escape.compareTo(field.escape) > 0) {
+                        field.escape = e.escape;
+                    }
+                }
+            }
+        }
+
+        // Perform scalar replacement for arrays
+        scalarReplacement();
+    }
+
+    /**
+     * Replaces instructions that trigger an ArrayIndexOutofBounds exception
+     * with an actual throw of the exception.
+     *
+     * @param insn {@code non-null;} instruction causing the exception
+     * @param index {@code non-null;} index value that is out of bounds
+     * @param deletedInsns {@code non-null;} set of instructions marked for
+     * deletion
+     */
+    private void insertExceptionThrow(SsaInsn insn, RegisterSpec index,
+                                          HashSet<SsaInsn> deletedInsns) {
+        // Create a new ArrayIndexOutOfBoundsException
+        CstType exception =
+            new CstType(Exceptions.TYPE_ArrayIndexOutOfBoundsException);
+        insertThrowingInsnBefore(insn, RegisterSpecList.EMPTY, null,
+                                     RegOps.NEW_INSTANCE, exception);
+
+        // Add a successor block with a move result pseudo for the exception
+        SsaBasicBlock currBlock = insn.getBlock();
+        SsaBasicBlock newBlock =
+            currBlock.insertNewSuccessor(currBlock.getPrimarySuccessor());
+        SsaInsn newInsn = newBlock.getInsns().get(0);
+        RegisterSpec newReg =
+            RegisterSpec.make(ssaMeth.makeNewSsaReg(), exception);
+        insertPlainInsnBefore(newInsn, RegisterSpecList.EMPTY, newReg,
+                                  RegOps.MOVE_RESULT_PSEUDO, null);
+
+        // Add another successor block to initialize the exception
+        SsaBasicBlock newBlock2 =
+            newBlock.insertNewSuccessor(newBlock.getPrimarySuccessor());
+        SsaInsn newInsn2 = newBlock2.getInsns().get(0);
+        CstNat newNat = new CstNat(new CstUtf8("<init>"), new CstUtf8("(I)V"));
+        CstMethodRef newRef = new CstMethodRef(exception, newNat);
+        insertThrowingInsnBefore(newInsn2, RegisterSpecList.make(newReg, index),
+                                     null, RegOps.INVOKE_DIRECT, newRef);
+        deletedInsns.add(newInsn2);
+
+        // Add another successor block to throw the new exception
+        SsaBasicBlock newBlock3 =
+            newBlock2.insertNewSuccessor(newBlock2.getPrimarySuccessor());
+        SsaInsn newInsn3 = newBlock3.getInsns().get(0);
+        insertThrowingInsnBefore(newInsn3, RegisterSpecList.make(newReg), null,
+                                     RegOps.THROW, null);
+        newBlock3.replaceSuccessor(newBlock3.getPrimarySuccessorIndex(),
+                                       ssaMeth.getExitBlock().getIndex());
+        deletedInsns.add(newInsn3);
+    }
+
+    /**
+     * Inserts a new PlainInsn before the given instruction.
+     * TODO: move this somewhere more appropriate
+     *
+     * @param insn {@code non-null;} instruction to insert before
+     * @param newSources {@code non-null;} sources of new instruction
+     * @param newResult {@code non-null;} result of new instruction
+     * @param newOpcode opcode of new instruction
+     * @param cst {@code null-ok;} constant for new instruction, if any
+     */
+    private void insertPlainInsnBefore(SsaInsn insn,
+        RegisterSpecList newSources, RegisterSpec newResult, int newOpcode,
+        Constant cst) {
+
+        Insn originalRopInsn = insn.getOriginalRopInsn();
+        Rop newRop;
+        if (newOpcode == RegOps.MOVE_RESULT_PSEUDO) {
+            newRop = Rops.opMoveResultPseudo(newResult.getType());
+        } else {
+            newRop = Rops.ropFor(newOpcode, newResult, newSources, cst);
+        }
+
+        Insn newRopInsn;
+        if (cst == null) {
+            newRopInsn = new PlainInsn(newRop,
+                    originalRopInsn.getPosition(), newResult, newSources);
+        } else {
+            newRopInsn = new PlainCstInsn(newRop,
+                originalRopInsn.getPosition(), newResult, newSources, cst);
+        }
+
+        NormalSsaInsn newInsn = new NormalSsaInsn(newRopInsn, insn.getBlock());
+        List<SsaInsn> insns = insn.getBlock().getInsns();
+
+        insns.add(insns.lastIndexOf(insn), newInsn);
+        ssaMeth.onInsnAdded(newInsn);
+    }
+
+    /**
+     * Inserts a new ThrowingInsn before the given instruction.
+     * TODO: move this somewhere more appropriate
+     *
+     * @param insn {@code non-null;} instruction to insert before
+     * @param newSources {@code non-null;} sources of new instruction
+     * @param newResult {@code non-null;} result of new instruction
+     * @param newOpcode opcode of new instruction
+     * @param cst {@code null-ok;} constant for new instruction, if any
+     */
+    private void insertThrowingInsnBefore(SsaInsn insn,
+        RegisterSpecList newSources, RegisterSpec newResult, int newOpcode,
+        Constant cst) {
+
+        Insn origRopInsn = insn.getOriginalRopInsn();
+        Rop newRop = Rops.ropFor(newOpcode, newResult, newSources, cst);
+        Insn newRopInsn;
+        if (cst == null) {
+            newRopInsn = new ThrowingInsn(newRop,
+                origRopInsn.getPosition(), newSources, StdTypeList.EMPTY);
+        } else {
+            newRopInsn = new ThrowingCstInsn(newRop,
+                origRopInsn.getPosition(), newSources, StdTypeList.EMPTY, cst);
+        }
+
+        NormalSsaInsn newInsn = new NormalSsaInsn(newRopInsn, insn.getBlock());
+        List<SsaInsn> insns = insn.getBlock().getInsns();
+
+        insns.add(insns.lastIndexOf(insn), newInsn);
+        ssaMeth.onInsnAdded(newInsn);
+    }
+}
diff --git a/dx/src/com/android/dx/ssa/InterferenceRegisterMapper.java b/dx/src/com/android/dx/ssa/InterferenceRegisterMapper.java
index 392579d..851249b 100644
--- a/dx/src/com/android/dx/ssa/InterferenceRegisterMapper.java
+++ b/dx/src/com/android/dx/ssa/InterferenceRegisterMapper.java
@@ -49,7 +49,7 @@
 
     /**
      * Constructs an instance
-     * 
+     *
      * @param countOldRegisters number of registers in old namespace
      */
     public InterferenceRegisterMapper(InterferenceGraph oldRegInterference,
@@ -113,7 +113,7 @@
     /**
      * Adds a register's interference set to the interference list,
      * growing it if necessary.
-     * 
+     *
      * @param newReg register in new namespace
      * @param oldReg register in old namespace
      */
@@ -158,7 +158,7 @@
                 return true;
             }
         }
-        
+
         return false;
     }
 }
diff --git a/dx/src/com/android/dx/ssa/LiteralOpUpgrader.java b/dx/src/com/android/dx/ssa/LiteralOpUpgrader.java
index a70b5bb..01d818d 100644
--- a/dx/src/com/android/dx/ssa/LiteralOpUpgrader.java
+++ b/dx/src/com/android/dx/ssa/LiteralOpUpgrader.java
@@ -48,7 +48,7 @@
         LiteralOpUpgrader dc;
 
         dc = new LiteralOpUpgrader(ssaMethod);
-            
+
         dc.run();
     }
 
diff --git a/dx/src/com/android/dx/ssa/MoveParamCombiner.java b/dx/src/com/android/dx/ssa/MoveParamCombiner.java
index 352e3e6..41660d2 100644
--- a/dx/src/com/android/dx/ssa/MoveParamCombiner.java
+++ b/dx/src/com/android/dx/ssa/MoveParamCombiner.java
@@ -37,7 +37,7 @@
 
     /**
      * Processes a method with this optimization step.
-     * 
+     *
      * @param ssaMethod method to process
      */
     public static void process(SsaMethod ssaMethod) {
@@ -45,7 +45,7 @@
     }
 
     private MoveParamCombiner(SsaMethod ssaMeth) {
-        this.ssaMeth = ssaMeth;        
+        this.ssaMeth = ssaMeth;
     }
 
     /**
@@ -126,7 +126,7 @@
 
                     // Use list is modified by mapSourceRegisters
                     for (int i = uses.size() - 1; i >= 0; i--) {
-                        SsaInsn use = uses.get(i);                                
+                        SsaInsn use = uses.get(i);
                         use.mapSourceRegisters(mapper);
                     }
 
diff --git a/dx/src/com/android/dx/ssa/NormalSsaInsn.java b/dx/src/com/android/dx/ssa/NormalSsaInsn.java
index d3392ca..93d3647 100644
--- a/dx/src/com/android/dx/ssa/NormalSsaInsn.java
+++ b/dx/src/com/android/dx/ssa/NormalSsaInsn.java
@@ -63,13 +63,13 @@
         for (int i = 0; i < sz; i++) {
             newSources.set(i, i == index ? newSpec : origSources.get(i));
         }
-        
+
         newSources.setImmutable();
 
         RegisterSpec origSpec = origSources.get(index);
         if (origSpec.getReg() != newSpec.getReg()) {
             /*
-             * If the register remains unchanged, we're only changing 
+             * If the register remains unchanged, we're only changing
              * the type or local var name so don't update use list
              */
             getBlock().getParent().onSourceChanged(this, origSpec, newSpec);
@@ -102,7 +102,7 @@
 
     /**
      * Like rop.Insn.getSources().
-     * 
+     *
      * @return {@code null-ok;} sources list
      */
     public RegisterSpecList getSources() {
@@ -137,7 +137,7 @@
     /** {@inheritDoc} */
     public RegisterSpec getLocalAssignment() {
         RegisterSpec assignment;
-        
+
         if (insn.getOpcode().getOpcode() == RegOps.MARK_LOCAL) {
             assignment = insn.getSources().get(0);
         } else {
diff --git a/dx/src/com/android/dx/ssa/Optimizer.java b/dx/src/com/android/dx/ssa/Optimizer.java
index c5f6dc9..06ed138 100644
--- a/dx/src/com/android/dx/ssa/Optimizer.java
+++ b/dx/src/com/android/dx/ssa/Optimizer.java
@@ -18,12 +18,10 @@
 
 import com.android.dx.rop.code.RopMethod;
 import com.android.dx.rop.code.TranslationAdvice;
-import com.android.dx.ssa.back.SsaToRop;
 import com.android.dx.ssa.back.LivenessAnalyzer;
+import com.android.dx.ssa.back.SsaToRop;
 
 import java.util.EnumSet;
-import java.util.BitSet;
-import java.util.ArrayList;
 
 /**
  * Runs a method through the SSA form conversion, any optimization algorithms,
@@ -36,7 +34,8 @@
 
     /** optional optimizer steps */
     public enum OptionalStep {
-        MOVE_PARAM_COMBINER,SCCP,LITERAL_UPGRADE,CONST_COLLECTOR
+        MOVE_PARAM_COMBINER, SCCP, LITERAL_UPGRADE, CONST_COLLECTOR,
+            ESCAPE_ANALYSIS
     }
 
     /**
@@ -71,14 +70,14 @@
             boolean isStatic, boolean inPreserveLocals,
             TranslationAdvice inAdvice) {
 
-        return optimize(rmeth, paramWidth, isStatic, inPreserveLocals, inAdvice, 
+        return optimize(rmeth, paramWidth, isStatic, inPreserveLocals, inAdvice,
                 EnumSet.allOf(OptionalStep.class));
     }
 
     /**
      * Runs optimization algorthims over this method, and returns a new
      * instance of RopMethod with the changes.
-     * 
+     *
      * @param rmeth method to process
      * @param paramWidth the total width, in register-units, of this method's
      * parameters
@@ -167,6 +166,16 @@
             needsDeadCodeRemover = false;
         }
 
+        /*
+         * ESCAPE_ANALYSIS impacts debuggability, so left off by default
+         */
+        steps.remove(OptionalStep.ESCAPE_ANALYSIS);
+        if (steps.contains(OptionalStep.ESCAPE_ANALYSIS)) {
+            EscapeAnalysis.process(ssaMeth);
+            DeadCodeRemover.process(ssaMeth);
+            needsDeadCodeRemover = false;
+        }
+
         if (steps.contains(OptionalStep.CONST_COLLECTOR)) {
             ConstCollector.process(ssaMeth);
             DeadCodeRemover.process(ssaMeth);
@@ -241,6 +250,6 @@
 
         LivenessAnalyzer.constructInterferenceGraph(ssaMeth);
 
-        return ssaMeth;        
+        return ssaMeth;
     }
 }
diff --git a/dx/src/com/android/dx/ssa/PhiInsn.java b/dx/src/com/android/dx/ssa/PhiInsn.java
index 64e85ac..3ea876f 100644
--- a/dx/src/com/android/dx/ssa/PhiInsn.java
+++ b/dx/src/com/android/dx/ssa/PhiInsn.java
@@ -48,7 +48,7 @@
 
     /**
      * Constructs a new phi insn with no operands.
-     * 
+     *
      * @param resultReg the result reg for this phi insn
      * @param block block containing this insn.
      */
@@ -59,7 +59,7 @@
 
     /**
      * Makes a phi insn with a void result type.
-     * 
+     *
      * @param resultReg the result register for this phi insn.
      * @param block block containing this insn.
      */
@@ -88,7 +88,7 @@
      */
     public void updateSourcesToDefinitions(SsaMethod ssaMeth) {
         for (Operand o : operands) {
-            RegisterSpec def 
+            RegisterSpec def
                 = ssaMeth.getDefinitionForRegister(
                     o.regSpec.getReg()).getResult();
 
@@ -111,7 +111,7 @@
 
     /**
      * Gets the original rop-form result reg. This is useful during renaming.
-     * 
+     *
      * @return the original rop-form result reg
      */
     public int getRopResultReg() {
@@ -120,7 +120,7 @@
 
     /**
      * Adds an operand to this phi instruction.
-     * 
+     *
      * @param registerSpec register spec, including type and reg of operand
      * @param predBlock predecessor block to be associated with this operand
      */
@@ -128,7 +128,7 @@
             SsaBasicBlock predBlock) {
         operands.add(new Operand(registerSpec, predBlock.getIndex(),
                 predBlock.getRopLabel()));
-        
+
         // Un-cache sources, in case someone has already called getSources().
         sources = null;
     }
@@ -136,7 +136,7 @@
     /**
      * Gets the index of the pred block associated with the RegisterSpec
      * at the particular getSources() index.
-     * 
+     *
      * @param sourcesIndex index of source in getSources()
      * @return block index
      */
@@ -177,7 +177,7 @@
     /**
      * Gets sources. Constructed lazily from phi operand data structures and
      * then cached.
-     * 
+     *
      * @return {@code non-null;} sources list
      */
     public RegisterSpecList getSources() {
@@ -255,7 +255,7 @@
     /**
      * Always throws an exeption, since a phi insn may not be
      * converted back to rop form.
-     * 
+     *
      * @return always throws exception
      */
     @Override
@@ -287,7 +287,7 @@
     /** {@inheritDoc} */
     @Override
     public boolean isPhiOrMove() {
-        return true;    
+        return true;
     }
 
     /** {@inheritDoc} */
@@ -310,7 +310,7 @@
     /**
      * Returns human-readable string for listing dumps. This method
      * allows sub-classes to specify extra text.
-     * 
+     *
      * @param extra {@code null-ok;} the argument to print after the opcode
      * @return human-readable string for listing dumps
      */
@@ -318,7 +318,7 @@
         StringBuffer sb = new StringBuffer(80);
 
         sb.append(SourcePosition.NO_INFO);
-        sb.append(": phi");       
+        sb.append(": phi");
 
         if (extra != null) {
             sb.append("(");
@@ -327,7 +327,7 @@
         }
 
         RegisterSpec result = getResult();
-        
+
         if (result == null) {
             sb.append(" .");
         } else {
diff --git a/dx/src/com/android/dx/ssa/PhiTypeResolver.java b/dx/src/com/android/dx/ssa/PhiTypeResolver.java
index f4c26d7..4b8b4e3 100644
--- a/dx/src/com/android/dx/ssa/PhiTypeResolver.java
+++ b/dx/src/com/android/dx/ssa/PhiTypeResolver.java
@@ -121,7 +121,7 @@
      * Resolves the result of a phi insn based on its operands. The "void"
      * type, which is a nonsensical type for a register, is used for
      * registers defined by as-of-yet-unresolved phi operations.
-     * 
+     *
      * @return true if the result type changed, false if no change
      */
     boolean resolveResultType(PhiInsn insn) {
@@ -185,7 +185,7 @@
         }
 
         LocalItem newLocal = sameLocals ? firstLocal : null;
-        
+
         RegisterSpec result = insn.getResult();
 
         if ((result.getTypeBearer() == newResultType)
diff --git a/dx/src/com/android/dx/ssa/RegisterMapper.java b/dx/src/com/android/dx/ssa/RegisterMapper.java
index 1f45b42..bef941f 100644
--- a/dx/src/com/android/dx/ssa/RegisterMapper.java
+++ b/dx/src/com/android/dx/ssa/RegisterMapper.java
@@ -21,7 +21,7 @@
 import com.android.dx.util.ToHuman;
 
 /**
- * Represents a mapping between two register numbering schemes. 
+ * Represents a mapping between two register numbering schemes.
  * Subclasses of this may be mutable, and as such the mapping provided
  * is only valid for the lifetime of the method call in which
  * instances of this class are passed.
diff --git a/dx/src/com/android/dx/ssa/SCCP.java b/dx/src/com/android/dx/ssa/SCCP.java
index 73e9b49..42abbb2 100644
--- a/dx/src/com/android/dx/ssa/SCCP.java
+++ b/dx/src/com/android/dx/ssa/SCCP.java
@@ -136,7 +136,7 @@
             return false;
         }
     }
-    
+
     /**
      * Simulates a PHI node and set the lattice for the result
      * to the approriate value.
@@ -438,7 +438,7 @@
      * steps.
      */
     private void replaceConstants() {
-        for (int reg = 0; reg < regCount; reg++) {            
+        for (int reg = 0; reg < regCount; reg++) {
             if (latticeValues[reg] != CONSTANT) {
                 continue;
             }
diff --git a/dx/src/com/android/dx/ssa/SsaBasicBlock.java b/dx/src/com/android/dx/ssa/SsaBasicBlock.java
index ab0e122..499f59f 100644
--- a/dx/src/com/android/dx/ssa/SsaBasicBlock.java
+++ b/dx/src/com/android/dx/ssa/SsaBasicBlock.java
@@ -18,20 +18,18 @@
 
 import com.android.dx.rop.code.BasicBlock;
 import com.android.dx.rop.code.BasicBlockList;
+import com.android.dx.rop.code.Insn;
 import com.android.dx.rop.code.InsnList;
 import com.android.dx.rop.code.PlainInsn;
 import com.android.dx.rop.code.RegisterSpec;
 import com.android.dx.rop.code.RegisterSpecList;
+import com.android.dx.rop.code.Rop;
 import com.android.dx.rop.code.RopMethod;
 import com.android.dx.rop.code.Rops;
 import com.android.dx.rop.code.SourcePosition;
-import com.android.dx.rop.code.Insn;
-import com.android.dx.rop.code.Rop;
-import com.android.dx.util.IntList;
 import com.android.dx.util.Hex;
+import com.android.dx.util.IntList;
 import com.android.dx.util.IntSet;
-import com.android.dx.util.BitIntSet;
-import com.android.dx.util.ListIntSet;
 
 import java.util.ArrayList;
 import java.util.BitSet;
@@ -96,6 +94,12 @@
     private int movesFromPhisAtBeginning = 0;
 
     /**
+     * contains last computed value of reachability of this block, or -1
+     * if reachability hasn't been calculated yet
+     */
+    private int reachable = -1;
+
+    /**
      * {@code null-ok;} indexed by reg: the regs that are live-in at
      * this block
      */
@@ -514,6 +518,26 @@
         parent.getBlocks().get(oldIndex).predecessors.clear(index);
     }
 
+    /**
+     * Removes a successor from this block's successor list.
+     *
+     * @param oldIndex index of successor block to remove
+     */
+    public void removeSuccessor(int oldIndex) {
+        int removeIndex = 0;
+
+        for (int i = successorList.size() - 1; i >= 0; i--) {
+            if (successorList.get(i) == oldIndex) {
+                removeIndex = i;
+            } else {
+                primarySuccessor = successorList.get(i);
+            }
+        }
+
+        successorList.removeIndex(removeIndex);
+        successors.clear(oldIndex);
+        parent.getBlocks().get(oldIndex).predecessors.clear(index);
+    }
 
     /**
      * Attaches block to an exit block if necessary. If this block
@@ -820,16 +844,25 @@
     }
 
     /**
-     * Returns true if this block is reachable (that is, it hasn't been
-     * unlinked from the control flow of this method). This currently tests
-     * that it's either the start block or it has predecessors, which suffices
-     * for all current control flow transformations.
+     * Returns true if this block was last calculated to be reachable.
+     * Recalculates reachability if value has never been computed.
      *
      * @return {@code true} if reachable
      */
     public boolean isReachable() {
-        return index == parent.getEntryBlockIndex()
-                || predecessors.cardinality() > 0;
+        if (reachable == -1) {
+            parent.computeReachability();
+        }
+        return (reachable == 1);
+    }
+
+    /**
+     * Sets reachability of block to specified value
+     *
+     * @param reach new value of reachability for block
+     */
+    public void setReachable(int reach) {
+        reachable = reach;
     }
 
     /**
@@ -959,6 +992,7 @@
     }
 
     /** {@inheritDoc} */
+    @Override
     public String toString() {
         return "{" + index + ":" + Hex.u2(ropLabel) + '}';
     }
diff --git a/dx/src/com/android/dx/ssa/SsaConverter.java b/dx/src/com/android/dx/ssa/SsaConverter.java
index d5be287..5cd8b6f 100644
--- a/dx/src/com/android/dx/ssa/SsaConverter.java
+++ b/dx/src/com/android/dx/ssa/SsaConverter.java
@@ -49,7 +49,7 @@
 
         LocalVariableInfo localInfo = LocalVariableExtractor.extract(result);
 
-        placePhiFunctions(result, localInfo);
+        placePhiFunctions(result, localInfo, 0);
         new SsaRenamer(result).run();
 
         /*
@@ -62,6 +62,19 @@
     }
 
     /**
+     * Updates an SSA representation, placing phi functions and renaming all
+     * registers above a certain threshold number.
+     *
+     * @param ssaMeth input
+     * @param threshold registers below this number are unchanged
+     */
+    public static void updateSsaMethod(SsaMethod ssaMeth, int threshold) {
+        LocalVariableInfo localInfo = LocalVariableExtractor.extract(ssaMeth);
+        placePhiFunctions(ssaMeth, localInfo, threshold);
+        new SsaRenamer(ssaMeth, threshold).run();
+    }
+
+    /**
      * Returns an SSA represention with only the edge-splitter run.
      *
      * @param rmeth method to process
@@ -100,7 +113,7 @@
 
         LocalVariableInfo localInfo = LocalVariableExtractor.extract(result);
 
-        placePhiFunctions(result, localInfo);
+        placePhiFunctions(result, localInfo, 0);
         return result;
     }
 
@@ -269,16 +282,17 @@
      * Modifications are made in-place.
      * @param localInfo {@code non-null;} local variable info, used
      * when placing phis
+     * @param threshold registers below this number are ignored
      */
     private static void placePhiFunctions (SsaMethod ssaMeth,
-            LocalVariableInfo localInfo) {
+            LocalVariableInfo localInfo, int threshold) {
         ArrayList<SsaBasicBlock> ssaBlocks;
         int regCount;
         int blockCount;
 
         ssaBlocks = ssaMeth.getBlocks();
         blockCount = ssaBlocks.size();
-        regCount = ssaMeth.getRegCount();
+        regCount = ssaMeth.getRegCount() - threshold;
 
         DomFront df = new DomFront(ssaMeth);
         DomFront.DomInfo[] domInfos = df.run();
@@ -304,8 +318,8 @@
             for (SsaInsn insn : b.getInsns()) {
                 RegisterSpec rs = insn.getResult();
 
-                if (rs != null) {
-                    defsites[rs.getReg()].set(bi);
+                if (rs != null && rs.getReg() - threshold >= 0) {
+                    defsites[rs.getReg() - threshold].set(bi);
                 }
             }
         }
@@ -327,7 +341,7 @@
          * For each register, compute all locations for phi placement
          * based on dominance-frontier algorithm.
          */
-        for (int reg = 0, s = ssaMeth.getRegCount() ; reg < s ; reg++ ) {
+        for (int reg = 0, s = regCount; reg < s; reg++) {
             int workBlockIndex;
 
             /* Worklist set starts out with each node where reg is assigned. */
@@ -345,11 +359,12 @@
                     if (!phisites[reg].get(dfBlockIndex)) {
                         phisites[reg].set(dfBlockIndex);
 
+                        int tReg = reg + threshold;
                         RegisterSpec rs
-                                = localInfo.getStarts(dfBlockIndex).get(reg);
+                            = localInfo.getStarts(dfBlockIndex).get(tReg);
 
                         if (rs == null) {
-                            ssaBlocks.get(dfBlockIndex).addPhiInsnForReg(reg);
+                            ssaBlocks.get(dfBlockIndex).addPhiInsnForReg(tReg);
                         } else {
                             ssaBlocks.get(dfBlockIndex).addPhiInsnForReg(rs);
                         }
diff --git a/dx/src/com/android/dx/ssa/SsaInsn.java b/dx/src/com/android/dx/ssa/SsaInsn.java
index 815f82d..ca7a1a2 100644
--- a/dx/src/com/android/dx/ssa/SsaInsn.java
+++ b/dx/src/com/android/dx/ssa/SsaInsn.java
@@ -31,7 +31,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param result {@code null-ok;} initial result register. May be changed.
      * @param block {@code non-null;} block containing this insn. Can
      * never change.
@@ -68,7 +68,7 @@
 
     /**
      * Like {@link com.android.dx.rop.code.Insn getResult()}.
-     * 
+     *
      * @return result register
      */
     public RegisterSpec getResult() {
@@ -77,7 +77,7 @@
 
     /**
      * Set the result register.
-     * 
+     *
      * @param result {@code non-null;} the new result register
      */
     protected void setResult(RegisterSpec result) {
@@ -90,7 +90,7 @@
 
     /**
      * Like {@link com.android.dx.rop.code.Insn getSources()}.
-     * 
+     *
      * @return {@code non-null;} sources list
      */
     abstract public RegisterSpecList getSources();
@@ -106,7 +106,7 @@
 
     /**
      * Returns whether or not the specified reg is the result reg.
-     * 
+     *
      * @param reg register to test
      * @return true if there is a result and it is stored in the specified
      * register
@@ -119,7 +119,7 @@
     /**
      * Changes the result register if this insn has a result. This is used
      * during renaming.
-     * 
+     *
      * @param reg new result register
      */
     public void changeResultReg(int reg) {
@@ -154,7 +154,7 @@
 
         result = mapper.map(result);
         block.getParent().updateOneDefinition(this, oldResult);
-        mapSourceRegisters(mapper);        
+        mapSourceRegisters(mapper);
     }
 
     /**
@@ -176,7 +176,7 @@
     /**
      * Returns the original Rop insn for this insn, or null if this is
      * a phi insn.
-     * 
+     *
      * TODO: Move this up into NormalSsaInsn.
      *
      * @return {@code null-ok;} Rop insn if there is one.
@@ -189,8 +189,8 @@
      * may be the result register, or for {@code mark-local} insns
      * it may be the source.
      *
-     * @see com.android.dx.rop.code.Insn#getLocalAssignment() 
-     * 
+     * @see com.android.dx.rop.code.Insn#getLocalAssignment()
+     *
      * @return {@code null-ok;} a local-associated register spec or null
      */
     public RegisterSpec getLocalAssignment() {
@@ -204,7 +204,7 @@
     /**
      * Indicates whether the specified register is amongst the registers
      * used as sources for this instruction.
-     * 
+     *
      * @param reg the register in question
      * @return true if the reg is a source
      */
@@ -230,7 +230,7 @@
     /**
      * Returns true if this insn is considered to have a side effect beyond
      * that of assigning to the result reg.
-     * 
+     *
      * @return true if this insn is considered to have a side effect beyond
      * that of assigning to the result reg.
      */
@@ -259,7 +259,7 @@
 
     /**
      * Accepts a visitor.
-     * 
+     *
      * @param v {@code non-null} the visitor
      */
     public abstract void accept(Visitor v);
diff --git a/dx/src/com/android/dx/ssa/SsaMethod.java b/dx/src/com/android/dx/ssa/SsaMethod.java
index 073e515..4c2bd85 100644
--- a/dx/src/com/android/dx/ssa/SsaMethod.java
+++ b/dx/src/com/android/dx/ssa/SsaMethod.java
@@ -17,23 +17,23 @@
 package com.android.dx.ssa;
 
 import com.android.dx.rop.code.BasicBlockList;
+import com.android.dx.rop.code.Insn;
 import com.android.dx.rop.code.PlainInsn;
+import com.android.dx.rop.code.RegOps;
 import com.android.dx.rop.code.RegisterSpec;
 import com.android.dx.rop.code.RegisterSpecList;
+import com.android.dx.rop.code.Rop;
 import com.android.dx.rop.code.RopMethod;
 import com.android.dx.rop.code.Rops;
 import com.android.dx.rop.code.SourcePosition;
-import com.android.dx.rop.code.Insn;
-import com.android.dx.rop.code.RegOps;
-import com.android.dx.rop.code.Rop;
 import com.android.dx.util.IntList;
 
 import java.util.ArrayList;
 import java.util.BitSet;
 import java.util.Collections;
 import java.util.List;
-import java.util.Stack;
 import java.util.Set;
+import java.util.Stack;
 
 /**
  * A method in SSA form.
@@ -359,6 +359,32 @@
     }
 
     /**
+     * Computes reachability for all blocks in the method. First clears old
+     * values from all blocks, then starts with the entry block and walks down
+     * the control flow graph, marking all blocks it finds as reachable.
+     */
+    public void computeReachability() {
+        for (SsaBasicBlock block : blocks) {
+            block.setReachable(0);
+        }
+
+        ArrayList<SsaBasicBlock> blockList = new ArrayList<SsaBasicBlock>();
+        blockList.add(this.getEntryBlock());
+
+        while (!blockList.isEmpty()) {
+            SsaBasicBlock block = blockList.remove(0);
+            if (block.isReachable()) continue;
+
+            block.setReachable(1);
+            BitSet succs = block.getSuccessors();
+            for (int i = succs.nextSetBit(0); i >= 0;
+                     i = succs.nextSetBit(i + 1)) {
+                blockList.add(blocks.get(i));
+            }
+        }
+    }
+
+    /**
      * Remaps unversioned registers.
      *
      * @param mapper maps old registers to new.
@@ -821,6 +847,15 @@
                 Insn gotoInsn = new PlainInsn(Rops.GOTO,
                         SourcePosition.NO_INFO, null, RegisterSpecList.EMPTY);
                 insns.add(SsaInsn.makeFromRop(gotoInsn, block));
+
+                // Remove secondary successors from this block
+                BitSet succs = block.getSuccessors();
+                for (int i = succs.nextSetBit(0); i >= 0;
+                         i = succs.nextSetBit(i + 1)) {
+                    if (i != block.getPrimarySuccessorIndex()) {
+                        block.removeSuccessor(i);
+                    }
+                }
             }
         }
     }
diff --git a/dx/src/com/android/dx/ssa/SsaRenamer.java b/dx/src/com/android/dx/ssa/SsaRenamer.java
index 8452c03..58e4142 100644
--- a/dx/src/com/android/dx/ssa/SsaRenamer.java
+++ b/dx/src/com/android/dx/ssa/SsaRenamer.java
@@ -16,14 +16,19 @@
 
 package com.android.dx.ssa;
 
-import com.android.dx.rop.code.*;
+import com.android.dx.rop.code.LocalItem;
+import com.android.dx.rop.code.PlainInsn;
+import com.android.dx.rop.code.RegisterSpec;
+import com.android.dx.rop.code.RegisterSpecList;
+import com.android.dx.rop.code.Rops;
+import com.android.dx.rop.code.SourcePosition;
 import com.android.dx.rop.type.Type;
 import com.android.dx.util.IntList;
 
 import java.util.ArrayList;
 import java.util.BitSet;
-import java.util.HashSet;
 import java.util.HashMap;
+import java.util.HashSet;
 
 /**
  * Complete transformation to SSA form by renaming all registers accessed.<p>
@@ -67,6 +72,9 @@
     /** the number of original rop registers */
     private final int ropRegCount;
 
+    /** work only on registers above this value */
+    private int threshold;
+
     /**
      * indexed by block index; register version state for each block start.
      * This list is updated by each dom parent for its children. The only
@@ -100,6 +108,7 @@
          * "version 0" registers.
          */
         nextSsaReg = ropRegCount;
+        threshold = 0;
         startsForBlocks = new RegisterSpec[ssaMeth.getBlocks().size()][];
 
         ssaRegToLocalItems = new ArrayList<LocalItem>();
@@ -135,6 +144,18 @@
     }
 
     /**
+    * Constructs an instance of the renamer with threshold set
+    *
+    * @param ssaMeth {@code non-null;} un-renamed SSA method that will
+    * be renamed.
+    * @param thresh registers below this number are unchanged
+    */
+   public SsaRenamer(SsaMethod ssaMeth, int thresh) {
+       this(ssaMeth);
+       threshold = thresh;
+   }
+
+    /**
      * Performs renaming transformation, modifying the method's instructions
      * in-place.
      */
@@ -215,6 +236,18 @@
     }
 
     /**
+     * Returns true if this SSA register is below the specified threshold.
+     * Used when most code is already in SSA form, and renaming is needed only
+     * for registers above a certain threshold.
+     *
+     * @param ssaReg the SSA register in question
+     * @return {@code true} if its register number is below the threshold
+     */
+    private boolean isBelowThresholdRegister(int ssaReg) {
+        return ssaReg < threshold;
+    }
+
+    /**
      * Returns true if this SSA register is a "version 0"
      * register. All version 0 registers are assigned the first N register
      * numbers, where N is the count of original rop registers.
@@ -504,7 +537,8 @@
                         ssaSourceReg, ropResult.getType(), newLocal);
 
             if (!Optimizer.getPreserveLocals() || (onlyOneAssociatedLocal
-                    && equalsHandlesNulls(newLocal, sourceLocal))) {
+                    && equalsHandlesNulls(newLocal, sourceLocal)) &&
+                    threshold == 0) {
                 /*
                  * We don't have to keep this move to preserve local
                  * information. Either the name is the same, or the result
@@ -512,7 +546,8 @@
                  */
 
                 addMapping(ropResultReg, ssaReg);
-            } else if (onlyOneAssociatedLocal && sourceLocal == null) {
+            } else if (onlyOneAssociatedLocal && sourceLocal == null &&
+                    threshold == 0) {
                 /*
                  * The register was previously unnamed. This means that a
                  * local starts after it's first assignment in SSA form
@@ -572,6 +607,9 @@
             }
 
             int ropReg = ropResult.getReg();
+            if (isBelowThresholdRegister(ropReg)) {
+                return;
+            }
 
             insn.changeResultReg(nextSsaReg);
             addMapping(ropReg, insn.getResult());
@@ -593,6 +631,9 @@
                     int ropReg;
 
                     ropReg = insn.getRopResultReg();
+                    if (isBelowThresholdRegister(ropReg)) {
+                        return;
+                    }
 
                     /*
                      * Never add a version 0 register as a phi
diff --git a/dx/src/com/android/dx/ssa/back/IdenticalBlockCombiner.java b/dx/src/com/android/dx/ssa/back/IdenticalBlockCombiner.java
index cfc7015..515b04f 100644
--- a/dx/src/com/android/dx/ssa/back/IdenticalBlockCombiner.java
+++ b/dx/src/com/android/dx/ssa/back/IdenticalBlockCombiner.java
@@ -41,7 +41,7 @@
 
     /**
      * Constructs instance. Call {@code process()} to run.
-     * 
+     *
      * @param rm {@code non-null;} instance to process
      */
     public IdenticalBlockCombiner(RopMethod rm) {
@@ -120,7 +120,7 @@
 
     /**
      * Helper method to compare the contents of two blocks.
-     * 
+     *
      * @param a {@code non-null;} a block to compare
      * @param b {@code non-null;} another block to compare
      * @return {@code true} iff the two blocks' instructions are the same
diff --git a/dx/src/com/android/dx/ssa/back/LivenessAnalyzer.java b/dx/src/com/android/dx/ssa/back/LivenessAnalyzer.java
index cd3f7d2..a293e6f 100644
--- a/dx/src/com/android/dx/ssa/back/LivenessAnalyzer.java
+++ b/dx/src/com/android/dx/ssa/back/LivenessAnalyzer.java
@@ -98,7 +98,7 @@
 
         return interference;
     }
-    
+
     /**
      * Makes liveness analyzer instance for specific register.
      *
diff --git a/dx/src/com/android/dx/ssa/back/NullRegisterAllocator.java b/dx/src/com/android/dx/ssa/back/NullRegisterAllocator.java
index f6dc961..0205c11 100644
--- a/dx/src/com/android/dx/ssa/back/NullRegisterAllocator.java
+++ b/dx/src/com/android/dx/ssa/back/NullRegisterAllocator.java
@@ -54,5 +54,5 @@
         }
 
         return mapper;
-    }    
+    }
 }
diff --git a/dx/src/com/android/dx/ssa/back/RegisterAllocator.java b/dx/src/com/android/dx/ssa/back/RegisterAllocator.java
index e75eee1..1f9f70f 100644
--- a/dx/src/com/android/dx/ssa/back/RegisterAllocator.java
+++ b/dx/src/com/android/dx/ssa/back/RegisterAllocator.java
@@ -66,7 +66,7 @@
 
     /**
      * Runs the algorithm.
-     * 
+     *
      * @return a register mapper to apply to the {@code SsaMethod}
      */
     public abstract RegisterMapper allocateRegisters();
@@ -105,7 +105,7 @@
     /**
      * Returns true if the definition site of this register is a
      * move-param (ie, this is a method parameter).
-     * 
+     *
      * @param reg register in question
      * @return {@code true} if this is a method parameter
      */
diff --git a/dx/src/com/android/dx/ssa/back/SsaToRop.java b/dx/src/com/android/dx/ssa/back/SsaToRop.java
index 0ecbead..d9d2c45 100644
--- a/dx/src/com/android/dx/ssa/back/SsaToRop.java
+++ b/dx/src/com/android/dx/ssa/back/SsaToRop.java
@@ -65,7 +65,7 @@
 
     /**
      * Converts a method in SSA form to ROP form.
-     * 
+     *
      * @param ssaMeth {@code non-null;} method to process
      * @param minimizeRegisters {@code true} if the converter should
      * attempt to minimize the rop-form register count
@@ -78,7 +78,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param ssaMeth {@code non-null;} method to process
      * @param minimizeRegisters {@code true} if the converter should
      * attempt to minimize the rop-form register count
@@ -92,7 +92,7 @@
 
     /**
      * Performs the conversion.
-     * 
+     *
      * @return {@code non-null;} rop-form output
      */
     private RopMethod convert() {
@@ -113,7 +113,7 @@
         if (DEBUG) {
             System.out.println("Printing reg map");
             System.out.println(((BasicRegisterMapper)mapper).toHuman());
-        }        
+        }
 
         ssaMeth.setBackMode();
 
@@ -135,7 +135,7 @@
     }
 
     /**
-     * Removes all blocks containing only GOTOs from the control flow. 
+     * Removes all blocks containing only GOTOs from the control flow.
      * Although much of this work will be done later when converting
      * from rop to dex, not all simplification cases can be handled
      * there. Furthermore, any no-op block between the exit block and
@@ -171,7 +171,7 @@
      */
     private void removePhiFunctions() {
         ArrayList<SsaBasicBlock> blocks = ssaMeth.getBlocks();
-        
+
         for (SsaBasicBlock block : blocks) {
             // Add moves in all the pred blocks for each phi insn.
             block.forEachPhiInsn(new PhiVisitor(blocks));
@@ -251,6 +251,7 @@
         // Exit block may be null.
         SsaBasicBlock exitBlock = ssaMeth.getExitBlock();
 
+        ssaMeth.computeReachability();
         int ropBlockCount = ssaMeth.getCountReachableBlocks();
 
         // Don't count the exit block, if it exists.
@@ -335,7 +336,7 @@
 
     /**
      * Converts an insn list to rop form.
-     * 
+     *
      * @param ssaInsns {@code non-null;} old instructions
      * @return {@code non-null;} immutable instruction list
      */
@@ -354,7 +355,7 @@
 
     /**
      * <b>Note:</b> This method is not presently used.
-     * 
+     *
      * @return a list of registers ordered by most-frequently-used to
      * least-frequently-used. Each register is listed once and only
      * once.
@@ -381,5 +382,5 @@
         }
 
         return result;
-    }    
+    }
 }
diff --git a/dx/src/com/android/dx/util/AnnotatedOutput.java b/dx/src/com/android/dx/util/AnnotatedOutput.java
index 9b69a36..7a9ea29 100644
--- a/dx/src/com/android/dx/util/AnnotatedOutput.java
+++ b/dx/src/com/android/dx/util/AnnotatedOutput.java
@@ -24,7 +24,7 @@
         extends Output {
     /**
      * Get whether this instance will actually keep annotations.
-     * 
+     *
      * @return {@code true} iff annotations are being kept
      */
     public boolean annotates();
@@ -33,7 +33,7 @@
      * Get whether this instance is intended to keep verbose annotations.
      * Annotators may use the result of calling this method to inform their
      * annotation activity.
-     * 
+     *
      * @return {@code true} iff annotations are to be verbose
      */
     public boolean isVerbose();
@@ -43,7 +43,7 @@
      * open annotation will be closed by this call, and the new
      * annotation marks all subsequent output until another annotation
      * call.
-     * 
+     *
      * @param msg {@code non-null;} the annotation message
      */
     public void annotate(String msg);
@@ -54,7 +54,7 @@
      * call. If there is already pending annotation from one or more
      * previous calls to this method, the new call "consumes" output
      * after all the output covered by the previous calls.
-     * 
+     *
      * @param amt {@code >= 0;} the amount of output for this annotation to
      * cover
      * @param msg {@code non-null;} the annotation message
@@ -72,7 +72,7 @@
      * Implementations of this interface are encouraged to deal with too-wide
      * output, but annotaters are encouraged to attempt to avoid exceeding
      * the indicated width.
-     * 
+     *
      * @return {@code >= 1;} the maximum width
      */
     public int getAnnotationWidth();
diff --git a/dx/src/com/android/dx/util/BitIntSet.java b/dx/src/com/android/dx/util/BitIntSet.java
index db85571..b364f0c 100644
--- a/dx/src/com/android/dx/util/BitIntSet.java
+++ b/dx/src/com/android/dx/util/BitIntSet.java
@@ -64,7 +64,7 @@
 
     /** @inheritDoc */
     public boolean has(int value) {
-        return (value < Bits.getMax(bits)) && Bits.get(bits, value);    
+        return (value < Bits.getMax(bits)) && Bits.get(bits, value);
     }
 
     /** @inheritDoc */
@@ -93,7 +93,7 @@
 
     /** @inheritDoc */
     public int elements() {
-        return Bits.bitCount(bits);        
+        return Bits.bitCount(bits);
     }
 
     /** @inheritDoc */
diff --git a/dx/src/com/android/dx/util/Bits.java b/dx/src/com/android/dx/util/Bits.java
index 1f45bd3..cbc0a5b 100644
--- a/dx/src/com/android/dx/util/Bits.java
+++ b/dx/src/com/android/dx/util/Bits.java
@@ -29,7 +29,7 @@
 
     /**
      * Constructs a bit set to contain bits up to the given index (exclusive).
-     * 
+     *
      * @param max {@code >= 0;} the maximum bit index (exclusive)
      * @return {@code non-null;} an appropriately-constructed instance
      */
@@ -40,7 +40,7 @@
 
     /**
      * Gets the maximum index (exclusive) for the given bit set.
-     * 
+     *
      * @param bits {@code non-null;} bit set in question
      * @return {@code >= 0;} the maximum index (exclusive) that may be set
      */
@@ -50,7 +50,7 @@
 
     /**
      * Gets the value of the bit at the given index.
-     * 
+     *
      * @param bits {@code non-null;} bit set to operate on
      * @param idx {@code >= 0, < getMax(set);} which bit
      * @return the value of the indicated bit
@@ -63,7 +63,7 @@
 
     /**
      * Sets the given bit to the given value.
-     * 
+     *
      * @param bits {@code non-null;} bit set to operate on
      * @param idx {@code >= 0, < getMax(set);} which bit
      * @param value the new value for the bit
@@ -81,7 +81,7 @@
 
     /**
      * Sets the given bit to {@code true}.
-     * 
+     *
      * @param bits {@code non-null;} bit set to operate on
      * @param idx {@code >= 0, < getMax(set);} which bit
      */
@@ -93,7 +93,7 @@
 
     /**
      * Sets the given bit to {@code false}.
-     * 
+     *
      * @param bits {@code non-null;} bit set to operate on
      * @param idx {@code >= 0, < getMax(set);} which bit
      */
@@ -106,7 +106,7 @@
     /**
      * Returns whether or not the given bit set is empty, that is, whether
      * no bit is set to {@code true}.
-     * 
+     *
      * @param bits {@code non-null;} bit set to operate on
      * @return {@code true} iff all bits are {@code false}
      */
@@ -124,7 +124,7 @@
 
     /**
      * Gets the number of bits set to {@code true} in the given bit set.
-     * 
+     *
      * @param bits {@code non-null;} bit set to operate on
      * @return {@code >= 0;} the bit count (aka population count) of the set
      */
@@ -142,7 +142,7 @@
     /**
      * Returns whether any bits are set to {@code true} in the
      * specified range.
-     * 
+     *
      * @param bits {@code non-null;} bit set to operate on
      * @param start {@code >= 0;} index of the first bit in the range (inclusive)
      * @param end {@code >= 0;} index of the last bit in the range (exclusive)
@@ -157,7 +157,7 @@
     /**
      * Finds the lowest-order bit set at or after the given index in the
      * given bit set.
-     * 
+     *
      * @param bits {@code non-null;} bit set to operate on
      * @param idx {@code >= 0;} minimum index to return
      * @return {@code >= -1;} lowest-order bit set at or after {@code idx},
@@ -184,7 +184,7 @@
     /**
      * Finds the lowest-order bit set at or after the given index in the
      * given {@code int}.
-     * 
+     *
      * @param value the value in question
      * @param idx 0..31 the minimum bit index to return
      * @return {@code >= -1;} lowest-order bit set at or after {@code idx},
diff --git a/dx/src/com/android/dx/util/ByteArray.java b/dx/src/com/android/dx/util/ByteArray.java
index 79fa195..21d0457 100644
--- a/dx/src/com/android/dx/util/ByteArray.java
+++ b/dx/src/com/android/dx/util/ByteArray.java
@@ -198,7 +198,7 @@
      * Copies the contents of this instance into the given raw
      * {@code byte[]} at the given offset. The given array must be
      * large enough.
-     * 
+     *
      * @param out {@code non-null;} array to hold the output
      * @param offset {@code non-null;} index into {@code out} for the first
      * byte of output
@@ -252,7 +252,7 @@
      * with the cursor starting at the beginning of this instance's data.
      * <b>Note:</b> The returned instance may be cast to {@link #GetCursor}
      * if needed.
-     * 
+     *
      * @return {@code non-null;} an appropriately-constructed
      * {@code DataInputStream} instance
      */
@@ -265,7 +265,7 @@
      * with the cursor starting at the beginning of this instance's data.
      * <b>Note:</b> The returned instance may be cast to {@link #GetCursor}
      * if needed.
-     * 
+     *
      * @return {@code non-null;} an appropriately-constructed
      * {@code InputStream} instancex
      */
@@ -279,12 +279,12 @@
     public interface GetCursor {
         /**
          * Gets the current cursor.
-         * 
+         *
          * @return {@code 0..size();} the cursor
          */
         public int getCursor();
     }
-     
+
     /**
      * Helper class for {@link #makeInputStream}, which implements the
      * stream functionality.
@@ -295,7 +295,7 @@
 
         /** 0..size; the mark */
         private int mark;
-        
+
         public MyInputStream() {
             cursor = 0;
             mark = 0;
@@ -315,7 +315,7 @@
             if ((offset + length) > arr.length) {
                 length = arr.length - offset;
             }
-            
+
             int maxLength = size - cursor;
             if (length > maxLength) {
                 length = maxLength;
@@ -351,7 +351,7 @@
     public static class MyDataInputStream extends DataInputStream {
         /** {@code non-null;} the underlying {@link #MyInputStream} */
         private final MyInputStream wrapped;
-        
+
         public MyDataInputStream(MyInputStream wrapped) {
             super(wrapped);
 
diff --git a/dx/src/com/android/dx/util/ByteArrayAnnotatedOutput.java b/dx/src/com/android/dx/util/ByteArrayAnnotatedOutput.java
index 5fcf5d8..6d0615e 100644
--- a/dx/src/com/android/dx/util/ByteArrayAnnotatedOutput.java
+++ b/dx/src/com/android/dx/util/ByteArrayAnnotatedOutput.java
@@ -23,7 +23,7 @@
 /**
  * Implementation of {@link AnnotatedOutput} which stores the written data
  * into a {@code byte[]}.
- * 
+ *
  * <p><b>Note:</b> As per the {@link Output} interface, multi-byte
  * writes all use little-endian order.</p>
  */
@@ -31,7 +31,7 @@
         implements AnnotatedOutput {
     /** default size for stretchy instances */
     private static final int DEFAULT_SIZE = 1000;
-    
+
     /**
      * whether the instance is stretchy, that is, whether its array
      * may be resized to increase capacity
@@ -49,7 +49,7 @@
 
     /**
      * {@code null-ok;} list of annotations, or {@code null} if this instance
-     * isn't keeping them 
+     * isn't keeping them
      */
     private ArrayList<Annotation> annotations;
 
@@ -58,7 +58,7 @@
 
     /**
      * {@code >= 8 (if used);} the number of bytes of hex output to use
-     * in annotations 
+     * in annotations
      */
     private int hexCols;
 
@@ -68,7 +68,7 @@
      * particular, no reallocation will occur in order to expand the
      * capacity of the resulting instance. Also, the constructed
      * instance does not keep annotations by default.
-     * 
+     *
      * @param data {@code non-null;} data array to use for output
      */
     public ByteArrayAnnotatedOutput(byte[] data) {
@@ -86,7 +86,7 @@
 
     /**
      * Internal constructor.
-     * 
+     *
      * @param data {@code non-null;} data array to use for output
      * @param stretchy whether the instance is to be stretchy
      */
@@ -107,9 +107,9 @@
     /**
      * Gets the underlying {@code byte[]} of this instance, which
      * may be larger than the number of bytes written
-     * 
+     *
      * @see #toByteArray
-     * 
+     *
      * @return {@code non-null;} the {@code byte[]}
      */
     public byte[] getArray() {
@@ -120,9 +120,9 @@
      * Constructs and returns a new {@code byte[]} that contains
      * the written contents exactly (that is, with no extra unwritten
      * bytes at the end).
-     * 
+     *
      * @see #getArray
-     * 
+     *
      * @return {@code non-null;} an appropriately-constructed array
      */
     public byte[] toByteArray() {
@@ -258,7 +258,7 @@
 
         return count;
     }
-    
+
     /** {@inheritDoc} */
     public void write(ByteArray bytes) {
         int blen = bytes.size();
@@ -285,7 +285,7 @@
         // twos-complement math trick: ((x < 0) || (y < 0)) <=> ((x|y) < 0)
         if (((offset | length | end) < 0) || (bytesEnd > bytes.length)) {
             throw new IndexOutOfBoundsException("bytes.length " +
-                                                bytes.length + "; " + 
+                                                bytes.length + "; " +
                                                 offset + "..!" + end);
         }
 
@@ -418,7 +418,7 @@
      * Indicates that this instance should keep annotations. This method may
      * be called only once per instance, and only before any data has been
      * written to the it.
-     * 
+     *
      * @param annotationWidth {@code >= 40;} the desired maximum annotation width
      * @param verbose whether or not to indicate verbose annotations
      */
@@ -473,7 +473,7 @@
 
     /**
      * Writes the annotated content of this instance to the given writer.
-     * 
+     *
      * @param out {@code non-null;} where to write to
      */
     public void writeAnnotationsTo(Writer out) throws IOException {
@@ -537,7 +537,7 @@
     /**
      * Reallocates the underlying array if necessary. Calls to this method
      * should be guarded by a test of {@link #stretchy}.
-     * 
+     *
      * @param desiredSize {@code >= 0;} the desired minimum total size of the array
      */
     private void ensureCapacity(int desiredSize) {
@@ -557,7 +557,7 @@
 
         /**
          * {@code >= 0;} end of annotated range (exclusive);
-         * {@code Integer.MAX_VALUE} if unclosed 
+         * {@code Integer.MAX_VALUE} if unclosed
          */
         private int end;
 
@@ -566,7 +566,7 @@
 
         /**
          * Constructs an instance.
-         * 
+         *
          * @param start {@code >= 0;} start of annotated range
          * @param end {@code >= start;} end of annotated range (exclusive) or
          * {@code Integer.MAX_VALUE} if unclosed
@@ -580,7 +580,7 @@
 
         /**
          * Constructs an instance. It is initally unclosed.
-         * 
+         *
          * @param start {@code >= 0;} start of annotated range
          * @param text {@code non-null;} annotation text
          */
@@ -591,7 +591,7 @@
         /**
          * Sets the end as given, but only if the instance is unclosed;
          * otherwise, do nothing.
-         * 
+         *
          * @param end {@code >= start;} the end
          */
         public void setEndIfUnset(int end) {
@@ -602,7 +602,7 @@
 
         /**
          * Sets the end as given.
-         * 
+         *
          * @param end {@code >= start;} the end
          */
         public void setEnd(int end) {
@@ -611,7 +611,7 @@
 
         /**
          * Gets the start.
-         * 
+         *
          * @return the start
          */
         public int getStart() {
@@ -620,7 +620,7 @@
 
         /**
          * Gets the end.
-         * 
+         *
          * @return the end
          */
         public int getEnd() {
@@ -629,7 +629,7 @@
 
         /**
          * Gets the text.
-         * 
+         *
          * @return {@code non-null;} the text
          */
         public String getText() {
diff --git a/dx/src/com/android/dx/util/FileUtils.java b/dx/src/com/android/dx/util/FileUtils.java
index 3f51207..098c5ab 100644
--- a/dx/src/com/android/dx/util/FileUtils.java
+++ b/dx/src/com/android/dx/util/FileUtils.java
@@ -34,7 +34,7 @@
     /**
      * Reads the named file, translating {@link IOException} to a
      * {@link RuntimeException} of some sort.
-     * 
+     *
      * @param fileName {@code non-null;} name of the file to read
      * @return {@code non-null;} contents of the file
      */
@@ -46,7 +46,7 @@
     /**
      * Reads the given file, translating {@link IOException} to a
      * {@link RuntimeException} of some sort.
-     * 
+     *
      * @param file {@code non-null;} the file to read
      * @return {@code non-null;} contents of the file
      */
diff --git a/dx/src/com/android/dx/util/FixedSizeList.java b/dx/src/com/android/dx/util/FixedSizeList.java
index 17d773c..fb3af04 100644
--- a/dx/src/com/android/dx/util/FixedSizeList.java
+++ b/dx/src/com/android/dx/util/FixedSizeList.java
@@ -28,7 +28,7 @@
 
     /**
      * Constructs an instance. All indices initially contain {@code null}.
-     * 
+     *
      * @param size the size of the list
      */
     public FixedSizeList(int size) {
@@ -78,7 +78,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * This method will only work if every element of the list
      * implements {@link ToHuman}.
      */
@@ -93,7 +93,7 @@
 
     /**
      * Gets a customized string form for this instance.
-     * 
+     *
      * @param prefix {@code null-ok;} prefix for the start of the result
      * @param separator {@code null-ok;} separator to insert between each item
      * @param suffix {@code null-ok;} suffix for the end of the result
@@ -107,7 +107,7 @@
      * Gets a customized human string for this instance. This method will
      * only work if every element of the list implements {@link
      * ToHuman}.
-     * 
+     *
      * @param prefix {@code null-ok;} prefix for the start of the result
      * @param separator {@code null-ok;} separator to insert between each item
      * @param suffix {@code null-ok;} suffix for the end of the result
@@ -168,7 +168,7 @@
      * will throw {@code NullPointerException}. This method is
      * protected so that subclasses may offer a safe type-checked
      * public interface to their clients.
-     * 
+     *
      * @param n {@code >= 0, < size();} which element
      * @return {@code non-null;} the indicated element
      */
@@ -192,7 +192,7 @@
      * returned. This method is protected so that subclasses may
      * (optionally) offer a safe type-checked public interface to
      * their clients.
-     * 
+     *
      * @param n {@code >= 0, < size();} which element
      * @return {@code null-ok;} the indicated element
      */
@@ -205,7 +205,7 @@
      * checks on the element. This method is protected so that
      * subclasses may offer a safe type-checked public interface to
      * their clients.
-     * 
+     *
      * @param n {@code >= 0, < size();} which element
      * @param obj {@code null-ok;} the value to store
      */
@@ -222,7 +222,7 @@
 
     /**
      * Throws the appropriate exception for the given index value.
-     * 
+     *
      * @param n the index value
      * @return never
      * @throws IndexOutOfBoundsException always thrown
@@ -238,11 +238,11 @@
     /**
      * Helper for {@link #toString} and {@link #toHuman}, which both of
      * those call to pretty much do everything.
-     * 
+     *
      * @param prefix {@code null-ok;} prefix for the start of the result
      * @param separator {@code null-ok;} separator to insert between each item
      * @param suffix {@code null-ok;} suffix for the end of the result
-     * @param human whether the output is to be human 
+     * @param human whether the output is to be human
      * @return {@code non-null;} the custom string
      */
     private String toString0(String prefix, String separator, String suffix,
diff --git a/dx/src/com/android/dx/util/Hex.java b/dx/src/com/android/dx/util/Hex.java
index cb71e5e..e95669c 100644
--- a/dx/src/com/android/dx/util/Hex.java
+++ b/dx/src/com/android/dx/util/Hex.java
@@ -29,7 +29,7 @@
 
     /**
      * Formats a {@code long} as an 8-byte unsigned hex value.
-     * 
+     *
      * @param v value to format
      * @return {@code non-null;} formatted form
      */
@@ -45,7 +45,7 @@
 
     /**
      * Formats an {@code int} as a 4-byte unsigned hex value.
-     * 
+     *
      * @param v value to format
      * @return {@code non-null;} formatted form
      */
@@ -61,7 +61,7 @@
 
     /**
      * Formats an {@code int} as a 3-byte unsigned hex value.
-     * 
+     *
      * @param v value to format
      * @return {@code non-null;} formatted form
      */
@@ -77,7 +77,7 @@
 
     /**
      * Formats an {@code int} as a 2-byte unsigned hex value.
-     * 
+     *
      * @param v value to format
      * @return {@code non-null;} formatted form
      */
@@ -95,7 +95,7 @@
      * Formats an {@code int} as either a 2-byte unsigned hex value
      * (if the value is small enough) or a 4-byte unsigned hex value (if
      * not).
-     * 
+     *
      * @param v value to format
      * @return {@code non-null;} formatted form
      */
@@ -109,7 +109,7 @@
 
     /**
      * Formats an {@code int} as a 1-byte unsigned hex value.
-     * 
+     *
      * @param v value to format
      * @return {@code non-null;} formatted form
      */
@@ -125,7 +125,7 @@
 
     /**
      * Formats an {@code int} as a 4-bit unsigned hex nibble.
-     * 
+     *
      * @param v value to format
      * @return {@code non-null;} formatted form
      */
@@ -138,7 +138,7 @@
 
     /**
      * Formats a {@code long} as an 8-byte signed hex value.
-     * 
+     *
      * @param v value to format
      * @return {@code non-null;} formatted form
      */
@@ -162,7 +162,7 @@
 
     /**
      * Formats an {@code int} as a 4-byte signed hex value.
-     * 
+     *
      * @param v value to format
      * @return {@code non-null;} formatted form
      */
@@ -186,7 +186,7 @@
 
     /**
      * Formats an {@code int} as a 2-byte signed hex value.
-     * 
+     *
      * @param v value to format
      * @return {@code non-null;} formatted form
      */
@@ -210,7 +210,7 @@
 
     /**
      * Formats an {@code int} as a 1-byte signed hex value.
-     * 
+     *
      * @param v value to format
      * @return {@code non-null;} formatted form
      */
@@ -236,7 +236,7 @@
      * Formats a hex dump of a portion of a {@code byte[]}. The result
      * is always newline-terminated, unless the passed-in length was zero,
      * in which case the result is always the empty string ({@code ""}).
-     * 
+     *
      * @param arr {@code non-null;} array to format
      * @param offset {@code >= 0;} offset to the part to dump
      * @param length {@code >= 0;} number of bytes to dump
@@ -253,7 +253,7 @@
         // twos-complement math trick: ((x < 0) || (y < 0)) <=> ((x|y) < 0)
         if (((offset | length | end) < 0) || (end > arr.length)) {
             throw new IndexOutOfBoundsException("arr.length " +
-                                                arr.length + "; " + 
+                                                arr.length + "; " +
                                                 offset + "..!" + end);
         }
 
@@ -298,6 +298,6 @@
             sb.append('\n');
         }
 
-        return sb.toString();        
+        return sb.toString();
     }
 }
diff --git a/dx/src/com/android/dx/util/HexParser.java b/dx/src/com/android/dx/util/HexParser.java
index 3d0c992..1b34345 100644
--- a/dx/src/com/android/dx/util/HexParser.java
+++ b/dx/src/com/android/dx/util/HexParser.java
@@ -37,7 +37,7 @@
      * comment. If a double quote is encountered, then the ASCII value
      * of the subsequent characters is used, until the next double
      * quote. Quoted strings may not span multiple lines.
-     * 
+     *
      * @param src {@code non-null;} the source string
      * @return {@code non-null;} the parsed form
      */
diff --git a/dx/src/com/android/dx/util/IndentingWriter.java b/dx/src/com/android/dx/util/IndentingWriter.java
index 92f0b55..3424e37 100644
--- a/dx/src/com/android/dx/util/IndentingWriter.java
+++ b/dx/src/com/android/dx/util/IndentingWriter.java
@@ -47,7 +47,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param out {@code non-null;} writer to send final output to
      * @param width {@code >= 0;} the maximum output width (not including
      * {@code prefix}), or {@code 0} for no maximum
@@ -77,7 +77,7 @@
 
     /**
      * Constructs a no-prefix instance.
-     * 
+     *
      * @param out {@code non-null;} writer to send final output to
      * @param width {@code >= 0;} the maximum output width (not including
      * {@code prefix}), or {@code 0} for no maximum
diff --git a/dx/src/com/android/dx/util/IntList.java b/dx/src/com/android/dx/util/IntList.java
index c51c028..089fead 100644
--- a/dx/src/com/android/dx/util/IntList.java
+++ b/dx/src/com/android/dx/util/IntList.java
@@ -40,7 +40,7 @@
 
     /**
      * Constructs a new immutable instance with the given element.
-     * 
+     *
      * @param value the sole value in the list
      */
     public static IntList makeImmutable(int value) {
@@ -54,7 +54,7 @@
 
     /**
      * Constructs a new immutable instance with the given elements.
-     * 
+     *
      * @param value0 the first value in the list
      * @param value1 the second value in the list
      */
@@ -77,7 +77,7 @@
 
     /**
      * Constructs an empty instance.
-     * 
+     *
      * @param initialCapacity {@code >= 0;} initial capacity of the list
      */
     public IntList(int initialCapacity) {
@@ -164,7 +164,7 @@
 
     /**
      * Gets the indicated value.
-     * 
+     *
      * @param n {@code >= 0, < size();} which element
      * @return the indicated element's value
      */
@@ -183,7 +183,7 @@
 
     /**
      * Sets the value at the given index.
-     * 
+     *
      * @param n {@code >= 0, < size();} which element
      * @param value value to store
      */
@@ -208,7 +208,7 @@
     /**
      * Adds an element to the end of the list. This will increase the
      * list's capacity if necessary.
-     * 
+     *
      * @param value the value to add
      */
     public void add(int value) {
@@ -301,7 +301,7 @@
         result = get(size-1);
         size--;
 
-        return result;    
+        return result;
     }
 
     /**
@@ -318,7 +318,7 @@
 
     /**
      * Shrinks the size of the list.
-     * 
+     *
      * @param newSize {@code >= 0;} the new size
      */
     public void shrink(int newSize) {
@@ -337,7 +337,7 @@
 
     /**
      * Makes and returns a mutable copy of the list.
-     * 
+     *
      * @return {@code non-null;} an appropriately-constructed instance
      */
     public IntList mutableCopy() {
@@ -440,9 +440,9 @@
      * Returns whether or not the given value appears in the list.
      * This will do a binary search if the list is sorted or a linear
      * search if not.
-     * 
+     *
      * @see #sort
-     * 
+     *
      * @param value value to look for
      * @return whether the list contains the given value
      */
diff --git a/dx/src/com/android/dx/util/LabeledList.java b/dx/src/com/android/dx/util/LabeledList.java
index 28a148b..5b6e125 100644
--- a/dx/src/com/android/dx/util/LabeledList.java
+++ b/dx/src/com/android/dx/util/LabeledList.java
@@ -156,6 +156,6 @@
 
         if (item != null) {
             addLabelIndex(item.getLabel(), n);
-        }        
+        }
     }
 }
diff --git a/dx/src/com/android/dx/util/Leb128Utils.java b/dx/src/com/android/dx/util/Leb128Utils.java
index 6ed3a61..5d450ea 100644
--- a/dx/src/com/android/dx/util/Leb128Utils.java
+++ b/dx/src/com/android/dx/util/Leb128Utils.java
@@ -30,13 +30,13 @@
     /**
      * Gets the number of bytes in the unsigned LEB128 encoding of the
      * given value.
-     * 
+     *
      * @param value the value in question
      * @return its write size, in bytes
      */
     public static int unsignedLeb128Size(int value) {
         // TODO: This could be much cleverer.
-        
+
         int remaining = value >> 7;
         int count = 0;
 
@@ -51,7 +51,7 @@
     /**
      * Gets the number of bytes in the signed LEB128 encoding of the
      * given value.
-     * 
+     *
      * @param value the value in question
      * @return its write size, in bytes
      */
diff --git a/dx/src/com/android/dx/util/ListIntSet.java b/dx/src/com/android/dx/util/ListIntSet.java
index 6d28a18..2b4fc21 100644
--- a/dx/src/com/android/dx/util/ListIntSet.java
+++ b/dx/src/com/android/dx/util/ListIntSet.java
@@ -54,7 +54,7 @@
 
     /** @inheritDoc */
     public boolean has(int value) {
-        return ints.indexOf(value) >= 0;    
+        return ints.indexOf(value) >= 0;
     }
 
     /** @inheritDoc */
@@ -70,7 +70,7 @@
             while (j < szOther && i < szThis) {
                 while (j < szOther && o.ints.get(j) < ints.get(i)) {
                     add(o.ints.get(j++));
-                }                
+                }
                 if (j == szOther) {
                     break;
                 }
diff --git a/dx/src/com/android/dx/util/Output.java b/dx/src/com/android/dx/util/Output.java
index 5e737ae..402fa83 100644
--- a/dx/src/com/android/dx/util/Output.java
+++ b/dx/src/com/android/dx/util/Output.java
@@ -17,7 +17,7 @@
 package com.android.dx.util;
 
 /**
- * Interface for a sink for binary output. This is similar to 
+ * Interface for a sink for binary output. This is similar to
  * {@code java.util.DataOutput}, but no {@code IOExceptions}
  * are declared, and multibyte output is defined to be little-endian.
  */
@@ -25,44 +25,44 @@
     /**
      * Gets the current cursor position. This is the same as the number of
      * bytes written to this instance.
-     * 
+     *
      * @return {@code >= 0;} the cursor position
      */
     public int getCursor();
 
     /**
      * Asserts that the cursor is the given value.
-     * 
+     *
      * @param expectedCursor the expected cursor value
      * @throws RuntimeException thrown if {@code getCursor() !=
      * expectedCursor}
      */
     public void assertCursor(int expectedCursor);
- 
+
     /**
      * Writes a {@code byte} to this instance.
-     * 
+     *
      * @param value the value to write; all but the low 8 bits are ignored
      */
     public void writeByte(int value);
 
     /**
      * Writes a {@code short} to this instance.
-     * 
+     *
      * @param value the value to write; all but the low 16 bits are ignored
      */
     public void writeShort(int value);
 
     /**
      * Writes an {@code int} to this instance.
-     * 
+     *
      * @param value the value to write
      */
     public void writeInt(int value);
 
     /**
      * Writes a {@code long} to this instance.
-     * 
+     *
      * @param value the value to write
      */
     public void writeLong(long value);
@@ -89,14 +89,14 @@
 
     /**
      * Writes a {@link ByteArray} to this instance.
-     * 
+     *
      * @param bytes {@code non-null;} the array to write
      */
     public void write(ByteArray bytes);
 
     /**
      * Writes a portion of a {@code byte[]} to this instance.
-     * 
+     *
      * @param bytes {@code non-null;} the array to write
      * @param offset {@code >= 0;} offset into {@code bytes} for the first
      * byte to write
@@ -107,22 +107,22 @@
     /**
      * Writes a {@code byte[]} to this instance. This is just
      * a convenient shorthand for {@code write(bytes, 0, bytes.length)}.
-     * 
+     *
      * @param bytes {@code non-null;} the array to write
      */
     public void write(byte[] bytes);
 
-    /** 
+    /**
      * Writes the given number of {@code 0} bytes.
-     * 
+     *
      * @param count {@code >= 0;} the number of zeroes to write
      */
     public void writeZeroes(int count);
 
-    /** 
+    /**
      * Adds extra bytes if necessary (with value {@code 0}) to
      * force alignment of the output cursor as given.
-     * 
+     *
      * @param alignment {@code > 0;} the alignment; must be a power of two
      */
     public void alignTo(int alignment);
diff --git a/dx/src/com/android/dx/util/TwoColumnOutput.java b/dx/src/com/android/dx/util/TwoColumnOutput.java
index a155c15..ed2ab9f 100644
--- a/dx/src/com/android/dx/util/TwoColumnOutput.java
+++ b/dx/src/com/android/dx/util/TwoColumnOutput.java
@@ -49,7 +49,7 @@
     /**
      * Turns the given two strings (with widths) and spacer into a formatted
      * two-column string.
-     * 
+     *
      * @param s1 {@code non-null;} first string
      * @param width1 {@code > 0;} width of the first column
      * @param spacer {@code non-null;} spacer string
@@ -79,7 +79,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param out {@code non-null;} writer to send final output to
      * @param leftWidth {@code > 0;} width of the left column, in characters
      * @param rightWidth {@code > 0;} width of the right column, in characters
@@ -117,7 +117,7 @@
 
     /**
      * Constructs an instance.
-     * 
+     *
      * @param out {@code non-null;} stream to send final output to
      * @param leftWidth {@code >= 1;} width of the left column, in characters
      * @param rightWidth {@code >= 1;} width of the right column, in characters
@@ -130,7 +130,7 @@
 
     /**
      * Gets the writer to use to write to the left column.
-     * 
+     *
      * @return {@code non-null;} the left column writer
      */
     public Writer getLeft() {
@@ -139,7 +139,7 @@
 
     /**
      * Gets the writer to use to write to the right column.
-     * 
+     *
      * @return {@code non-null;} the right column writer
      */
     public Writer getRight() {
@@ -225,12 +225,12 @@
     /**
      * Appends a newline to the given buffer via the given writer, but
      * only if it isn't empty and doesn't already end with one.
-     * 
+     *
      * @param buf {@code non-null;} the buffer in question
      * @param out {@code non-null;} the writer to use
      */
     private static void appendNewlineIfNecessary(StringBuffer buf,
-                                                 Writer out) 
+                                                 Writer out)
             throws IOException {
         int len = buf.length();
 
@@ -241,7 +241,7 @@
 
     /**
      * Writes the given number of spaces to the given writer.
-     * 
+     *
      * @param out {@code non-null;} where to write
      * @param amt {@code >= 0;} the number of spaces to write
      */
diff --git a/dx/src/com/android/dx/util/Writers.java b/dx/src/com/android/dx/util/Writers.java
index 632b082..eba845c 100644
--- a/dx/src/com/android/dx/util/Writers.java
+++ b/dx/src/com/android/dx/util/Writers.java
@@ -34,7 +34,7 @@
      * Makes a {@code PrintWriter} for the given {@code Writer},
      * returning the given writer if it already happens to be the right
      * class.
-     * 
+     *
      * @param writer {@code non-null;} writer to (possibly) wrap
      * @return {@code non-null;} an appropriate instance
      */
diff --git a/dx/src/com/android/dx/util/_tests/_ListIntSet.java b/dx/src/com/android/dx/util/_tests/_ListIntSet.java
index aed79b0..ccd5991 100644
--- a/dx/src/com/android/dx/util/_tests/_ListIntSet.java
+++ b/dx/src/com/android/dx/util/_tests/_ListIntSet.java
@@ -39,7 +39,7 @@
         assertTrue(set.has(31));
 
         assertEquals(3, set.elements());
-        
+
         assertFalse(set.has(2));
         assertFalse(set.has(7));
         assertFalse(set.has(30));
@@ -79,7 +79,7 @@
 
         IntIterator iter = set.iterator();
 
-        assertFalse(iter.hasNext());        
+        assertFalse(iter.hasNext());
     }
 
     public void test_remove() {
diff --git a/dx/tests/010-class-attrib-InnerClasses/small-class.txt b/dx/tests/010-class-attrib-InnerClasses/small-class.txt
index 6ad13a4..54fd19d 100644
--- a/dx/tests/010-class-attrib-InnerClasses/small-class.txt
+++ b/dx/tests/010-class-attrib-InnerClasses/small-class.txt
@@ -35,4 +35,3 @@
 0003 0000 0001 0002  # Small / null / "Small" / private
 0003 0007 0000 0004  # Small / Zorch / null / protected
 0007 0003 0006 ffff  # Zorch / Small / "Zorch" / all-bits
-
diff --git a/dx/tests/021-code-attrib-LineNumberTable/info.txt b/dx/tests/021-code-attrib-LineNumberTable/info.txt
index 3e81d29..2ffc798 100644
--- a/dx/tests/021-code-attrib-LineNumberTable/info.txt
+++ b/dx/tests/021-code-attrib-LineNumberTable/info.txt
@@ -5,4 +5,3 @@
 The salient bit of parsing tested here is that the class has a single
 method with a simple Code attribute, which itself has a syntactically
 valid LineNumberTable attribute.
-
diff --git a/dx/tests/022-code-attrib-LocalVariableTable/info.txt b/dx/tests/022-code-attrib-LocalVariableTable/info.txt
index d1afa33..5b44286 100644
--- a/dx/tests/022-code-attrib-LocalVariableTable/info.txt
+++ b/dx/tests/022-code-attrib-LocalVariableTable/info.txt
@@ -5,4 +5,3 @@
 The salient bit of parsing tested here is that the class has a single
 method with a simple Code attribute, which itself has a syntactically
 valid LocalVariableTable attribute.
-
diff --git a/dx/tests/023-code-exception-table/info.txt b/dx/tests/023-code-exception-table/info.txt
index f4bb35e..2dbb5da 100644
--- a/dx/tests/023-code-exception-table/info.txt
+++ b/dx/tests/023-code-exception-table/info.txt
@@ -5,4 +5,3 @@
 The salient bit of parsing tested here is that the class has a single
 method with a minimal but syntactically valid Code attribute, which
 sports a non-empty syntactically valid exception table.
-
diff --git a/dx/tests/028-class-attrib-EnclosingMethod/info.txt b/dx/tests/028-class-attrib-EnclosingMethod/info.txt
index 206a43e..9600803 100644
--- a/dx/tests/028-class-attrib-EnclosingMethod/info.txt
+++ b/dx/tests/028-class-attrib-EnclosingMethod/info.txt
@@ -6,4 +6,3 @@
 class-level EnclosingMethod attribute, which is syntactically valid. There
 are two possible variants (method may be null), and this test contains one
 of each.
-
diff --git a/dx/tests/031-bb-dead-code/blort.j b/dx/tests/031-bb-dead-code/blort.j
index d3e20d0..b6854f2 100644
--- a/dx/tests/031-bb-dead-code/blort.j
+++ b/dx/tests/031-bb-dead-code/blort.j
@@ -180,4 +180,3 @@
 blort:
     return
 .end method
-
diff --git a/dx/tests/032-bb-live-code/blort.j b/dx/tests/032-bb-live-code/blort.j
index a1ec1dc..05790bb 100644
--- a/dx/tests/032-bb-live-code/blort.j
+++ b/dx/tests/032-bb-live-code/blort.j
@@ -340,4 +340,3 @@
     multianewarray [[[I 2
     return
 .end method
-
diff --git a/dx/tests/038-dex-instance-method/info.txt b/dx/tests/038-dex-instance-method/info.txt
index c9ce0b1..6aa93c3 100644
--- a/dx/tests/038-dex-instance-method/info.txt
+++ b/dx/tests/038-dex-instance-method/info.txt
@@ -2,4 +2,3 @@
 conversion runs without failure, though the contents of the converted
 file are not checked for correctness. This test is of a classfile with
 just an instance method.
-
diff --git a/dx/tests/042-dex-ignore-result/Blort.java b/dx/tests/042-dex-ignore-result/Blort.java
index 21370ed..2df4e66 100644
--- a/dx/tests/042-dex-ignore-result/Blort.java
+++ b/dx/tests/042-dex-ignore-result/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     static public int hello() {
         return 10;
diff --git a/dx/tests/043-dex-two-classes/Blort.java b/dx/tests/043-dex-two-classes/Blort.java
index 1d9de84..235907d 100644
--- a/dx/tests/043-dex-two-classes/Blort.java
+++ b/dx/tests/043-dex-two-classes/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     // This space intentionally left blank.
 }
diff --git a/dx/tests/044-dex-math-ops/Blort.java b/dx/tests/044-dex-math-ops/Blort.java
index bf73c33..75095b5 100644
--- a/dx/tests/044-dex-math-ops/Blort.java
+++ b/dx/tests/044-dex-math-ops/Blort.java
@@ -14,13 +14,13 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     private volatile int i;
     private volatile long l;
     private volatile float f;
     private volatile double d;
-    
+
     public void blort(int i1, int i2) {
         i = -i1;
         i = ~i1;
@@ -69,5 +69,5 @@
         d = d1 * d2;
         d = d1 / d2;
         d = d1 % d2;
-    }    
+    }
 }
diff --git a/dx/tests/045-dex-switch-ops/Blort.java b/dx/tests/045-dex-switch-ops/Blort.java
index fed741f..598bd69 100644
--- a/dx/tests/045-dex-switch-ops/Blort.java
+++ b/dx/tests/045-dex-switch-ops/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public int switchTest1(int x) {
         switch (x) {
diff --git a/dx/tests/046-dex-exceptions/Blort.java b/dx/tests/046-dex-exceptions/Blort.java
index 8d040c4..a0b6c0b 100644
--- a/dx/tests/046-dex-exceptions/Blort.java
+++ b/dx/tests/046-dex-exceptions/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public static int maybeThrow(int x) {
         if (x < 10) {
@@ -23,7 +23,7 @@
 
         return x;
     }
-    
+
     public static int exTest1(int x) {
         try {
             maybeThrow(x);
diff --git a/dx/tests/047-dex-wide-args/Blort.java b/dx/tests/047-dex-wide-args/Blort.java
index e7fc9b5..fa0f1d8 100644
--- a/dx/tests/047-dex-wide-args/Blort.java
+++ b/dx/tests/047-dex-wide-args/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public static long test1(int w, long x, int y, long z) {
         return w + x + y + z;
diff --git a/dx/tests/048-dex-new-array/Blort.java b/dx/tests/048-dex-new-array/Blort.java
index 312370c..1af0cde 100644
--- a/dx/tests/048-dex-new-array/Blort.java
+++ b/dx/tests/048-dex-new-array/Blort.java
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public static void sink(Object x) {
         // Do nothing.
     }
-    
+
     public static void test() {
         sink(new boolean[0]);
         sink(new byte[1]);
diff --git a/dx/tests/049-dex-instanceof/Blort.java b/dx/tests/049-dex-instanceof/Blort.java
index 2d46cd1..ad41f30 100644
--- a/dx/tests/049-dex-instanceof/Blort.java
+++ b/dx/tests/049-dex-instanceof/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public static boolean test(Object x) {
         return x instanceof Blort;
diff --git a/dx/tests/050-dex-checkcast/Blort.java b/dx/tests/050-dex-checkcast/Blort.java
index 893c3a3..5441eec 100644
--- a/dx/tests/050-dex-checkcast/Blort.java
+++ b/dx/tests/050-dex-checkcast/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public static Blort test(Object x) {
         return (Blort) x;
diff --git a/dx/tests/051-dex-explicit-null/Blort.java b/dx/tests/051-dex-explicit-null/Blort.java
index f3bb333..9045c50 100644
--- a/dx/tests/051-dex-explicit-null/Blort.java
+++ b/dx/tests/051-dex-explicit-null/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public static Object test1() {
         return null;
diff --git a/dx/tests/052-dex-static-var-access/Blort.java b/dx/tests/052-dex-static-var-access/Blort.java
index fdbefb4..3dd0e78 100644
--- a/dx/tests/052-dex-static-var-access/Blort.java
+++ b/dx/tests/052-dex-static-var-access/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public static boolean staticBoolean;
     public static byte staticByte;
diff --git a/dx/tests/053-dex-instance-var-access/Blort.java b/dx/tests/053-dex-instance-var-access/Blort.java
index 1f68737..eb62d62 100644
--- a/dx/tests/053-dex-instance-var-access/Blort.java
+++ b/dx/tests/053-dex-instance-var-access/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public boolean insBoolean;
     public byte insByte;
diff --git a/dx/tests/054-dex-high16/Blort.java b/dx/tests/054-dex-high16/Blort.java
index e8976fa..9fba972 100644
--- a/dx/tests/054-dex-high16/Blort.java
+++ b/dx/tests/054-dex-high16/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public static void sink(int i) {
         // Do nothing.
diff --git a/dx/tests/055-dex-explicit-throw/Blort.java b/dx/tests/055-dex-explicit-throw/Blort.java
index a47ba90..e6720d9 100644
--- a/dx/tests/055-dex-explicit-throw/Blort.java
+++ b/dx/tests/055-dex-explicit-throw/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     private static RuntimeException theException = new RuntimeException();
 
diff --git a/dx/tests/056-dex-call-interface/Blort.java b/dx/tests/056-dex-call-interface/Blort.java
index 75775e6..4175f05 100644
--- a/dx/tests/056-dex-call-interface/Blort.java
+++ b/dx/tests/056-dex-call-interface/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public static int test(Zorch z, double d) {
         z.zorch1();
diff --git a/dx/tests/057-dex-call-virtual/Blort.java b/dx/tests/057-dex-call-virtual/Blort.java
index e32135b..75ee7d8 100644
--- a/dx/tests/057-dex-call-virtual/Blort.java
+++ b/dx/tests/057-dex-call-virtual/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public static int test(Zorch z) {
         z.zorch1();
diff --git a/dx/tests/057-dex-call-virtual/Zorch.java b/dx/tests/057-dex-call-virtual/Zorch.java
index 718601f..867eaed 100644
--- a/dx/tests/057-dex-call-virtual/Zorch.java
+++ b/dx/tests/057-dex-call-virtual/Zorch.java
@@ -16,7 +16,7 @@
 
 public class Zorch
 {
-    public void zorch1() { 
+    public void zorch1() {
         // This space intentionally left blank.
     }
 
diff --git a/dx/tests/058-dex-call-direct/Blort.java b/dx/tests/058-dex-call-direct/Blort.java
index 77e224c..6d7fa7f 100644
--- a/dx/tests/058-dex-call-direct/Blort.java
+++ b/dx/tests/058-dex-call-direct/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public static int test(Blort b) {
         b.zorch1();
diff --git a/dx/tests/059-dex-call-super/Blort.java b/dx/tests/059-dex-call-super/Blort.java
index 599440b..efb451e 100644
--- a/dx/tests/059-dex-call-super/Blort.java
+++ b/dx/tests/059-dex-call-super/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
     extends Zorch
 {
     public int test1() {
diff --git a/dx/tests/059-dex-call-super/Zorch.java b/dx/tests/059-dex-call-super/Zorch.java
index 2f8951a..aa668ab 100644
--- a/dx/tests/059-dex-call-super/Zorch.java
+++ b/dx/tests/059-dex-call-super/Zorch.java
@@ -16,7 +16,7 @@
 
 public class Zorch
 {
-    public void zorch1() { 
+    public void zorch1() {
         // This space intentionally left blank.
     }
 
diff --git a/dx/tests/060-dex-call-static/Blort.java b/dx/tests/060-dex-call-static/Blort.java
index 2b9bb48..8ad2e27 100644
--- a/dx/tests/060-dex-call-static/Blort.java
+++ b/dx/tests/060-dex-call-static/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public static int test() {
         Zorch.zorch1();
diff --git a/dx/tests/061-dex-try-catch/Blort.java b/dx/tests/061-dex-try-catch/Blort.java
index b63a41e..903f40e 100644
--- a/dx/tests/061-dex-try-catch/Blort.java
+++ b/dx/tests/061-dex-try-catch/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public static void caught() {
         // This space intentionally left blank.
diff --git a/dx/tests/062-dex-synch-method/Blort.java b/dx/tests/062-dex-synch-method/Blort.java
index 823c2ca..4aca417 100644
--- a/dx/tests/062-dex-synch-method/Blort.java
+++ b/dx/tests/062-dex-synch-method/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public synchronized void testInstance1() {
         // This space intentionally left blank.
diff --git a/dx/tests/063-dex-empty-switch/Blort.java b/dx/tests/063-dex-empty-switch/Blort.java
index 2d996f3..f538995 100644
--- a/dx/tests/063-dex-empty-switch/Blort.java
+++ b/dx/tests/063-dex-empty-switch/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public int test1(int x) {
         switch (x) {
diff --git a/dx/tests/064-dex-array-access/Blort.java b/dx/tests/064-dex-array-access/Blort.java
index 3f1d1d8..fa03ec0 100644
--- a/dx/tests/064-dex-array-access/Blort.java
+++ b/dx/tests/064-dex-array-access/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public boolean test01(boolean[] x) {
         x[0] = true;
diff --git a/dx/tests/065-dex-new-array/Blort.java b/dx/tests/065-dex-new-array/Blort.java
index 93af87f..7a7eaa4 100644
--- a/dx/tests/065-dex-new-array/Blort.java
+++ b/dx/tests/065-dex-new-array/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public boolean[] test1() {
         return new boolean[1];
diff --git a/dx/tests/066-dex-try-catch-rethrow/Blort.java b/dx/tests/066-dex-try-catch-rethrow/Blort.java
index cefc0fd..cdb00ea 100644
--- a/dx/tests/066-dex-try-catch-rethrow/Blort.java
+++ b/dx/tests/066-dex-try-catch-rethrow/Blort.java
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public static Object zorch1(String s) {
         return null;
     }
-    
+
     public static void test1() {
         try {
             zorch1("x");
@@ -43,7 +43,7 @@
     public static int zorch3(String s) {
         return 0;
     }
-    
+
     public static void test3() {
         try {
             zorch3("x");
@@ -55,7 +55,7 @@
     public static Object zorch4(int x) {
         return null;
     }
-    
+
     public static void test4() {
         try {
             zorch4(1);
@@ -67,7 +67,7 @@
     public static Object zorch5(int x) {
         return null;
     }
-    
+
     public static Object test5() {
         try {
             return zorch5(1);
diff --git a/dx/tests/067-dex-switch-and-try/Blort.java b/dx/tests/067-dex-switch-and-try/Blort.java
index d90bd32..e6435e1 100644
--- a/dx/tests/067-dex-switch-and-try/Blort.java
+++ b/dx/tests/067-dex-switch-and-try/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     static public void blort() {
         // This space intentionally left blank.
diff --git a/dx/tests/068-dex-infinite-loop/Blort.java b/dx/tests/068-dex-infinite-loop/Blort.java
index 09c45a4..f026407 100644
--- a/dx/tests/068-dex-infinite-loop/Blort.java
+++ b/dx/tests/068-dex-infinite-loop/Blort.java
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public static boolean zorch() {
         return true;
     }
-    
+
     public static void test1() {
         for (;;) {
             // This space intentionally left blank.
@@ -43,7 +43,7 @@
             if (zorch()) {
                 break;
             }
-            
+
             while (zorch()) {
                 zorch();
             }
diff --git a/dx/tests/069-dex-source-position/Blort.java b/dx/tests/069-dex-source-position/Blort.java
index 5cede03..8c0c5c0 100644
--- a/dx/tests/069-dex-source-position/Blort.java
+++ b/dx/tests/069-dex-source-position/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public static int test(int x) {
         if (x == 0) { // line 6
diff --git a/dx/tests/070-dex-multianewarray/Blort.java b/dx/tests/070-dex-multianewarray/Blort.java
index 500b14c..ef812cf 100644
--- a/dx/tests/070-dex-multianewarray/Blort.java
+++ b/dx/tests/070-dex-multianewarray/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public static Object test01() {
         Object[][] x = new Object[2][5];
diff --git a/dx/tests/072-dex-switch-edge-cases/Blort.java b/dx/tests/072-dex-switch-edge-cases/Blort.java
index ba2e033..2d4d107 100644
--- a/dx/tests/072-dex-switch-edge-cases/Blort.java
+++ b/dx/tests/072-dex-switch-edge-cases/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     // Empty switch statement. (Note: This is the same as a default-only
     // switch statement, since under the covers every switch statement
@@ -44,7 +44,7 @@
 
         return 1;
     }
-    
+
     // Single element: Integer.MAX_VALUE.
     public int test4(int x) {
         switch (x) {
diff --git a/dx/tests/073-dex-null-array-refs/Blort.java b/dx/tests/073-dex-null-array-refs/Blort.java
index b6678c0..e16e0f4 100644
--- a/dx/tests/073-dex-null-array-refs/Blort.java
+++ b/dx/tests/073-dex-null-array-refs/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public static Object test1() {
         return ((Object[]) null)[0];
@@ -50,7 +50,7 @@
 
         return arr[0];
     }
-    
+
     public static void test8(Object[] arr) {
         if (check()) {
             arr = null;
diff --git a/dx/tests/074-dex-form35c-edge-case/Blort.java b/dx/tests/074-dex-form35c-edge-case/Blort.java
index 60efc63..979263f 100644
--- a/dx/tests/074-dex-form35c-edge-case/Blort.java
+++ b/dx/tests/074-dex-form35c-edge-case/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public void test()
     {
diff --git a/dx/tests/075-dex-cat2-value-merge/Blort.java b/dx/tests/075-dex-cat2-value-merge/Blort.java
index d1bf0be..0aa4c5a 100644
--- a/dx/tests/075-dex-cat2-value-merge/Blort.java
+++ b/dx/tests/075-dex-cat2-value-merge/Blort.java
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public static void test(long[] arr)
     {
         long x = 0;
-        
+
         for (;;) {
             x += arr[0];
         }
diff --git a/dx/tests/076-dex-synch-and-stack/Blort.java b/dx/tests/076-dex-synch-and-stack/Blort.java
index 6ba9757..8a83492 100644
--- a/dx/tests/076-dex-synch-and-stack/Blort.java
+++ b/dx/tests/076-dex-synch-and-stack/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public synchronized void test() {
         new Object();
diff --git a/dx/tests/077-dex-code-alignment/Blort.java b/dx/tests/077-dex-code-alignment/Blort.java
index 862cd51..3ec041a 100644
--- a/dx/tests/077-dex-code-alignment/Blort.java
+++ b/dx/tests/077-dex-code-alignment/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public static void justReturn1() {
         // This space intentionally left blank.
diff --git a/dx/tests/078-dex-local-variable-table/Blort.java b/dx/tests/078-dex-local-variable-table/Blort.java
index d9f006f..7291445 100644
--- a/dx/tests/078-dex-local-variable-table/Blort.java
+++ b/dx/tests/078-dex-local-variable-table/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public static void test01(Object x) {
         x.hashCode();
diff --git a/dx/tests/079-dex-local-variable-renumbering/Blort.java b/dx/tests/079-dex-local-variable-renumbering/Blort.java
index 629da90..c8453a2 100644
--- a/dx/tests/079-dex-local-variable-renumbering/Blort.java
+++ b/dx/tests/079-dex-local-variable-renumbering/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     public static int test1(int x) {
         float f0 = 0.0f;
diff --git a/dx/tests/080-dex-exception-tables/Blort.java b/dx/tests/080-dex-exception-tables/Blort.java
index f406bee..2143f7f 100644
--- a/dx/tests/080-dex-exception-tables/Blort.java
+++ b/dx/tests/080-dex-exception-tables/Blort.java
@@ -30,7 +30,7 @@
             return 10;
         } catch (RuntimeException ex) {
             return 11;
-        } 
+        }
 
         call3();
         return 12;
@@ -141,13 +141,13 @@
             call1();
         } catch (RuntimeException ex) {
             return 10;
-        } 
+        }
 
         try {
             call2();
         } catch (RuntimeException ex) {
             return 11;
-        } 
+        }
 
         return 12;
     }
@@ -158,14 +158,14 @@
             call2();
         } catch (RuntimeException ex) {
             return 10;
-        } 
+        }
 
         try {
             call3();
             call4();
         } catch (RuntimeException ex) {
             return 11;
-        } 
+        }
 
         return 12;
     }
@@ -195,5 +195,5 @@
 
         return 14;
     }
-    
+
 }
diff --git a/dx/tests/083-ssa-phi-placement/Blort.java b/dx/tests/083-ssa-phi-placement/Blort.java
index b314290..ed3264d 100644
--- a/dx/tests/083-ssa-phi-placement/Blort.java
+++ b/dx/tests/083-ssa-phi-placement/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
 
     public int phiTest() {
@@ -22,7 +22,7 @@
         int j = 1;
         int k = 0;
 
-        while (k < 100) { 
+        while (k < 100) {
             if (j < 20) {
                 j = i;
                 k++;
@@ -64,4 +64,3 @@
         }
     }
 }
-
diff --git a/dx/tests/084-dex-high-register-moves/Blort.java b/dx/tests/084-dex-high-register-moves/Blort.java
index 736cefb..e68ebd8 100644
--- a/dx/tests/084-dex-high-register-moves/Blort.java
+++ b/dx/tests/084-dex-high-register-moves/Blort.java
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     private static int i;
     private static long l;
     private static Object o;
-    
+
     public static void test() {
         int i0 = 0;
         int i1 = 0;
diff --git a/dx/tests/085-dex-jsr-ret/blort.j b/dx/tests/085-dex-jsr-ret/blort.j
index 2f4bf38..2616723 100644
--- a/dx/tests/085-dex-jsr-ret/blort.j
+++ b/dx/tests/085-dex-jsr-ret/blort.j
@@ -67,5 +67,3 @@
 
 .catch java/lang/Throwable from j2 to j2a using catchBlock
 .end method
-
-
diff --git a/dx/tests/085-dex-jsr-ret/info.txt b/dx/tests/085-dex-jsr-ret/info.txt
index 4542fde..8e164d6 100644
--- a/dx/tests/085-dex-jsr-ret/info.txt
+++ b/dx/tests/085-dex-jsr-ret/info.txt
@@ -1,2 +1 @@
 Tests handling of the Java jsr/jsr_w/ret bytecodes.
-
diff --git a/dx/tests/086-ssa-edge-split/Blort.java b/dx/tests/086-ssa-edge-split/Blort.java
index 5e54dfd..d12b3f9 100644
--- a/dx/tests/086-ssa-edge-split/Blort.java
+++ b/dx/tests/086-ssa-edge-split/Blort.java
@@ -14,13 +14,13 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     /**
      * This method requires the edge-splitter to add a node
      * to get to the finally block, since there are
      * two exception sources.
-     * 
+     *
      */
     public int edgeSplitPredTest(int x) {
         int y = 1;
@@ -45,7 +45,7 @@
      * a unique predecessor
      */
     void edgeSplitMoveException() {
-        try { 
+        try {
             hashCode();
             hashCode();
         } catch (Throwable tr) {
@@ -60,7 +60,7 @@
      */
     int edgeSplitSuccessor(int x) {
         int y = 0;
-        
+
         switch(x) {
             case 1: y++;
             break;
@@ -72,4 +72,3 @@
         return y;
     }
 }
-
diff --git a/dx/tests/087-ssa-local-vars/Blort.java b/dx/tests/087-ssa-local-vars/Blort.java
index f149790..7ce8a91 100644
--- a/dx/tests/087-ssa-local-vars/Blort.java
+++ b/dx/tests/087-ssa-local-vars/Blort.java
@@ -24,7 +24,7 @@
         System.out.println("object -> string (modified)");
         objectArray[4] = new Object();
         try {
-            System.arraycopy(objectArray, 0, stringArray, 0,stringArray.length);        
+            System.arraycopy(objectArray, 0, stringArray, 0,stringArray.length);
         } catch (ArrayStoreException ase) {
             // "ase" is an unused local which still must be preserved
             System.out.println("caught ArrayStoreException (expected)");
@@ -40,7 +40,7 @@
         System.err.println(foo);
     }
     /**
-     * Stolen from 
+     * Stolen from
      * java/android/org/apache/http/impl/io/AbstractMessageParser.java
      * Simplified.
      *
@@ -76,7 +76,7 @@
                     }
                     i++;
                 }
-                if (maxLineLen > 0 
+                if (maxLineLen > 0
                         && previous.length() + 1 + current.length() - i > maxLineLen) {
                     throw new IOException("Maximum line length limit exceeded");
                 }
@@ -92,4 +92,3 @@
         }
     }
 }
-
diff --git a/dx/tests/088-ssa-combine-blocks/Blort.java b/dx/tests/088-ssa-combine-blocks/Blort.java
index 6449883..bf49dbe 100644
--- a/dx/tests/088-ssa-combine-blocks/Blort.java
+++ b/dx/tests/088-ssa-combine-blocks/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     /**
      * just because this should do nothing
@@ -27,7 +27,7 @@
      * a unique predecessor
      */
     void edgeSplitMoveException() {
-        try { 
+        try {
             hashCode();
             hashCode();
         } catch (Throwable tr) {
@@ -42,4 +42,3 @@
         }
     }
 }
-
diff --git a/dx/tests/089-dex-define-object/Object.java b/dx/tests/089-dex-define-object/Object.java
index e4d9e3c..575c736 100644
--- a/dx/tests/089-dex-define-object/Object.java
+++ b/dx/tests/089-dex-define-object/Object.java
@@ -17,15 +17,15 @@
 package java.lang;
 
 public class Object {
-    public Object() { 
+    public Object() {
         // This space intentionally left blank.
     }
 
     public boolean equals(Object o) {
-        return true; 
+        return true;
     }
 
-    protected void finalize() { 
+    protected void finalize() {
         // This space intentionally left blank.
     }
 
@@ -35,7 +35,7 @@
     public final native void notifyAll();
 
     public String toString() {
-        return "blort"; 
+        return "blort";
     }
 
     public final void wait() {
diff --git a/dx/tests/090-dex-unify-arrays/Blort.java b/dx/tests/090-dex-unify-arrays/Blort.java
index 47e1745..507153e 100644
--- a/dx/tests/090-dex-unify-arrays/Blort.java
+++ b/dx/tests/090-dex-unify-arrays/Blort.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-public class Blort 
+public class Blort
 {
     /*
      * Note: The use of the casts after the "?" in the following are
diff --git a/dx/tests/091-ssa-const-collector/Blort.java b/dx/tests/091-ssa-const-collector/Blort.java
index 40626e2..ea99a0d 100644
--- a/dx/tests/091-ssa-const-collector/Blort.java
+++ b/dx/tests/091-ssa-const-collector/Blort.java
@@ -4,7 +4,7 @@
     enum Foo {
         ONE,TWO,THREE,FOUR,FIVE,SIX,SEVEN,EIGHT
     }
-    
+
     /** all uses of 10 should be combined except the local assignment */
     void testNumeric() {
         int foo = 10;
@@ -62,4 +62,3 @@
 
     }
 }
-
diff --git a/dx/tests/092-ssa-cfg-edge-cases/Blort.java b/dx/tests/092-ssa-cfg-edge-cases/Blort.java
index a1f264e..8b3602f 100644
--- a/dx/tests/092-ssa-cfg-edge-cases/Blort.java
+++ b/dx/tests/092-ssa-cfg-edge-cases/Blort.java
@@ -1,6 +1,6 @@
 
 class Blort {
-    
+
     void testMultipleIdenticalSuccessors(int foo) {
         switch(foo) {
             case 1:
@@ -18,4 +18,3 @@
         }
     }
 }
-
diff --git a/dx/tests/093-ssa-invoke-range/Blort.java b/dx/tests/093-ssa-invoke-range/Blort.java
index a75e31f..f2bb66c 100644
--- a/dx/tests/093-ssa-invoke-range/Blort.java
+++ b/dx/tests/093-ssa-invoke-range/Blort.java
@@ -1,10 +1,10 @@
 
 class Blort {
-    
+
     static void methodThatNeedsInvokeRange
         (int a, int b, int c, int d, int e, int f) {
     }
-    
+
     void testNoLocals() {
         methodThatNeedsInvokeRange(5, 0, 5, 0, 5, 0);
     }
@@ -50,7 +50,7 @@
         methodThatNeedsInvokeRange(src, 0, dest, 1, 5, 0);
         methodThatNeedsInvokeRange(dest, 0, src, 1, 5, 0);
     }
-    
+
     // ensure that an attempt to combine registers for a local
     // with a differing category doesn't mess us up.
     long testMixedCategory(boolean foo) {
@@ -67,4 +67,3 @@
         }
     }
 }
-
diff --git a/dx/tests/094-scala-locals/blort.j b/dx/tests/094-scala-locals/blort.j
index 0d3cae5..7c711ef 100644
--- a/dx/tests/094-scala-locals/blort.j
+++ b/dx/tests/094-scala-locals/blort.j
@@ -42,4 +42,3 @@
 end:
     return
 .end method
-
diff --git a/dx/tests/095-dex-const-string-jumbo/run b/dx/tests/095-dex-const-string-jumbo/run
index d984333..a1c7365 100644
--- a/dx/tests/095-dex-const-string-jumbo/run
+++ b/dx/tests/095-dex-const-string-jumbo/run
@@ -39,4 +39,3 @@
 $JAVAC -d . *.java
 dx --debug --dex --no-optimize --positions=none --no-locals \
     --dump-method=Blort.test *.class
-
diff --git a/dx/tests/098-dex-jsr-ret-throw/info.txt b/dx/tests/098-dex-jsr-ret-throw/info.txt
index 41636a2..9dcd39d 100644
--- a/dx/tests/098-dex-jsr-ret-throw/info.txt
+++ b/dx/tests/098-dex-jsr-ret-throw/info.txt
@@ -2,4 +2,3 @@
 It contains an example of a subroutine being exited by a "throw" instruction in 
 such a way that it caused the frame merge and subroutine inliner
 algorithms to not converge. This was bug #1137450.
-
diff --git a/dx/tests/104-verify-return-ops/run b/dx/tests/104-verify-return-ops/run
index 471d490..fbce332 100644
--- a/dx/tests/104-verify-return-ops/run
+++ b/dx/tests/104-verify-return-ops/run
@@ -36,4 +36,3 @@
 oneop sig_ireturn
 oneop sig_lreturn
 oneop sig_return
-
diff --git a/dx/tests/105-verify-load-store-ops/info.txt b/dx/tests/105-verify-load-store-ops/info.txt
index 85b7311..a3a41d6 100644
--- a/dx/tests/105-verify-load-store-ops/info.txt
+++ b/dx/tests/105-verify-load-store-ops/info.txt
@@ -1,3 +1,2 @@
 This tests that load and store opcodes verify that their arguments are
 actually of the appropriate types.
-
diff --git a/dx/tests/111-use-null-as-array/Blort.java b/dx/tests/111-use-null-as-array/Blort.java
index c16684f..79d2b4f 100644
--- a/dx/tests/111-use-null-as-array/Blort.java
+++ b/dx/tests/111-use-null-as-array/Blort.java
@@ -105,4 +105,3 @@
         arr[15] = (short) 16;
     }
 }
-
diff --git a/dx/tests/run-all-tests b/dx/tests/run-all-tests
index 1ade761..68062c2 100755
--- a/dx/tests/run-all-tests
+++ b/dx/tests/run-all-tests
@@ -55,4 +55,3 @@
 for i in $failNames; do
     echo "failed: $i"
 done
-    
diff --git a/hit/src/com/android/hit/ArrayInstance.java b/hit/src/com/android/hit/ArrayInstance.java
index cdb5616..42e8803 100644
--- a/hit/src/com/android/hit/ArrayInstance.java
+++ b/hit/src/com/android/hit/ArrayInstance.java
@@ -24,8 +24,8 @@
     private int mType;
     private int mNumEntries;
     private byte[] mData;
-    
-    public ArrayInstance(long id, StackTrace stack, int type, int numEntries, 
+
+    public ArrayInstance(long id, StackTrace stack, int type, int numEntries,
             byte[] data) {
         mId = id;
         mStack = stack;
@@ -38,17 +38,17 @@
         if (mType != Types.OBJECT) {
             return;
         }
-        
+
         /*
          * mData holds a stream of object instance ids
          * Spin through them all and list ourselves as a reference holder.
          */
         int idSize = Types.getTypeSize(mType);
         final int N = mNumEntries;
-        
+
         ByteArrayInputStream bais = new ByteArrayInputStream(mData);
         DataInputStream dis = new DataInputStream(bais);
-        
+
         for (int i = 0; i < N; i++) {
             long id;
 
@@ -60,7 +60,7 @@
                 }
 
                 Instance instance = state.findReference(id);
-                
+
                 if (instance != null) {
                     instance.addParent(this);
                 }
@@ -81,7 +81,7 @@
         if (resultSet.contains(this)) {
             return;
         }
-        
+
         if (null != filter) {
             if (filter.accept(this)) {
                 resultSet.add(this);
@@ -93,30 +93,30 @@
         if (mType != Types.OBJECT) {
             return;
         }
-        
+
         /*
          * mData holds a stream of object instance ids
          * Spin through them all and visit them
          */
         int idSize = Types.getTypeSize(mType);
         final int N = mNumEntries;
-        
+
         ByteArrayInputStream bais = new ByteArrayInputStream(mData);
         DataInputStream dis = new DataInputStream(bais);
         State state = mHeap.mState;
-        
+
         for (int i = 0; i < N; i++) {
             long id;
-            
+
             try {
                 if (idSize == 4) {
                     id = dis.readInt();
                 } else {
                     id = dis.readLong();
                 }
-                
+
                 Instance instance = state.findReference(id);
-                
+
                 if (instance != null) {
                     instance.visit(resultSet, filter);
                 }
@@ -141,48 +141,48 @@
         if (mType != Types.OBJECT) {
             return super.describeReferenceTo(referent);
         }
-        
+
         int idSize = Types.getTypeSize(mType);
         final int N = mNumEntries;
         int numRefs = 0;
         StringBuilder result = new StringBuilder("Elements [");
         ByteArrayInputStream bais = new ByteArrayInputStream(mData);
         DataInputStream dis = new DataInputStream(bais);
-        
+
         /*
          * Spin through all the objects and build up a string describing
          * all of the array elements that refer to the target object.
          */
         for (int i = 0; i < N; i++) {
             long id;
-            
+
             try {
                 if (idSize == 4) {
                     id = dis.readInt();
                 } else {
                     id = dis.readLong();
                 }
-                
+
                 if (id == referent) {
                     numRefs++;
-                    
+
                     if (numRefs > 1) {
                         result.append(", ");
                     }
-                    
+
                     result.append(i);
                 }
             } catch (java.io.IOException e) {
                 e.printStackTrace();
             }
         }
-        
+
         if (numRefs == 0) {
             return super.describeReferenceTo(referent);
         }
 
         result.append("]");
-        
+
         return result.toString();
     }
 }
diff --git a/hit/src/com/android/hit/ClassInstance.java b/hit/src/com/android/hit/ClassInstance.java
index 36525be..0869769 100644
--- a/hit/src/com/android/hit/ClassInstance.java
+++ b/hit/src/com/android/hit/ClassInstance.java
@@ -29,7 +29,7 @@
         mStack = stack;
         mClassId = classId;
     }
-    
+
     public final void loadFieldData(DataInputStream in, int numBytes)
             throws IOException {
         mFieldValues = new byte[numBytes];
@@ -44,7 +44,7 @@
         resolve(state, isa, isa.mFieldTypes, mFieldValues);
     }
 
-    private void resolve(State state, ClassObj isa, int[] types, 
+    private void resolve(State state, ClassObj isa, int[] types,
             byte[] values) {
         ByteArrayInputStream bais = new ByteArrayInputStream(values);
         DataInputStream dis = new DataInputStream(bais);
@@ -61,15 +61,15 @@
 
                     if (type == Types.OBJECT) {
                         long id;
-                        
+
                         if (size == 4) {
                             id = dis.readInt();
                         } else {
                             id = dis.readLong();
                         }
-                        
+
                         Instance instance = state.findReference(id);
-                        
+
                         if (instance != null) {
                             instance.addParent(this);
                         }
@@ -85,7 +85,7 @@
     @Override
     public final int getSize() {
         ClassObj isa = mHeap.mState.findClass(mClassId);
-        
+
         return isa.getSize();
     }
 
@@ -94,7 +94,7 @@
         if (resultSet.contains(this)) {
             return;
         }
-        
+
         if (filter != null) {
             if (filter.accept(this)) {
                 resultSet.add(this);
@@ -109,7 +109,7 @@
         ByteArrayInputStream bais = new ByteArrayInputStream(mFieldValues);
         DataInputStream dis = new DataInputStream(bais);
         final int N = types.length;
-        
+
         /*
          * Spin through the list of fields, find all object references,
          * and list ourselves as a reference holder.
@@ -118,18 +118,18 @@
             for (int i = 0; i < N; i++) {
                 int type = types[i];
                 int size = Types.getTypeSize(type);
-                
+
                 if (type == Types.OBJECT) {
                     long id;
-                    
+
                     if (size == 4) {
                         id = dis.readInt();
                     } else {
                         id = dis.readLong();
                     }
-                    
+
                     Instance instance = state.findReference(id);
-                    
+
                     if (instance != null) {
                         instance.visit(resultSet, filter);
                     }
@@ -145,7 +145,7 @@
     @Override
     public final String getTypeName() {
         ClassObj theClass = mHeap.mState.findClass(mClassId);
-        
+
         return theClass.mClassName;
     }
 
@@ -163,7 +163,7 @@
         final int N = types.length;
         StringBuilder result = new StringBuilder("Referenced in field(s):");
         int numReferences = 0;
-        
+
         /*
          * Spin through the list of fields, add info about the field
          * references to the output text.
@@ -172,16 +172,16 @@
             for (int i = 0; i < N; i++) {
                 int type = types[i];
                 int size = Types.getTypeSize(type);
-                
+
                 if (type == Types.OBJECT) {
                     long id;
-                    
+
                     if (size == 4) {
                         id = dis.readInt();
                     } else {
                         id = dis.readLong();
                     }
-                    
+
                     if (id == referent) {
                         numReferences++;
                         result.append("\n    ");
@@ -202,7 +202,7 @@
         if (numReferences == 0) {
             return super.describeReferenceTo(referent);
         }
-        
+
         return result.toString();
     }
 }
diff --git a/hit/src/com/android/hit/ClassObj.java b/hit/src/com/android/hit/ClassObj.java
index 388af4a..1e3ac28 100644
--- a/hit/src/com/android/hit/ClassObj.java
+++ b/hit/src/com/android/hit/ClassObj.java
@@ -51,7 +51,7 @@
         DataInputStream dis = new DataInputStream(bais);
         int[] types = mStaticFieldTypes;
         final int N = types.length;
-        
+
         /*
          * Spin through the list of static fields, find all object references,
          * and list ourselves as a reference holder.  Also add them to
@@ -61,18 +61,18 @@
             for (int i = 0; i < N; i++) {
                 int type = types[i];
                 int size = Types.getTypeSize(type);
-                
+
                 if (type == Types.OBJECT) {
                     long id;
-                    
+
                     if (size == 4) {
                         id = dis.readInt();
                     } else {
                         id = dis.readLong();
                     }
-                    
+
                     RootObj root = new RootObj(RootType.JAVA_STATIC, id);
-                    
+
                     if (id == 0) {
                         root.mComment = String.format(
                             "Static field %s:%s null",
@@ -80,9 +80,9 @@
                                 mStaticFieldNames[i]);
                     } else {
                         Instance instance = state.findReference(id);
-                        
+
                         instance.addParent(this);
-                        
+
                         root.mComment = String.format(
                             "Static field %s:%s %s [%s] 0x%08x",
                                 mClassName,
@@ -105,7 +105,7 @@
         //  Lastly, add ourself as a subclass of our superclass
         if (mSuperclassId != 0) {
             ClassObj superclass = state.findClass(mSuperclassId);
-            
+
             superclass.addSubclass(this);
         }
     }
@@ -135,7 +135,7 @@
     public final void setFieldNames(String[] names) {
         mFieldNames = names;
     }
-    
+
     public final void setFieldTypes(int[] types) {
         mFieldTypes = types;
     }
@@ -143,11 +143,11 @@
     public final void setStaticFieldNames(String[] names) {
         mStaticFieldNames = names;
     }
-    
+
     public final void setStaticFieldTypes(int[] types) {
         mStaticFieldTypes = types;
     }
-    
+
     public final void setStaticFieldValues(byte[] values) {
         mStaticFieldValues = values;
     }
@@ -156,14 +156,14 @@
         System.out.println("+----------  ClassObj dump for: " + mClassName);
 
         System.out.println("+-----  Static fields");
-        
+
         for (int i = 0; i < mStaticFieldNames.length; i++) {
-            System.out.println(mStaticFieldNames[i] + ": " 
+            System.out.println(mStaticFieldNames[i] + ": "
                 + mStaticFieldTypes[i]);
         }
 
         System.out.println("+-----  Instance fields");
-        
+
         for (int i = 0; i < mFieldNames.length; i++) {
             System.out.println(mFieldNames[i] + ": " + mFieldTypes[i]);
         }
@@ -179,7 +179,7 @@
         if (resultSet.contains(this)) {
             return;
         }
-        
+
         if (filter != null) {
             if (filter.accept(this)) {
                 resultSet.add(this);
@@ -187,14 +187,14 @@
         } else {
             resultSet.add(this);
         }
-        
+
         ByteArrayInputStream bais =
             new ByteArrayInputStream(mStaticFieldValues);
         DataInputStream dis = new DataInputStream(bais);
         int[] types = mStaticFieldTypes;
         final int N = types.length;
         State state = mHeap.mState;
-        
+
         /*
          * Spin through the list of static fields, find all object references,
          * and visit them.
@@ -203,18 +203,18 @@
             for (int i = 0; i < N; i++) {
                 int type = types[i];
                 int size = Types.getTypeSize(type);
-                
+
                 if (type == Types.OBJECT) {
                     long id;
-                    
+
                     if (size == 4) {
                         id = dis.readInt();
                     } else {
                         id = dis.readLong();
                     }
-                    
+
                     Instance instance = state.findReference(id);
-                    
+
                     if (instance != null) {
                         instance.visit(resultSet, filter);
                     }
@@ -235,7 +235,7 @@
         if (! (o instanceof ClassObj)) {
             return false;
         }
-        
+
         return 0 == compareTo((ClassObj) o);
     }
 }
diff --git a/hit/src/com/android/hit/Heap.java b/hit/src/com/android/hit/Heap.java
index 82dde8e..37b15dd 100644
--- a/hit/src/com/android/hit/Heap.java
+++ b/hit/src/com/android/hit/Heap.java
@@ -21,16 +21,16 @@
 
 public class Heap {
     String mName;
-    
+
     //  List of individual stack frames
     HashMap<Long, StackFrame> mFrames = new HashMap<Long, StackFrame>();
-    
+
     //  List stack traces, which are lists of stack frames
     HashMap<Integer, StackTrace> mTraces = new HashMap<Integer, StackTrace>();
-    
+
     //  Root objects such as interned strings, jni locals, etc
     ArrayList<RootObj> mRoots = new ArrayList<RootObj>();
-    
+
     //  List of threads
     HashMap<Integer, ThreadObj> mThreads = new HashMap<Integer, ThreadObj>();
 
@@ -47,7 +47,7 @@
     public Heap(String name) {
         mName = name;
     }
-    
+
     public final void addStackFrame(StackFrame theFrame) {
         mFrames.put(theFrame.mId, theFrame);
     }
@@ -64,14 +64,14 @@
         return mTraces.get(traceSerialNumber);
     }
 
-    public final StackTrace getStackTraceAtDepth(int traceSerialNumber, 
+    public final StackTrace getStackTraceAtDepth(int traceSerialNumber,
             int depth) {
         StackTrace trace = mTraces.get(traceSerialNumber);
-        
+
         if (trace != null) {
             trace = trace.fromDepth(depth);
         }
-        
+
         return trace;
     }
 
@@ -83,7 +83,7 @@
     public final void addThread(ThreadObj thread, int serialNumber) {
         mThreads.put(serialNumber, thread);
     }
-    
+
     public final ThreadObj getThread(int serialNumber) {
         return mThreads.get(serialNumber);
     }
@@ -91,7 +91,7 @@
     public final void addInstance(long id, Instance instance) {
         mInstances.put(id, instance);
     }
-    
+
     public final Instance getInstance(long id) {
         return mInstances.get(id);
     }
@@ -100,7 +100,7 @@
         mClassesById.put(id, theClass);
         mClassesByName.put(theClass.mClassName, theClass);
     }
-    
+
     public final ClassObj getClass(long id) {
         return mClassesById.get(id);
     }
@@ -112,7 +112,7 @@
     public final void dumpInstanceCounts() {
         for (ClassObj theClass: mClassesById.values()) {
             int count = theClass.mInstances.size();
-            
+
             if (count > 0) {
                 System.out.println(theClass + ": " + count);
             }
@@ -122,18 +122,18 @@
     public final void dumpSubclasses() {
         for (ClassObj theClass: mClassesById.values()) {
             int count = theClass.mSubclasses.size();
-            
+
             if (count > 0) {
                 System.out.println(theClass);
                 theClass.dumpSubclasses();
             }
         }
     }
-    
+
     public final void dumpSizes() {
         for (ClassObj theClass: mClassesById.values()) {
             int size = 0;
-            
+
             for (Instance instance: theClass.mInstances) {
                 size += instance.getCompositeSize();
             }
@@ -144,7 +144,7 @@
             }
         }
     }
-    
+
     /*
      * Spin through all of the class instances and link them to their
      * parent class definition objects.  Then have each instance resolve
@@ -161,11 +161,11 @@
             String name = theClass.mClassName;
             String superclassName = "none";
             ClassObj superClass = mClassesById.get(theClass.mSuperclassId);
-            
+
             if (superClass != null) {
                 superclassName = superClass.mClassName;
             }
-            
+
             theClass.addInstance(instance);
             instance.resolveReferences(state);
         }
diff --git a/hit/src/com/android/hit/HprofParser.java b/hit/src/com/android/hit/HprofParser.java
index 2226001..98fef1e 100644
--- a/hit/src/com/android/hit/HprofParser.java
+++ b/hit/src/com/android/hit/HprofParser.java
@@ -53,7 +53,7 @@
     private static final int ROOT_INSTANCE_DUMP         =   0x21;
     private static final int ROOT_OBJECT_ARRAY_DUMP     =   0x22;
     private static final int ROOT_PRIMITIVE_ARRAY_DUMP  =   0x23;
-    
+
     /**
      * Android format addition
      *
@@ -63,7 +63,7 @@
      * associated with the specified heap.  The HEAP_DUMP_INFO data is reset
      * at the end of the HEAP_DUMP[_SEGMENT].  Multiple HEAP_DUMP_INFO entries
      * may appear in a single HEAP_DUMP[_SEGMENT].
-     * 
+     *
      * Format:
      *     u1: Tag value (0xFE)
      *     u4: heap ID
@@ -103,12 +103,12 @@
         try {
             String  s = readNullTerminatedString();
             DataInputStream in = mInput;
-            
+
             mIdSize = in.readInt();
             Types.setIdSize(mIdSize);
-            
+
             in.readLong();  //  Timestamp, ignored for now
-            
+
             while (true) {
                 int tag = in.readUnsignedByte();
                 int timestamp = in.readInt();
@@ -118,7 +118,7 @@
                     case STRING_IN_UTF8:
                         loadString(length - 4);
                         break;
-                    
+
                     case LOAD_CLASS:
                         loadClass();
                         break;
@@ -135,7 +135,7 @@
                         loadHeapDump(length);
                         mState.setToDefaultHeap();
                         break;
-                        
+
                     case HEAP_DUMP_SEGMENT:
                         loadHeapDump(length);
                         mState.setToDefaultHeap();
@@ -153,7 +153,7 @@
         }
 
         mState.resolveReferences();
-        
+
         return state;
     }
 
@@ -164,7 +164,7 @@
         for (int c = in.read(); c != 0; c = in.read()) {
             s.append((char) c);
         }
-        
+
         return s.toString();
     }
 
@@ -175,13 +175,13 @@
             case 4: return ((long) mInput.readInt()) & 0x00000000ffffffffL;
             case 8: return mInput.readLong();
         }
-        
+
         throw new IllegalArgumentException("ID Length must be 1, 2, 4, or 8");
     }
 
     private String readUTF8(int length) throws IOException {
         byte[] b = new byte[length];
-        
+
         mInput.read(b);
 
         return new String(b, "utf-8");
@@ -190,7 +190,7 @@
     private void loadString(int length) throws IOException {
         long id = readId();
         String string = readUTF8(length);
-        
+
         mStrings.put(id, string);
     }
 
@@ -200,7 +200,7 @@
         long id = readId();
         int stackTrace = in.readInt();              //  unused
         String name = mStrings.get(readId());
-        
+
         mClassNames.put(id, name);
     }
 
@@ -211,8 +211,8 @@
         String sourceFile = mStrings.get(readId());
         int serial = mInput.readInt();
         int lineNumber = mInput.readInt();
-        
-        StackFrame frame = new StackFrame(id, methodName, methodSignature, 
+
+        StackFrame frame = new StackFrame(id, methodName, methodSignature,
             sourceFile, serial, lineNumber);
 
         mState.addStackFrame(frame);
@@ -223,12 +223,12 @@
         int threadSerialNumber = mInput.readInt();
         final int numFrames = mInput.readInt();
         StackFrame[] frames = new StackFrame[numFrames];
-        
+
         for (int i = 0; i < numFrames; i++) {
             frames[i] = mState.getStackFrame(readId());
         }
-        
-        StackTrace trace = new StackTrace(serialNumber, threadSerialNumber, 
+
+        StackTrace trace = new StackTrace(serialNumber, threadSerialNumber,
             frames);
 
         mState.addStackTrace(trace);
@@ -236,62 +236,62 @@
 
     private void loadHeapDump(int length) throws IOException {
         DataInputStream in = mInput;
-        
+
         while (length > 0) {
             int tag = in.readUnsignedByte();
             length--;
-            
+
             switch (tag) {
                 case ROOT_UNKNOWN:
                     length -= loadBasicObj(RootType.UNKNOWN);
                     break;
-                    
+
                 case ROOT_JNI_GLOBAL:
                     length -= loadBasicObj(RootType.NATIVE_STATIC);
                     readId();   //  ignored
                     length -= mIdSize;
                     break;
-                    
+
                 case ROOT_JNI_LOCAL:
                     length -= loadJniLocal();
                     break;
-                    
+
                 case ROOT_JAVA_FRAME:
                     length -= loadJavaFrame();
                     break;
-                    
+
                 case ROOT_NATIVE_STACK:
                     length -= loadNativeStack();
                     break;
-                    
+
                 case ROOT_STICKY_CLASS:
                     length -= loadBasicObj(RootType.SYSTEM_CLASS);
                     break;
-                    
+
                 case ROOT_THREAD_BLOCK:
                     length -= loadThreadBlock();
                     break;
-                    
+
                 case ROOT_MONITOR_USED:
                     length -= loadBasicObj(RootType.BUSY_MONITOR);
                     break;
-                    
+
                 case ROOT_THREAD_OBJECT:
                     length -= loadThreadObject();
                     break;
-                    
+
                 case ROOT_CLASS_DUMP:
                     length -= loadClassDump();
                     break;
-                    
+
                 case ROOT_INSTANCE_DUMP:
                     length -= loadInstanceDump();
                     break;
-                    
+
                 case ROOT_OBJECT_ARRAY_DUMP:
                     length -= loadObjectArrayDump();
                     break;
-                    
+
                 case ROOT_PRIMITIVE_ARRAY_DUMP:
                     length -= loadPrimitiveArrayDump();
                     break;
@@ -302,66 +302,66 @@
 
                     throw new IllegalArgumentException(
                         "Don't know how to load a nodata array");
-                
+
                 case ROOT_HEAP_DUMP_INFO:
                     int heapId = mInput.readInt();
                     long heapNameId = readId();
                     String heapName = mStrings.get(heapNameId);
-                    
+
                     mState.setHeapTo(heapId, heapName);
                     length -= 4 + mIdSize;
                     break;
-                
+
                 case ROOT_INTERNED_STRING:
                     length -= loadBasicObj(RootType.INTERNED_STRING);
                     break;
-                    
+
                 case ROOT_FINALIZING:
                     length -= loadBasicObj(RootType.FINALIZING);
                     break;
-                    
+
                 case ROOT_DEBUGGER:
                     length -= loadBasicObj(RootType.DEBUGGER);
                     break;
-                    
+
                 case ROOT_REFERENCE_CLEANUP:
                     length -= loadBasicObj(RootType.REFERENCE_CLEANUP);
                     break;
-                    
+
                 case ROOT_VM_INTERNAL:
                     length -= loadBasicObj(RootType.VM_INTERNAL);
                     break;
-                    
+
                 case ROOT_JNI_MONITOR:
                     length -= loadJniMonitor();
                     break;
-                    
+
                 case ROOT_UNREACHABLE:
                     length -= loadBasicObj(RootType.UNREACHABLE);
                     break;
-                    
+
                 default:
                     throw new IllegalArgumentException(
-                        "loadHeapDump loop with unknown tag " + tag 
-                        + " with " + mInput.available() 
+                        "loadHeapDump loop with unknown tag " + tag
+                        + " with " + mInput.available()
                         + " bytes possibly remaining");
             }
         }
     }
-    
+
     private int loadJniLocal() throws IOException {
         long id = readId();
         int threadSerialNumber = mInput.readInt();
         int stackFrameNumber = mInput.readInt();
         ThreadObj thread = mState.getThread(threadSerialNumber);
-        StackTrace trace = mState.getStackTraceAtDepth(thread.mStackTrace, 
+        StackTrace trace = mState.getStackTraceAtDepth(thread.mStackTrace,
             stackFrameNumber);
-        RootObj root = new RootObj(RootType.NATIVE_LOCAL, id, 
+        RootObj root = new RootObj(RootType.NATIVE_LOCAL, id,
             threadSerialNumber, trace);
-        
+
         root.setHeap(mState.mCurrentHeap);
         mState.addRoot(root);
-        
+
         return mIdSize + 4 + 4;
     }
 
@@ -370,38 +370,38 @@
         int threadSerialNumber = mInput.readInt();
         int stackFrameNumber = mInput.readInt();
         ThreadObj thread = mState.getThread(threadSerialNumber);
-        StackTrace trace = mState.getStackTraceAtDepth(thread.mStackTrace, 
+        StackTrace trace = mState.getStackTraceAtDepth(thread.mStackTrace,
             stackFrameNumber);
-        RootObj root = new RootObj(RootType.JAVA_LOCAL, id, threadSerialNumber, 
+        RootObj root = new RootObj(RootType.JAVA_LOCAL, id, threadSerialNumber,
             trace);
-        
+
         root.setHeap(mState.mCurrentHeap);
         mState.addRoot(root);
-        
+
         return mIdSize + 4 + 4;
     }
-    
+
     private int loadNativeStack() throws IOException {
         long id = readId();
         int threadSerialNumber = mInput.readInt();
         ThreadObj thread = mState.getThread(threadSerialNumber);
         StackTrace trace = mState.getStackTrace(thread.mStackTrace);
-        RootObj root = new RootObj(RootType.NATIVE_STACK, id, 
+        RootObj root = new RootObj(RootType.NATIVE_STACK, id,
             threadSerialNumber, trace);
-        
+
         root.setHeap(mState.mCurrentHeap);
         mState.addRoot(root);
-        
+
         return mIdSize + 4;
     }
 
     private int loadBasicObj(RootType type) throws IOException {
         long id = readId();
         RootObj root = new RootObj(type, id);
-        
+
         root.setHeap(mState.mCurrentHeap);
         mState.addRoot(root);
-        
+
         return mIdSize;
     }
 
@@ -410,12 +410,12 @@
         int threadSerialNumber = mInput.readInt();
         ThreadObj thread = mState.getThread(threadSerialNumber);
         StackTrace stack = mState.getStackTrace(thread.mStackTrace);
-        RootObj root = new RootObj(RootType.THREAD_BLOCK, id, 
+        RootObj root = new RootObj(RootType.THREAD_BLOCK, id,
             threadSerialNumber, stack);
-        
+
         root.setHeap(mState.mCurrentHeap);
         mState.addRoot(root);
-        
+
         return mIdSize + 4;
     }
 
@@ -424,9 +424,9 @@
         int threadSerialNumber = mInput.readInt();
         int stackSerialNumber = mInput.readInt();
         ThreadObj thread = new ThreadObj(id, stackSerialNumber);
-        
+
         mState.addThread(thread, threadSerialNumber);
-        
+
         return mIdSize + 4 + 4;
     }
 
@@ -449,7 +449,7 @@
         //  Skip over the constant pool
         int numEntries = in.readUnsignedShort();
         bytesRead += 2;
-        
+
         for (int i = 0; i < numEntries; i++) {
             in.readUnsignedShort();
             bytesRead += 2 + skipValue();
@@ -463,7 +463,7 @@
         int[] staticFieldTypes = new int[numEntries];
         ByteArrayOutputStream staticFieldValues = new ByteArrayOutputStream();
         byte[] buffer = mFieldBuffer;
-        
+
         for (int i = 0; i < numEntries; i++) {
             staticFieldNames[i] = mStrings.get(readId());
 
@@ -476,14 +476,14 @@
 
             bytesRead += mIdSize + 1 + fieldSize;
         }
-        
+
         //  Instance fields
         numEntries = in.readUnsignedShort();
         bytesRead += 2;
-        
+
         String[] names = new String[numEntries];
         int[] types = new int[numEntries];
-        
+
         for (int i = 0; i < numEntries; i++) {
             long fieldName = readId();
             int type = in.readUnsignedByte();
@@ -493,7 +493,7 @@
 
             bytesRead += mIdSize + 1;
         }
-        
+
         ClassObj theClass = new ClassObj(id, stack, mClassNames.get(id));
 
         theClass.setStaticFieldNames(staticFieldNames);
@@ -504,11 +504,11 @@
         theClass.setFieldNames(names);
         theClass.setFieldTypes(types);
         theClass.setSize(instanceSize);
-        
+
         theClass.setHeap(mState.mCurrentHeap);
 
         mState.addClass(id, theClass);
-        
+
         return bytesRead;
     }
 
@@ -523,7 +523,7 @@
         instance.loadFieldData(mInput, remaining);
         instance.setHeap(mState.mCurrentHeap);
         mState.addInstance(id, instance);
-        
+
         return mIdSize + 4 + mIdSize + 4 + remaining;
     }
 
@@ -536,19 +536,19 @@
         int totalBytes = numElements * mIdSize;
         byte[] data = new byte[totalBytes];
         String className = mClassNames.get(classId);
-        
+
         mInput.readFully(data);
 
-        ArrayInstance array = new ArrayInstance(id, stack, Types.OBJECT, 
+        ArrayInstance array = new ArrayInstance(id, stack, Types.OBJECT,
             numElements, data);
-        
+
         array.mClassId = classId;
         array.setHeap(mState.mCurrentHeap);
         mState.addInstance(id, array);
 
         return mIdSize + 4 + 4 + mIdSize + totalBytes;
     }
-    
+
     private int loadPrimitiveArrayDump() throws IOException {
         long id = readId();
         int stackId = mInput.readInt();
@@ -558,15 +558,15 @@
         int size = Types.getTypeSize(type);
         int totalBytes = numElements * size;
         byte[] data = new byte[totalBytes];
-        
+
         mInput.readFully(data);
 
-        ArrayInstance array = new ArrayInstance(id, stack, type, numElements, 
+        ArrayInstance array = new ArrayInstance(id, stack, type, numElements,
             data);
-        
+
         array.setHeap(mState.mCurrentHeap);
         mState.addInstance(id, array);
-        
+
         return mIdSize + 4 + 4 + 1 + totalBytes;
     }
 
@@ -575,21 +575,21 @@
         int threadSerialNumber = mInput.readInt();
         int stackDepth = mInput.readInt();
         ThreadObj thread = mState.getThread(threadSerialNumber);
-        StackTrace trace = mState.getStackTraceAtDepth(thread.mStackTrace, 
+        StackTrace trace = mState.getStackTraceAtDepth(thread.mStackTrace,
             stackDepth);
-        RootObj root = new RootObj(RootType.NATIVE_MONITOR, id, 
+        RootObj root = new RootObj(RootType.NATIVE_MONITOR, id,
             threadSerialNumber, trace);
-        
+
         root.setHeap(mState.mCurrentHeap);
         mState.addRoot(root);
-        
+
         return mIdSize + 4 + 4;
     }
 
     private int skipValue() throws IOException {
         int type = mInput.readUnsignedByte();
         int size = Types.getTypeSize(type);
-        
+
         skipFully(size);
 
         return size + 1;
@@ -604,7 +604,7 @@
     private void skipFully(long numBytes) throws IOException {
         while (numBytes > 0) {
             long skipped = mInput.skip(numBytes);
-            
+
             numBytes -= skipped;
         }
     }
diff --git a/hit/src/com/android/hit/Instance.java b/hit/src/com/android/hit/Instance.java
index 24db38d..6afa2b2 100644
--- a/hit/src/com/android/hit/Instance.java
+++ b/hit/src/com/android/hit/Instance.java
@@ -25,10 +25,10 @@
 
     //  Id of the ClassObj of which this object is an instance
     long mClassId;
-    
+
     //  The stack in which this object was allocated
     StackTrace mStack;
-    
+
     //  The heap in which this object was allocated (app, zygote, etc)
     Heap mHeap;
 
@@ -41,7 +41,7 @@
 
     //  List of all objects that hold a live reference to this object
     private ArrayList<Instance> mParents;
-    
+
     /*
      * After the whole HPROF file is read and parsed this method will be
      * called on all heap objects so that they can resolve their internal
@@ -67,15 +67,15 @@
 
     public final int getCompositeSize() {
         HashSet<Instance> set = new HashSet<Instance>();
-        
+
         visit(set, null);
-        
+
         int size = 0;
-        
+
         for (Instance instance: set) {
             size += instance.getSize();
         }
-        
+
         return size;
     }
 
@@ -89,21 +89,21 @@
     public void setHeap(Heap heap) {
         mHeap = heap;
     }
-    
+
     //  Add to the list of objects that have a hard reference to this Instance
     public void addParent(Instance parent) {
         if (mParents == null) {
             mParents = new ArrayList<Instance>();
         }
-        
+
         mParents.add(parent);
     }
-    
+
     public ArrayList<Instance> getParents() {
         if (mParents == null) {
             mParents = new ArrayList<Instance>();
         }
-        
+
         return mParents;
     }
 
@@ -112,6 +112,6 @@
      * a String describing the reference in detail.
      */
     public String describeReferenceTo(long id) {
-        return "No reference to 0x" + Long.toHexString(id); 
+        return "No reference to 0x" + Long.toHexString(id);
     }
 }
diff --git a/hit/src/com/android/hit/Main.java b/hit/src/com/android/hit/Main.java
index eebadfe..4ed5c11 100644
--- a/hit/src/com/android/hit/Main.java
+++ b/hit/src/com/android/hit/Main.java
@@ -28,16 +28,16 @@
         FileInputStream fis;
         BufferedInputStream bis;
         DataInputStream dis;
-        
+
         try {
             fis = new FileInputStream(argv[0]);
             bis = new BufferedInputStream(fis);
             dis = new DataInputStream(bis);
-            
+
             State state = (new HprofParser(dis)).parse();
 
             dis.close();
-            
+
             testClassesQuery(state);
             testAllClassesQuery(state);
             testFindInstancesOf(state);
@@ -53,28 +53,28 @@
             "javax.",
             "org.xml.sax"
         };
-        
+
         Map<String, Set<ClassObj>> someClasses = Queries.classes(state, x);
-        
+
         for (String thePackage: someClasses.keySet()) {
             System.out.println("------------------- " + thePackage);
-            
+
             Set<ClassObj> classes = someClasses.get(thePackage);
-            
+
             for (ClassObj theClass: classes) {
                 System.out.println("     " + theClass.mClassName);
             }
         }
     }
-    
+
     private static void testAllClassesQuery(State state) {
         Map<String, Set<ClassObj>> allClasses = Queries.allClasses(state);
-        
+
         for (String thePackage: allClasses.keySet()) {
             System.out.println("------------------- " + thePackage);
-            
+
             Set<ClassObj> classes = allClasses.get(thePackage);
-            
+
             for (ClassObj theClass: classes) {
                 System.out.println("     " + theClass.mClassName);
             }
@@ -83,14 +83,14 @@
 
     private static void testFindInstancesOf(State state) {
         Instance[] instances = Queries.instancesOf(state, "java.lang.String");
-        
+
         System.out.println("There are " + instances.length + " Strings.");
     }
 
     private static void testFindAllInstancesOf(State state) {
-        Instance[] instances = Queries.allInstancesOf(state, 
+        Instance[] instances = Queries.allInstancesOf(state,
             "android.graphics.drawable.Drawable");
-        
+
         System.out.println("There are " + instances.length
             + " instances of Drawables and its subclasses.");
     }
diff --git a/hit/src/com/android/hit/Queries.java b/hit/src/com/android/hit/Queries.java
index cc692b0..0dac796 100644
--- a/hit/src/com/android/hit/Queries.java
+++ b/hit/src/com/android/hit/Queries.java
@@ -27,7 +27,7 @@
 
 public class Queries {
     /*
-     * NOTES:  Here's a list of the queries that can be done in hat and 
+     * NOTES:  Here's a list of the queries that can be done in hat and
      * how you'd perform a similar query here in hit:
      *
      * hat                      hit
@@ -67,7 +67,7 @@
         return classes(state, null);
     }
 
-    public static Map<String, Set<ClassObj>> classes(State state, 
+    public static Map<String, Set<ClassObj>> classes(State state,
             String[] excludedPrefixes) {
         TreeMap<String, Set<ClassObj>> result =
         new TreeMap<String, Set<ClassObj>>();
@@ -78,16 +78,16 @@
         for (Heap heap: state.mHeaps.values()) {
             classes.addAll(heap.mClassesById.values());
         }
-        
+
         //  Filter it if needed
         if (excludedPrefixes != null) {
             final int N = excludedPrefixes.length;
             Iterator<ClassObj> iter = classes.iterator();
-            
+
             while (iter.hasNext()) {
                 ClassObj theClass = iter.next();
                 String classPath = theClass.toString();
-                
+
                 for (int i = 0; i < N; i++) {
                     if (classPath.startsWith(excludedPrefixes[i])) {
                         iter.remove();
@@ -96,29 +96,29 @@
                 }
             }
         }
-        
+
         //  Now that we have a final list of classes, group them by package
         for (ClassObj theClass: classes) {
             String packageName = DEFAULT_PACKAGE;
             int lastDot = theClass.mClassName.lastIndexOf('.');
-            
+
             if (lastDot != -1) {
                 packageName = theClass.mClassName.substring(0, lastDot);
             }
-            
+
             Set<ClassObj> classSet = result.get(packageName);
-            
+
             if (classSet == null) {
                 classSet = new TreeSet<ClassObj>();
                 result.put(packageName, classSet);
             }
-            
+
             classSet.add(theClass);
         }
-        
+
         return result;
     }
-    
+
     /*
      * It's sorta sad that this is a pass-through call, but it seems like
      * having all of the hat-like query methods in one place is a good thing
@@ -134,14 +134,14 @@
      */
      public static Instance[] instancesOf(State state, String baseClassName) {
          ClassObj theClass = state.findClass(baseClassName);
-         
+
          if (theClass == null) {
              throw new IllegalArgumentException("Class not found: "
                 + baseClassName);
          }
-         
+
          Instance[] instances = new Instance[theClass.mInstances.size()];
-         
+
          return theClass.mInstances.toArray(instances);
      }
 
@@ -151,38 +151,38 @@
      */
     public static Instance[] allInstancesOf(State state, String baseClassName) {
         ClassObj theClass = state.findClass(baseClassName);
-        
+
         if (theClass == null) {
             throw new IllegalArgumentException("Class not found: "
                 + baseClassName);
         }
 
         ArrayList<ClassObj> classList = new ArrayList<ClassObj>();
-        
+
         classList.add(theClass);
         classList.addAll(traverseSubclasses(theClass));
-        
+
         ArrayList<Instance> instanceList = new ArrayList<Instance>();
-        
+
         for (ClassObj someClass: classList) {
             instanceList.addAll(someClass.mInstances);
         }
-        
+
         Instance[] result = new Instance[instanceList.size()];
-        
+
         instanceList.toArray(result);
-        
+
         return result;
     }
-    
+
     private static ArrayList<ClassObj> traverseSubclasses(ClassObj base) {
         ArrayList<ClassObj> result = new ArrayList<ClassObj>();
-        
+
         for (ClassObj subclass: base.mSubclasses) {
             result.add(subclass);
             result.addAll(traverseSubclasses(subclass));
         }
-        
+
         return result;
     }
 
@@ -192,33 +192,33 @@
      */
     public static Instance findObject(State state, String id) {
         long id2 = Long.parseLong(id, 16);
-        
+
         return state.findReference(id2);
     }
 
     public static Collection<RootObj> getRoots(State state) {
         HashSet<RootObj> result = new HashSet<RootObj>();
-        
+
         for (Heap heap: state.mHeaps.values()) {
             result.addAll(heap.mRoots);
         }
-        
+
         return result;
     }
 
     public static final Instance[] newInstances(State older, State newer) {
         ArrayList<Instance> resultList = new ArrayList<Instance>();
-        
+
         for (Heap newHeap: newer.mHeaps.values()) {
             Heap oldHeap = older.getHeap(newHeap.mName);
-            
+
             if (oldHeap == null) {
                 continue;
             }
-            
+
             for (Instance instance: newHeap.mInstances.values()) {
                 Instance oldInstance = oldHeap.getInstance(instance.mId);
-                
+
                 /*
                  * If this instance wasn't in the old heap, or was there,
                  * but that ID was for an obj of a different type, then we have
@@ -231,9 +231,9 @@
                 }
             }
         }
-        
+
         Instance[] resultArray = new Instance[resultList.size()];
-        
+
         return resultList.toArray(resultArray);
     }
 }
diff --git a/hit/src/com/android/hit/RootObj.java b/hit/src/com/android/hit/RootObj.java
index 1f9d539..a9acd35 100644
--- a/hit/src/com/android/hit/RootObj.java
+++ b/hit/src/com/android/hit/RootObj.java
@@ -37,7 +37,7 @@
     public RootObj(RootType type, long id) {
         this(type, id, 0, null);
     }
-    
+
     public RootObj(RootType type, long id, int thread, StackTrace stack) {
         mType = type;
         mId = id;
@@ -47,7 +47,7 @@
 
     public final String getClassName(State state) {
         ClassObj theClass;
-        
+
         if (mType == RootType.SYSTEM_CLASS) {
             theClass = state.findClass(mId);
         } else {
@@ -59,24 +59,24 @@
         if (theClass == null) {
             return "no class defined!!";
         }
-        
+
         return theClass.mClassName;
     }
 
     @Override
     public final int getSize() {
         Instance instance = null;
-        
+
         if (mType == RootType.SYSTEM_CLASS) {
             instance = mHeap.mState.findClass(mId);
         } else {
             instance = mHeap.mState.findReference(mId);
         }
-        
+
         if (instance == null) {
             return 0;
         }
-        
+
         return instance.getSize();
     }
 
@@ -85,7 +85,7 @@
         if (resultSet.contains(this)) {
             return;
         }
-        
+
         if (filter != null) {
             if (filter.accept(this)) {
                 resultSet.add(this);
diff --git a/hit/src/com/android/hit/RootType.java b/hit/src/com/android/hit/RootType.java
index 01ebeff..209ed1b 100644
--- a/hit/src/com/android/hit/RootType.java
+++ b/hit/src/com/android/hit/RootType.java
@@ -34,19 +34,19 @@
     JAVA_LOCAL          (14, "java local"),
     NATIVE_STACK        (15, "native stack"),
     JAVA_STATIC         (16, "java static");
-    
+
     private final int mType;
     private final String mName;
-    
+
     RootType(int type, String name) {
         mType = type;
         mName = name;
     }
-    
+
     public final int getType() {
         return mType;
     }
-    
+
     public final String getName() {
         return mName;
     }
diff --git a/hit/src/com/android/hit/StackFrame.java b/hit/src/com/android/hit/StackFrame.java
index a40f607..2ae7f32 100644
--- a/hit/src/com/android/hit/StackFrame.java
+++ b/hit/src/com/android/hit/StackFrame.java
@@ -21,7 +21,7 @@
     public static final int UNKNOWN_LOCATION        =   -1;
     public static final int COMPILED_METHOD         =   -2;
     public static final int NATIVE_METHOD           =   -3;
-    
+
     long mId;
     String mMethodName;
     String mSignature;
@@ -29,7 +29,7 @@
     int mSerialNumber;
     int mLineNumber;
 
-    public StackFrame(long id, String method, String sig, String file, 
+    public StackFrame(long id, String method, String sig, String file,
             int serial, int line) {
         mId = id;
         mMethodName = method;
@@ -45,16 +45,16 @@
             case UNKNOWN_LOCATION:  return "Unknown line number";
             case COMPILED_METHOD:   return "Compiled method";
             case NATIVE_METHOD:     return "Native method";
-            
+
             default:                return String.valueOf(mLineNumber);
         }
     }
 
     public final String toString() {
-        return mMethodName 
-            + mSignature.replace('/', '.') 
-            + " - " 
-            + mFilename + ":" 
+        return mMethodName
+            + mSignature.replace('/', '.')
+            + " - "
+            + mFilename + ":"
             + lineNumberString();
     }
 }
diff --git a/hit/src/com/android/hit/StackTrace.java b/hit/src/com/android/hit/StackTrace.java
index 239a7b8..53cb86d 100644
--- a/hit/src/com/android/hit/StackTrace.java
+++ b/hit/src/com/android/hit/StackTrace.java
@@ -31,9 +31,9 @@
     int mOffset = 0;
 
     private StackTrace() {
-        
+
     }
-    
+
     public StackTrace(int serial, int thread, StackFrame[] frames) {
         mSerialNumber = serial;
         mThreadSerialNumber = thread;
@@ -42,21 +42,21 @@
 
     public final StackTrace fromDepth(int startingDepth) {
         StackTrace result = new StackTrace();
-        
+
         if (mParent != null) {
             result.mParent = mParent;
         } else {
             result.mParent = this;
         }
-        
+
         result.mOffset = startingDepth + mOffset;
-        
+
         return result;
     }
-    
+
     public final void dump() {
         final int N = mFrames.length;
-        
+
         for (int i = 0; i < N; i++) {
             System.out.println(mFrames[i].toString());
         }
diff --git a/hit/src/com/android/hit/State.java b/hit/src/com/android/hit/State.java
index 9b2060d..96c944d 100644
--- a/hit/src/com/android/hit/State.java
+++ b/hit/src/com/android/hit/State.java
@@ -41,13 +41,13 @@
 
     public Heap setHeapTo(int id, String name) {
         Heap heap = mHeaps.get(id);
-        
+
         if (heap == null) {
             heap = new Heap(name);
             heap.mState = this;
             mHeaps.put(id, heap);
         }
-        
+
         mCurrentHeap = heap;
 
         return mCurrentHeap;
@@ -56,54 +56,54 @@
     public Heap getHeap(int id) {
         return mHeaps.get(id);
     }
-    
+
     public Heap getHeap(String name) {
         for (Heap heap: mHeaps.values()) {
             if (heap.mName.equals(name)) {
                 return heap;
             }
         }
-        
+
         return null;
     }
 
     public final void addStackFrame(StackFrame theFrame) {
         mCurrentHeap.addStackFrame(theFrame);
     }
-    
+
     public final StackFrame getStackFrame(long id) {
         return mCurrentHeap.getStackFrame(id);
     }
-    
+
     public final void addStackTrace(StackTrace theTrace) {
         mCurrentHeap.addStackTrace(theTrace);
     }
-    
+
     public final StackTrace getStackTrace(int traceSerialNumber) {
         return mCurrentHeap.getStackTrace(traceSerialNumber);
     }
-    
-    public final StackTrace getStackTraceAtDepth(int traceSerialNumber, 
+
+    public final StackTrace getStackTraceAtDepth(int traceSerialNumber,
             int depth) {
         return mCurrentHeap.getStackTraceAtDepth(traceSerialNumber, depth);
     }
-    
+
     public final void addRoot(RootObj root) {
         mCurrentHeap.addRoot(root);
     }
-    
+
     public final void addThread(ThreadObj thread, int serialNumber) {
         mCurrentHeap.addThread(thread, serialNumber);
     }
-    
+
     public final ThreadObj getThread(int serialNumber) {
         return mCurrentHeap.getThread(serialNumber);
     }
-    
+
     public final void addInstance(long id, Instance instance) {
         mCurrentHeap.addInstance(id, instance);
     }
-    
+
     public final void addClass(long id, ClassObj theClass) {
         mCurrentHeap.addClass(id, theClass);
     }
@@ -111,40 +111,40 @@
     public final Instance findReference(long id) {
         for (Heap heap: mHeaps.values()) {
             Instance instance = heap.getInstance(id);
-            
+
             if (instance != null) {
                 return instance;
             }
         }
-        
+
         //  Couldn't find an instance of a class, look for a class object
         return findClass(id);
     }
-    
+
     public final ClassObj findClass(long id) {
         for (Heap heap: mHeaps.values()) {
             ClassObj theClass = heap.getClass(id);
-            
+
             if (theClass != null) {
                 return theClass;
             }
         }
-        
+
         return null;
     }
-    
+
     public final ClassObj findClass(String name) {
         for (Heap heap: mHeaps.values()) {
             ClassObj theClass = heap.getClass(name);
-            
+
             if (theClass != null) {
                 return theClass;
             }
         }
-        
+
         return null;
     }
-    
+
     public final void dumpInstanceCounts() {
         for (Heap heap: mHeaps.values()) {
             System.out.println(
@@ -152,7 +152,7 @@
             heap.dumpInstanceCounts();
         }
     }
-    
+
     public final void dumpSizes() {
         for (Heap heap: mHeaps.values()) {
             System.out.println(
@@ -168,7 +168,7 @@
             heap.dumpSubclasses();
         }
     }
-    
+
     public final void resolveReferences() {
         for (Heap heap: mHeaps.values()) {
             heap.resolveInstanceRefs(this);
diff --git a/hit/src/com/android/hit/Types.java b/hit/src/com/android/hit/Types.java
index ef316a9..62228ce 100644
--- a/hit/src/com/android/hit/Types.java
+++ b/hit/src/com/android/hit/Types.java
@@ -45,7 +45,7 @@
             case 'S':      return 2;       //  short
             case 'I':      return 4;       //  int
             case 'J':      return 8;       //  long
-                
+
             case OBJECT:   return mIdSize;
             case BOOLEAN:  return 1;
             case CHAR:     return 2;
@@ -56,10 +56,10 @@
             case INT:      return 4;
             case LONG:     return 8;
         }
-        
+
         throw new IllegalArgumentException("Illegal type signature: " + type);
     }
-    
+
     public static final String getTypeName(int type) {
         switch (type) {
             case '[':      return "array";
@@ -72,7 +72,7 @@
             case 'S':      return "short";
             case 'I':      return "int";
             case 'J':      return "long";
-                
+
             case OBJECT:   return "object";
             case BOOLEAN:  return "boolean";
             case CHAR:     return "char";
@@ -83,7 +83,7 @@
             case INT:      return "int";
             case LONG:     return "long";
         }
-        
+
         throw new IllegalArgumentException("Illegal type signature: " + type);
     }
 }
diff --git a/libdex/Android.mk b/libdex/Android.mk
index df45f04..dfd9802 100644
--- a/libdex/Android.mk
+++ b/libdex/Android.mk
@@ -25,6 +25,7 @@
 	DexSwapVerify.c \
 	InstrUtils.c \
 	Leb128.c \
+	OpCodeNames.c \
 	OptInvocation.c \
 	sha1.c \
 	SysUtil.c \
diff --git a/libdex/CmdUtils.c b/libdex/CmdUtils.c
index 95e20e7..35696f9 100644
--- a/libdex/CmdUtils.c
+++ b/libdex/CmdUtils.c
@@ -115,7 +115,7 @@
 
     if (len < 5) {
         if (!quiet) {
-            fprintf(stderr, 
+            fprintf(stderr,
                 "ERROR: filename must end in .dex, .zip, .jar, or .apk\n");
         }
         result = kUTFRBadArgs;
@@ -138,7 +138,7 @@
         }
 
         result = dexUnzipToFile(fileName, tempFileName, quiet);
-        
+
         if (result == kUTFRSuccess) {
             //printf("+++ Good unzip to '%s'\n", tempFileName);
             fileName = tempFileName;
diff --git a/libdex/DexCatch.c b/libdex/DexCatch.c
index 5eae17a..ed97e87 100644
--- a/libdex/DexCatch.c
+++ b/libdex/DexCatch.c
@@ -20,14 +20,14 @@
 
 #include "DexCatch.h"
 
-/* Get the first handler offset for the given DexCode. 
+/* Get the first handler offset for the given DexCode.
  * It's not 0 because the handlers list is prefixed with its size
  * (in entries) as a uleb128. */
 u4 dexGetFirstHandlerOffset(const DexCode* pCode) {
     if (pCode->triesSize == 0) {
         return 0;
     }
-    
+
     const u1* baseData = dexGetCatchHandlerData(pCode);
     const u1* data = baseData;
 
diff --git a/libdex/DexCatch.h b/libdex/DexCatch.h
index f928144..c0eec7c 100644
--- a/libdex/DexCatch.h
+++ b/libdex/DexCatch.h
@@ -32,7 +32,7 @@
     u4          address;    /* handler address */
 } DexCatchHandler;
 
-/* Get the first handler offset for the given DexCode. 
+/* Get the first handler offset for the given DexCode.
  * It's not 0 because the handlers list is prefixed with its size
  * (in entries) as a uleb128. */
 u4 dexGetFirstHandlerOffset(const DexCode* pCode);
@@ -84,7 +84,7 @@
 {
     dexCatchIteratorInitToPointer(pIterator,
             dexGetCatchHandlerData(pCode) + offset);
-}    
+}
 
 /* Get the next item from a DexCatchIterator. Returns NULL if at end. */
 DEX_INLINE DexCatchHandler* dexCatchIteratorNext(DexCatchIterator* pIterator) {
@@ -119,7 +119,7 @@
  * found. Returns false if there is no applicable handler. */
 DEX_INLINE bool dexFindCatchHandler(DexCatchIterator *pIterator,
         const DexCode* pCode, u4 address) {
-    u2 triesSize = pCode->triesSize; 
+    u2 triesSize = pCode->triesSize;
     int offset = -1;
 
     // Short-circuit the overwhelmingly common cases.
@@ -134,13 +134,13 @@
             if (address < start) {
                 break;
             }
-        
+
             u4 end = start + tries[0].insnCount;
 
             if (address >= end) {
                 break;
             }
-        
+
             offset = tries[0].handlerOff;
             break;
         }
@@ -157,6 +157,6 @@
         dexCatchIteratorInit(pIterator, pCode, offset);
         return true;
     }
-}    
+}
 
 #endif
diff --git a/libdex/DexClass.c b/libdex/DexClass.c
index 1268130..8a59e09 100644
--- a/libdex/DexClass.c
+++ b/libdex/DexClass.c
@@ -52,11 +52,11 @@
 /* Read and verify an encoded_field. This updates the
  * given data pointer to point past the end of the read data and
  * returns an "okay" flag (that is, false == failure).
- * 
+ *
  * The lastIndex value should be set to 0 before the first field in
  * a list is read. It is updated as fields are read and used in the
  * decode process.
- *  
+ *
  * The verification done by this function is of the raw data format
  * only; it does not verify that access flags or indices
  * are valid. */
@@ -73,7 +73,7 @@
 /* Read and verify an encoded_method. This updates the
  * given data pointer to point past the end of the read data and
  * returns an "okay" flag (that is, false == failure).
- * 
+ *
  * The lastIndex value should be set to 0 before the first method in
  * a list is read. It is updated as fields are read and used in the
  * decode process.
@@ -97,7 +97,7 @@
  * must subsequently be free()d. This function returns NULL if there
  * was trouble parsing the data. If this function is passed NULL, it
  * returns an initialized empty DexClassData structure.
- * 
+ *
  * The verification done by this function is of the raw data format
  * only; it does not verify that access flags, indices, or offsets
  * are valid. */
@@ -110,7 +110,7 @@
         memset(result, 0, sizeof(*result));
         return result;
     }
-    
+
     if (! dexReadAndVerifyClassDataHeader(pData, pLimit, &header)) {
         return NULL;
     }
@@ -138,21 +138,21 @@
     } else {
         result->staticFields = NULL;
     }
-    
+
     if (header.instanceFieldsSize != 0) {
         result->instanceFields = (DexField*) ptr;
         ptr += header.instanceFieldsSize * sizeof(DexField);
     } else {
         result->instanceFields = NULL;
     }
-    
+
     if (header.directMethodsSize != 0) {
         result->directMethods = (DexMethod*) ptr;
         ptr += header.directMethodsSize * sizeof(DexMethod);
     } else {
         result->directMethods = NULL;
     }
-    
+
     if (header.virtualMethodsSize != 0) {
         result->virtualMethods = (DexMethod*) ptr;
     } else {
@@ -176,7 +176,7 @@
         okay = dexReadAndVerifyClassDataMethod(pData, pLimit,
                 &result->directMethods[i], &lastIndex);
     }
-    
+
     lastIndex = 0;
     for (i = 0; okay && (i < header.virtualMethodsSize); i++) {
         okay = dexReadAndVerifyClassDataMethod(pData, pLimit,
diff --git a/libdex/DexClass.h b/libdex/DexClass.h
index ce41e8b..3d1e11b 100644
--- a/libdex/DexClass.h
+++ b/libdex/DexClass.h
@@ -65,11 +65,11 @@
 /* Read and verify an encoded_field. This updates the
  * given data pointer to point past the end of the read data and
  * returns an "okay" flag (that is, false == failure).
- * 
+ *
  * The lastIndex value should be set to 0 before the first field in
  * a list is read. It is updated as fields are read and used in the
  * decode process.
- *  
+ *
  * The verification done by this function is of the raw data format
  * only; it does not verify that access flags or indices
  * are valid. */
@@ -79,7 +79,7 @@
 /* Read and verify an encoded_method. This updates the
  * given data pointer to point past the end of the read data and
  * returns an "okay" flag (that is, false == failure).
- * 
+ *
  * The lastIndex value should be set to 0 before the first method in
  * a list is read. It is updated as fields are read and used in the
  * decode process.
@@ -96,7 +96,7 @@
  * must subsequently be free()d. This function returns NULL if there
  * was trouble parsing the data. If this function is passed NULL, it
  * returns an initialized empty DexClassData structure.
- * 
+ *
  * The verification done by this function is of the raw data format
  * only; it does not verify that access flags, indices, or offsets
  * are valid. */
@@ -127,8 +127,8 @@
 }
 
 /* Read an encoded_field without verification. This updates the
- * given data pointer to point past the end of the read data. 
- * 
+ * given data pointer to point past the end of the read data.
+ *
  * The lastIndex value should be set to 0 before the first field in
  * a list is read. It is updated as fields are read and used in the
  * decode process.
@@ -143,8 +143,8 @@
 }
 
 /* Read an encoded_method without verification. This updates the
- * given data pointer to point past the end of the read data. 
- * 
+ * given data pointer to point past the end of the read data.
+ *
  * The lastIndex value should be set to 0 before the first method in
  * a list is read. It is updated as fields are read and used in the
  * decode process.
diff --git a/libdex/DexFile.c b/libdex/DexFile.c
index b139746..0050e4a 100644
--- a/libdex/DexFile.c
+++ b/libdex/DexFile.c
@@ -90,7 +90,7 @@
      * character (U+00a0, U+2000..U+200f, U+2028..U+202f,
      * U+fff0..U+ffff).
      */
-    
+
     u2 utf16 = dexGetUtf16FromUtf8(pUtf8Ptr);
 
     // Perform follow-up tests based on the high 8 bits.
@@ -139,7 +139,7 @@
 /* Return whether the given string is a valid field or method name. */
 bool dexIsValidMemberName(const char* s) {
     bool angleName = false;
-    
+
     switch (*s) {
         case '\0': {
             // The empty string is not a valid name.
@@ -184,9 +184,9 @@
         // Arrays may have no more than 255 dimensions.
         return false;
     }
-    
+
     switch (*(s++)) {
-        case 'B': 
+        case 'B':
         case 'C':
         case 'D':
         case 'F':
@@ -443,7 +443,7 @@
         pClassDef = dexGetClassDef(pDexFile, i);
         pString = dexStringByTypeIdx(pDexFile, pClassDef->classIdx);
 
-        classLookupAdd(pDexFile, pLookup, 
+        classLookupAdd(pDexFile, pLookup,
             (u1*)pString - pDexFile->baseAddr,
             (u1*)pClassDef - pDexFile->baseAddr, &numProbes);
 
@@ -877,7 +877,7 @@
 
         if (pLookup->table[idx].classDescriptorHash == hash) {
             const char* str;
-        
+
             str = (const char*) (pDexFile->baseAddr + offset);
             if (strcmp(str, descriptor) == 0) {
                 return (const DexClassDef*)
@@ -1017,7 +1017,7 @@
  * Reads a string index as encoded for the debug info format,
  * returning a string pointer or NULL as appropriate.
  */
-static const char* readStringIdx(const DexFile* pDexFile, 
+static const char* readStringIdx(const DexFile* pDexFile,
         const u1** pStream) {
     u4 stringIdx = readUnsignedLeb128(pStream);
 
@@ -1033,7 +1033,7 @@
  * Reads a type index as encoded for the debug info format, returning
  * a string pointer for its descriptor or NULL as appropriate.
  */
-static const char* readTypeIdx(const DexFile* pDexFile, 
+static const char* readTypeIdx(const DexFile* pDexFile,
         const u1** pStream) {
     u4 typeIdx = readUnsignedLeb128(pStream);
 
@@ -1056,14 +1056,14 @@
     bool live;
 } LocalInfo;
 
-static void emitLocalCbIfLive (void *cnxt, int reg, u4 endAddress, 
+static void emitLocalCbIfLive (void *cnxt, int reg, u4 endAddress,
         LocalInfo *localInReg, DexDebugNewLocalCb localCb)
 {
     if (localCb != NULL && localInReg[reg].live) {
         localCb(cnxt, reg, localInReg[reg].startAddress, endAddress,
-                localInReg[reg].name, 
-                localInReg[reg].descriptor, 
-                localInReg[reg].signature == NULL 
+                localInReg[reg].name,
+                localInReg[reg].descriptor,
+                localInReg[reg].signature == NULL
                 ? "" : localInReg[reg].signature );
     }
 }
@@ -1113,7 +1113,7 @@
     } else {
         assert(pCode->insSize == dexProtoComputeArgsSize(&proto));
     }
-    
+
     DexParameterIterator iterator;
     dexParameterIteratorInit(&iterator, &proto);
 
@@ -1121,7 +1121,7 @@
         const char* descriptor = dexParameterIteratorNextDescriptor(&iterator);
         const char *name;
         int reg;
-        
+
         if ((argReg >= pCode->registersSize) || (descriptor == NULL)) {
             goto invalid_stream;
         }
@@ -1159,7 +1159,7 @@
             case DBG_ADVANCE_PC:
                 address += readUnsignedLeb128(&stream);
                 break;
-                
+
             case DBG_ADVANCE_LINE:
                 line += readSignedLeb128(&stream);
                 break;
@@ -1170,13 +1170,13 @@
                 if (reg > pCode->registersSize) goto invalid_stream;
 
                 // Emit what was previously there, if anything
-                emitLocalCbIfLive (cnxt, reg, address, 
+                emitLocalCbIfLive (cnxt, reg, address,
                     localInReg, localCb);
 
                 localInReg[reg].name = readStringIdx(pDexFile, &stream);
                 localInReg[reg].descriptor = readTypeIdx(pDexFile, &stream);
                 if (opcode == DBG_START_LOCAL_EXTENDED) {
-                    localInReg[reg].signature 
+                    localInReg[reg].signature
                         = readStringIdx(pDexFile, &stream);
                 } else {
                     localInReg[reg].signature = NULL;
@@ -1197,7 +1197,7 @@
                 reg = readUnsignedLeb128(&stream);
                 if (reg > pCode->registersSize) goto invalid_stream;
 
-                if (localInReg[reg].name == NULL 
+                if (localInReg[reg].name == NULL
                         || localInReg[reg].descriptor == NULL) {
                     goto invalid_stream;
                 }
@@ -1224,7 +1224,7 @@
                 line += DBG_LINE_BASE + (adjopcode % DBG_LINE_RANGE);
 
                 if (posCb != NULL) {
-                    int done; 
+                    int done;
                     done = posCb(cnxt, address, line);
 
                     if (done) {
@@ -1254,4 +1254,3 @@
         free(methodDescriptor);
     }
 }
-
diff --git a/libdex/DexFile.h b/libdex/DexFile.h
index 29f34c0..2ce7ebd 100644
--- a/libdex/DexFile.h
+++ b/libdex/DexFile.h
@@ -70,7 +70,7 @@
 
 /*
  * access flags and masks; the "standard" ones are all <= 0x4000
- * 
+ *
  * Note: There are related declarations in vm/oo/Object.h in the ClassFlags
  * enum.
  */
@@ -96,7 +96,7 @@
     ACC_CONSTRUCTOR  = 0x00010000,       // method (Dalvik only)
     ACC_DECLARED_SYNCHRONIZED =
                        0x00020000,       // method (Dalvik only)
-    ACC_CLASS_MASK = 
+    ACC_CLASS_MASK =
         (ACC_PUBLIC | ACC_FINAL | ACC_INTERFACE | ACC_ABSTRACT
                 | ACC_SYNTHETIC | ACC_ANNOTATION | ACC_ENUM),
     ACC_INNER_CLASS_MASK =
@@ -758,7 +758,7 @@
     if ((((u4) insnsEnd) & 3) != 0) {
         insnsEnd++;
     }
-    
+
     return (const DexTry*) insnsEnd;
 }
 
@@ -795,7 +795,7 @@
 
 /*
  * Decode debug info for method.
- * 
+ *
  * posCb is called in ascending address order.
  * localCb is called in order of ascending end address.
  */
diff --git a/libdex/DexInlines.c b/libdex/DexInlines.c
index ac0262f..6b3aed8 100644
--- a/libdex/DexInlines.c
+++ b/libdex/DexInlines.c
@@ -28,4 +28,3 @@
 #include "InstrUtils.h"
 #include "Leb128.h"
 #include "ZipArchive.h"
-
diff --git a/libdex/DexProto.c b/libdex/DexProto.c
index c8f1b3e..b5574dc 100644
--- a/libdex/DexProto.c
+++ b/libdex/DexProto.c
@@ -112,7 +112,7 @@
  * ===========================================================================
  *      Method Prototypes
  * ===========================================================================
- */        
+ */
 
 /*
  * Return the DexProtoId from the given DexProto. The DexProto must
@@ -150,7 +150,7 @@
     }
 
     length += strlen(dexStringByTypeIdx(dexFile, protoId->returnTypeIdx));
-    
+
     dexStringCacheAlloc(pCache, length);
 
     char *at = (char*) pCache->value;
@@ -201,7 +201,7 @@
 
         length += strlen(descriptor);
     }
-    
+
     dexParameterIteratorInit(&iterator, pProto);
 
     dexStringCacheAlloc(pCache, length);
@@ -299,7 +299,7 @@
         // Compare return types.
 
         if (compareReturnType) {
-            int result = 
+            int result =
                 strcmp(dexStringByTypeIdx(dexFile1, protoId1->returnTypeIdx),
                         dexStringByTypeIdx(dexFile2, protoId2->returnTypeIdx));
 
@@ -309,14 +309,14 @@
         }
 
         // Compare parameters.
-        
+
         int minParam = (paramCount1 > paramCount2) ? paramCount2 : paramCount1;
         int i;
 
         for (i = 0; i < minParam; i++) {
             u4 idx1 = dexTypeListGetIdx(typeList1, i);
             u4 idx2 = dexTypeListGetIdx(typeList2, i);
-            int result = 
+            int result =
                 strcmp(dexStringByTypeIdx(dexFile1, idx1),
                         dexStringByTypeIdx(dexFile2, idx2));
 
@@ -368,7 +368,7 @@
     if (result == NULL) {
         return NULL;
     }
-    
+
     // The return type is the character just past the ')'.
     return result + 1;
 }
@@ -385,7 +385,7 @@
     while (*descriptor == '[') {
         descriptor++;
     }
-    
+
     switch (*descriptor) {
         case 'B': case 'C': case 'D': case 'F':
         case 'I': case 'J': case 'S': case 'Z': {
@@ -412,7 +412,7 @@
         const char* descriptor) {
     // First compare the return types.
 
-    int result = strcmp(dexProtoGetReturnType(proto), 
+    int result = strcmp(dexProtoGetReturnType(proto),
             methodDescriptorReturnType(descriptor));
 
     if (result != 0) {
@@ -427,7 +427,7 @@
     // Skip the '('.
     assert (*descriptor == '(');
     descriptor++;
-    
+
     for (;;) {
         const char* protoDesc = dexParameterIteratorNextDescriptor(&iterator);
 
@@ -451,7 +451,7 @@
         }
 
         // Both prototype and descriptor have arguments. Compare them.
-        
+
         const char* nextDesc = methodDescriptorNextType(descriptor);
 
         for (;;) {
@@ -469,7 +469,7 @@
                 break;
             }
         }
-            
+
         /*
          * If we made it here, the two arguments matched, and
          * descriptor == nextDesc.
@@ -482,7 +482,7 @@
  * ===========================================================================
  *      Parameter Iterators
  * ===========================================================================
- */        
+ */
 
 /*
  * Initialize the given DexParameterIterator to be at the start of the
@@ -531,4 +531,3 @@
 
     return dexStringByTypeIdx(pIterator->proto->dexFile, idx);
 }
-
diff --git a/libdex/InstrUtils.c b/libdex/InstrUtils.c
index 8961ce5..a3ee859 100644
--- a/libdex/InstrUtils.c
+++ b/libdex/InstrUtils.c
@@ -297,6 +297,14 @@
         case OP_IPUT_QUICK:
         case OP_IPUT_WIDE_QUICK:
         case OP_IPUT_OBJECT_QUICK:
+        case OP_IGET_VOLATILE:
+        case OP_IPUT_VOLATILE:
+        case OP_SGET_VOLATILE:
+        case OP_SPUT_VOLATILE:
+        case OP_IGET_OBJECT_VOLATILE:
+        case OP_IPUT_OBJECT_VOLATILE:
+        case OP_SGET_OBJECT_VOLATILE:
+        case OP_SPUT_OBJECT_VOLATILE:
         case OP_IGET_WIDE_VOLATILE:
         case OP_IPUT_WIDE_VOLATILE:
         case OP_SGET_WIDE_VOLATILE:
@@ -324,16 +332,8 @@
         case OP_UNUSED_73:
         case OP_UNUSED_79:
         case OP_UNUSED_7A:
-        case OP_UNUSED_E3:
-        case OP_UNUSED_E4:
-        case OP_UNUSED_E5:
-        case OP_UNUSED_E6:
-        case OP_UNUSED_E7:
         case OP_BREAKPOINT:
         case OP_UNUSED_F1:
-        case OP_UNUSED_FC:
-        case OP_UNUSED_FD:
-        case OP_UNUSED_FE:
         case OP_UNUSED_FF:
             assert(width == 0);
             break;
@@ -628,6 +628,14 @@
         case OP_IPUT_QUICK:
         case OP_IPUT_WIDE_QUICK:
         case OP_IPUT_OBJECT_QUICK:
+        case OP_IGET_VOLATILE:
+        case OP_IPUT_VOLATILE:
+        case OP_SGET_VOLATILE:
+        case OP_SPUT_VOLATILE:
+        case OP_IGET_OBJECT_VOLATILE:
+        case OP_IPUT_OBJECT_VOLATILE:
+        case OP_SGET_OBJECT_VOLATILE:
+        case OP_SPUT_OBJECT_VOLATILE:
         case OP_IGET_WIDE_VOLATILE:
         case OP_IPUT_WIDE_VOLATILE:
         case OP_SGET_WIDE_VOLATILE:
@@ -653,16 +661,8 @@
         case OP_UNUSED_73:
         case OP_UNUSED_79:
         case OP_UNUSED_7A:
-        case OP_UNUSED_E3:
-        case OP_UNUSED_E4:
-        case OP_UNUSED_E5:
-        case OP_UNUSED_E6:
-        case OP_UNUSED_E7:
         case OP_BREAKPOINT:
         case OP_UNUSED_F1:
-        case OP_UNUSED_FC:
-        case OP_UNUSED_FD:
-        case OP_UNUSED_FE:
         case OP_UNUSED_FF:
             break;
 
@@ -973,6 +973,14 @@
         case OP_IPUT_WIDE_VOLATILE:
         case OP_SGET_WIDE_VOLATILE:
         case OP_SPUT_WIDE_VOLATILE:
+        case OP_IGET_VOLATILE:
+        case OP_IPUT_VOLATILE:
+        case OP_SGET_VOLATILE:
+        case OP_SPUT_VOLATILE:
+        case OP_IGET_OBJECT_VOLATILE:
+        case OP_IPUT_OBJECT_VOLATILE:
+        case OP_SGET_OBJECT_VOLATILE:
+        case OP_SPUT_OBJECT_VOLATILE:
             fmt = kFmt22c;
             break;
         case OP_IGET_QUICK:
@@ -1011,16 +1019,8 @@
         case OP_UNUSED_73:
         case OP_UNUSED_79:
         case OP_UNUSED_7A:
-        case OP_UNUSED_E3:
-        case OP_UNUSED_E4:
-        case OP_UNUSED_E5:
-        case OP_UNUSED_E6:
-        case OP_UNUSED_E7:
         case OP_BREAKPOINT:
         case OP_UNUSED_F1:
-        case OP_UNUSED_FC:
-        case OP_UNUSED_FD:
-        case OP_UNUSED_FE:
         case OP_UNUSED_FF:
             fmt = kFmtUnknown;
             break;
@@ -1069,7 +1069,7 @@
         pDec->vB = INST_B(inst);
         break;
     case kFmt11n:       // op vA, #+B
-        pDec->vA = INST_A(inst); 
+        pDec->vA = INST_A(inst);
         pDec->vB = (s4) (INST_B(inst) << 28) >> 28; // sign extend 4-bit value
         break;
     case kFmt11x:       // op vAA
@@ -1239,9 +1239,10 @@
  * works for special OP_NOP entries, including switch statement data tables
  * and array data.
  */
-int dexGetInstrOrTableWidthAbs(const InstructionWidth* widths, const u2* insns)
+size_t dexGetInstrOrTableWidthAbs(const InstructionWidth* widths,
+    const u2* insns)
 {
-    int width;
+    size_t width;
 
     if (*insns == kPackedSwitchSignature) {
         width = 4 + insns[1] * 2;
diff --git a/libdex/InstrUtils.h b/libdex/InstrUtils.h
index 60244a8..ad2bc34 100644
--- a/libdex/InstrUtils.h
+++ b/libdex/InstrUtils.h
@@ -29,7 +29,7 @@
  * (This defines InstructionFormat as an unsigned char to reduce the size
  * of the table.  This isn't necessary with some compilers, which use an
  * integer width appropriate for the number of enum values.)
- * 
+ *
  * If you add or delete a format, you have to change some or all of:
  *  - this enum
  *  - the switch inside dexDecodeInstruction() in InstrUtils.c
@@ -126,7 +126,8 @@
 /*
  * Return the width of the specified instruction, or 0 if not defined.
  */
-DEX_INLINE int dexGetInstrWidthAbs(const InstructionWidth* widths,OpCode opCode)
+DEX_INLINE size_t dexGetInstrWidthAbs(const InstructionWidth* widths,
+    OpCode opCode)
 {
     //assert(/*opCode >= 0 &&*/ opCode < kNumDalvikInstructions);
 
@@ -142,7 +143,8 @@
  * works for special OP_NOP entries, including switch statement data tables
  * and array data.
  */
-int dexGetInstrOrTableWidthAbs(const InstructionWidth* widths, const u2* insns);
+size_t dexGetInstrOrTableWidthAbs(const InstructionWidth* widths,
+    const u2* insns);
 
 
 /*
diff --git a/libdex/OpCode.h b/libdex/OpCode.h
index 4dfd047..312ff01 100644
--- a/libdex/OpCode.h
+++ b/libdex/OpCode.h
@@ -45,16 +45,16 @@
  *      and running int:fast as above
  *  - repeat for other platforms (x86, ...)
  *  (see notes in mterp/ReadMe.txt for rebuilding instructions)
- * 
+ *
  * Verifier / optimizer:
  *  - update some stuff in analysis/DexOptimize.c, analysis/DexVerify.c,
  *    and/or analysis/CodeVerify.c as needed
  *    - verify by running with verifier enabled (it's on by default)
- * 
+ *
  * Tools:
  *  - update the OpCodeNames table in dexdump/OpCodeNames.c
  *  - update dexdump/DexDump.c if an instruction format has changed
- *  
+ *
  * Note: The Dalvik VM tests (in the tests subdirectory) provide a convenient
  * way to test most of the above without doing any rebuilds.  In particular,
  * test 003-omnibus-opcodes will exercise most of the opcodes.
@@ -108,18 +108,18 @@
 
     OP_NEW_INSTANCE                 = 0x22,
     OP_NEW_ARRAY                    = 0x23,
-    
+
     OP_FILLED_NEW_ARRAY             = 0x24,
     OP_FILLED_NEW_ARRAY_RANGE       = 0x25,
     OP_FILL_ARRAY_DATA              = 0x26,
-    
+
     OP_THROW                        = 0x27,
     OP_GOTO                         = 0x28,
     OP_GOTO_16                      = 0x29,
     OP_GOTO_32                      = 0x2a,
     OP_PACKED_SWITCH                = 0x2b,
     OP_SPARSE_SWITCH                = 0x2c,
-    
+
     OP_CMPL_FLOAT                   = 0x2d,
     OP_CMPG_FLOAT                   = 0x2e,
     OP_CMPL_DOUBLE                  = 0x2f,
@@ -145,7 +145,7 @@
     OP_UNUSED_41                    = 0x41,
     OP_UNUSED_42                    = 0x42,
     OP_UNUSED_43                    = 0x43,
-    
+
     OP_AGET                         = 0x44,
     OP_AGET_WIDE                    = 0x45,
     OP_AGET_OBJECT                  = 0x46,
@@ -198,7 +198,7 @@
     OP_INVOKE_INTERFACE             = 0x72,
 
     OP_UNUSED_73                    = 0x73,
-    
+
     OP_INVOKE_VIRTUAL_RANGE         = 0x74,
     OP_INVOKE_SUPER_RANGE           = 0x75,
     OP_INVOKE_DIRECT_RANGE          = 0x76,
@@ -321,13 +321,13 @@
     OP_SHR_INT_LIT8                 = 0xe1,
     OP_USHR_INT_LIT8                = 0xe2,
 
-    OP_UNUSED_E3                    = 0xe3,
-    OP_UNUSED_E4                    = 0xe4,
-    OP_UNUSED_E5                    = 0xe5,
-    OP_UNUSED_E6                    = 0xe6,
-    OP_UNUSED_E7                    = 0xe7,
-
     /* verifier/optimizer output -- nothing below here is generated by "dx" */
+    OP_IGET_VOLATILE                = 0xe3,
+    OP_IPUT_VOLATILE                = 0xe4,
+    OP_SGET_VOLATILE                = 0xe5,
+    OP_SPUT_VOLATILE                = 0xe6,
+    OP_IGET_OBJECT_VOLATILE         = 0xe7,
+
     OP_IGET_WIDE_VOLATILE           = 0xe8,
     OP_IPUT_WIDE_VOLATILE           = 0xe9,
     OP_SGET_WIDE_VOLATILE           = 0xea,
@@ -359,10 +359,11 @@
     OP_INVOKE_VIRTUAL_QUICK_RANGE   = 0xf9,
     OP_INVOKE_SUPER_QUICK           = 0xfa,
     OP_INVOKE_SUPER_QUICK_RANGE     = 0xfb,
-    OP_UNUSED_FC                    = 0xfc, /* OP_INVOKE_DIRECT_QUICK? */
-    OP_UNUSED_FD                    = 0xfd, /* OP_INVOKE_DIRECT_QUICK_RANGE? */
-    OP_UNUSED_FE                    = 0xfe, /* OP_INVOKE_INTERFACE_QUICK? */
-    OP_UNUSED_FF                    = 0xff, /* OP_INVOKE_INTERFACE_QUICK_RANGE*/
+    OP_IPUT_OBJECT_VOLATILE         = 0xfc,
+    OP_SGET_OBJECT_VOLATILE         = 0xfd,
+    OP_SPUT_OBJECT_VOLATILE         = 0xfe,
+
+    OP_UNUSED_FF                    = 0xff, /* reserved for code expansion */
 } OpCode;
 
 #define kNumDalvikInstructions 256
@@ -628,11 +629,11 @@
         H(OP_SHL_INT_LIT8),                                                 \
         H(OP_SHR_INT_LIT8),                                                 \
         H(OP_USHR_INT_LIT8),                                                \
-        H(OP_UNUSED_E3),                                                    \
-        H(OP_UNUSED_E4),                                                    \
-        H(OP_UNUSED_E5),                                                    \
-        H(OP_UNUSED_E6),                                                    \
-        H(OP_UNUSED_E7),                                                    \
+        H(OP_IGET_VOLATILE),                                                \
+        H(OP_IPUT_VOLATILE),                                                \
+        H(OP_SGET_VOLATILE),                                                \
+        H(OP_SPUT_VOLATILE),                                                \
+        H(OP_IGET_OBJECT_VOLATILE),                                         \
         H(OP_IGET_WIDE_VOLATILE),                                           \
         H(OP_IPUT_WIDE_VOLATILE),                                           \
         H(OP_SGET_WIDE_VOLATILE),                                           \
@@ -654,9 +655,9 @@
         H(OP_INVOKE_VIRTUAL_QUICK_RANGE),                                   \
         H(OP_INVOKE_SUPER_QUICK),                                           \
         H(OP_INVOKE_SUPER_QUICK_RANGE),                                     \
-        H(OP_UNUSED_FC),                                                    \
-        H(OP_UNUSED_FD),                                                    \
-        H(OP_UNUSED_FE),                                                    \
+        H(OP_IPUT_OBJECT_VOLATILE),                                         \
+        H(OP_SGET_OBJECT_VOLATILE),                                         \
+        H(OP_SPUT_OBJECT_VOLATILE),                                         \
         H(OP_UNUSED_FF),                                                    \
     };
 
diff --git a/dexdump/OpCodeNames.c b/libdex/OpCodeNames.c
similarity index 94%
rename from dexdump/OpCodeNames.c
rename to libdex/OpCodeNames.c
index e0645cc..c182d4e 100644
--- a/dexdump/OpCodeNames.c
+++ b/libdex/OpCodeNames.c
@@ -13,11 +13,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 /*
  * Table of Dalvik opcode names.
  */
 #include "OpCodeNames.h"
 
+#include <assert.h>
+
 /*
  * The following two lines work, but slashes and dashes both turn into
  * underscores, and the strings are all upper case.  The output is easier
@@ -287,11 +290,11 @@
     "shl-int/lit8",
     "shr-int/lit8",
     "ushr-int/lit8",
-    "UNUSED",
-    "UNUSED",
-    "UNUSED",
-    "UNUSED",
-    "UNUSED",
+    "+iget-volatile",
+    "+iput-volatile",
+    "+sget-volatile",
+    "+sput-volatile",
+    "+iget-object-volatile",
     "+iget-wide-volatile",
     "+iput-wide-volatile",
     "+sget-wide-volatile",
@@ -314,17 +317,17 @@
     "+invoke-virtual-quick/range",
     "+invoke-super-quick",
     "+invoke-super-quick/range",
-    "UNUSED",
-    "UNUSED",
-    "UNUSED",
+    "+iput-object-volatile",
+    "+sget-object-volatile",
+    "+sput-object-volatile",
     "UNUSED",
 };
 
 /*
  * Return the name of an opcode.
  */
-const char* getOpcodeName(OpCode op)
+const char* dexGetOpcodeName(OpCode op)
 {
+    assert(op >= 0 && op < kNumDalvikInstructions);
     return gOpNames[op];
 }
-
diff --git a/dexdump/OpCodeNames.h b/libdex/OpCodeNames.h
similarity index 79%
rename from dexdump/OpCodeNames.h
rename to libdex/OpCodeNames.h
index 1aec0d1..f81368d 100644
--- a/dexdump/OpCodeNames.h
+++ b/libdex/OpCodeNames.h
@@ -13,14 +13,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 /*
  * Dalvik opcode names.
- */ 
-#ifndef _DEXDUMP_OPCODENAMES
-#define _DEXDUMP_OPCODENAMES
+ */
+#ifndef _LIBDEX_OPCODENAMES
+#define _LIBDEX_OPCODENAMES
 
-#include "libdex/OpCode.h"
+#include "OpCode.h"
 
-const char* getOpcodeName(OpCode op);
+const char* dexGetOpcodeName(OpCode op);
 
-#endif /*_DEXDUMP_OPCODENAMES*/
+#endif /*_LIBDEX_OPCODENAMES*/
diff --git a/libdex/OptInvocation.c b/libdex/OptInvocation.c
index 8ce918b..df5f8d9 100644
--- a/libdex/OptInvocation.c
+++ b/libdex/OptInvocation.c
@@ -140,4 +140,3 @@
 
     return 0;
 }
-
diff --git a/libdex/SysUtil.c b/libdex/SysUtil.c
index ca64c25..e2b1fff 100644
--- a/libdex/SysUtil.c
+++ b/libdex/SysUtil.c
@@ -406,4 +406,3 @@
 
     return 0;
 }
-
diff --git a/libdex/ZipArchive.c b/libdex/ZipArchive.c
index 65bc6e9..756f488 100644
--- a/libdex/ZipArchive.c
+++ b/libdex/ZipArchive.c
@@ -120,7 +120,7 @@
  */
 static u2 get2LE(unsigned char const* pSrc)
 {
-    return pSrc[0] | (pSrc[1] << 8); 
+    return pSrc[0] | (pSrc[1] << 8);
 }
 
 /*
@@ -745,4 +745,3 @@
 bail:
     return result;
 }
-
diff --git a/libdex/sha1.c b/libdex/sha1.c
index 6289248..dc7e30a 100644
--- a/libdex/sha1.c
+++ b/libdex/sha1.c
@@ -16,7 +16,7 @@
 100% Public Domain
 
 -----------------
-Modified 7/98 
+Modified 7/98
 By James H. Brown <jbrown@burgoyne.com>
 Still 100% Public Domain
 
diff --git a/libnativehelper/JNIHelp.c b/libnativehelper/JNIHelp.c
index 1dff85d..59d457b 100644
--- a/libnativehelper/JNIHelp.c
+++ b/libnativehelper/JNIHelp.c
@@ -285,3 +285,55 @@
         return ret;
     }
 }
+
+static struct CachedFields {
+    jclass fileDescriptorClass;
+    jmethodID fileDescriptorCtor;
+    jfieldID descriptorField;
+} gCachedFields;
+
+int registerJniHelp(JNIEnv* env) {
+    gCachedFields.fileDescriptorClass =
+            (*env)->NewGlobalRef(env, (*env)->FindClass(env, "java/io/FileDescriptor"));
+    if (gCachedFields.fileDescriptorClass == NULL) {
+        return -1;
+    }
+
+    gCachedFields.fileDescriptorCtor =
+            (*env)->GetMethodID(env, gCachedFields.fileDescriptorClass, "<init>", "()V");
+    if (gCachedFields.fileDescriptorCtor == NULL) {
+        return -1;
+    }
+
+    gCachedFields.descriptorField =
+            (*env)->GetFieldID(env, gCachedFields.fileDescriptorClass, "descriptor", "I");
+    if (gCachedFields.descriptorField == NULL) {
+        return -1;
+    }
+
+    return 0;
+}
+
+/*
+ * Create a java.io.FileDescriptor given an integer fd
+ */
+jobject jniCreateFileDescriptor(JNIEnv* env, int fd) {
+    jobject fileDescriptor = (*env)->NewObject(env,
+            gCachedFields.fileDescriptorClass, gCachedFields.fileDescriptorCtor);
+    jniSetFileDescriptorOfFD(env, fileDescriptor, fd);
+    return fileDescriptor;
+}
+
+/*
+ * Get an int file descriptor from a java.io.FileDescriptor
+ */
+int jniGetFDFromFileDescriptor(JNIEnv* env, jobject fileDescriptor) {
+    return (*env)->GetIntField(env, fileDescriptor, gCachedFields.descriptorField);
+}
+
+/*
+ * Set the descriptor of a java.io.FileDescriptor
+ */
+void jniSetFileDescriptorOfFD(JNIEnv* env, jobject fileDescriptor, int value) {
+    (*env)->SetIntField(env, fileDescriptor, gCachedFields.descriptorField, value);
+}
diff --git a/libnativehelper/README b/libnativehelper/README
index fa757c0..5a5f5d4 100644
--- a/libnativehelper/README
+++ b/libnativehelper/README
@@ -9,4 +9,3 @@
  - SHOULD be written in C rather than C++ where possible.
 
 Some helper functions are defined in include/nativehelper/JNIHelp.h.
-
diff --git a/libnativehelper/Register.c b/libnativehelper/Register.c
index 1de679a..e3cd407 100644
--- a/libnativehelper/Register.c
+++ b/libnativehelper/Register.c
@@ -17,11 +17,13 @@
 #include "jni.h"
 
 extern int registerCoreLibrariesJni(JNIEnv* env);
+extern int registerJniHelp(JNIEnv* env);
 
 /*
  * Register all methods for system classes.
  */
 int jniRegisterSystemMethods(JNIEnv* env)
 {
-    return registerCoreLibrariesJni(env);
+    // We initialize JNIHelp.c first so that the core libraries can safely rely on it.
+    return registerJniHelp(env) != -1 && registerCoreLibrariesJni(env) != -1;
 }
diff --git a/libnativehelper/include/nativehelper/JNIHelp.h b/libnativehelper/include/nativehelper/JNIHelp.h
index 585d1c7..1c9f933 100644
--- a/libnativehelper/include/nativehelper/JNIHelp.h
+++ b/libnativehelper/include/nativehelper/JNIHelp.h
@@ -81,7 +81,7 @@
  */
 jobject jniCreateFileDescriptor(C_JNIEnv* env, int fd);
 
-/* 
+/*
  * Get an int file descriptor from a java.io.FileDescriptor
  */
 int jniGetFDFromFileDescriptor(C_JNIEnv* env, jobject fileDescriptor);
diff --git a/libnativehelper/include/nativehelper/jni.h b/libnativehelper/include/nativehelper/jni.h
index ad954c8..93349e0 100644
--- a/libnativehelper/include/nativehelper/jni.h
+++ b/libnativehelper/include/nativehelper/jni.h
@@ -124,10 +124,10 @@
     JNIWeakGlobalRefType = 3
 } jobjectRefType;
 
-typedef struct { 
-    const char* name; 
-    const char* signature; 
-    void*       fnPtr; 
+typedef struct {
+    const char* name;
+    const char* signature;
+    void*       fnPtr;
 } JNINativeMethod;
 
 struct _JNIEnv;
@@ -1037,7 +1037,7 @@
     void*       reserved0;
     void*       reserved1;
     void*       reserved2;
- 
+
     jint        (*DestroyJavaVM)(JavaVM*);
     jint        (*AttachCurrentThread)(JavaVM*, JNIEnv**, void*);
     jint        (*DetachCurrentThread)(JavaVM*);
diff --git a/tests/002-sleep/src/Main.java b/tests/002-sleep/src/Main.java
index 450be2f..c1a2d83 100644
--- a/tests/002-sleep/src/Main.java
+++ b/tests/002-sleep/src/Main.java
@@ -5,7 +5,7 @@
         if (args.length != 0) {
             millis = Integer.parseInt(args[0]);
         }
-        
+
         System.out.println("Sleeping " + millis + " msec...");
 
         long start = System.currentTimeMillis();
diff --git a/tests/003-omnibus-opcodes/build b/tests/003-omnibus-opcodes/build
index 0259995..9eb5ed3 100644
--- a/tests/003-omnibus-opcodes/build
+++ b/tests/003-omnibus-opcodes/build
@@ -24,4 +24,3 @@
 
 dx -JXmx256m --debug --dex --dump-to=classes.lst --output=classes.dex classes
 zip test.jar classes.dex
-
diff --git a/tests/003-omnibus-opcodes/src/Array.java b/tests/003-omnibus-opcodes/src/Array.java
index 6f1aa47..f385dd8 100644
--- a/tests/003-omnibus-opcodes/src/Array.java
+++ b/tests/003-omnibus-opcodes/src/Array.java
@@ -222,4 +222,3 @@
         checkNegAlloc(-1);
     }
 }
-
diff --git a/tests/003-omnibus-opcodes/src/Compare.java b/tests/003-omnibus-opcodes/src/Compare.java
index 27d6862..43a708a 100644
--- a/tests/003-omnibus-opcodes/src/Compare.java
+++ b/tests/003-omnibus-opcodes/src/Compare.java
@@ -169,4 +169,3 @@
         testDoubleCompare(-5.0, 4.0, 4.0, (1.0/0.0) / (1.0/0.0));
     }
 }
-
diff --git a/tests/003-omnibus-opcodes/src/FloatMath.java b/tests/003-omnibus-opcodes/src/FloatMath.java
index cf4869c..3c49402 100644
--- a/tests/003-omnibus-opcodes/src/FloatMath.java
+++ b/tests/003-omnibus-opcodes/src/FloatMath.java
@@ -335,4 +335,3 @@
         jlmTests(3.14159f, 123456.78987654321);
     }
 }
-
diff --git a/tests/003-omnibus-opcodes/src/Goto.java b/tests/003-omnibus-opcodes/src/Goto.java
index 5b467fd..d56ceae 100644
--- a/tests/003-omnibus-opcodes/src/Goto.java
+++ b/tests/003-omnibus-opcodes/src/Goto.java
@@ -2406,4 +2406,3 @@
         bigGoto(true);
     }
 };
-
diff --git a/tests/003-omnibus-opcodes/src/InstField.java b/tests/003-omnibus-opcodes/src/InstField.java
index 2756be6..80b95ab 100644
--- a/tests/003-omnibus-opcodes/src/InstField.java
+++ b/tests/003-omnibus-opcodes/src/InstField.java
@@ -106,4 +106,3 @@
         assert(mVolatileLong2 == -1234605616436508551L);
     }
 }
-
diff --git a/tests/003-omnibus-opcodes/src/IntMath.java b/tests/003-omnibus-opcodes/src/IntMath.java
index d5ac744..89194de 100644
--- a/tests/003-omnibus-opcodes/src/IntMath.java
+++ b/tests/003-omnibus-opcodes/src/IntMath.java
@@ -490,4 +490,3 @@
         jlmTests(12345, 0x1122334455667788L);
     }
 }
-
diff --git a/tests/003-omnibus-opcodes/src/Main.java b/tests/003-omnibus-opcodes/src/Main.java
index 271d795..fb39d76 100644
--- a/tests/003-omnibus-opcodes/src/Main.java
+++ b/tests/003-omnibus-opcodes/src/Main.java
@@ -68,7 +68,7 @@
         } catch (VerifyError ve) {
             System.out.println("Caught (retry): " + ve);
         }
-        
+
         try {
             UnresTest2.run();
         } catch (VerifyError ve) {
diff --git a/tests/003-omnibus-opcodes/src/MethodCall.java b/tests/003-omnibus-opcodes/src/MethodCall.java
index 2a365f2..f89194b 100644
--- a/tests/003-omnibus-opcodes/src/MethodCall.java
+++ b/tests/003-omnibus-opcodes/src/MethodCall.java
@@ -80,4 +80,3 @@
         return 7;
     }
 }
-
diff --git a/tests/003-omnibus-opcodes/src/Monitor.java b/tests/003-omnibus-opcodes/src/Monitor.java
index 0518ad9..66d7c65 100644
--- a/tests/003-omnibus-opcodes/src/Monitor.java
+++ b/tests/003-omnibus-opcodes/src/Monitor.java
@@ -42,4 +42,3 @@
         assert(mVal == 2);
     }
 }
-
diff --git a/tests/003-omnibus-opcodes/src/StaticField.java b/tests/003-omnibus-opcodes/src/StaticField.java
index 2d403b9..7ccdd7e 100644
--- a/tests/003-omnibus-opcodes/src/StaticField.java
+++ b/tests/003-omnibus-opcodes/src/StaticField.java
@@ -74,4 +74,3 @@
         assert(mVolatileLong2 == -1234605616436508551L);
     }
 }
-
diff --git a/tests/003-omnibus-opcodes/src/Switch.java b/tests/003-omnibus-opcodes/src/Switch.java
index de1b7e1..67c82b0 100644
--- a/tests/003-omnibus-opcodes/src/Switch.java
+++ b/tests/003-omnibus-opcodes/src/Switch.java
@@ -60,4 +60,3 @@
         testSwitch();
     }
 }
-
diff --git a/tests/003-omnibus-opcodes/src/Throw.java b/tests/003-omnibus-opcodes/src/Throw.java
index 2d4e130..91ee6dd 100644
--- a/tests/003-omnibus-opcodes/src/Throw.java
+++ b/tests/003-omnibus-opcodes/src/Throw.java
@@ -122,4 +122,3 @@
         th.rethrow();
     }
 }
-
diff --git a/tests/003-omnibus-opcodes/src/UnresClass.java b/tests/003-omnibus-opcodes/src/UnresClass.java
index 10dd79a..52b3d4f 100644
--- a/tests/003-omnibus-opcodes/src/UnresClass.java
+++ b/tests/003-omnibus-opcodes/src/UnresClass.java
@@ -7,4 +7,3 @@
 public class UnresClass {
     int foo;
 }
-
diff --git a/tests/003-omnibus-opcodes/src/UnresStuff.java b/tests/003-omnibus-opcodes/src/UnresStuff.java
index 5c925af..1d2a556 100644
--- a/tests/003-omnibus-opcodes/src/UnresStuff.java
+++ b/tests/003-omnibus-opcodes/src/UnresStuff.java
@@ -20,4 +20,3 @@
         System.out.println("unres!");
     }
 }
-
diff --git a/tests/003-omnibus-opcodes/src/UnresTest2.java b/tests/003-omnibus-opcodes/src/UnresTest2.java
index b458bfe..768be8f 100644
--- a/tests/003-omnibus-opcodes/src/UnresTest2.java
+++ b/tests/003-omnibus-opcodes/src/UnresTest2.java
@@ -47,4 +47,3 @@
         System.out.println("UnresTest2 done");
     }
 }
-
diff --git a/tests/003-omnibus-opcodes/src2/UnresStuff.java b/tests/003-omnibus-opcodes/src2/UnresStuff.java
index 8b4b884..56f43af 100644
--- a/tests/003-omnibus-opcodes/src2/UnresStuff.java
+++ b/tests/003-omnibus-opcodes/src2/UnresStuff.java
@@ -7,4 +7,3 @@
 public class UnresStuff {
     public int x;
 }
-
diff --git a/tests/004-annotations/src/android/test/anno/AnnoArrayField.java b/tests/004-annotations/src/android/test/anno/AnnoArrayField.java
index d929aac..681045c 100644
--- a/tests/004-annotations/src/android/test/anno/AnnoArrayField.java
+++ b/tests/004-annotations/src/android/test/anno/AnnoArrayField.java
@@ -17,4 +17,3 @@
     double[] dd() default {0.987654321};
     String[] str() default {};
 }
-
diff --git a/tests/004-annotations/src/android/test/anno/AnnoFancyConstructor.java b/tests/004-annotations/src/android/test/anno/AnnoFancyConstructor.java
index e807a32..19dadec 100644
--- a/tests/004-annotations/src/android/test/anno/AnnoFancyConstructor.java
+++ b/tests/004-annotations/src/android/test/anno/AnnoFancyConstructor.java
@@ -8,4 +8,3 @@
 public @interface AnnoFancyConstructor {
     public int numArgs() default 0;
 }
-
diff --git a/tests/004-annotations/src/android/test/anno/AnnoFancyField.java b/tests/004-annotations/src/android/test/anno/AnnoFancyField.java
index 3637976..855ba56 100644
--- a/tests/004-annotations/src/android/test/anno/AnnoFancyField.java
+++ b/tests/004-annotations/src/android/test/anno/AnnoFancyField.java
@@ -10,4 +10,3 @@
 public @interface AnnoFancyField {
     public String nombre() default "no se";
 }
-
diff --git a/tests/004-annotations/src/android/test/anno/AnnoFancyMethod.java b/tests/004-annotations/src/android/test/anno/AnnoFancyMethod.java
index 0958f34..3088866 100644
--- a/tests/004-annotations/src/android/test/anno/AnnoFancyMethod.java
+++ b/tests/004-annotations/src/android/test/anno/AnnoFancyMethod.java
@@ -12,4 +12,3 @@
     AnnoFancyMethodEnum enumerated() default AnnoFancyMethodEnum.FOO;
     Class someClass() default SomeClass.class;
 }
-
diff --git a/tests/004-annotations/src/android/test/anno/AnnoFancyParameter.java b/tests/004-annotations/src/android/test/anno/AnnoFancyParameter.java
index 2bda6ee..bc2ba7c 100644
--- a/tests/004-annotations/src/android/test/anno/AnnoFancyParameter.java
+++ b/tests/004-annotations/src/android/test/anno/AnnoFancyParameter.java
@@ -8,4 +8,3 @@
 public @interface AnnoFancyParameter {
     double factor();
 }
-
diff --git a/tests/004-annotations/src/android/test/anno/AnnoFancyType.java b/tests/004-annotations/src/android/test/anno/AnnoFancyType.java
index 34ba009..745f838 100644
--- a/tests/004-annotations/src/android/test/anno/AnnoFancyType.java
+++ b/tests/004-annotations/src/android/test/anno/AnnoFancyType.java
@@ -9,4 +9,3 @@
     public int num();
     public String name() default "unknown";
 }
-
diff --git a/tests/004-annotations/src/android/test/anno/AnnoSimpleConstructor.java b/tests/004-annotations/src/android/test/anno/AnnoSimpleConstructor.java
index c0c127b..d66b9ae 100644
--- a/tests/004-annotations/src/android/test/anno/AnnoSimpleConstructor.java
+++ b/tests/004-annotations/src/android/test/anno/AnnoSimpleConstructor.java
@@ -6,4 +6,3 @@
 @Retention(RetentionPolicy.RUNTIME)
 
 public @interface AnnoSimpleConstructor {}
-
diff --git a/tests/004-annotations/src/android/test/anno/AnnoSimpleField.java b/tests/004-annotations/src/android/test/anno/AnnoSimpleField.java
index 6428f1a..04193d2 100644
--- a/tests/004-annotations/src/android/test/anno/AnnoSimpleField.java
+++ b/tests/004-annotations/src/android/test/anno/AnnoSimpleField.java
@@ -6,4 +6,3 @@
 @Retention(RetentionPolicy.RUNTIME)
 
 public @interface AnnoSimpleField {}
-
diff --git a/tests/004-annotations/src/android/test/anno/AnnoSimpleLocalVariable.java b/tests/004-annotations/src/android/test/anno/AnnoSimpleLocalVariable.java
index 9a5e062..a839fa2 100644
--- a/tests/004-annotations/src/android/test/anno/AnnoSimpleLocalVariable.java
+++ b/tests/004-annotations/src/android/test/anno/AnnoSimpleLocalVariable.java
@@ -6,4 +6,3 @@
 @Retention(RetentionPolicy.RUNTIME)
 
 public @interface AnnoSimpleLocalVariable {}
-
diff --git a/tests/004-annotations/src/android/test/anno/AnnoSimpleMethod.java b/tests/004-annotations/src/android/test/anno/AnnoSimpleMethod.java
index 78e46aa..fcd9c0f 100644
--- a/tests/004-annotations/src/android/test/anno/AnnoSimpleMethod.java
+++ b/tests/004-annotations/src/android/test/anno/AnnoSimpleMethod.java
@@ -6,4 +6,3 @@
 @Retention(RetentionPolicy.RUNTIME)
 
 public @interface AnnoSimpleMethod {}
-
diff --git a/tests/004-annotations/src/android/test/anno/AnnoSimplePackage.java b/tests/004-annotations/src/android/test/anno/AnnoSimplePackage.java
index 8d37376..4aadfe7 100644
--- a/tests/004-annotations/src/android/test/anno/AnnoSimplePackage.java
+++ b/tests/004-annotations/src/android/test/anno/AnnoSimplePackage.java
@@ -6,4 +6,3 @@
 @Retention(RetentionPolicy.RUNTIME)
 
 public @interface AnnoSimplePackage {}
-
diff --git a/tests/004-annotations/src/android/test/anno/AnnoSimpleParameter.java b/tests/004-annotations/src/android/test/anno/AnnoSimpleParameter.java
index 305f6d5..6e26ca3 100644
--- a/tests/004-annotations/src/android/test/anno/AnnoSimpleParameter.java
+++ b/tests/004-annotations/src/android/test/anno/AnnoSimpleParameter.java
@@ -6,4 +6,3 @@
 @Retention(RetentionPolicy.RUNTIME)
 
 public @interface AnnoSimpleParameter {}
-
diff --git a/tests/004-annotations/src/android/test/anno/AnnoSimpleType.java b/tests/004-annotations/src/android/test/anno/AnnoSimpleType.java
index 7c3c718..3bba3db 100644
--- a/tests/004-annotations/src/android/test/anno/AnnoSimpleType.java
+++ b/tests/004-annotations/src/android/test/anno/AnnoSimpleType.java
@@ -7,4 +7,3 @@
 @Inherited
 @Documented
 public @interface AnnoSimpleType {}
-
diff --git a/tests/004-annotations/src/android/test/anno/AnnoSimpleType2.java b/tests/004-annotations/src/android/test/anno/AnnoSimpleType2.java
index 8bae110..f74b291 100644
--- a/tests/004-annotations/src/android/test/anno/AnnoSimpleType2.java
+++ b/tests/004-annotations/src/android/test/anno/AnnoSimpleType2.java
@@ -6,4 +6,3 @@
 @Retention(RetentionPolicy.RUNTIME)
 @Inherited
 public @interface AnnoSimpleType2 {}
-
diff --git a/tests/004-annotations/src/android/test/anno/AnnoSimpleTypeInvis.java b/tests/004-annotations/src/android/test/anno/AnnoSimpleTypeInvis.java
index e6ae9ce..541d82e 100644
--- a/tests/004-annotations/src/android/test/anno/AnnoSimpleTypeInvis.java
+++ b/tests/004-annotations/src/android/test/anno/AnnoSimpleTypeInvis.java
@@ -6,4 +6,3 @@
 @Retention(RetentionPolicy.CLASS)
 
 public @interface AnnoSimpleTypeInvis {}
-
diff --git a/tests/004-annotations/src/android/test/anno/ExportedProperty.java b/tests/004-annotations/src/android/test/anno/ExportedProperty.java
index 380b93d..810d28f 100644
--- a/tests/004-annotations/src/android/test/anno/ExportedProperty.java
+++ b/tests/004-annotations/src/android/test/anno/ExportedProperty.java
@@ -10,4 +10,3 @@
     boolean resolveId() default false;
     IntToString[] mapping() default { @IntToString(from = -1, to = "-1") };
 }
-
diff --git a/tests/004-annotations/src/android/test/anno/FullyNoted.java b/tests/004-annotations/src/android/test/anno/FullyNoted.java
index d24a6d8..76a7b04 100644
--- a/tests/004-annotations/src/android/test/anno/FullyNoted.java
+++ b/tests/004-annotations/src/android/test/anno/FullyNoted.java
@@ -37,4 +37,3 @@
         return 0;
     }
 }
-
diff --git a/tests/004-annotations/src/android/test/anno/INoted.java b/tests/004-annotations/src/android/test/anno/INoted.java
index 7a7198c..b2cd007 100644
--- a/tests/004-annotations/src/android/test/anno/INoted.java
+++ b/tests/004-annotations/src/android/test/anno/INoted.java
@@ -5,4 +5,3 @@
     @AnnoSimpleMethod
     public int bar();
 }
-
diff --git a/tests/004-annotations/src/android/test/anno/IntToString.java b/tests/004-annotations/src/android/test/anno/IntToString.java
index 5363c83..e84fcfa 100644
--- a/tests/004-annotations/src/android/test/anno/IntToString.java
+++ b/tests/004-annotations/src/android/test/anno/IntToString.java
@@ -10,4 +10,3 @@
     int from();
     String to();
 }
-
diff --git a/tests/004-annotations/src/android/test/anno/SimplyNoted.java b/tests/004-annotations/src/android/test/anno/SimplyNoted.java
index 7dce77e..95a3d24 100644
--- a/tests/004-annotations/src/android/test/anno/SimplyNoted.java
+++ b/tests/004-annotations/src/android/test/anno/SimplyNoted.java
@@ -28,4 +28,3 @@
         return bar;
     }
 }
-
diff --git a/tests/004-annotations/src/android/test/anno/SomeClass.java b/tests/004-annotations/src/android/test/anno/SomeClass.java
index 5bb05c9..c21d68d 100644
--- a/tests/004-annotations/src/android/test/anno/SomeClass.java
+++ b/tests/004-annotations/src/android/test/anno/SomeClass.java
@@ -2,4 +2,3 @@
 
 public class SomeClass {
 }
-
diff --git a/tests/004-annotations/src/android/test/anno/SubNoted.java b/tests/004-annotations/src/android/test/anno/SubNoted.java
index 089e5e6..2530346 100644
--- a/tests/004-annotations/src/android/test/anno/SubNoted.java
+++ b/tests/004-annotations/src/android/test/anno/SubNoted.java
@@ -10,4 +10,3 @@
         return 0;
     }
 }
-
diff --git a/tests/004-annotations/src/android/test/anno/TestAnnotations.java b/tests/004-annotations/src/android/test/anno/TestAnnotations.java
index 98fb0ef..4ad32d5 100644
--- a/tests/004-annotations/src/android/test/anno/TestAnnotations.java
+++ b/tests/004-annotations/src/android/test/anno/TestAnnotations.java
@@ -14,7 +14,7 @@
     static private void printAnnotationArray(String prefix, Annotation[] arr) {
         TreeMap<String, Annotation> sorted =
             new TreeMap<String, Annotation>();
-        
+
         for (Annotation a : arr) {
             sorted.put(a.annotationType().getName(), a);
         }
@@ -24,7 +24,7 @@
             System.out.println(prefix + "    " + a.annotationType());
         }
     }
-    
+
     static void printAnnotations(Class clazz) {
         Annotation[] annos;
         Annotation[][] parAnnos;
@@ -120,7 +120,7 @@
         Method meth;
         ExportedProperty property;
         final IntToString[] mapping;
-        
+
         try {
             meth = TestAnnotations.class.getMethod("getFocusType",
                     (Class[])null);
@@ -175,4 +175,3 @@
         System.out.println("SubNoted.get(AnnoSimpleType) = " + anno);
     }
 }
-
diff --git a/tests/004-annotations/src/android/test/anno/package-info.java b/tests/004-annotations/src/android/test/anno/package-info.java
index f434024..74b11f9 100644
--- a/tests/004-annotations/src/android/test/anno/package-info.java
+++ b/tests/004-annotations/src/android/test/anno/package-info.java
@@ -1,3 +1,2 @@
 @AnnoSimplePackage
 package android.test.anno;
-
diff --git a/tests/008-instanceof/src/Iface1.java b/tests/008-instanceof/src/Iface1.java
index 12dcfe7..ba17d45 100644
--- a/tests/008-instanceof/src/Iface1.java
+++ b/tests/008-instanceof/src/Iface1.java
@@ -11,4 +11,3 @@
 
     public String mWahoo = new String("wahoo");
 }
-
diff --git a/tests/008-instanceof/src/Iface2.java b/tests/008-instanceof/src/Iface2.java
index 6f8c262..83fe650 100644
--- a/tests/008-instanceof/src/Iface2.java
+++ b/tests/008-instanceof/src/Iface2.java
@@ -7,4 +7,3 @@
 
     public int iFunc2(int ii);
 }
-
diff --git a/tests/008-instanceof/src/Iface2Sub1.java b/tests/008-instanceof/src/Iface2Sub1.java
index 83c8791..db3e905 100644
--- a/tests/008-instanceof/src/Iface2Sub1.java
+++ b/tests/008-instanceof/src/Iface2Sub1.java
@@ -7,4 +7,3 @@
 
     //public int iFunc2(int ii);
 }
-
diff --git a/tests/008-instanceof/src/ImplA.java b/tests/008-instanceof/src/ImplA.java
index 9949d01..9007001 100644
--- a/tests/008-instanceof/src/ImplA.java
+++ b/tests/008-instanceof/src/ImplA.java
@@ -12,4 +12,3 @@
         return ii+2;
     }
 }
-
diff --git a/tests/008-instanceof/src/ImplB.java b/tests/008-instanceof/src/ImplB.java
index b3a0c89..619fa00 100644
--- a/tests/008-instanceof/src/ImplB.java
+++ b/tests/008-instanceof/src/ImplB.java
@@ -14,4 +14,3 @@
 
     public static String mWhoami = new String("ImplB!");
 }
-
diff --git a/tests/009-instanceof2/src/Iface1.java b/tests/009-instanceof2/src/Iface1.java
index 12dcfe7..ba17d45 100644
--- a/tests/009-instanceof2/src/Iface1.java
+++ b/tests/009-instanceof2/src/Iface1.java
@@ -11,4 +11,3 @@
 
     public String mWahoo = new String("wahoo");
 }
-
diff --git a/tests/009-instanceof2/src/Iface2.java b/tests/009-instanceof2/src/Iface2.java
index 6f8c262..83fe650 100644
--- a/tests/009-instanceof2/src/Iface2.java
+++ b/tests/009-instanceof2/src/Iface2.java
@@ -7,4 +7,3 @@
 
     public int iFunc2(int ii);
 }
-
diff --git a/tests/009-instanceof2/src/Iface2Sub1.java b/tests/009-instanceof2/src/Iface2Sub1.java
index 83c8791..db3e905 100644
--- a/tests/009-instanceof2/src/Iface2Sub1.java
+++ b/tests/009-instanceof2/src/Iface2Sub1.java
@@ -7,4 +7,3 @@
 
     //public int iFunc2(int ii);
 }
-
diff --git a/tests/009-instanceof2/src/ImplA.java b/tests/009-instanceof2/src/ImplA.java
index 9949d01..9007001 100644
--- a/tests/009-instanceof2/src/ImplA.java
+++ b/tests/009-instanceof2/src/ImplA.java
@@ -12,4 +12,3 @@
         return ii+2;
     }
 }
-
diff --git a/tests/009-instanceof2/src/ImplB.java b/tests/009-instanceof2/src/ImplB.java
index b3a0c89..619fa00 100644
--- a/tests/009-instanceof2/src/ImplB.java
+++ b/tests/009-instanceof2/src/ImplB.java
@@ -14,4 +14,3 @@
 
     public static String mWhoami = new String("ImplB!");
 }
-
diff --git a/tests/010-instance/src/Y.java b/tests/010-instance/src/Y.java
index 6585ee7..2b2c371 100644
--- a/tests/010-instance/src/Y.java
+++ b/tests/010-instance/src/Y.java
@@ -6,4 +6,3 @@
         return 1;
     }
 }
-
diff --git a/tests/011-array-copy/src/Iface1.java b/tests/011-array-copy/src/Iface1.java
index 12dcfe7..ba17d45 100644
--- a/tests/011-array-copy/src/Iface1.java
+++ b/tests/011-array-copy/src/Iface1.java
@@ -11,4 +11,3 @@
 
     public String mWahoo = new String("wahoo");
 }
-
diff --git a/tests/011-array-copy/src/Iface2.java b/tests/011-array-copy/src/Iface2.java
index 6f8c262..83fe650 100644
--- a/tests/011-array-copy/src/Iface2.java
+++ b/tests/011-array-copy/src/Iface2.java
@@ -7,4 +7,3 @@
 
     public int iFunc2(int ii);
 }
-
diff --git a/tests/011-array-copy/src/ImplA.java b/tests/011-array-copy/src/ImplA.java
index 9949d01..9007001 100644
--- a/tests/011-array-copy/src/ImplA.java
+++ b/tests/011-array-copy/src/ImplA.java
@@ -12,4 +12,3 @@
         return ii+2;
     }
 }
-
diff --git a/tests/015-switch/src/Main.java b/tests/015-switch/src/Main.java
index 678a564..7198e2b 100644
--- a/tests/015-switch/src/Main.java
+++ b/tests/015-switch/src/Main.java
@@ -103,4 +103,3 @@
         }
     }
 }
-
diff --git a/tests/021-string2/src/junit/framework/Assert.java b/tests/021-string2/src/junit/framework/Assert.java
index c1bc7b2..364e646 100644
--- a/tests/021-string2/src/junit/framework/Assert.java
+++ b/tests/021-string2/src/junit/framework/Assert.java
@@ -71,7 +71,7 @@
         assertEquals(null, expected, actual);
     }
     /**
-     * Asserts that two Strings are equal. 
+     * Asserts that two Strings are equal.
      */
     static public void assertEquals(String message, String expected, String actual) {
         if (expected == null && actual == null)
@@ -81,7 +81,7 @@
         throw new ComparisonFailure(message, expected, actual);
     }
     /**
-     * Asserts that two Strings are equal. 
+     * Asserts that two Strings are equal.
      */
     static public void assertEquals(String expected, String actual) {
         assertEquals(null, expected, actual);
diff --git a/tests/021-string2/src/junit/framework/ComparisonFailure.java b/tests/021-string2/src/junit/framework/ComparisonFailure.java
index a0ad176..0cb2cee 100644
--- a/tests/021-string2/src/junit/framework/ComparisonFailure.java
+++ b/tests/021-string2/src/junit/framework/ComparisonFailure.java
@@ -2,7 +2,7 @@
 
 /**
  * Thrown when an assert equals for Strings failed.
- * 
+ *
  * Inspired by a patch from Alex Chaffee mailto:alex@purpletech.com
  */
 public class ComparisonFailure extends AssertionFailedError {
@@ -20,19 +20,19 @@
         fExpected= expected;
         fActual= actual;
     }
-    
+
     /**
      * Returns "..." in place of common prefix and "..." in
      * place of common suffix between expected and actual.
-     * 
+     *
      * @see java.lang.Throwable#getMessage()
      */
     public String getMessage() {
         if (fExpected == null || fActual == null)
             return Assert.format(super.getMessage(), fExpected, fActual);
-            
+
         int end= Math.min(fExpected.length(), fActual.length());
-        
+
         int i= 0;
         for(; i < end; i++) {
             if (fExpected.charAt(i) != fActual.charAt(i))
@@ -45,7 +45,7 @@
                 break;
         }
         String actual, expected;
-        
+
         // equal strings
         if (j < i && k < i) {
             expected= fExpected;
@@ -57,12 +57,12 @@
                 expected= "..."+expected;
                 actual= "..."+actual;
             }
-            
+
             if (j < fExpected.length()-1)
                 expected= expected+"...";
             if (k < fActual.length()-1)
                 actual= actual+"...";
-        }    
+        }
         return Assert.format(super.getMessage(), expected, actual);
     }
 }
diff --git a/tests/022-interface/src/Iface1.java b/tests/022-interface/src/Iface1.java
index 12dcfe7..ba17d45 100644
--- a/tests/022-interface/src/Iface1.java
+++ b/tests/022-interface/src/Iface1.java
@@ -11,4 +11,3 @@
 
     public String mWahoo = new String("wahoo");
 }
-
diff --git a/tests/022-interface/src/Iface2.java b/tests/022-interface/src/Iface2.java
index 6f8c262..83fe650 100644
--- a/tests/022-interface/src/Iface2.java
+++ b/tests/022-interface/src/Iface2.java
@@ -7,4 +7,3 @@
 
     public int iFunc2(int ii);
 }
-
diff --git a/tests/022-interface/src/Iface2Sub1.java b/tests/022-interface/src/Iface2Sub1.java
index 83c8791..db3e905 100644
--- a/tests/022-interface/src/Iface2Sub1.java
+++ b/tests/022-interface/src/Iface2Sub1.java
@@ -7,4 +7,3 @@
 
     //public int iFunc2(int ii);
 }
-
diff --git a/tests/022-interface/src/ImplA.java b/tests/022-interface/src/ImplA.java
index 9949d01..9007001 100644
--- a/tests/022-interface/src/ImplA.java
+++ b/tests/022-interface/src/ImplA.java
@@ -12,4 +12,3 @@
         return ii+2;
     }
 }
-
diff --git a/tests/022-interface/src/ImplB.java b/tests/022-interface/src/ImplB.java
index b3a0c89..619fa00 100644
--- a/tests/022-interface/src/ImplB.java
+++ b/tests/022-interface/src/ImplB.java
@@ -14,4 +14,3 @@
 
     public static String mWhoami = new String("ImplB!");
 }
-
diff --git a/tests/023-many-interfaces/iface-gen.c b/tests/023-many-interfaces/iface-gen.c
index 313de69..1e3284a 100644
--- a/tests/023-many-interfaces/iface-gen.c
+++ b/tests/023-many-interfaces/iface-gen.c
@@ -52,4 +52,3 @@
 
     return (result != 0);
 }
-
diff --git a/tests/023-many-interfaces/src/ManyInterfaces.java b/tests/023-many-interfaces/src/ManyInterfaces.java
index 3c67f1f..375938a 100644
--- a/tests/023-many-interfaces/src/ManyInterfaces.java
+++ b/tests/023-many-interfaces/src/ManyInterfaces.java
@@ -152,7 +152,7 @@
 {
     /** whether to report timing information */
     private static boolean timing = false;
-    
+
     /**
      * Report on a section.
      */
@@ -168,7 +168,7 @@
 
     /**
      * Run tests.
-     * 
+     *
      * @param timing whether to print out timing info
      */
     public static void run(boolean timing) {
@@ -233,7 +233,7 @@
         end = System.nanoTime();
         report("testInst099", start, end, iter, rept);
     }
-    
+
     public int func001() { return 1; }
     public int func003() { return 3; }
     public int func005() { return 5; }
@@ -411,4 +411,3 @@
         }
     }
 }
-
diff --git a/tests/024-illegal-access/src/SemiPrivate.java b/tests/024-illegal-access/src/SemiPrivate.java
index cc7f2d8..17b2ac0 100644
--- a/tests/024-illegal-access/src/SemiPrivate.java
+++ b/tests/024-illegal-access/src/SemiPrivate.java
@@ -6,4 +6,3 @@
 public class SemiPrivate {
     /* not private */ static String mPrivvy = "stuff";
 }
-
diff --git a/tests/024-illegal-access/src/otherpkg/Package.java b/tests/024-illegal-access/src/otherpkg/Package.java
index a82b321..bc295b5 100644
--- a/tests/024-illegal-access/src/otherpkg/Package.java
+++ b/tests/024-illegal-access/src/otherpkg/Package.java
@@ -21,4 +21,3 @@
  */
 public class Package {
 }
-
diff --git a/tests/024-illegal-access/src2/SemiPrivate.java b/tests/024-illegal-access/src2/SemiPrivate.java
index 6bdf610..cf6f8e6 100644
--- a/tests/024-illegal-access/src2/SemiPrivate.java
+++ b/tests/024-illegal-access/src2/SemiPrivate.java
@@ -6,4 +6,3 @@
 public class SemiPrivate {
     private static String mPrivvy = "stuff";
 }
-
diff --git a/tests/024-illegal-access/src2/otherpkg/Package.java b/tests/024-illegal-access/src2/otherpkg/Package.java
index 7f740d4..54d8341 100644
--- a/tests/024-illegal-access/src2/otherpkg/Package.java
+++ b/tests/024-illegal-access/src2/otherpkg/Package.java
@@ -21,4 +21,3 @@
  */
 class Package {
 }
-
diff --git a/tests/025-access-controller/src/Privvy.java b/tests/025-access-controller/src/Privvy.java
index d8027a1..07a0678 100644
--- a/tests/025-access-controller/src/Privvy.java
+++ b/tests/025-access-controller/src/Privvy.java
@@ -16,4 +16,3 @@
         return mValue;
     }
 }
-
diff --git a/tests/027-arithmetic/src/Main.java b/tests/027-arithmetic/src/Main.java
index 6299eed..4d0f74e 100644
--- a/tests/027-arithmetic/src/Main.java
+++ b/tests/027-arithmetic/src/Main.java
@@ -139,4 +139,3 @@
         unsignedShiftTest();
     }
 }
-
diff --git a/tests/028-array-write/src/Main.java b/tests/028-array-write/src/Main.java
index c9181f1..6f36f84 100644
--- a/tests/028-array-write/src/Main.java
+++ b/tests/028-array-write/src/Main.java
@@ -6,7 +6,7 @@
 public class Main {
     /** whether to report times */
     static boolean timing = false;
-    
+
     static final int STORAGE_SIZE = 128*1024;
     static int[] mStorage = new int[STORAGE_SIZE];
 
@@ -60,10 +60,9 @@
         if ((args.length >= 1) && args[0].equals("--timing")) {
             timing = true;
         }
-        
+
         writeTest();
         copyTest();
         System.out.println("Done!");
     }
 }
-
diff --git a/tests/029-assert/src/Main.java b/tests/029-assert/src/Main.java
index efa10f7..1e5cc7c 100644
--- a/tests/029-assert/src/Main.java
+++ b/tests/029-assert/src/Main.java
@@ -14,4 +14,3 @@
         }
     }
 }
-
diff --git a/tests/030-bad-finalizer/run b/tests/030-bad-finalizer/run
index 6e02946..8e03cd3 100644
--- a/tests/030-bad-finalizer/run
+++ b/tests/030-bad-finalizer/run
@@ -17,11 +17,11 @@
 ${RUN} "$@" > original-output.txt
 
 cat original-output.txt | awk '
-/Segmentation fault/ { 
+/Segmentation fault/ {
     # ignore the details of the line
     print "(segfault)"
     next;
 }
-{ 
+{
     print;
 }'
diff --git a/tests/030-bad-finalizer/src/BadFinalizer.java b/tests/030-bad-finalizer/src/BadFinalizer.java
index 25aee3f..3ff422b 100644
--- a/tests/030-bad-finalizer/src/BadFinalizer.java
+++ b/tests/030-bad-finalizer/src/BadFinalizer.java
@@ -30,4 +30,3 @@
         }
     }
 }
-
diff --git a/tests/030-bad-finalizer/src/Main.java b/tests/030-bad-finalizer/src/Main.java
index 542020e..c063476 100644
--- a/tests/030-bad-finalizer/src/Main.java
+++ b/tests/030-bad-finalizer/src/Main.java
@@ -18,9 +18,8 @@
             System.out.println("Requesting another GC.");
             System.gc();
         }
-        
+
         System.out.println("Done waiting.");
         System.exit(0);
     }
 }
-
diff --git a/tests/031-class-attributes/src/ClassAttrs.java b/tests/031-class-attributes/src/ClassAttrs.java
index 35bd550..c1407bd 100644
--- a/tests/031-class-attributes/src/ClassAttrs.java
+++ b/tests/031-class-attributes/src/ClassAttrs.java
@@ -53,7 +53,7 @@
             meth = MemberClass.class.getMethod("foo", (Class[]) null);
             System.out.println("method signature: "
                     + getSignatureAttribute(meth));
-            
+
             Field field;
             field = MemberClass.class.getField("mWha");
             System.out.println("field signature: "
diff --git a/tests/032-concrete-sub/src/AbstractBase.java b/tests/032-concrete-sub/src/AbstractBase.java
index 875303e..6281189 100644
--- a/tests/032-concrete-sub/src/AbstractBase.java
+++ b/tests/032-concrete-sub/src/AbstractBase.java
@@ -24,4 +24,3 @@
 
     public void abstractOrNot() {}
 }
-
diff --git a/tests/032-concrete-sub/src/ConcreteSub.java b/tests/032-concrete-sub/src/ConcreteSub.java
index fbaeb1b..083f25d 100644
--- a/tests/032-concrete-sub/src/ConcreteSub.java
+++ b/tests/032-concrete-sub/src/ConcreteSub.java
@@ -24,7 +24,7 @@
         System.out.println("calling abs.doStuff()");
         abs.doStuff();
     }
-    
+
     public static void main() {
         ConcreteSub sub = new ConcreteSub();
 
@@ -51,4 +51,3 @@
         System.out.println("meth modifiers=" + meth.getModifiers());
     }
 }
-
diff --git a/tests/032-concrete-sub/src/ConcreteSub2.java b/tests/032-concrete-sub/src/ConcreteSub2.java
index 0b8fbf5..0a9e67e 100644
--- a/tests/032-concrete-sub/src/ConcreteSub2.java
+++ b/tests/032-concrete-sub/src/ConcreteSub2.java
@@ -24,4 +24,3 @@
         abstractOrNot();
     }
 }
-
diff --git a/tests/032-concrete-sub/src/Main.java b/tests/032-concrete-sub/src/Main.java
index a3aa2b8..4a5193d 100644
--- a/tests/032-concrete-sub/src/Main.java
+++ b/tests/032-concrete-sub/src/Main.java
@@ -34,4 +34,3 @@
         }
     }
 }
-
diff --git a/tests/032-concrete-sub/src2/AbstractBase.java b/tests/032-concrete-sub/src2/AbstractBase.java
index 78ec4b1..534f738 100644
--- a/tests/032-concrete-sub/src2/AbstractBase.java
+++ b/tests/032-concrete-sub/src2/AbstractBase.java
@@ -27,4 +27,3 @@
 
     public abstract void abstractOrNot();
 }
-
diff --git a/tests/033-class-init-deadlock/src/Main.java b/tests/033-class-init-deadlock/src/Main.java
index df13c26..27c4922 100644
--- a/tests/033-class-init-deadlock/src/Main.java
+++ b/tests/033-class-init-deadlock/src/Main.java
@@ -11,15 +11,15 @@
 
     static public void main(String[] args) {
         Thread thread1, thread2;
-        
+
         System.out.println("Deadlock test starting.");
         thread1 = new Thread() { public void run() { new A(); } };
         thread2 = new Thread() { public void run() { new B(); } };
         thread1.start();
         thread2.start();
-        
+
         try { Thread.sleep(6000); } catch (InterruptedException ie) { }
-        
+
         System.out.println("Deadlock test interupting threads.");
         thread1.interrupt();
         thread2.interrupt();
@@ -49,4 +49,3 @@
         Main.bInitialized = true;
     }
 }
-
diff --git a/tests/034-call-null/src/Main.java b/tests/034-call-null/src/Main.java
index 6b5c28c..a0a129e 100644
--- a/tests/034-call-null/src/Main.java
+++ b/tests/034-call-null/src/Main.java
@@ -12,4 +12,3 @@
         instance.doStuff();
     }
 }
-
diff --git a/tests/035-enum/src/Main.java b/tests/035-enum/src/Main.java
index c0915d4..09fcc98 100644
--- a/tests/035-enum/src/Main.java
+++ b/tests/035-enum/src/Main.java
@@ -21,4 +21,3 @@
         System.out.println("  enum? " + field.isEnumConstant());
     }
 }
-
diff --git a/tests/036-finalizer/src/FinalizerTest.java b/tests/036-finalizer/src/FinalizerTest.java
index 7bf289e..420ec34 100644
--- a/tests/036-finalizer/src/FinalizerTest.java
+++ b/tests/036-finalizer/src/FinalizerTest.java
@@ -21,4 +21,3 @@
         mReborn = this;
     }
 }
-
diff --git a/tests/036-finalizer/src/Main.java b/tests/036-finalizer/src/Main.java
index a8623f8..c29cc11 100644
--- a/tests/036-finalizer/src/Main.java
+++ b/tests/036-finalizer/src/Main.java
@@ -40,7 +40,7 @@
         } catch (InterruptedException ie) {
             throw new RuntimeException(ie);
         }
-                
+
         return wimp[0];
     }
 
@@ -80,7 +80,7 @@
         /* this will try to collect and finalize ft */
         System.out.println("gc");
         System.gc();
-        
+
         System.out.println("wimp: " + wimpString(wimp));
         System.out.println("finalize");
         System.runFinalization();
@@ -105,4 +105,3 @@
         System.out.println("wimp: " + wimpString(wimp));
     }
 }
-
diff --git a/tests/037-inherit/src/Main.java b/tests/037-inherit/src/Main.java
index e0b36c7..55b782e 100644
--- a/tests/037-inherit/src/Main.java
+++ b/tests/037-inherit/src/Main.java
@@ -35,4 +35,3 @@
         return this.MAGIC_INT;
     }
 }
-
diff --git a/tests/039-join-main/src/Main.java b/tests/039-join-main/src/Main.java
index 8d66b58..0644f1c 100644
--- a/tests/039-join-main/src/Main.java
+++ b/tests/039-join-main/src/Main.java
@@ -6,7 +6,7 @@
 public class Main {
     public static void main(String[] args) {
         Thread t;
-        
+
         t = new Thread(new JoinMainSub(Thread.currentThread()), "Joiner");
         System.out.print("Starting thread '" + t.getName() + "'\n");
         t.start();
@@ -39,4 +39,3 @@
         }
     }
 }
-
diff --git a/tests/040-miranda/src/MirandaAbstract.java b/tests/040-miranda/src/MirandaAbstract.java
index 1ce97c3..b603ce6 100644
--- a/tests/040-miranda/src/MirandaAbstract.java
+++ b/tests/040-miranda/src/MirandaAbstract.java
@@ -14,4 +14,3 @@
         return true;
     }
 }
-
diff --git a/tests/040-miranda/src/MirandaClass.java b/tests/040-miranda/src/MirandaClass.java
index 835752d..3bf6704 100644
--- a/tests/040-miranda/src/MirandaClass.java
+++ b/tests/040-miranda/src/MirandaClass.java
@@ -22,4 +22,3 @@
         return false;
     }
 }
-
diff --git a/tests/040-miranda/src/MirandaClass2.java b/tests/040-miranda/src/MirandaClass2.java
index 4c07bd9..e9bdf2b 100644
--- a/tests/040-miranda/src/MirandaClass2.java
+++ b/tests/040-miranda/src/MirandaClass2.java
@@ -7,4 +7,3 @@
         return 28;
     }
 }
-
diff --git a/tests/040-miranda/src/MirandaInterface.java b/tests/040-miranda/src/MirandaInterface.java
index a7c89fd..2c0a59a 100644
--- a/tests/040-miranda/src/MirandaInterface.java
+++ b/tests/040-miranda/src/MirandaInterface.java
@@ -8,4 +8,3 @@
     public boolean inInterface();
 
 }
-
diff --git a/tests/040-miranda/src/MirandaInterface2.java b/tests/040-miranda/src/MirandaInterface2.java
index f0187c6..83b6af8 100644
--- a/tests/040-miranda/src/MirandaInterface2.java
+++ b/tests/040-miranda/src/MirandaInterface2.java
@@ -10,4 +10,3 @@
     public int inInterface2();
 
 }
-
diff --git a/tests/042-new-instance/src/Main.java b/tests/042-new-instance/src/Main.java
index 037aa2a..8faef13 100644
--- a/tests/042-new-instance/src/Main.java
+++ b/tests/042-new-instance/src/Main.java
@@ -154,4 +154,3 @@
         }
     }
 }
-
diff --git a/tests/042-new-instance/src/MaybeAbstract.java b/tests/042-new-instance/src/MaybeAbstract.java
index 43c002b..6d3b05b 100644
--- a/tests/042-new-instance/src/MaybeAbstract.java
+++ b/tests/042-new-instance/src/MaybeAbstract.java
@@ -18,4 +18,3 @@
     public MaybeAbstract() {}
     int foo() { return 0; }
 }
-
diff --git a/tests/042-new-instance/src2/MaybeAbstract.java b/tests/042-new-instance/src2/MaybeAbstract.java
index bfbfd45..8b70a07 100644
--- a/tests/042-new-instance/src2/MaybeAbstract.java
+++ b/tests/042-new-instance/src2/MaybeAbstract.java
@@ -18,4 +18,3 @@
     public MaybeAbstract() {}
     int foo() { return 0; }
 }
-
diff --git a/tests/043-privates/src/Main.java b/tests/043-privates/src/Main.java
index 9c4d357..73b4d79 100644
--- a/tests/043-privates/src/Main.java
+++ b/tests/043-privates/src/Main.java
@@ -43,4 +43,3 @@
         return "PrivatePackageSub!";
     }
 }
-
diff --git a/tests/044-proxy/src/BasicTest.java b/tests/044-proxy/src/BasicTest.java
index 1633812..2a453c4 100644
--- a/tests/044-proxy/src/BasicTest.java
+++ b/tests/044-proxy/src/BasicTest.java
@@ -261,4 +261,3 @@
         return result;
     }
 }
-
diff --git a/tests/044-proxy/src/Clash.java b/tests/044-proxy/src/Clash.java
index 31a9d2f..adeffdc 100644
--- a/tests/044-proxy/src/Clash.java
+++ b/tests/044-proxy/src/Clash.java
@@ -68,4 +68,3 @@
         return null;
     }
 }
-
diff --git a/tests/044-proxy/src/Clash2.java b/tests/044-proxy/src/Clash2.java
index 44ffe47..2a384f4 100644
--- a/tests/044-proxy/src/Clash2.java
+++ b/tests/044-proxy/src/Clash2.java
@@ -58,4 +58,3 @@
         return null;
     }
 }
-
diff --git a/tests/044-proxy/src/Clash3.java b/tests/044-proxy/src/Clash3.java
index ce323da..6d6f2f2 100644
--- a/tests/044-proxy/src/Clash3.java
+++ b/tests/044-proxy/src/Clash3.java
@@ -73,4 +73,3 @@
         return null;
     }
 }
-
diff --git a/tests/044-proxy/src/Clash4.java b/tests/044-proxy/src/Clash4.java
index f200573..1bfb37f 100644
--- a/tests/044-proxy/src/Clash4.java
+++ b/tests/044-proxy/src/Clash4.java
@@ -75,4 +75,3 @@
         return null;
     }
 }
-
diff --git a/tests/044-proxy/src/Main.java b/tests/044-proxy/src/Main.java
index 64ba9b8..01926af 100644
--- a/tests/044-proxy/src/Main.java
+++ b/tests/044-proxy/src/Main.java
@@ -27,4 +27,3 @@
         WrappedThrow.main(null);
     }
 }
-
diff --git a/tests/044-proxy/src/WrappedThrow.java b/tests/044-proxy/src/WrappedThrow.java
index ea4af24..27ae84e 100644
--- a/tests/044-proxy/src/WrappedThrow.java
+++ b/tests/044-proxy/src/WrappedThrow.java
@@ -242,4 +242,3 @@
         return result;
     }
 }
-
diff --git a/tests/045-reflect-array/src/Main.java b/tests/045-reflect-array/src/Main.java
index 1be05dd..c70e291 100644
--- a/tests/045-reflect-array/src/Main.java
+++ b/tests/045-reflect-array/src/Main.java
@@ -145,4 +145,3 @@
         System.out.println("ReflectArrayTest.testMulti passed");
     }
 }
-
diff --git a/tests/046-reflect/src/Main.java b/tests/046-reflect/src/Main.java
index 99b1c4e..399a417 100644
--- a/tests/046-reflect/src/Main.java
+++ b/tests/046-reflect/src/Main.java
@@ -433,4 +433,3 @@
     }
     public void createNoisyInit(NoisyInit ni) {}
 }
-
diff --git a/tests/047-returns/src/Main.java b/tests/047-returns/src/Main.java
index dc8ed76..d53c4a7 100644
--- a/tests/047-returns/src/Main.java
+++ b/tests/047-returns/src/Main.java
@@ -63,4 +63,3 @@
 interface CommonInterface {
     int doStuff();
 }
-
diff --git a/tests/048-server-socket/src/Main.java b/tests/048-server-socket/src/Main.java
index b21210a..55dbf9a 100644
--- a/tests/048-server-socket/src/Main.java
+++ b/tests/048-server-socket/src/Main.java
@@ -50,4 +50,3 @@
         System.out.println("done");
     }
 }
-
diff --git a/tests/049-show-object/src/Main.java b/tests/049-show-object/src/Main.java
index 60a4cef..d31eeda 100644
--- a/tests/049-show-object/src/Main.java
+++ b/tests/049-show-object/src/Main.java
@@ -32,4 +32,3 @@
         showObject(array);
     }
 }
-
diff --git a/tests/050-sync-test/src/Main.java b/tests/050-sync-test/src/Main.java
index 620e899..c2ea192 100644
--- a/tests/050-sync-test/src/Main.java
+++ b/tests/050-sync-test/src/Main.java
@@ -42,7 +42,7 @@
 
         try {
             Thread.sleep(100);
-        } 
+        }
         catch (InterruptedException ie) {
             System.out.println("INTERRUPT!");
             ie.printStackTrace();
@@ -153,7 +153,7 @@
             }
             catch (InterruptedException ie) {
                 // Expecting this; interrupted should be false.
-                System.out.println(Thread.currentThread().getName() + 
+                System.out.println(Thread.currentThread().getName() +
                         " interrupted, flag=" + Thread.interrupted());
                 intr = true;
             }
@@ -177,4 +177,3 @@
         }
     }
 }
-
diff --git a/tests/050-sync-test/src/ThreadDeathHandler.java b/tests/050-sync-test/src/ThreadDeathHandler.java
index 3f42f4d..5ea61a5 100644
--- a/tests/050-sync-test/src/ThreadDeathHandler.java
+++ b/tests/050-sync-test/src/ThreadDeathHandler.java
@@ -17,4 +17,3 @@
         e.printStackTrace();
     }
 }
-
diff --git a/tests/051-thread/src/Main.java b/tests/051-thread/src/Main.java
index ff1b181..9acc89e 100644
--- a/tests/051-thread/src/Main.java
+++ b/tests/051-thread/src/Main.java
@@ -32,7 +32,7 @@
         } catch (InterruptedException ex) {
             ex.printStackTrace();
         }
-        
+
         System.out.print("Thread starter returning\n");
     }
 
@@ -71,4 +71,3 @@
         }
     }
 }
-
diff --git a/tests/052-verifier-fun/src/Main.java b/tests/052-verifier-fun/src/Main.java
index 81ff654..ca960cf 100644
--- a/tests/052-verifier-fun/src/Main.java
+++ b/tests/052-verifier-fun/src/Main.java
@@ -107,4 +107,3 @@
         feature.doStuff();
     }
 }
-
diff --git a/tests/053-wait-some/src/Main.java b/tests/053-wait-some/src/Main.java
index 468f9f0..51e6c52 100644
--- a/tests/053-wait-some/src/Main.java
+++ b/tests/053-wait-some/src/Main.java
@@ -13,7 +13,7 @@
         boolean timing = (args.length >= 1) && args[0].equals("--timing");
         doit(timing);
     }
-    
+
     public static void doit(boolean timing) {
         Object sleepy = new Object();
         long start, end;
@@ -47,10 +47,10 @@
                     if (epsilon > 50) {
                         epsilon = 50;
                     }
-                    
+
                     long min = delay - epsilon;
                     long max = delay + epsilon;
-                    
+
                     if (elapsed < min) {
                         System.out.println("  Elapsed time was too short");
                         showTime = true;
@@ -60,7 +60,7 @@
                         showTime = true;
                     }
                 }
-                    
+
                 if (showTime) {
                     System.out.println("  Wall clock elapsed "
                             + elapsed + "ms");
@@ -69,4 +69,3 @@
         }
     }
 }
-
diff --git a/tests/054-uncaught/src/Main.java b/tests/054-uncaught/src/Main.java
index 68e9b42..4ee6b05 100644
--- a/tests/054-uncaught/src/Main.java
+++ b/tests/054-uncaught/src/Main.java
@@ -8,7 +8,7 @@
         testThread(1);
         testThread(2);
         testThread(3);
-        
+
         catchTheUncaught(1);
     }
 
@@ -22,7 +22,7 @@
             ex.printStackTrace();
         }
     }
-    
+
     static void catchTheUncaught(int which) {
         ThreadDeathHandler defHandler = new ThreadDeathHandler("DEFAULT");
         ThreadDeathHandler threadHandler = new ThreadDeathHandler("THREAD");
@@ -55,7 +55,7 @@
         public Helper(int which) {
             this.which = which;
         }
-        
+
         public void run() {
             catchTheUncaught(which);
         }
diff --git a/tests/054-uncaught/src/ThreadDeathHandler.java b/tests/054-uncaught/src/ThreadDeathHandler.java
index 3f42f4d..5ea61a5 100644
--- a/tests/054-uncaught/src/ThreadDeathHandler.java
+++ b/tests/054-uncaught/src/ThreadDeathHandler.java
@@ -17,4 +17,3 @@
         e.printStackTrace();
     }
 }
-
diff --git a/tests/055-enum-performance/src/Main.java b/tests/055-enum-performance/src/Main.java
index a576d3a..64d03eb 100644
--- a/tests/055-enum-performance/src/Main.java
+++ b/tests/055-enum-performance/src/Main.java
@@ -3,7 +3,7 @@
 public class Main {
     /** used by {@link #basisCall} */
     static private int basisTestValue = 12;
-    
+
     static public void main(String[] args) throws Exception {
         boolean timing = (args.length >= 1) && args[0].equals("--timing");
         run(timing);
@@ -11,7 +11,7 @@
 
     static public void run(boolean timing) {
         preTest();
-        
+
         long time0 = System.nanoTime();
         int count1 = test1(500);
         long time1 = System.nanoTime();
@@ -105,7 +105,7 @@
 
     static public int basisCall(int i, String name) {
         int compare = name.compareTo("fuzzbot");
-        
+
         if (i < (basisTestValue * compare)) {
             return basisTestValue;
         } else {
diff --git a/tests/057-iteration-performance/src/Main.java b/tests/057-iteration-performance/src/Main.java
index defbd75..d562802 100644
--- a/tests/057-iteration-performance/src/Main.java
+++ b/tests/057-iteration-performance/src/Main.java
@@ -19,7 +19,7 @@
 /**
  * The matrix of tests includes the A-E axis for loop body contents and
  * the 0-5 axis for iterator style.
- * 
+ *
  * <ul>
  * <li>A: empty body</li>
  * <li>B: array element access and update</li>
@@ -30,7 +30,7 @@
  * <li>G: one small object allocation (empty constructor)</li>
  * <li>H: copy 8k of bytes from one array to another</li>
  * </ul>
- * 
+ *
  * <ul>
  * <li>0: for() loop backward to 0</li>
  * <li>1: for() loop forward to local variable</li>
@@ -44,7 +44,7 @@
 public class Main {
     static public final int BODIES = 8;
     static public final int LOOPS = 7;
-    
+
     static public void main(String[] args) throws Exception {
         boolean timing = (args.length >= 1) && args[0].equals("--timing");
 
@@ -70,14 +70,14 @@
         if (timing) {
             System.out.println("iters = " + iters);
         }
-        
+
         run(timing, iters);
     }
 
     static private enum Normalization {
         NONE, PER_COLUMN, TOP_LEFT;
     }
-    
+
     static public void printTimings(double[][] timings, Normalization norm) {
         System.out.println();
         System.out.printf("%-7s   A        B        C        D        E" +
@@ -124,7 +124,7 @@
             } else {
                 combineTimings(timings, newTimings, i);
             }
-            
+
             if (checkTimes(timings, timing)) {
                 break;
             }
@@ -137,7 +137,7 @@
         if (! goodTimes) {
             timing = true;
         }
-        
+
         if (timing) {
             printTimings(timings, Normalization.NONE);
             printTimings(timings, Normalization.TOP_LEFT);
@@ -151,13 +151,13 @@
             int oldWeight) {
         for (int i = 0; i < target.length; i++) {
             for (int j = 0; j < target[i].length; j++) {
-                target[i][j] = 
+                target[i][j] =
                     ((target[i][j] * oldWeight) + newTimes[i][j])
                     / (oldWeight + 1);
             }
         }
     }
-    
+
     static public boolean checkTimes(double[][] timings, boolean print) {
         // expected increase over A1
         double[][] expected = {
@@ -167,11 +167,11 @@
             {  1.6,  2.8,  2.9,  3.6,  6.8, 12.6, 63.5,  97.0 },
             {  1.7,  3.0,  2.9,  3.7,  6.9, 12.8, 64.0,  98.0 },
             {  6.0,  6.0,  6.0,  7.0, 10.0, 15.0, 64.5, 105.0 },
-            { 31.0, 31.2, 31.5, 34.0, 41.0, 43.0, 91.0, 135.0 }, 
+            { 31.0, 31.2, 31.5, 34.0, 41.0, 43.0, 91.0, 135.0 },
         };
 
         boolean good = true;
-        
+
         for (int x = 0; x < BODIES; x++) {
             for (int y = 0; y < LOOPS; y++) {
                 double ratio = timings[x][y] / timings[0][0];
@@ -187,7 +187,7 @@
 
         return good;
     }
-    
+
     static public double[][] runAllTests(int iters, boolean print) {
         // diters is used to get usec, not nanosec; hence the extra 1000.
         double diters = (double) iters * INNER_COUNT * 1000;
@@ -200,7 +200,7 @@
         if (print) {
             System.out.println("Running A...");
         }
-        
+
         t0 = System.nanoTime();
         testA0(iters);
         t1 = System.nanoTime();
@@ -226,11 +226,11 @@
         timings[0][6] = (t7 - t6) / diters;
 
         // Column B
-        
+
         if (print) {
             System.out.println("Running B...");
         }
-        
+
         t0 = System.nanoTime();
         testB0(iters);
         t1 = System.nanoTime();
@@ -256,11 +256,11 @@
         timings[1][6] = (t7 - t6) / diters;
 
         // Column C
-        
+
         if (print) {
             System.out.println("Running C...");
         }
-        
+
         t0 = System.nanoTime();
         testC0(iters);
         t1 = System.nanoTime();
@@ -284,9 +284,9 @@
         timings[2][4] = (t5 - t4) / diters;
         timings[2][5] = (t6 - t5) / diters;
         timings[2][6] = (t7 - t6) / diters;
-        
+
         // Column D
-        
+
         if (print) {
             System.out.println("Running D...");
         }
@@ -314,9 +314,9 @@
         timings[3][4] = (t5 - t4) / diters;
         timings[3][5] = (t6 - t5) / diters;
         timings[3][6] = (t7 - t6) / diters;
-        
+
         // Column E
-        
+
         if (print) {
             System.out.println("Running E...");
         }
@@ -344,9 +344,9 @@
         timings[4][4] = (t5 - t4) / diters;
         timings[4][5] = (t6 - t5) / diters;
         timings[4][6] = (t7 - t6) / diters;
-        
+
         // Column F
-        
+
         if (print) {
             System.out.println("Running F...");
         }
@@ -379,9 +379,9 @@
 
         iters /= 5;
         diters /= 5;
-        
+
         // Column G
-        
+
         if (print) {
             System.out.println("Running G...");
         }
@@ -409,9 +409,9 @@
         timings[6][4] = (t5 - t4) / diters;
         timings[6][5] = (t6 - t5) / diters;
         timings[6][6] = (t7 - t6) / diters;
-        
+
         // Column H
-        
+
         if (print) {
             System.out.println("Running H...");
         }
@@ -472,9 +472,9 @@
             return size;
         }
     }
-    
+
     // The tests themselves
-    
+
     static public void testA0(int iters) {
         for (int outer = iters; outer > 0; outer--) {
             for (int i = INNER_COUNT; i > 0; i--) {
@@ -495,7 +495,7 @@
 
     static public void testA2(int iters) {
         int[] array = INNER_ARRAY;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i = 0; i < array.length; i++) {
                 // empty
@@ -505,7 +505,7 @@
 
     static public void testA3(int iters) {
         int[] array = INNER_ARRAY;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i : array) {
                 // empty
@@ -515,7 +515,7 @@
 
     static public void testA4(int iters) {
         Target target = TARGET;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i = 0; i < target.size; i++) {
                 // empty
@@ -525,7 +525,7 @@
 
     static public void testA5(int iters) {
         Target target = TARGET;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i = 0; i < target.size(); i++) {
                 // empty
@@ -535,7 +535,7 @@
 
     static public void testA6(int iters) {
         ArrayList<Object> list = INNER_LIST;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (Object o : list) {
                 // empty
@@ -545,7 +545,7 @@
 
     static public void testB0(int iters) {
         Target target = TARGET;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i = INNER_COUNT; i > 0; i--) {
                 target.value++;
@@ -567,7 +567,7 @@
     static public void testB2(int iters) {
         Target target = TARGET;
         int[] array = INNER_ARRAY;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i = 0; i < array.length; i++) {
                 target.value++;
@@ -578,7 +578,7 @@
     static public void testB3(int iters) {
         Target target = TARGET;
         int[] array = INNER_ARRAY;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i : array) {
                 target.value++;
@@ -588,7 +588,7 @@
 
     static public void testB4(int iters) {
         Target target = TARGET;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i = 0; i < target.size; i++) {
                 target.value++;
@@ -598,7 +598,7 @@
 
     static public void testB5(int iters) {
         Target target = TARGET;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i = 0; i < target.size(); i++) {
                 target.value++;
@@ -609,7 +609,7 @@
     static public void testB6(int iters) {
         Target target = TARGET;
         ArrayList<Object> list = INNER_LIST;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (Object o : list) {
                 target.value++;
@@ -640,7 +640,7 @@
 
     static public void testC2(int iters) {
         int[] array = INNER_ARRAY;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i = 0; i < array.length; i++) {
                 array[i]++;
@@ -650,7 +650,7 @@
 
     static public void testC3(int iters) {
         int[] array = INNER_ARRAY;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i : array) {
                 array[0] = i + 1;
@@ -661,7 +661,7 @@
     static public void testC4(int iters) {
         Target target = TARGET;
         int[] array = INNER_ARRAY;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i = 0; i < target.size; i++) {
                 array[i]++;
@@ -672,7 +672,7 @@
     static public void testC5(int iters) {
         int[] array = INNER_ARRAY;
         Target target = TARGET;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i = 0; i < target.size(); i++) {
                 array[i]++;
@@ -683,7 +683,7 @@
     static public void testC6(int iters) {
         int[] array = INNER_ARRAY;
         ArrayList<Object> list = INNER_LIST;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (Object o : list) {
                 array[0]++;
@@ -715,7 +715,7 @@
     static public void testD2(int iters) {
         Target target = TARGET;
         int[] array = INNER_ARRAY;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i = 0; i < array.length; i++) {
                 target.simple();
@@ -726,7 +726,7 @@
     static public void testD3(int iters) {
         Target target = TARGET;
         int[] array = INNER_ARRAY;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i : array) {
                 target.simple();
@@ -736,7 +736,7 @@
 
     static public void testD4(int iters) {
         Target target = TARGET;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i = 0; i < target.size; i++) {
                 target.simple();
@@ -746,7 +746,7 @@
 
     static public void testD5(int iters) {
         Target target = TARGET;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i = 0; i < target.size(); i++) {
                 target.simple();
@@ -757,13 +757,13 @@
     static public void testD6(int iters) {
         Target target = TARGET;
         ArrayList<Object> list = INNER_LIST;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (Object o : list) {
                 target.simple();
             }
         }
-    }    
+    }
 
     static public void testE0(int iters) {
         Target target = TARGET;
@@ -793,7 +793,7 @@
     static public void testE2(int iters) {
         Target target = TARGET;
         int[] array = INNER_ARRAY;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i = 0; i < array.length; i++) {
                 synchronized (target) {
@@ -806,7 +806,7 @@
     static public void testE3(int iters) {
         Target target = TARGET;
         int[] array = INNER_ARRAY;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i : array) {
                 synchronized (target) {
@@ -818,7 +818,7 @@
 
     static public void testE4(int iters) {
         Target target = TARGET;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i = 0; i < target.size; i++) {
                 synchronized (target) {
@@ -830,7 +830,7 @@
 
     static public void testE5(int iters) {
         Target target = TARGET;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i = 0; i < target.size(); i++) {
                 synchronized (target) {
@@ -843,7 +843,7 @@
     static public void testE6(int iters) {
         Target target = TARGET;
         ArrayList<Object> list = INNER_LIST;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (Object o : list) {
                 synchronized (target) {
@@ -851,7 +851,7 @@
                 }
             }
         }
-    }    
+    }
 
     static public void testF0(int iters) {
         Target target = TARGET;
@@ -885,7 +885,7 @@
     static public void testF2(int iters) {
         Target target = TARGET;
         int[] array = INNER_ARRAY;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i = 0; i < array.length; i++) {
                 target.simple();
@@ -900,7 +900,7 @@
     static public void testF3(int iters) {
         Target target = TARGET;
         int[] array = INNER_ARRAY;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i : array) {
                 target.simple();
@@ -914,7 +914,7 @@
 
     static public void testF4(int iters) {
         Target target = TARGET;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i = 0; i < target.size; i++) {
                 target.simple();
@@ -928,7 +928,7 @@
 
     static public void testF5(int iters) {
         Target target = TARGET;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i = 0; i < target.size(); i++) {
                 target.simple();
@@ -943,7 +943,7 @@
     static public void testF6(int iters) {
         Target target = TARGET;
         ArrayList<Object> list = INNER_LIST;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (Object o : list) {
                 target.simple();
@@ -975,7 +975,7 @@
 
     static public void testG2(int iters) {
         int[] array = INNER_ARRAY;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i = 0; i < array.length; i++) {
                 new Target();
@@ -985,7 +985,7 @@
 
     static public void testG3(int iters) {
         int[] array = INNER_ARRAY;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i : array) {
                 new Target();
@@ -995,7 +995,7 @@
 
     static public void testG4(int iters) {
         Target target = TARGET;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i = 0; i < target.size; i++) {
                 new Target();
@@ -1005,7 +1005,7 @@
 
     static public void testG5(int iters) {
         Target target = TARGET;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i = 0; i < target.size(); i++) {
                 new Target();
@@ -1015,7 +1015,7 @@
 
     static public void testG6(int iters) {
         ArrayList<Object> list = INNER_LIST;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (Object o : list) {
                 new Target();
@@ -1026,7 +1026,7 @@
     static public void testH0(int iters) {
         byte[] b1 = BYTES_1;
         byte[] b2 = BYTES_2;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i = INNER_COUNT; i > 0; i--) {
                 System.arraycopy(b1, 0, b2, 0, ARRAY_BYTES);
@@ -1050,7 +1050,7 @@
         byte[] b1 = BYTES_1;
         byte[] b2 = BYTES_2;
         int[] array = INNER_ARRAY;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i = 0; i < array.length; i++) {
                 System.arraycopy(b1, 0, b2, 0, ARRAY_BYTES);
@@ -1062,7 +1062,7 @@
         byte[] b1 = BYTES_1;
         byte[] b2 = BYTES_2;
         int[] array = INNER_ARRAY;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i : array) {
                 System.arraycopy(b1, 0, b2, 0, ARRAY_BYTES);
@@ -1074,7 +1074,7 @@
         Target target = TARGET;
         byte[] b1 = BYTES_1;
         byte[] b2 = BYTES_2;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i = 0; i < target.size; i++) {
                 System.arraycopy(b1, 0, b2, 0, ARRAY_BYTES);
@@ -1086,7 +1086,7 @@
         Target target = TARGET;
         byte[] b1 = BYTES_1;
         byte[] b2 = BYTES_2;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (int i = 0; i < target.size(); i++) {
                 System.arraycopy(b1, 0, b2, 0, ARRAY_BYTES);
@@ -1098,7 +1098,7 @@
         byte[] b1 = BYTES_1;
         byte[] b2 = BYTES_2;
         ArrayList<Object> list = INNER_LIST;
-        
+
         for (int outer = iters; outer > 0; outer--) {
             for (Object o : list) {
                 System.arraycopy(b1, 0, b2, 0, ARRAY_BYTES);
diff --git a/tests/058-enum-order/src/Main.java b/tests/058-enum-order/src/Main.java
index 74048c6..2cd6052 100644
--- a/tests/058-enum-order/src/Main.java
+++ b/tests/058-enum-order/src/Main.java
@@ -21,7 +21,7 @@
     public static enum Muffin {
         CORN, BLUEBERRY, CRANBERRY, BRAN, BLACKBERRY;
     }
-    
+
     public static void main(String args[]) {
         Muffin[] array = Muffin.class.getEnumConstants();
         for (Muffin m : array) {
diff --git a/tests/059-finalizer-throw/src/Main.java b/tests/059-finalizer-throw/src/Main.java
index f000d90..42260e4 100644
--- a/tests/059-finalizer-throw/src/Main.java
+++ b/tests/059-finalizer-throw/src/Main.java
@@ -21,7 +21,7 @@
         System.gc();
         System.runFinalization();
 
-        new Timer().schedule(new TimerTask() {
+        new Timer(true).schedule(new TimerTask() {
                 public void run() {
                     System.out.println("Timed out, exiting");
                     System.exit(1);
diff --git a/tests/064-field-access/src/GetNonexistent.java b/tests/064-field-access/src/GetNonexistent.java
index b979eb2..faad686 100644
--- a/tests/064-field-access/src/GetNonexistent.java
+++ b/tests/064-field-access/src/GetNonexistent.java
@@ -19,4 +19,3 @@
         Object obj = Holder.mObject;
     }
 }
-
diff --git a/tests/064-field-access/src/Holder.java b/tests/064-field-access/src/Holder.java
index 5ae9f71..5e34024 100644
--- a/tests/064-field-access/src/Holder.java
+++ b/tests/064-field-access/src/Holder.java
@@ -17,4 +17,3 @@
 public class Holder {
     public static Object mObject = new Object();
 }
-
diff --git a/tests/064-field-access/src/Main.java b/tests/064-field-access/src/Main.java
index 300c6b2..c068d23 100644
--- a/tests/064-field-access/src/Main.java
+++ b/tests/064-field-access/src/Main.java
@@ -343,4 +343,3 @@
     }
 
 }
-
diff --git a/tests/064-field-access/src/other/OtherPackage.java b/tests/064-field-access/src/other/OtherPackage.java
index 49f0d78..a595db5 100644
--- a/tests/064-field-access/src/other/OtherPackage.java
+++ b/tests/064-field-access/src/other/OtherPackage.java
@@ -13,4 +13,3 @@
 
     double pkgDoubleField = 3.141592654;
 }
-
diff --git a/tests/064-field-access/src2/Holder.java b/tests/064-field-access/src2/Holder.java
index dcb63eb..28224d7 100644
--- a/tests/064-field-access/src2/Holder.java
+++ b/tests/064-field-access/src2/Holder.java
@@ -17,4 +17,3 @@
 public class Holder {
     //public static Object mObject = new Object();
 }
-
diff --git a/tests/065-mismatched-implements/src/Base.java b/tests/065-mismatched-implements/src/Base.java
index 7e35408..8623ad7 100644
--- a/tests/065-mismatched-implements/src/Base.java
+++ b/tests/065-mismatched-implements/src/Base.java
@@ -5,4 +5,3 @@
         System.out.println("whee");
     }
 };
-
diff --git a/tests/065-mismatched-implements/src/Defs.java b/tests/065-mismatched-implements/src/Defs.java
index 456b6bf..bab92d8 100644
--- a/tests/065-mismatched-implements/src/Defs.java
+++ b/tests/065-mismatched-implements/src/Defs.java
@@ -5,4 +5,3 @@
 
     // func2 not defined
 }
-
diff --git a/tests/065-mismatched-implements/src/Indirect.java b/tests/065-mismatched-implements/src/Indirect.java
index dd87a65..023e409 100644
--- a/tests/065-mismatched-implements/src/Indirect.java
+++ b/tests/065-mismatched-implements/src/Indirect.java
@@ -25,4 +25,3 @@
         Base base = new Base();
     }
 }
-
diff --git a/tests/065-mismatched-implements/src/Main.java b/tests/065-mismatched-implements/src/Main.java
index 6993b17..5975b99 100644
--- a/tests/065-mismatched-implements/src/Main.java
+++ b/tests/065-mismatched-implements/src/Main.java
@@ -27,4 +27,3 @@
         }
     }
 }
-
diff --git a/tests/065-mismatched-implements/src2/Defs.java b/tests/065-mismatched-implements/src2/Defs.java
index a630c90..e7eb8a1 100644
--- a/tests/065-mismatched-implements/src2/Defs.java
+++ b/tests/065-mismatched-implements/src2/Defs.java
@@ -9,4 +9,3 @@
         System.out.println("yo yo");
     }
 }
-
diff --git a/tests/066-mismatched-super/src/Base.java b/tests/066-mismatched-super/src/Base.java
index 815f974..6180c8b 100644
--- a/tests/066-mismatched-super/src/Base.java
+++ b/tests/066-mismatched-super/src/Base.java
@@ -3,4 +3,3 @@
 public class Base extends Defs {
     // no need to implement func(), provided by abstract class
 };
-
diff --git a/tests/066-mismatched-super/src/Defs.java b/tests/066-mismatched-super/src/Defs.java
index a630c90..e7eb8a1 100644
--- a/tests/066-mismatched-super/src/Defs.java
+++ b/tests/066-mismatched-super/src/Defs.java
@@ -9,4 +9,3 @@
         System.out.println("yo yo");
     }
 }
-
diff --git a/tests/066-mismatched-super/src/Indirect.java b/tests/066-mismatched-super/src/Indirect.java
index dd87a65..023e409 100644
--- a/tests/066-mismatched-super/src/Indirect.java
+++ b/tests/066-mismatched-super/src/Indirect.java
@@ -25,4 +25,3 @@
         Base base = new Base();
     }
 }
-
diff --git a/tests/066-mismatched-super/src/Main.java b/tests/066-mismatched-super/src/Main.java
index 6993b17..5975b99 100644
--- a/tests/066-mismatched-super/src/Main.java
+++ b/tests/066-mismatched-super/src/Main.java
@@ -27,4 +27,3 @@
         }
     }
 }
-
diff --git a/tests/066-mismatched-super/src2/Defs.java b/tests/066-mismatched-super/src2/Defs.java
index 456b6bf..bab92d8 100644
--- a/tests/066-mismatched-super/src2/Defs.java
+++ b/tests/066-mismatched-super/src2/Defs.java
@@ -5,4 +5,3 @@
 
     // func2 not defined
 }
-
diff --git a/tests/067-preemptive-unpark/src/Main.java b/tests/067-preemptive-unpark/src/Main.java
index 1ecac14..a16219e 100644
--- a/tests/067-preemptive-unpark/src/Main.java
+++ b/tests/067-preemptive-unpark/src/Main.java
@@ -7,11 +7,11 @@
 
     public static void main(String[] args) throws Exception {
         setUp();
-        
+
         ParkTester test = new ParkTester();
 
         System.out.println("Test starting");
-        
+
         test.start();
         UNSAFE.unpark(test);
         clearStack(10);
@@ -81,7 +81,7 @@
     private static class ParkTester extends Thread {
         public volatile boolean parkNow = false;
         public volatile boolean success = false;
-        
+
         public void run() {
             while (!parkNow) {
                 try {
diff --git a/tests/068-classloader/src-ex/AbstractGet.java b/tests/068-classloader/src-ex/AbstractGet.java
index b62aa8f..db13b32 100644
--- a/tests/068-classloader/src-ex/AbstractGet.java
+++ b/tests/068-classloader/src-ex/AbstractGet.java
@@ -30,4 +30,3 @@
 abstract class AbstractBase extends BaseOkay {
     public abstract DoubledExtendOkay getExtended();
 }
-
diff --git a/tests/068-classloader/src-ex/DoubledExtend.java b/tests/068-classloader/src-ex/DoubledExtend.java
index 17da2c2..6ad2708 100644
--- a/tests/068-classloader/src-ex/DoubledExtend.java
+++ b/tests/068-classloader/src-ex/DoubledExtend.java
@@ -18,4 +18,3 @@
         return "DoubledExtend 2";
     }
 }
-
diff --git a/tests/068-classloader/src-ex/DoubledExtendOkay.java b/tests/068-classloader/src-ex/DoubledExtendOkay.java
index 766fa8e..9674875 100644
--- a/tests/068-classloader/src-ex/DoubledExtendOkay.java
+++ b/tests/068-classloader/src-ex/DoubledExtendOkay.java
@@ -34,4 +34,3 @@
         return "DoubledExtendOkay 2";
     }
 }
-
diff --git a/tests/068-classloader/src-ex/DoubledImplement.java b/tests/068-classloader/src-ex/DoubledImplement.java
index b479d8f..5c44fc3 100644
--- a/tests/068-classloader/src-ex/DoubledImplement.java
+++ b/tests/068-classloader/src-ex/DoubledImplement.java
@@ -16,4 +16,3 @@
         System.out.println("DoubledImplement two");
     }
 }
-
diff --git a/tests/068-classloader/src-ex/DoubledImplement2.java b/tests/068-classloader/src-ex/DoubledImplement2.java
index 60e820f..24ecb65 100644
--- a/tests/068-classloader/src-ex/DoubledImplement2.java
+++ b/tests/068-classloader/src-ex/DoubledImplement2.java
@@ -30,4 +30,3 @@
         System.out.println("DoubledImplement2 two");
     }
 }
-
diff --git a/tests/068-classloader/src-ex/GetDoubled.java b/tests/068-classloader/src-ex/GetDoubled.java
index 5e20441..28ada1e 100644
--- a/tests/068-classloader/src-ex/GetDoubled.java
+++ b/tests/068-classloader/src-ex/GetDoubled.java
@@ -24,4 +24,3 @@
         return new DoubledExtendOkay();
     }
 }
-
diff --git a/tests/068-classloader/src-ex/IfaceImpl.java b/tests/068-classloader/src-ex/IfaceImpl.java
index 94a3bb0..7e9c27d 100644
--- a/tests/068-classloader/src-ex/IfaceImpl.java
+++ b/tests/068-classloader/src-ex/IfaceImpl.java
@@ -19,4 +19,3 @@
         return new DoubledImplement2();
     }
 }
-
diff --git a/tests/068-classloader/src-ex/IfaceSub.java b/tests/068-classloader/src-ex/IfaceSub.java
index cb932bb..7e512e7 100644
--- a/tests/068-classloader/src-ex/IfaceSub.java
+++ b/tests/068-classloader/src-ex/IfaceSub.java
@@ -17,4 +17,3 @@
 public interface IfaceSub extends IfaceSuper {
     public DoubledImplement2 getDoubledInstance2();
 }
-
diff --git a/tests/068-classloader/src-ex/Inaccessible1.java b/tests/068-classloader/src-ex/Inaccessible1.java
index 7b28427..415a8a1 100644
--- a/tests/068-classloader/src-ex/Inaccessible1.java
+++ b/tests/068-classloader/src-ex/Inaccessible1.java
@@ -9,4 +9,3 @@
         System.out.println("--- inaccessible1");
     }
 }
-
diff --git a/tests/068-classloader/src-ex/Inaccessible2.java b/tests/068-classloader/src-ex/Inaccessible2.java
index b612bfa..dc20c21 100644
--- a/tests/068-classloader/src-ex/Inaccessible2.java
+++ b/tests/068-classloader/src-ex/Inaccessible2.java
@@ -8,4 +8,3 @@
         System.out.println("--- inaccessible2");
     }
 }
-
diff --git a/tests/068-classloader/src-ex/Inaccessible3.java b/tests/068-classloader/src-ex/Inaccessible3.java
index 75a01be..771d0f7 100644
--- a/tests/068-classloader/src-ex/Inaccessible3.java
+++ b/tests/068-classloader/src-ex/Inaccessible3.java
@@ -8,4 +8,3 @@
         System.out.println("--- inaccessible3");
     }
 }
-
diff --git a/tests/068-classloader/src/Base.java b/tests/068-classloader/src/Base.java
index 37bc1f2..b297a8a 100644
--- a/tests/068-classloader/src/Base.java
+++ b/tests/068-classloader/src/Base.java
@@ -14,4 +14,3 @@
         return dt.getStr();
     }
 }
-
diff --git a/tests/068-classloader/src/BaseOkay.java b/tests/068-classloader/src/BaseOkay.java
index c5c3f7a..48b7796 100644
--- a/tests/068-classloader/src/BaseOkay.java
+++ b/tests/068-classloader/src/BaseOkay.java
@@ -36,4 +36,3 @@
 interface IDoubledExtendOkay {
     public DoubledExtendOkay getExtended();
 }
-
diff --git a/tests/068-classloader/src/DoubledExtend.java b/tests/068-classloader/src/DoubledExtend.java
index 44c2bce..5f8ebc2 100644
--- a/tests/068-classloader/src/DoubledExtend.java
+++ b/tests/068-classloader/src/DoubledExtend.java
@@ -18,4 +18,3 @@
         return "DoubledExtend 1";
     }
 }
-
diff --git a/tests/068-classloader/src/DoubledExtendOkay.java b/tests/068-classloader/src/DoubledExtendOkay.java
index e8ff404..e226e5f 100644
--- a/tests/068-classloader/src/DoubledExtendOkay.java
+++ b/tests/068-classloader/src/DoubledExtendOkay.java
@@ -34,4 +34,3 @@
         return "DoubledExtendOkay 1";
     }
 }
-
diff --git a/tests/068-classloader/src/DoubledImplement.java b/tests/068-classloader/src/DoubledImplement.java
index 5568a43..64ec5e2 100644
--- a/tests/068-classloader/src/DoubledImplement.java
+++ b/tests/068-classloader/src/DoubledImplement.java
@@ -16,4 +16,3 @@
         System.out.println("DoubledImplement one");
     }
 }
-
diff --git a/tests/068-classloader/src/DoubledImplement2.java b/tests/068-classloader/src/DoubledImplement2.java
index 5e18315..12c036c 100644
--- a/tests/068-classloader/src/DoubledImplement2.java
+++ b/tests/068-classloader/src/DoubledImplement2.java
@@ -30,4 +30,3 @@
         System.out.println("DoubledImplement2 one");
     }
 }
-
diff --git a/tests/068-classloader/src/FancyLoader.java b/tests/068-classloader/src/FancyLoader.java
index 1daf155..173b08f 100644
--- a/tests/068-classloader/src/FancyLoader.java
+++ b/tests/068-classloader/src/FancyLoader.java
@@ -185,7 +185,7 @@
         throws ClassNotFoundException
     {
         Class res;
-        
+
         /*
          * 1. Invoke findLoadedClass(String) to check if the class has
          * already been loaded.
@@ -226,4 +226,3 @@
         return res;
     }
 }
-
diff --git a/tests/068-classloader/src/ICommon.java b/tests/068-classloader/src/ICommon.java
index 4eac9be..35a98cc 100644
--- a/tests/068-classloader/src/ICommon.java
+++ b/tests/068-classloader/src/ICommon.java
@@ -6,4 +6,3 @@
 public interface ICommon {
     public DoubledImplement getDoubledInstance();
 }
-
diff --git a/tests/068-classloader/src/ICommon2.java b/tests/068-classloader/src/ICommon2.java
index 13b2c23..6d81afc 100644
--- a/tests/068-classloader/src/ICommon2.java
+++ b/tests/068-classloader/src/ICommon2.java
@@ -20,4 +20,3 @@
 public interface ICommon2 {
     public DoubledImplement2 getDoubledInstance2();
 }
-
diff --git a/tests/068-classloader/src/IGetDoubled.java b/tests/068-classloader/src/IGetDoubled.java
index 0a4ac91..08cd1ce 100644
--- a/tests/068-classloader/src/IGetDoubled.java
+++ b/tests/068-classloader/src/IGetDoubled.java
@@ -20,4 +20,3 @@
 public interface IGetDoubled {
     public DoubledExtendOkay getDoubled();
 }
-
diff --git a/tests/068-classloader/src/IfaceSuper.java b/tests/068-classloader/src/IfaceSuper.java
index f01963a..36d278c 100644
--- a/tests/068-classloader/src/IfaceSuper.java
+++ b/tests/068-classloader/src/IfaceSuper.java
@@ -17,4 +17,3 @@
 public interface IfaceSuper {
     public DoubledImplement2 getDoubledInstance2();
 }
-
diff --git a/tests/068-classloader/src/InaccessibleBase.java b/tests/068-classloader/src/InaccessibleBase.java
index d43ea00..83af665 100644
--- a/tests/068-classloader/src/InaccessibleBase.java
+++ b/tests/068-classloader/src/InaccessibleBase.java
@@ -5,4 +5,3 @@
  */
 class InaccessibleBase {
 }
-
diff --git a/tests/068-classloader/src/InaccessibleInterface.java b/tests/068-classloader/src/InaccessibleInterface.java
index 6df7501..7f52b80 100644
--- a/tests/068-classloader/src/InaccessibleInterface.java
+++ b/tests/068-classloader/src/InaccessibleInterface.java
@@ -5,4 +5,3 @@
  */
 interface InaccessibleInterface {
 }
-
diff --git a/tests/068-classloader/src/Main.java b/tests/068-classloader/src/Main.java
index 0788b52..1bc7b04 100644
--- a/tests/068-classloader/src/Main.java
+++ b/tests/068-classloader/src/Main.java
@@ -423,4 +423,3 @@
         di2.one();
     }
 }
-
diff --git a/tests/068-classloader/src/SimpleBase.java b/tests/068-classloader/src/SimpleBase.java
index 5e1fb5a..fd56db9 100644
--- a/tests/068-classloader/src/SimpleBase.java
+++ b/tests/068-classloader/src/SimpleBase.java
@@ -6,4 +6,3 @@
 public class SimpleBase {
     public SimpleBase() {}
 }
-
diff --git a/tests/069-field-type/info.txt b/tests/069-field-type/info.txt
index 58db32e..6e3a22f 100644
--- a/tests/069-field-type/info.txt
+++ b/tests/069-field-type/info.txt
@@ -2,4 +2,3 @@
 inappropriate object type in an instance field.  By compiling two
 versions of the field-holder class we can bypass the compiler's type
 safety.
-
diff --git a/tests/069-field-type/src/Blah.java b/tests/069-field-type/src/Blah.java
index 932f276..fd98336 100644
--- a/tests/069-field-type/src/Blah.java
+++ b/tests/069-field-type/src/Blah.java
@@ -7,4 +7,3 @@
         System.out.println("run");
     }
 }
-
diff --git a/tests/069-field-type/src/Holder.java b/tests/069-field-type/src/Holder.java
index ec56e69..e3c9f89 100644
--- a/tests/069-field-type/src/Holder.java
+++ b/tests/069-field-type/src/Holder.java
@@ -5,4 +5,3 @@
 public class Holder {
     public Runnable mValue;
 }
-
diff --git a/tests/069-field-type/src/Main.java b/tests/069-field-type/src/Main.java
index 72268e9..f9885e6 100644
--- a/tests/069-field-type/src/Main.java
+++ b/tests/069-field-type/src/Main.java
@@ -32,4 +32,3 @@
         System.out.println("Done");
     }
 }
-
diff --git a/tests/069-field-type/src2/Blah.java b/tests/069-field-type/src2/Blah.java
index b40e732..1bffff6 100644
--- a/tests/069-field-type/src2/Blah.java
+++ b/tests/069-field-type/src2/Blah.java
@@ -8,4 +8,3 @@
         return 0;
     }
 }
-
diff --git a/tests/070-nio-buffer/src/Main.java b/tests/070-nio-buffer/src/Main.java
index 8cdaa51..bfcab3a 100644
--- a/tests/070-nio-buffer/src/Main.java
+++ b/tests/070-nio-buffer/src/Main.java
@@ -89,10 +89,9 @@
         int1.clear ();
         int1.put (data);
         int1.position (0);
-            
+
         int1.clear ();
         int1.put (data);
         int1.position (0);
     }
 }
-
diff --git a/tests/071-dexfile/src-ex/Another.java b/tests/071-dexfile/src-ex/Another.java
index e732b5b..c978c59 100644
--- a/tests/071-dexfile/src-ex/Another.java
+++ b/tests/071-dexfile/src-ex/Another.java
@@ -26,4 +26,3 @@
         }
     }
 }
-
diff --git a/tests/071-dexfile/src/Main.java b/tests/071-dexfile/src/Main.java
index 42c841d..d71aec0 100644
--- a/tests/071-dexfile/src/Main.java
+++ b/tests/071-dexfile/src/Main.java
@@ -143,4 +143,3 @@
         return (ClassLoader) dclObj;
     }
 }
-
diff --git a/tests/072-precise-gc/src/Main.java b/tests/072-precise-gc/src/Main.java
index 9b2315d..e049221 100644
--- a/tests/072-precise-gc/src/Main.java
+++ b/tests/072-precise-gc/src/Main.java
@@ -111,4 +111,3 @@
         System.out.println(str0+str1+str2+str3+str4+str5+str6+str7+str8+str9);
     }
 }
-
diff --git a/tests/073-mismatched-field/src/IMain.java b/tests/073-mismatched-field/src/IMain.java
index 301dd21..3ad5ecb 100644
--- a/tests/073-mismatched-field/src/IMain.java
+++ b/tests/073-mismatched-field/src/IMain.java
@@ -17,4 +17,3 @@
 public interface IMain {
     //static int f = 123;
 }
-
diff --git a/tests/073-mismatched-field/src/Main.java b/tests/073-mismatched-field/src/Main.java
index fb9f32a..70709c0 100644
--- a/tests/073-mismatched-field/src/Main.java
+++ b/tests/073-mismatched-field/src/Main.java
@@ -29,4 +29,3 @@
         }
     }
 }
-
diff --git a/tests/073-mismatched-field/src/SuperMain.java b/tests/073-mismatched-field/src/SuperMain.java
index 7447739..48a9bab 100644
--- a/tests/073-mismatched-field/src/SuperMain.java
+++ b/tests/073-mismatched-field/src/SuperMain.java
@@ -17,4 +17,3 @@
 public class SuperMain {
     public int f = 456;
 }
-
diff --git a/tests/073-mismatched-field/src2/IMain.java b/tests/073-mismatched-field/src2/IMain.java
index 585c738..136f2a1 100644
--- a/tests/073-mismatched-field/src2/IMain.java
+++ b/tests/073-mismatched-field/src2/IMain.java
@@ -17,4 +17,3 @@
 public interface IMain {
     static int f = 123;
 }
-
diff --git a/tests/074-gc-thrash/info.txt b/tests/074-gc-thrash/info.txt
index c195adb..ded1582 100644
--- a/tests/074-gc-thrash/info.txt
+++ b/tests/074-gc-thrash/info.txt
@@ -1,2 +1 @@
 This thrashes the memory allocator and garbage collector for a brief period.
-
diff --git a/tests/074-gc-thrash/src/Main.java b/tests/074-gc-thrash/src/Main.java
index f79e5ce..f85aa4b 100644
--- a/tests/074-gc-thrash/src/Main.java
+++ b/tests/074-gc-thrash/src/Main.java
@@ -335,4 +335,3 @@
 
     public void pretendToUse(byte[] chunk) {}
 }
-
diff --git a/tests/075-verification-error/src/Main.java b/tests/075-verification-error/src/Main.java
index f357242..51d648c 100644
--- a/tests/075-verification-error/src/Main.java
+++ b/tests/075-verification-error/src/Main.java
@@ -146,4 +146,3 @@
         }
     }
 }
-
diff --git a/tests/075-verification-error/src/MaybeAbstract.java b/tests/075-verification-error/src/MaybeAbstract.java
index 43c002b..6d3b05b 100644
--- a/tests/075-verification-error/src/MaybeAbstract.java
+++ b/tests/075-verification-error/src/MaybeAbstract.java
@@ -18,4 +18,3 @@
     public MaybeAbstract() {}
     int foo() { return 0; }
 }
-
diff --git a/tests/075-verification-error/src/other/InaccessibleClass.java b/tests/075-verification-error/src/other/InaccessibleClass.java
index 254eaa3..b9bdfc4 100644
--- a/tests/075-verification-error/src/other/InaccessibleClass.java
+++ b/tests/075-verification-error/src/other/InaccessibleClass.java
@@ -21,4 +21,3 @@
 
     public static int blah = 5;
 }
-
diff --git a/tests/075-verification-error/src/other/InaccessibleMethod.java b/tests/075-verification-error/src/other/InaccessibleMethod.java
index 49a0b29..0460373 100644
--- a/tests/075-verification-error/src/other/InaccessibleMethod.java
+++ b/tests/075-verification-error/src/other/InaccessibleMethod.java
@@ -19,4 +19,3 @@
 public class InaccessibleMethod {
     public static void test() {}
 }
-
diff --git a/tests/075-verification-error/src/other/Mutant.java b/tests/075-verification-error/src/other/Mutant.java
index 6c869c0..ec4754b 100644
--- a/tests/075-verification-error/src/other/Mutant.java
+++ b/tests/075-verification-error/src/other/Mutant.java
@@ -41,4 +41,3 @@
         System.out.println("nay");
     }
 }
-
diff --git a/tests/075-verification-error/src2/MaybeAbstract.java b/tests/075-verification-error/src2/MaybeAbstract.java
index bfbfd45..8b70a07 100644
--- a/tests/075-verification-error/src2/MaybeAbstract.java
+++ b/tests/075-verification-error/src2/MaybeAbstract.java
@@ -18,4 +18,3 @@
     public MaybeAbstract() {}
     int foo() { return 0; }
 }
-
diff --git a/tests/075-verification-error/src2/other/InaccessibleClass.java b/tests/075-verification-error/src2/other/InaccessibleClass.java
index a3cfbff..812fac9 100644
--- a/tests/075-verification-error/src2/other/InaccessibleClass.java
+++ b/tests/075-verification-error/src2/other/InaccessibleClass.java
@@ -21,4 +21,3 @@
 
     public static int blah = 5;
 }
-
diff --git a/tests/075-verification-error/src2/other/InaccessibleMethod.java b/tests/075-verification-error/src2/other/InaccessibleMethod.java
index 6e2738e..9fb844e 100644
--- a/tests/075-verification-error/src2/other/InaccessibleMethod.java
+++ b/tests/075-verification-error/src2/other/InaccessibleMethod.java
@@ -19,4 +19,3 @@
 public class InaccessibleMethod {
     /*package*/ static void test() {}
 }
-
diff --git a/tests/075-verification-error/src2/other/Mutant.java b/tests/075-verification-error/src2/other/Mutant.java
index 220fda0..67cd36d 100644
--- a/tests/075-verification-error/src2/other/Mutant.java
+++ b/tests/075-verification-error/src2/other/Mutant.java
@@ -41,5 +41,3 @@
         System.out.println("nay");
     }
 }
-
-
diff --git a/tests/077-method-override/src/Base.java b/tests/077-method-override/src/Base.java
index eed6f22..befe2e2 100644
--- a/tests/077-method-override/src/Base.java
+++ b/tests/077-method-override/src/Base.java
@@ -81,4 +81,3 @@
         System.out.println("overrideStaticWithVirtual: Base");
     }
 }
-
diff --git a/tests/077-method-override/src/Derived.java b/tests/077-method-override/src/Derived.java
index 09ffdf6..7dc43d0 100644
--- a/tests/077-method-override/src/Derived.java
+++ b/tests/077-method-override/src/Derived.java
@@ -57,4 +57,3 @@
         System.out.println("overrideStaticWithVirtual: Derived");
     }
 }
-
diff --git a/tests/077-method-override/src/Main.java b/tests/077-method-override/src/Main.java
index fa401cd..2d10ee0 100644
--- a/tests/077-method-override/src/Main.java
+++ b/tests/077-method-override/src/Main.java
@@ -51,4 +51,3 @@
         }
     }
 }
-
diff --git a/tests/077-method-override/src2/Base.java b/tests/077-method-override/src2/Base.java
index 8be42bc..ab2a28b 100644
--- a/tests/077-method-override/src2/Base.java
+++ b/tests/077-method-override/src2/Base.java
@@ -80,4 +80,3 @@
         System.out.println("overrideStaticWithVirtual: Base");
     }
 }
-
diff --git a/tests/079-phantom/src/Bitmap.java b/tests/079-phantom/src/Bitmap.java
index 4d9c259..9d03cbd 100644
--- a/tests/079-phantom/src/Bitmap.java
+++ b/tests/079-phantom/src/Bitmap.java
@@ -150,4 +150,3 @@
         interrupt();
     }
 }
-
diff --git a/tests/079-phantom/src/Main.java b/tests/079-phantom/src/Main.java
index 3965481..9c459c9 100644
--- a/tests/079-phantom/src/Main.java
+++ b/tests/079-phantom/src/Main.java
@@ -83,4 +83,3 @@
         mBitmap3 = mBitmap4 = new Bitmap("three/four", 20, 20, dataB);
     }
 }
-
diff --git a/tests/084-class-init/src/IntHolder.java b/tests/084-class-init/src/IntHolder.java
index 809a142..4012d6e 100644
--- a/tests/084-class-init/src/IntHolder.java
+++ b/tests/084-class-init/src/IntHolder.java
@@ -39,4 +39,3 @@
         mValue = val;
     }
 }
-
diff --git a/tests/084-class-init/src/Main.java b/tests/084-class-init/src/Main.java
index 0f17ad1..89b76f5 100644
--- a/tests/084-class-init/src/Main.java
+++ b/tests/084-class-init/src/Main.java
@@ -91,4 +91,3 @@
         }
     }
 }
-
diff --git a/tests/084-class-init/src/PartialInit.java b/tests/084-class-init/src/PartialInit.java
index 59ce946..d4c71ff 100644
--- a/tests/084-class-init/src/PartialInit.java
+++ b/tests/084-class-init/src/PartialInit.java
@@ -22,4 +22,3 @@
     public static final IntHolder FIELD0 = new IntHolder(1);    // succeeds
     public static final IntHolder FIELD1 = new IntHolder(-2);   // throws
 }
-
diff --git a/tests/084-class-init/src/SlowInit.java b/tests/084-class-init/src/SlowInit.java
index 3d677cc..8ac72be 100644
--- a/tests/084-class-init/src/SlowInit.java
+++ b/tests/084-class-init/src/SlowInit.java
@@ -38,4 +38,3 @@
         FIELD3.setValue(444);
     };
 }
-
diff --git a/tests/README.txt b/tests/README.txt
index 276abbd..eb1ce36 100644
--- a/tests/README.txt
+++ b/tests/README.txt
@@ -11,4 +11,3 @@
 directory; this can be used to exercise "API mismatch" situations by
 replacing class files created in the first pass.  The "src-ex" directory
 is built separately, and is intended for exercising class loaders.
-
diff --git a/tests/etc/default-build b/tests/etc/default-build
index b0bf491..b8df442 100755
--- a/tests/etc/default-build
+++ b/tests/etc/default-build
@@ -41,4 +41,3 @@
     mv classes.dex classes-ex.dex
     mv classes-1.dex classes.dex
 fi
-
diff --git a/tests/run-all-tests b/tests/run-all-tests
index ac86e1e..ac01803 100755
--- a/tests/run-all-tests
+++ b/tests/run-all-tests
@@ -122,4 +122,3 @@
 for i in $failNames; do
     echo "failed: $i"
 done
-    
diff --git a/tools/deadcode.py b/tools/deadcode.py
index eb71b7c..2ef8c70 100755
--- a/tools/deadcode.py
+++ b/tools/deadcode.py
@@ -9,7 +9,7 @@
     When found, the name of the section is extracted.  The entire contents
     of that section is added to a result hashmap with the section name
     as the key"""
-    
+
     # Match lines like
     #              |section_name:
     # capturing section_name
@@ -19,11 +19,11 @@
     start = 0
     anchor = -1
     sectionName = ''
-    
+
     while True:
         # Look for a section header
         result = headerPattern.search(buffer, start)
-        
+
         # If there are no more, add a section from the last header to EOF
         if result is None:
             if anchor is not -1:
@@ -34,17 +34,17 @@
         # map indexed by the section name
         if anchor is not -1:
             sections[sectionName] = buffer[anchor:result.start()]
-            
+
         sectionName = result.group(1)
         start = result.end()
         anchor = start
-        
+
     return sections
 
 def FindMethods(section):
     """Spin through the 'method code index' section and extract all
     method signatures.  When found, they are added to a result list."""
-    
+
     # Match lines like:
     #             |[abcd] com/example/app/Class.method:(args)return
     # capturing the method signature
@@ -56,7 +56,7 @@
     while True:
         # Look for a method name
         result = methodPattern.search(section, start)
-        
+
         if result is None:
             return methods
 
@@ -68,16 +68,16 @@
     """Spin through all the input method signatures.  For each one, return
     whether or not there is method invokation line in the codes section that
     lists the method as the target."""
-    
+
     start = 0
-    
+
     while True:
         # Find the next reference to the method signature
         match = codes.find(method, start)
-        
+
         if match is -1:
             break;
-        
+
         # Find the beginning of the line the method reference is on
         startOfLine = codes.rfind("\n", 0, match) + 1
 
@@ -86,9 +86,9 @@
         # than the beginning of the code section for that method.
         if codes.find("invoke", startOfLine, match) is not -1:
             return True
-            
+
         start = match + len(method)
-        
+
     return False
 
 
@@ -120,7 +120,7 @@
         if not CallsMethod(codes, method):
             print "\t", method
             count += 1
-        
+
     if count is 0:
         print "\tNone"
 
diff --git a/tools/dexcheck b/tools/dexcheck
index ff3e98d..3e2f6f6 100755
--- a/tools/dexcheck
+++ b/tools/dexcheck
@@ -43,4 +43,3 @@
 done
 
 exit $failure
-
diff --git a/tools/dexdeps/README.txt b/tools/dexdeps/README.txt
index 14d65b0..060aecb 100644
--- a/tools/dexdeps/README.txt
+++ b/tools/dexdeps/README.txt
@@ -25,4 +25,3 @@
 
     "xml" produces a larger output file, readable with an XML browser.  Types
     are shown in a more human-readable form (e.g. "[I" becomes "int[]").
-
diff --git a/tools/dexdeps/src/Android.mk b/tools/dexdeps/src/Android.mk
index 756a0b3..7c0ef2f 100644
--- a/tools/dexdeps/src/Android.mk
+++ b/tools/dexdeps/src/Android.mk
@@ -29,4 +29,3 @@
 INTERNAL_DALVIK_MODULES += $(LOCAL_INSTALLED_MODULE)
 
 include $(BUILD_DROIDDOC)
-
diff --git a/tools/dexdeps/src/com/android/dexdeps/ClassRef.java b/tools/dexdeps/src/com/android/dexdeps/ClassRef.java
index 8065a0a..7f6edc9 100644
--- a/tools/dexdeps/src/com/android/dexdeps/ClassRef.java
+++ b/tools/dexdeps/src/com/android/dexdeps/ClassRef.java
@@ -67,4 +67,3 @@
         return mClassName;
     }
 }
-
diff --git a/tools/dexdeps/src/com/android/dexdeps/DexData.java b/tools/dexdeps/src/com/android/dexdeps/DexData.java
index 0a7fa2d..7ce5d04 100644
--- a/tools/dexdeps/src/com/android/dexdeps/DexData.java
+++ b/tools/dexdeps/src/com/android/dexdeps/DexData.java
@@ -591,4 +591,3 @@
         public int classIdx;            // index into type_ids
     }
 }
-
diff --git a/tools/dexdeps/src/com/android/dexdeps/DexDataException.java b/tools/dexdeps/src/com/android/dexdeps/DexDataException.java
index e51853f..873db94 100644
--- a/tools/dexdeps/src/com/android/dexdeps/DexDataException.java
+++ b/tools/dexdeps/src/com/android/dexdeps/DexDataException.java
@@ -21,4 +21,3 @@
  */
 public class DexDataException extends RuntimeException {
 }
-
diff --git a/tools/dexdeps/src/com/android/dexdeps/FieldRef.java b/tools/dexdeps/src/com/android/dexdeps/FieldRef.java
index 2726a7a..93e87cb 100644
--- a/tools/dexdeps/src/com/android/dexdeps/FieldRef.java
+++ b/tools/dexdeps/src/com/android/dexdeps/FieldRef.java
@@ -49,4 +49,3 @@
         return mFieldName;
     }
 }
-
diff --git a/tools/dexdeps/src/com/android/dexdeps/Main.java b/tools/dexdeps/src/com/android/dexdeps/Main.java
index b1f7f96..d48889d 100644
--- a/tools/dexdeps/src/com/android/dexdeps/Main.java
+++ b/tools/dexdeps/src/com/android/dexdeps/Main.java
@@ -200,4 +200,3 @@
         System.err.println("  --format={xml,brief}");
     }
 }
-
diff --git a/tools/dexdeps/src/com/android/dexdeps/MethodRef.java b/tools/dexdeps/src/com/android/dexdeps/MethodRef.java
index 96522eb..67dce62 100644
--- a/tools/dexdeps/src/com/android/dexdeps/MethodRef.java
+++ b/tools/dexdeps/src/com/android/dexdeps/MethodRef.java
@@ -85,4 +85,3 @@
         return builder.toString();
     }
 }
-
diff --git a/tools/dexdeps/src/com/android/dexdeps/Output.java b/tools/dexdeps/src/com/android/dexdeps/Output.java
index 122544c..b786825 100644
--- a/tools/dexdeps/src/com/android/dexdeps/Output.java
+++ b/tools/dexdeps/src/com/android/dexdeps/Output.java
@@ -298,4 +298,3 @@
         }
     }
 }
-
diff --git a/tools/dexdeps/src/com/android/dexdeps/UsageException.java b/tools/dexdeps/src/com/android/dexdeps/UsageException.java
index f9f971b..e695fc7 100644
--- a/tools/dexdeps/src/com/android/dexdeps/UsageException.java
+++ b/tools/dexdeps/src/com/android/dexdeps/UsageException.java
@@ -21,4 +21,3 @@
  */
 public class UsageException extends RuntimeException {
 }
-
diff --git a/tools/dmtracedump/Android.mk b/tools/dmtracedump/Android.mk
index ef9a9c2..e3f321e 100644
--- a/tools/dmtracedump/Android.mk
+++ b/tools/dmtracedump/Android.mk
@@ -1,4 +1,4 @@
-# 
+#
 # Copyright 2006 The Android Open Source Project
 #
 # Java method trace dump tool
@@ -20,5 +20,3 @@
 LOCAL_C_INCLUDES += dalvik/vm
 LOCAL_MODULE := create_test_dmtrace
 include $(BUILD_HOST_EXECUTABLE)
-
-
diff --git a/tools/dmtracedump/CreateTestTrace.c b/tools/dmtracedump/CreateTestTrace.c
index 9d72b1f..0b85d51 100644
--- a/tools/dmtracedump/CreateTestTrace.c
+++ b/tools/dmtracedump/CreateTestTrace.c
@@ -2,16 +2,16 @@
 **
 ** Copyright 2006, The Android Open Source Project
 **
-** Licensed under the Apache License, Version 2.0 (the "License"); 
-** you may not use this file except in compliance with the License. 
-** You may obtain a copy of the License at 
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
 **
-**     http://www.apache.org/licenses/LICENSE-2.0 
+**     http://www.apache.org/licenses/LICENSE-2.0
 **
-** Unless required by applicable law or agreed to in writing, software 
-** distributed under the License is distributed on an "AS IS" BASIS, 
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
-** See the License for the specific language governing permissions and 
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
 ** limitations under the License.
 */
 
@@ -214,7 +214,7 @@
         save_cp = cp;
         while (*cp != '\n')
             cp += 1;
-        
+
         /* Remove trailing spaces */
         cp -= 1;
         while (isspace(*cp))
diff --git a/tools/dmtracedump/TraceDump.c b/tools/dmtracedump/TraceDump.c
index 3dc1893..02cdf98 100644
--- a/tools/dmtracedump/TraceDump.c
+++ b/tools/dmtracedump/TraceDump.c
@@ -2,16 +2,16 @@
 **
 ** Copyright 2006, The Android Open Source Project
 **
-** Licensed under the Apache License, Version 2.0 (the "License"); 
-** you may not use this file except in compliance with the License. 
-** You may obtain a copy of the License at 
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
 **
-**     http://www.apache.org/licenses/LICENSE-2.0 
+**     http://www.apache.org/licenses/LICENSE-2.0
 **
-** Unless required by applicable law or agreed to in writing, software 
-** distributed under the License is distributed on an "AS IS" BASIS, 
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
-** See the License for the specific language governing permissions and 
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
 ** limitations under the License.
 */
 
@@ -59,7 +59,7 @@
 
 #define DEFAULT_ACTIVE_THREADS 8
 
-char *htmlHeader = 
+char *htmlHeader =
 "<html>\n<head>\n<script type=\"text/javascript\" src=\"%ssortable.js\"></script>\n"
 "<script langugage=\"javascript\">\n"
 "function toggle(item) {\n"
@@ -100,10 +100,10 @@
 "</head><body>\n\n";
 
 char *htmlFooter = "\n</body>\n</html>\n";
-char *profileSeparator = 
+char *profileSeparator =
     "======================================================================";
-    
-const char* tableHeader = 
+
+const char* tableHeader =
     "<table class='sortable' id='%s'><tr>\n"
     "<th>Method</th>\n"
     "<th>Run 1 (us)</th>\n"
@@ -112,18 +112,18 @@
     "<th>Diff (%%)</th>\n"
     "<th>1: # calls</th>\n"
     "<th>2: # calls</th>\n"
-    "</tr>\n";  
-    
-const char* tableHeaderMissing = 
+    "</tr>\n";
+
+const char* tableHeaderMissing =
     "<table class='sortable' id='%s'>\n"
     "<th>Method</th>\n"
     "<th>Exclusive</th>\n"
     "<th>Inclusive</th>\n"
     "<th># calls</th>\n";
-    
-#define GRAPH_LABEL_VISITED 0x0001 
+
+#define GRAPH_LABEL_VISITED 0x0001
 #define GRAPH_NODE_VISITED  0x0002
-    
+
 /*
  * Values from the header of the data file.
  */
@@ -1227,7 +1227,7 @@
     if (id == EOF)
         return 1;
     *threadId = id;
-    
+
     *methodVal = read4LE(dataFp);
     *elapsedTime = read4LE(dataFp);
     if (feof(dataFp)) {
@@ -1465,7 +1465,7 @@
     for (ii = 0; ii < num_entries - 1; ++ii)
         sorted[ii].next = &sorted[ii + 1];
     sorted[num_entries - 1].next = NULL;
-    
+
     return sorted;
 }
 
@@ -1488,7 +1488,7 @@
     char *className, *methodName, *signature;
     char classBuf[HTML_BUFSIZE], methodBuf[HTML_BUFSIZE];
     char signatureBuf[HTML_BUFSIZE];
-    
+
     anchor_close = "";
     if (gOptions.outputHtml)
         anchor_close = "</a>";
@@ -1690,7 +1690,7 @@
 }
 
 /* check to make sure that the child method meets the threshold of the parent */
-int checkThreshold(MethodEntry* parent, MethodEntry* child) 
+int checkThreshold(MethodEntry* parent, MethodEntry* child)
 {
     double parentTime = parent->elapsedInclusive;
     double childTime = child->elapsedInclusive;
@@ -1700,18 +1700,18 @@
 
 void createLabels(FILE* file, MethodEntry* method)
 {
-    fprintf(file, "node%d[label = \"[%d] %s.%s (%llu, %llu, %d)\"]\n", 
-             method->index, method->index, method->className, method->methodName, 
+    fprintf(file, "node%d[label = \"[%d] %s.%s (%llu, %llu, %d)\"]\n",
+             method->index, method->index, method->className, method->methodName,
              method->elapsedInclusive / 1000,
              method->elapsedExclusive / 1000,
              method->numCalls[0]);
 
-    method->graphState = GRAPH_LABEL_VISITED;  
+    method->graphState = GRAPH_LABEL_VISITED;
 
     TimedMethod* child;
     for (child = method->children[0] ; child ; child = child->next) {
         MethodEntry* childMethod = child->method;
-        
+
         if ((childMethod->graphState & GRAPH_LABEL_VISITED) == 0 && checkThreshold(method, childMethod)) {
             createLabels(file, child->method);
         }
@@ -1721,7 +1721,7 @@
 void createLinks(FILE* file, MethodEntry* method)
 {
     method->graphState |= GRAPH_NODE_VISITED;
-    
+
     TimedMethod* child;
     for (child = method->children[0] ; child ; child = child->next) {
         MethodEntry* childMethod = child->method;
@@ -1746,19 +1746,19 @@
     }
 
     FILE* file = fopen(path, "w+");
-    
+
     fprintf(file, "digraph g {\nnode [shape = record,height=.1];\n");
-     
+
     createLabels(file, dataKeys->methods);
     createLinks(file, dataKeys->methods);
-     
+
     fprintf(file, "}");
     fclose(file);
-     
+
     // now that we have the dot file generate the image
     char command[1024];
     snprintf(command, 1024, "dot -Tpng -o '%s' '%s'", gOptions.graphFileName, path);
-     
+
     system(command);
 
     if (! gOptions.keepDotFile) {
@@ -2931,7 +2931,7 @@
  */
 DataKeys* parseDataKeys(TraceData* traceData, const char* traceFileName,
 			uint64_t* threadTime, Filter** filters)
-{ 
+{
     DataKeys* dataKeys = NULL;
     MethodEntry **pMethods = NULL;
     MethodEntry* method;
@@ -2940,7 +2940,7 @@
     int ii, jj, numThreads;
     uint64_t currentTime;
     MethodEntry* caller;
-   
+
     dataFp = fopen(traceFileName, "r");
     if (dataFp == NULL)
         goto bail;
@@ -3178,7 +3178,7 @@
     }
     caller = &dataKeys->methods[TOPLEVEL_INDEX];
     caller->elapsedInclusive = sumThreadTime;
-    
+
 #if 0
     fclose(dumpStream);
 #endif
@@ -3190,7 +3190,7 @@
 bail:
     if (dataFp != NULL)
         fclose(dataFp);
-        
+
     return dataKeys;
 }
 
@@ -3207,7 +3207,7 @@
         MethodEntry* entry = &dataKeys->methods[ii];
         pMethods[ii] = entry;
     }
-    
+
     return pMethods;
 }
 
@@ -3253,7 +3253,7 @@
     if (result == 0) {
         result = strcmp(methodA->signature, methodB->signature);
         if (result == 0) {
-           return strcmp(methodA->className, methodB->className); 
+           return strcmp(methodA->className, methodB->className);
         }
     }
     return result;
@@ -3262,21 +3262,21 @@
 int findMatch(MethodEntry** methods, int size, MethodEntry* matchThis)
 {
     int i;
-    
+
     for (i = 0 ; i < size ; i++) {
         MethodEntry* method = methods[i];
-        
+
         if (method != NULL && !compareMethodNamesForDiff(&method, &matchThis)) {
-//            printf("%s.%s == %s.%s<br>\n", matchThis->className, matchThis->methodName, 
+//            printf("%s.%s == %s.%s<br>\n", matchThis->className, matchThis->methodName,
   //              method->className, method->methodName);
-                
+
             return i;
 /*            if (!compareMethodNames(&method, &matchThis)) {
                 return i;
             }
 */        }
     }
-    
+
     return -1;
 }
 
@@ -3286,13 +3286,13 @@
 
     const DiffEntry* entryA = (const DiffEntry*)a;
     const DiffEntry* entryB = (const DiffEntry*)b;
-    
+
     if (entryA->differenceExclusive < entryB->differenceExclusive) {
         return 1;
     } else if (entryA->differenceExclusive > entryB->differenceExclusive) {
         return -1;
     }
-    
+
     return 0;
 }
 
@@ -3302,37 +3302,37 @@
 
     const DiffEntry* entryA = (const DiffEntry*)a;
     const DiffEntry* entryB = (const DiffEntry*)b;
-    
+
     if (entryA->differenceInclusive < entryB->differenceInclusive) {
         return 1;
     } else if (entryA->differenceInclusive > entryB->differenceInclusive) {
         return -1;
     }
-    
+
     return 0;
 }
 
-void printMissingMethod(MethodEntry* method) 
+void printMissingMethod(MethodEntry* method)
 {
     char classBuf[HTML_BUFSIZE];
     char methodBuf[HTML_BUFSIZE];
     char* className;
     char* methodName;
-    
+
     className = htmlEscape(method->className, classBuf, HTML_BUFSIZE);
     methodName = htmlEscape(method->methodName, methodBuf, HTML_BUFSIZE);
-    
-    if (gOptions.outputHtml) printf("<tr><td>\n");    
-    
+
+    if (gOptions.outputHtml) printf("<tr><td>\n");
+
     printf("%s.%s ", className, methodName);
     if (gOptions.outputHtml) printf("</td><td>");
-    
+
     printf("%lld ", method->elapsedExclusive);
     if (gOptions.outputHtml) printf("</td><td>");
-    
+
     printf("%lld ", method->elapsedInclusive);
     if (gOptions.outputHtml) printf("</td><td>");
-    
+
     printf("%d\n", method->numCalls[0]);
     if (gOptions.outputHtml) printf("</td><td>\n");
 }
@@ -3342,8 +3342,8 @@
 {
     MethodEntry** methods1 = parseMethodEntries(d1);
     MethodEntry** methods2 = parseMethodEntries(d2);
-    
-    // sort and assign the indicies 
+
+    // sort and assign the indicies
     int i;
     qsort(methods1, d1->numMethods, sizeof(MethodEntry*), compareElapsedInclusive);
     for (i = 0; i < d1->numMethods; ++i) {
@@ -3354,17 +3354,17 @@
     for (i = 0; i < d2->numMethods; ++i) {
         methods2[i]->index = i;
     }
-    
+
     int max = (d1->numMethods < d2->numMethods) ? d2->numMethods : d1->numMethods;
     max++;
     DiffEntry* diffs = (DiffEntry*)malloc(max * sizeof(DiffEntry));
     memset(diffs, 0, max * sizeof(DiffEntry));
     DiffEntry* ptr = diffs;
-    
+
 //    printf("<br>d1->numMethods: %d d1->numMethods: %d<br>\n", d1->numMethods, d2->numMethods);
-  
+
     int matches = 0;
-    
+
     for (i = 0 ; i < d1->numMethods ; i++) {
         int match = findMatch(methods2, d2->numMethods, methods1[i]);
         if (match >= 0) {
@@ -3384,13 +3384,13 @@
                 ptr->differenceInclusive = i2 - i1;
                 ptr->differenceInclusivePercentage = ((double)i2 / (double)i1) * 100.0;
             }
-            
+
             // clear these out so we don't find them again and we know which ones
             // we have left over
             methods1[i] = NULL;
             methods2[match] = NULL;
             ptr++;
-            
+
             matches++;
         }
     }
@@ -3399,7 +3399,7 @@
 
     qsort(diffs, matches, sizeof(DiffEntry), compareDiffEntriesExculsive);
     ptr = diffs;
-    
+
     if (gOptions.outputHtml) {
         printf(htmlHeader, gOptions.sortableUrl);
         printf("<h3>Table of Contents</h3>\n");
@@ -3412,12 +3412,12 @@
         printf("<a name=\"exclusive\"></a><h3 id=\"exclusive\">Exclusive</h3>\n");
         printf(tableHeader, "exclusive_table");
     }
-    
+
     char classBuf[HTML_BUFSIZE];
     char methodBuf[HTML_BUFSIZE];
     char* className;
     char* methodName;
-    
+
     while (ptr->method1 != NULL && ptr->method2 != NULL) {
         if (gOptions.outputHtml) printf("<tr><td>\n");
 
@@ -3426,16 +3426,16 @@
 
         printf("%s.%s ", className, methodName);
         if (gOptions.outputHtml) printf("</td><td>");
-        
+
         printf("%lld ", ptr->method1->elapsedExclusive);
         if (gOptions.outputHtml) printf("</td><td>");
-        
+
         printf("%llu ", ptr->method2->elapsedExclusive);
         if (gOptions.outputHtml) printf("</td><td>");
-        
+
         printf("%lld ", ptr->differenceExclusive);
         if (gOptions.outputHtml) printf("</td><td>");
-        
+
         printf("%.2f\n", ptr->differenceExclusivePercentage);
         if (gOptions.outputHtml) printf("</td><td>\n");
 
@@ -3444,12 +3444,12 @@
 
         printf("%d\n", ptr->method2->numCalls[0]);
         if (gOptions.outputHtml) printf("</td></tr>\n");
-        
+
         ptr++;
     }
-    
+
     if (gOptions.outputHtml) printf("</table>\n");
-    
+
     if (gOptions.outputHtml) {
         printf(htmlHeader, gOptions.sortableUrl);
         printf("Run 1: %s<br>\n", gOptions.diffFileName);
@@ -3457,10 +3457,10 @@
         printf("<a name=\"inclusive\"></a><h3 id=\"inculisve\">Inclusive</h3>\n");
         printf(tableHeader, "inclusive_table");
     }
-    
+
     qsort(diffs, matches, sizeof(DiffEntry), compareDiffEntriesInculsive);
     ptr = diffs;
-    
+
     while (ptr->method1 != NULL && ptr->method2 != NULL) {
         if (gOptions.outputHtml) printf("<tr><td>\n");
 
@@ -3496,25 +3496,25 @@
         printf("<h3>Run 1 methods not found in Run 2</h3>");
         printf(tableHeaderMissing);
     }
-   
+
     for (i = 0; i < d1->numMethods; ++i) {
         if (methods1[i] != NULL) {
            printMissingMethod(methods1[i]);
         }
     }
-    
+
     if (gOptions.outputHtml) {
         printf("</table>\n");
         printf("<h3>Run 2 methods not found in Run 1</h3>");
         printf(tableHeaderMissing);
     }
-    
+
     for (i = 0; i < d2->numMethods; ++i) {
         if (methods2[i] != NULL) {
             printMissingMethod(methods2[i]);
         }
     }
-    
+
     if (gOptions.outputHtml) printf("</body></html\n");
 }
 
@@ -3613,9 +3613,9 @@
         uint64_t sum2;
         TraceData data2;
         DataKeys* d2 = parseDataKeys(&data2, gOptions.diffFileName, &sum2, filters);
-        
+
         createDiff(d2, sum2, dataKeys, sumThreadTime);
-        
+
         freeDataKeys(d2);
     } else {
         MethodEntry** methods = parseMethodEntries(dataKeys);
@@ -3626,7 +3626,7 @@
         }
         free(methods);
     }
-        
+
     freeDataKeys(dataKeys);
 
     return 0;
diff --git a/tools/dmtracedump/dmtracedump.pl b/tools/dmtracedump/dmtracedump.pl
index fbd00ac..6e487c6 100755
--- a/tools/dmtracedump/dmtracedump.pl
+++ b/tools/dmtracedump/dmtracedump.pl
@@ -12,9 +12,7 @@
 
     print("dmtracedump -h -p $input > $output\n");
     system("dmtracedump -h -p '$input' > '$output'");
-    
+
 }
 
 closedir DIR;
-
-
diff --git a/tools/dmtracedump/dumpdir.sh b/tools/dmtracedump/dumpdir.sh
index 34937d7..81992a2 100644
--- a/tools/dmtracedump/dumpdir.sh
+++ b/tools/dmtracedump/dumpdir.sh
@@ -9,4 +9,3 @@
     G=$2/`echo $F | sed "s/.*\\///g"`.html
     dmtracedump -h -p $F > $G
 done
-
diff --git a/tools/gclog.py b/tools/gclog.py
index 4d5b704..d008f6a 100755
--- a/tools/gclog.py
+++ b/tools/gclog.py
@@ -232,4 +232,3 @@
 
 
 start()
-
diff --git a/tools/gdbjithelper/README.txt b/tools/gdbjithelper/README.txt
index 032b244..aab1a00 100644
--- a/tools/gdbjithelper/README.txt
+++ b/tools/gdbjithelper/README.txt
@@ -26,7 +26,7 @@
 
 
 Step 2
- 
+
 Push $OUT/EXECUTABLES/gdbjithelper_intermediates/LINKED/gdbjithelper to
 /system/bin on the device or emulator
 
@@ -63,4 +63,3 @@
 
 Issue the following command to see code around LR
 x /20i (char *) &codeLR+1
-
diff --git a/tools/gdbjithelper/gdbjithelper.c b/tools/gdbjithelper/gdbjithelper.c
index 862fcae..817d5a4 100644
--- a/tools/gdbjithelper/gdbjithelper.c
+++ b/tools/gdbjithelper/gdbjithelper.c
@@ -40,7 +40,7 @@
  * 463ba204 4191debc 01010000 4284aa74 68b00054
  * 463ba214 045cf205 cc016468 0718f2a5 d0102800
  * 463ba224 4c13c701 a20aa108 efb0f775 e008e010
- * 
+ *
  * code around lr:
  * 463ba1a8 42e19e58 f2050050 cc01045c 0718f2a5
  * 463ba1b8 d00f2800 4c13c701 a20aa108 efe4f775
diff --git a/tools/hprof-conv/Android.mk b/tools/hprof-conv/Android.mk
index fbac5fa..3d39d7b 100644
--- a/tools/hprof-conv/Android.mk
+++ b/tools/hprof-conv/Android.mk
@@ -18,4 +18,3 @@
 LOCAL_SRC_FILES := HprofConv.c
 LOCAL_MODULE := hprof-conv
 include $(BUILD_HOST_EXECUTABLE)
-
diff --git a/tools/hprof-conv/HprofConv.c b/tools/hprof-conv/HprofConv.c
index 88e302e..02cb7f4 100644
--- a/tools/hprof-conv/HprofConv.c
+++ b/tools/hprof-conv/HprofConv.c
@@ -716,4 +716,3 @@
         fclose(out);
     return (cc != 0);
 }
-
diff --git a/vm/AllocTracker.c b/vm/AllocTracker.c
index 9fb1c4d..168713c 100644
--- a/vm/AllocTracker.c
+++ b/vm/AllocTracker.c
@@ -609,7 +609,7 @@
      */
     int idx = headIndex();
     int count = gDvm.allocRecordCount;
-    
+
     LOGI("Tracked allocations, (head=%d count=%d)\n",
         gDvm.allocRecordHead, count);
     while (count--) {
@@ -651,4 +651,3 @@
             free(data);
     }
 }
-
diff --git a/vm/Android.mk b/vm/Android.mk
index dd77dd4..14ad5ae 100644
--- a/vm/Android.mk
+++ b/vm/Android.mk
@@ -32,10 +32,6 @@
 # Build for the target (device).
 #
 
-ifeq ($(TARGET_ARCH_VARIANT),armv5te)
-    WITH_JIT := false
-endif
-
 ifeq ($(TARGET_CPU_SMP),true)
     target_smp_flag := -DANDROID_SMP=1
 else
diff --git a/vm/Atomic.c b/vm/Atomic.c
index 55b4cc9..4473c85 100644
--- a/vm/Atomic.c
+++ b/vm/Atomic.c
@@ -21,7 +21,7 @@
 /*
  * Quasi-atomic 64-bit operations, for platforms that lack the real thing.
  *
- * TODO: unify ARM/x86/sh implementations using the to-be-written
+ * TODO: unify ARMv6/x86/sh implementations using the to-be-written
  * spin lock implementation.  We don't want to rely on mutex innards,
  * and it would be great if all platforms were running the same code.
  */
@@ -40,21 +40,24 @@
 #define NEED_QUASIATOMICS 1
 #else
 
-int android_quasiatomic_cmpxchg_64(int64_t oldvalue, int64_t newvalue,
-        volatile int64_t* addr) {
+int dvmQuasiAtomicCas64(int64_t oldvalue, int64_t newvalue,
+    volatile int64_t* addr)
+{
     return OSAtomicCompareAndSwap64Barrier(oldvalue, newvalue,
             (int64_t*)addr) == 0;
 }
 
-int64_t android_quasiatomic_swap_64(int64_t value, volatile int64_t* addr) {
+int64_t dvmQuasiAtomicSwap64(int64_t value, volatile int64_t* addr)
+{
     int64_t oldValue;
     do {
         oldValue = *addr;
-    } while (android_quasiatomic_cmpxchg_64(oldValue, value, addr));
+    } while (dvmQuasiAtomicCas64(oldValue, value, addr));
     return oldValue;
 }
 
-int64_t android_quasiatomic_read_64(volatile int64_t* addr) {
+int64_t dvmQuasiAtomicRead64(volatile const int64_t* addr)
+{
     return OSAtomicAdd64Barrier(0, addr);
 }
 #endif
@@ -63,7 +66,54 @@
 #define NEED_QUASIATOMICS 1
 
 #elif __arm__
-// Most of the implementation is in atomic-android-arm.s.
+#include <machine/cpu-features.h>
+
+#ifdef __ARM_HAVE_LDREXD
+int64_t dvmQuasiAtomicSwap64(int64_t newvalue, volatile int64_t* addr)
+{
+    int64_t prev;
+    int status;
+    do {
+        __asm__ __volatile__ ("@ dvmQuasiAtomicSwap64\n"
+            "ldrexd     %0, %H0, [%3]\n"
+            "strexd     %1, %4, %H4, [%3]"
+            : "=&r" (prev), "=&r" (status), "+m"(*addr)
+            : "r" (addr), "r" (newvalue)
+            : "cc");
+    } while (__builtin_expect(status != 0, 0));
+    return prev;
+}
+
+int dvmQuasiAtomicCas64(int64_t oldvalue, int64_t newvalue,
+    volatile int64_t* addr)
+{
+    int64_t prev;
+    int status;
+    do {
+        __asm__ __volatile__ ("@ dvmQuasiAtomicCas64\n"
+            "ldrexd     %0, %H0, [%3]\n"
+            "mov        %1, #0\n"
+            "teq        %0, %4\n"
+            "teqeq      %H0, %H4\n"
+            "strexdeq   %1, %5, %H5, [%3]"
+            : "=&r" (prev), "=&r" (status), "+m"(*addr)
+            : "r" (addr), "Ir" (oldvalue), "r" (newvalue)
+            : "cc");
+    } while (__builtin_expect(status != 0, 0));
+    return prev != oldvalue;
+}
+
+int64_t dvmQuasiAtomicRead64(volatile const int64_t* addr)
+{
+    int64_t value;
+    __asm__ __volatile__ ("@ dvmQuasiAtomicRead64\n"
+        "ldrexd     %0, %H0, [%1]"
+        : "=&r" (value)
+        : "r" (addr));
+    return value;
+}
+
+#else
 
 // on the device, we implement the 64-bit atomic operations through
 // mutex locking. normally, this is bad because we must initialize
@@ -89,7 +139,8 @@
    &_swap_locks[((unsigned)(void*)(addr) >> 3U) % SWAP_LOCK_COUNT]
 
 
-int64_t android_quasiatomic_swap_64(int64_t value, volatile int64_t* addr) {
+int64_t dvmQuasiAtomicSwap64(int64_t value, volatile int64_t* addr)
+{
     int64_t oldValue;
     pthread_mutex_t*  lock = SWAP_LOCK(addr);
 
@@ -102,8 +153,9 @@
     return oldValue;
 }
 
-int android_quasiatomic_cmpxchg_64(int64_t oldvalue, int64_t newvalue,
-        volatile int64_t* addr) {
+int dvmQuasiAtomicCas64(int64_t oldvalue, int64_t newvalue,
+    volatile int64_t* addr)
+{
     int result;
     pthread_mutex_t*  lock = SWAP_LOCK(addr);
 
@@ -119,7 +171,8 @@
     return result;
 }
 
-int64_t android_quasiatomic_read_64(volatile int64_t* addr) {
+int64_t dvmQuasiAtomicRead64(volatile const int64_t* addr)
+{
     int64_t result;
     pthread_mutex_t*  lock = SWAP_LOCK(addr);
 
@@ -129,6 +182,8 @@
     return result;
 }
 
+#endif /*__ARM_HAVE_LDREXD*/
+
 /*****************************************************************************/
 #elif __sh__
 #define NEED_QUASIATOMICS 1
@@ -162,8 +217,9 @@
 /* global spinlock for all 64-bit quasiatomic operations */
 static int32_t quasiatomic_spinlock = 0;
 
-int android_quasiatomic_cmpxchg_64(int64_t oldvalue, int64_t newvalue,
-        volatile int64_t* addr) {
+int dvmQuasiAtomicCas64(int64_t oldvalue, int64_t newvalue,
+    volatile int64_t* addr)
+{
     int result;
 
     while (android_atomic_acquire_cas(0, 1, &quasiatomic_spinlock)) {
@@ -186,7 +242,8 @@
     return result;
 }
 
-int64_t android_quasiatomic_read_64(volatile int64_t* addr) {
+int64_t dvmQuasiAtomicRead64(volatile const int64_t* addr)
+{
     int64_t result;
 
     while (android_atomic_acquire_cas(0, 1, &quasiatomic_spinlock)) {
@@ -203,7 +260,8 @@
     return result;
 }
 
-int64_t android_quasiatomic_swap_64(int64_t value, volatile int64_t* addr) {
+int64_t dvmQuasiAtomicSwap64(int64_t value, volatile int64_t* addr)
+{
     int64_t result;
 
     while (android_atomic_acquire_cas(0, 1, &quasiatomic_spinlock)) {
@@ -221,5 +279,4 @@
     return result;
 }
 
-#endif
-
+#endif /*NEED_QUASIATOMICS*/
diff --git a/vm/Atomic.h b/vm/Atomic.h
index 27a5ea0..6c3a66f 100644
--- a/vm/Atomic.h
+++ b/vm/Atomic.h
@@ -24,42 +24,32 @@
 #include <cutils/atomic-inline.h>   /* and some uncommon ones */
 
 /*
- * Full memory barrier.  Ensures compiler ordering and SMP behavior.
- */
-#define MEM_BARRIER()   ANDROID_MEMBAR_FULL()
-
-/*
- * 32-bit atomic compare-and-swap macro.  Performs a memory barrier
- * before the swap (store-release).
- *
- * If *_addr equals "_old", replace it with "_new" and return nonzero
- * (i.e. returns "false" if the operation fails).
- *
- * Underlying function is currently declared:
- *   int release_cas(int32_t old, int32_t new, volatile int32_t* addr)
- *
- * TODO: rename macro to ATOMIC_RELEASE_CAS
- */
-#define ATOMIC_CMP_SWAP(_addr, _old, _new) \
-            (android_atomic_release_cas((_old), (_new), (_addr)) == 0)
-
-
-/*
  * NOTE: Two "quasiatomic" operations on the exact same memory address
  * are guaranteed to operate atomically with respect to each other,
  * but no guarantees are made about quasiatomic operations mixed with
  * non-quasiatomic operations on the same address, nor about
  * quasiatomic operations that are performed on partially-overlapping
  * memory.
+ *
+ * None of these provide a memory barrier.
  */
 
 /*
- * TODO: rename android_quasiatomic_* to dvmQuasiatomic*.  Don't want to do
- * that yet due to branch merge issues.
+ * Swap the 64-bit value at "addr" with "value".  Returns the previous
+ * value.
  */
-int64_t android_quasiatomic_swap_64(int64_t value, volatile int64_t* addr);
-int64_t android_quasiatomic_read_64(volatile int64_t* addr);
-int android_quasiatomic_cmpxchg_64(int64_t oldvalue, int64_t newvalue,
+int64_t dvmQuasiAtomicSwap64(int64_t value, volatile int64_t* addr);
+
+/*
+ * Read the 64-bit value at "addr".
+ */
+int64_t dvmQuasiAtomicRead64(volatile const int64_t* addr);
+
+/*
+ * If the value at "addr" is equal to "oldvalue", replace it with "newvalue"
+ * and return 0.  Otherwise, don't swap, and return nonzero.
+ */
+int dvmQuasiAtomicCas64(int64_t oldvalue, int64_t newvalue,
         volatile int64_t* addr);
 
 #endif /*_DALVIK_ATOMIC*/
diff --git a/vm/AtomicCache.c b/vm/AtomicCache.c
index cee84a8..bf8639e 100644
--- a/vm/AtomicCache.c
+++ b/vm/AtomicCache.c
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 /*
  * Mutex-free cache.  Each entry has two 32-bit keys, one 32-bit value,
  * and a 32-bit version.
@@ -75,7 +76,6 @@
 }
 
 
-
 /*
  * Update a cache entry.
  *
@@ -91,22 +91,24 @@
     )
 {
     /*
-     * The fields don't match, so we need to update them.  There is a
-     * risk that another thread is also trying to update them, so we
-     * grab an ownership flag to lock out other threads.
+     * The fields don't match, so we want to update them.  There is a risk
+     * that another thread is also trying to update them, so we grab an
+     * ownership flag to lock out other threads.
      *
      * If the lock flag was already set in "firstVersion", somebody else
-     * was in mid-update.  (This means that using "firstVersion" as the
-     * "before" argument to the CAS would succeed when it shouldn't and
-     * vice-versa -- we could also just pass in
-     * (firstVersion & ~ATOMIC_LOCK_FLAG) as the first argument.)
+     * was in mid-update, and we don't want to continue here.  (This means
+     * that using "firstVersion" as the "before" argument to the CAS would
+     * succeed when it shouldn't and vice-versa -- we could also just pass
+     * in (firstVersion & ~ATOMIC_LOCK_FLAG) as the first argument.)
      *
-     * NOTE: we don't really deal with the situation where we overflow
-     * the version counter (at 2^31).  Probably not a real concern.
+     * NOTE: we don't deal with the situation where we overflow the version
+     * counter and trample the ATOMIC_LOCK_FLAG (at 2^31).  Probably not
+     * a real concern.
      */
     if ((firstVersion & ATOMIC_LOCK_FLAG) != 0 ||
-        !ATOMIC_CMP_SWAP((volatile s4*) &pEntry->version,
-            firstVersion, firstVersion | ATOMIC_LOCK_FLAG))
+        android_atomic_release_cas(
+                firstVersion, firstVersion | ATOMIC_LOCK_FLAG,
+                (volatile s4*) &pEntry->version) != 0)
     {
         /*
          * We couldn't get the write lock.  Return without updating the table.
@@ -128,25 +130,30 @@
         pCache->misses++;
 #endif
 
-    /* volatile incr */
+    /*
+     * We have the write lock, but somebody could be reading this entry
+     * while we work.  We use memory barriers to ensure that the state
+     * is always consistent when the version number is even.
+     */
     pEntry->version++;
-    MEM_BARRIER();
+    ANDROID_MEMBAR_FULL();
 
     pEntry->key1 = key1;
     pEntry->key2 = key2;
     pEntry->value = value;
 
-    /* volatile incr */
+    ANDROID_MEMBAR_FULL();
     pEntry->version++;
-    MEM_BARRIER();
 
     /*
      * Clear the lock flag.  Nobody else should have been able to modify
      * pEntry->version, so if this fails the world is broken.
      */
     firstVersion += 2;
-    if (!ATOMIC_CMP_SWAP((volatile s4*) &pEntry->version,
-            firstVersion | ATOMIC_LOCK_FLAG, firstVersion))
+    assert((firstVersion & 0x01) == 0);
+    if (android_atomic_release_cas(
+            firstVersion | ATOMIC_LOCK_FLAG, firstVersion,
+            (volatile s4*) &pEntry->version) != 0)
     {
         //LOGE("unable to reset the instanceof cache ownership\n");
         dvmAbort();
@@ -170,4 +177,3 @@
                 (pCache->fail + pCache->hits + pCache->misses + pCache->fills),
         pCache->numEntries);
 }
-
diff --git a/vm/AtomicCache.h b/vm/AtomicCache.h
index 1d59a47..66d222e 100644
--- a/vm/AtomicCache.h
+++ b/vm/AtomicCache.h
@@ -63,17 +63,16 @@
  * Do a cache lookup.  We need to be able to read and write entries
  * atomically.  There are a couple of ways to do this:
  *  (1) Have a global lock.  A mutex is too heavy, so instead we would use
- *      an atomic flag.  If the flag is set, we could sit and spin, but
- *      if we're a high-priority thread that may cause a lockup.  Better
- *      to just ignore the cache and do the full computation.
+ *      an atomic flag.  If the flag is set, we could sit and spin,
+ *      but if we're a high-priority thread that may cause a lockup.
+ *      Better to just ignore the cache and do the full computation.
  *  (2) Have a "version" that gets incremented atomically when a write
  *      begins and again when it completes.  Compare the version before
- *      and after doing reads.  So long as "version" is volatile the
- *      compiler will do the right thing, allowing us to skip atomic
- *      ops in the common read case.  The table updates are expensive,
- *      requiring two volatile writes and (for correctness on
- *      multiprocessor systems) memory barriers.  We also need some
- *      sort of lock to ensure that nobody else tries to start an
+ *      and after doing reads.  So long as we have memory barriers in the
+ *      right place the compiler and CPU will do the right thing, allowing
+ *      us to skip atomic ops in the common read case.  The table updates
+ *      are expensive, requiring two writes with barriers.  We also need
+ *      some sort of lock to ensure that nobody else tries to start an
  *      update while we're in the middle of one.
  *
  * We expect a 95+% hit rate for the things we use this for, so #2 is
@@ -103,8 +102,8 @@
     hash = (((u4)(_key1) >> 2) ^ (u4)(_key2)) & ((_cacheSize)-1);           \
     pEntry = (_cache)->entries + hash;                                      \
                                                                             \
-    /* volatile read */                                                     \
     firstVersion = pEntry->version;                                         \
+    ANDROID_MEMBAR_FULL();                                                  \
                                                                             \
     if (pEntry->key1 == (u4)(_key1) && pEntry->key2 == (u4)(_key2)) {       \
         /*                                                                  \
@@ -113,7 +112,8 @@
          * We're also hosed if "firstVersion" was odd, indicating that      \
          * an update was in progress before we got here.                    \
          */                                                                 \
-        value = pEntry->value;    /* must grab before next check */         \
+        value = pEntry->value;                                              \
+        ANDROID_MEMBAR_FULL();                                              \
                                                                             \
         if ((firstVersion & 0x01) != 0 || firstVersion != pEntry->version)  \
         {                                                                   \
diff --git a/vm/Dalvik.h b/vm/Dalvik.h
index 27fa316..5d84440 100644
--- a/vm/Dalvik.h
+++ b/vm/Dalvik.h
@@ -58,6 +58,7 @@
 #include "alloc/HeapDebug.h"
 #include "alloc/HeapWorker.h"
 #include "alloc/GC.h"
+#include "alloc/WriteBarrier.h"
 #include "oo/AccessCheck.h"
 #include "JarFile.h"
 #include "Properties.h"
@@ -83,5 +84,6 @@
 #include "Atomic.h"
 #include "interp/Interp.h"
 #include "InlineNative.h"
+#include "oo/ObjectInlines.h"
 
 #endif /*_DALVIK_DALVIK*/
diff --git a/vm/DalvikVersion.h b/vm/DalvikVersion.h
index 4f9eeb8..3bc37b0 100644
--- a/vm/DalvikVersion.h
+++ b/vm/DalvikVersion.h
@@ -24,7 +24,7 @@
  * The version we show to tourists.
  */
 #define DALVIK_MAJOR_VERSION    1
-#define DALVIK_MINOR_VERSION    3
+#define DALVIK_MINOR_VERSION    4
 #define DALVIK_BUG_VERSION      0
 
 /*
@@ -32,6 +32,6 @@
  * way classes load changes, e.g. field ordering or vtable layout.  Changing
  * this guarantees that the optimized form of the DEX file is regenerated.
  */
-#define DALVIK_VM_BUILD         22
+#define DALVIK_VM_BUILD         23
 
 #endif /*_DALVIK_VERSION*/
diff --git a/vm/Ddm.c b/vm/Ddm.c
index 76cbe82..1aaebe0 100644
--- a/vm/Ddm.c
+++ b/vm/Ddm.c
@@ -411,7 +411,8 @@
     int cc;
     cc = read(fd, lineBuf, sizeof(lineBuf)-1);
     if (cc <= 0) {
-        LOGI("Unable to read '%s': got %d (errno=%d)\n", nameBuf, cc, errno);
+        const char* msg = (cc == 0) ? "unexpected EOF" : strerror(errno);
+        LOGI("Unable to read '%s': %s\n", nameBuf, msg);
         close(fd);
         return false;
     }
@@ -458,8 +459,8 @@
  *  (4b) threadId
  *  (1b) thread status
  *  (4b) tid
- *  (4b) utime 
- *  (4b) stime 
+ *  (4b) utime
+ *  (4b) stime
  *  (1b) is daemon?
  *
  * The length fields exist in anticipation of adding additional fields
@@ -595,4 +596,3 @@
         memcpy(arrayObj->contents, data, len);
     return arrayObj;
 }
-
diff --git a/vm/Debugger.c b/vm/Debugger.c
index aa37d5d..dc54d76 100644
--- a/vm/Debugger.c
+++ b/vm/Debugger.c
@@ -821,7 +821,7 @@
     if (strcmp(type, "Ljava/lang/String;") == 0)
         return JT_STRING;
     else if (strcmp(type, "Ljava/lang/Class;") == 0)
-        return JT_CLASS_OBJECT; 
+        return JT_CLASS_OBJECT;
     else if (strcmp(type, "Ljava/lang/Thread;") == 0)
         return JT_THREAD;
     else if (strcmp(type, "Ljava/lang/ThreadGroup;") == 0)
@@ -1150,7 +1150,7 @@
 {
     StringObject* strObj;
 
-    strObj = dvmCreateStringFromCstr(str, ALLOC_DEFAULT);
+    strObj = dvmCreateStringFromCstr(str);
     dvmReleaseTrackedAlloc((Object*) strObj, NULL);
     return objectToObjectId((Object*) strObj);
 }
@@ -1255,7 +1255,7 @@
     int i;
 
     dexStringCacheInit(&stringCache);
-    
+
     clazz = refTypeIdToClassObject(refTypeId);
     assert(clazz != NULL);
 
@@ -1325,7 +1325,7 @@
     bool withGeneric;
 } DebugCallbackContext;
 
-static int lineTablePositionsCb(void *cnxt, u4 address, u4 lineNum) 
+static int lineTablePositionsCb(void *cnxt, u4 address, u4 lineNum)
 {
     DebugCallbackContext *pContext = (DebugCallbackContext *)cnxt;
 
@@ -1454,7 +1454,7 @@
     DebugCallbackContext context;
 
     memset (&context, 0, sizeof(DebugCallbackContext));
-    
+
     method = methodIdToMethod(refTypeId, methodId);
 
     expandBufAdd4BE(pReply, method->insSize);
@@ -1664,7 +1664,7 @@
     StaticField* sfield = (StaticField*) fieldIdToField(refTypeId, fieldId);
     Object* objVal;
     JValue value;
-    
+
     value.j = rawValue;
 
     switch (sfield->field.signature[0]) {
@@ -1761,7 +1761,7 @@
     Object* threadObj;
     Thread* thread;
     bool result = false;
-    
+
     threadObj = objectIdToObject(threadId);
     assert(threadObj != NULL);
 
@@ -1808,7 +1808,7 @@
     Object* threadObj;
     Thread* thread;
     u4 result = 0;
-    
+
     threadObj = objectIdToObject(threadId);
     assert(threadObj != NULL);
 
@@ -1836,7 +1836,7 @@
     Object* threadObj;
     Thread* thread;
     bool result;
-    
+
     threadObj = objectIdToObject(threadId);
     assert(threadObj != NULL);
 
@@ -1863,7 +1863,7 @@
     Object* threadObj;
     Thread* thread;
     bool result = false;
-    
+
     threadObj = objectIdToObject(threadId);
     assert(threadObj != NULL);
 
@@ -1893,7 +1893,7 @@
 {
     Object* threadObj;
     Thread* thread;
-    
+
     threadObj = objectIdToObject(threadId);
     assert(threadObj != NULL);
 
diff --git a/vm/Dvm.mk b/vm/Dvm.mk
index 61783e3..3214e31 100644
--- a/vm/Dvm.mk
+++ b/vm/Dvm.mk
@@ -99,7 +99,7 @@
 
 LOCAL_SRC_FILES := \
 	AllocTracker.c \
-	Atomic.c \
+	Atomic.c.arm \
 	AtomicCache.c \
 	CheckJni.c \
 	Ddm.c \
@@ -137,6 +137,7 @@
 	alloc/Heap.c.arm \
 	alloc/DdmHeap.c \
 	alloc/Verify.c \
+	alloc/Visit.c \
 	analysis/CodeVerify.c \
 	analysis/DexPrepare.c \
 	analysis/DexVerify.c \
@@ -194,7 +195,7 @@
 	reflect/Annotation.c \
 	reflect/Proxy.c \
 	reflect/Reflect.c \
-	test/AtomicSpeed.c \
+	test/AtomicTest.c.arm \
 	test/TestHash.c \
 	test/TestIndirectRefTable.c
 
@@ -215,7 +216,6 @@
 ifeq ($(WITH_JIT),true)
   LOCAL_CFLAGS += -DWITH_JIT
   LOCAL_SRC_FILES += \
-	../dexdump/OpCodeNames.c \
 	compiler/Compiler.c \
 	compiler/Frontend.c \
 	compiler/Utility.c \
@@ -247,10 +247,6 @@
   endif # WITH_HPROF_STACK
 endif   # WITH_HPROF
 
-ifeq ($(strip $(DVM_TRACK_HEAP_MARKING)),true)
-  LOCAL_CFLAGS += -DDVM_TRACK_HEAP_MARKING=1
-endif
-
 LOCAL_C_INCLUDES += \
 	$(JNI_H_INCLUDE) \
 	dalvik \
@@ -276,6 +272,7 @@
 ifeq ($(dvm_arch),arm)
   #dvm_arch_variant := armv7-a
   #LOCAL_CFLAGS += -march=armv7-a -mfloat-abi=softfp -mfpu=vfp
+  LOCAL_CFLAGS += -Werror
   MTERP_ARCH_KNOWN := true
   # Select architecture-specific sources (armv4t, armv5te etc.)
   LOCAL_SRC_FILES += \
diff --git a/vm/DvmDex.c b/vm/DvmDex.c
index 258d768..aefdb81 100644
--- a/vm/DvmDex.c
+++ b/vm/DvmDex.c
@@ -288,4 +288,3 @@
 
     return true;
 }
-
diff --git a/vm/Exception.c b/vm/Exception.c
index 5e01dfc..fb3b9f8 100644
--- a/vm/Exception.c
+++ b/vm/Exception.c
@@ -424,7 +424,7 @@
     if (msg == NULL)
         msgStr = NULL;
     else {
-        msgStr = dvmCreateStringFromCstr(msg, ALLOC_DEFAULT);
+        msgStr = dvmCreateStringFromCstr(msg);
         if (msgStr == NULL) {
             LOGW("Could not allocate message string \"%s\" while "
                     "throwing internal exception (%s)\n",
@@ -528,7 +528,7 @@
             excepClass->descriptor, msg, initKind);
         assert(strcmp(excepClass->descriptor,
                       "Ljava/lang/RuntimeException;") != 0);
-        dvmThrowChainedException("Ljava/lang/RuntimeException;", 
+        dvmThrowChainedException("Ljava/lang/RuntimeException;",
             "re-throw on exception class missing constructor", NULL);
         goto bail;
     }
@@ -781,7 +781,7 @@
             if (handler == NULL) {
                 break;
             }
-                
+
             if (handler->typeIdx == kDexNoIndex) {
                 /* catch-all */
                 LOGV("Match on catch-all block at 0x%02x in %s.%s for %s\n",
@@ -1075,7 +1075,7 @@
                 *intPtr++ = 0;      /* no saved PC for native methods */
             } else {
                 assert(saveArea->xtra.currentPc >= method->insns &&
-                        saveArea->xtra.currentPc < 
+                        saveArea->xtra.currentPc <
                         method->insns + dvmGetMethodInsnsSize(method));
                 *intPtr++ = (int) (saveArea->xtra.currentPc - method->insns);
             }
@@ -1127,7 +1127,6 @@
 ArrayObject* dvmGetStackTraceRaw(const int* intVals, int stackDepth)
 {
     ArrayObject* steArray = NULL;
-    Object** stePtr;
     int i;
 
     /* init this if we haven't yet */
@@ -1139,7 +1138,6 @@
                     stackDepth, kObjectArrayRefWidth, ALLOC_DEFAULT);
     if (steArray == NULL)
         goto bail;
-    stePtr = (Object**) steArray->contents;
 
     /*
      * Allocate and initialize a StackTraceElement for each stack frame.
@@ -1168,13 +1166,13 @@
             lineNumber = dvmLineNumFromPC(meth, pc);
 
         dotName = dvmDescriptorToDot(meth->clazz->descriptor);
-        className = dvmCreateStringFromCstr(dotName, ALLOC_DEFAULT);
+        className = dvmCreateStringFromCstr(dotName);
         free(dotName);
 
-        methodName = dvmCreateStringFromCstr(meth->name, ALLOC_DEFAULT);
+        methodName = dvmCreateStringFromCstr(meth->name);
         sourceFile = dvmGetMethodSourceFile(meth);
         if (sourceFile != NULL)
-            fileName = dvmCreateStringFromCstr(sourceFile, ALLOC_DEFAULT);
+            fileName = dvmCreateStringFromCstr(sourceFile);
         else
             fileName = NULL;
 
@@ -1196,7 +1194,7 @@
         if (dvmCheckException(dvmThreadSelf()))
             goto bail;
 
-        *stePtr++ = ste;
+        dvmSetObjectArrayElement(steArray, i, ste);
     }
 
 bail:
@@ -1304,4 +1302,3 @@
         exception = cause;
     }
 }
-
diff --git a/vm/Globals.h b/vm/Globals.h
index 11fda50..30df209 100644
--- a/vm/Globals.h
+++ b/vm/Globals.h
@@ -122,6 +122,7 @@
     bool        preVerify;
     bool        postVerify;
     bool        generateRegisterMaps;
+    bool        concurrentMarkSweep;
 
     int         assertionCtrlCount;
     AssertionControl*   assertionCtrl;
@@ -180,7 +181,6 @@
     /*
      * Quick lookups for popular classes used internally.
      */
-    ClassObject* unlinkedJavaLangClass;
     ClassObject* classJavaLangClass;
     ClassObject* classJavaLangClassArray;
     ClassObject* classJavaLangError;
@@ -236,7 +236,7 @@
     int         offJavaLangClass_pd;
 
     /* field offsets - String */
-    volatile int javaLangStringReady;   /* 0=not init, 1=ready, -1=initing */
+    int         javaLangStringReady;    /* 0=not init, 1=ready, -1=initing */
     int         offJavaLangString_value;
     int         offJavaLangString_count;
     int         offJavaLangString_offset;
@@ -277,7 +277,6 @@
     int         offJavaLangRefReference_referent;
     int         offJavaLangRefReference_queue;
     int         offJavaLangRefReference_queueNext;
-    int         offJavaLangRefReference_vmData;
 
     /* method pointers - java.lang.ref.Reference */
     Method*     methJavaLangRefReference_enqueueInternal;
diff --git a/vm/Hash.c b/vm/Hash.c
index 67a25a1..7bdd92f 100644
--- a/vm/Hash.c
+++ b/vm/Hash.c
@@ -282,8 +282,8 @@
 
 /*
  * Scan every entry in the hash table and evaluate it with the specified
- * indirect function call. If the function returns 1, remove the entry from 
- * the table. 
+ * indirect function call. If the function returns 1, remove the entry from
+ * the table.
  *
  * Does NOT invoke the "free" function on the item.
  *
@@ -400,7 +400,7 @@
     {
         const void* data = (const void*)dvmHashIterData(&iter);
         int count;
-            
+
         count = countProbes(pHashTable, (*calcFunc)(data), data, cmpFunc);
 
         numEntries++;
diff --git a/vm/IndirectRefTable.c b/vm/IndirectRefTable.c
index 7a531a5..dadd03f 100644
--- a/vm/IndirectRefTable.c
+++ b/vm/IndirectRefTable.c
@@ -499,4 +499,3 @@
     LOGW("Memory held directly by native code is %d bytes\n", total);
     free(tableCopy);
 }
-
diff --git a/vm/Init.c b/vm/Init.c
index ece37f7..e29687d 100644
--- a/vm/Init.c
+++ b/vm/Init.c
@@ -117,6 +117,7 @@
     dvmFprintf(stderr, "  -Xgc:[no]overwritefree\n");
     dvmFprintf(stderr, "  -Xgc:[no]preverify\n");
     dvmFprintf(stderr, "  -Xgc:[no]postverify\n");
+    dvmFprintf(stderr, "  -Xgc:[no]concurrent\n");
     dvmFprintf(stderr, "  -Xgenregmap\n");
     dvmFprintf(stderr, "  -Xcheckdexsum\n");
 #if defined(WITH_JIT)
@@ -183,9 +184,6 @@
 #ifdef PROFILE_FIELD_ACCESS
         " profile_field_access"
 #endif
-#ifdef DVM_TRACK_HEAP_MARKING
-        " track_heap_marking"
-#endif
 #if DVM_RESOLVER_CACHE == DVM_RC_REDUCING
         " resolver_cache_reducing"
 #elif DVM_RESOLVER_CACHE == DVM_RC_EXPANDING
@@ -227,7 +225,7 @@
 {
     dvmFprintf(stdout, "DalvikVM version %d.%d.%d\n",
         DALVIK_MAJOR_VERSION, DALVIK_MINOR_VERSION, DALVIK_BUG_VERSION);
-    dvmFprintf(stdout, 
+    dvmFprintf(stdout,
         "Copyright (C) 2007 The Android Open Source Project\n\n"
         "This software is built from source code licensed under the "
         "Apache License,\n"
@@ -637,7 +635,7 @@
     gDvmJit.methodTable = dvmHashTableCreate(8, NULL);
 
     start = buf;
-    /* 
+    /*
      * Break comma-separated method signatures and enter them into the hash
      * table individually.
      */
@@ -986,6 +984,10 @@
                 gDvm.postVerify = true;
             else if (strcmp(argv[i] + 5, "nopostverify") == 0)
                 gDvm.postVerify = false;
+            else if (strcmp(argv[i] + 5, "concurrent") == 0)
+                gDvm.concurrentMarkSweep = true;
+            else if (strcmp(argv[i] + 5, "noconcurrent") == 0)
+                gDvm.concurrentMarkSweep = false;
             else {
                 dvmFprintf(stderr, "Bad value for -Xgc");
                 return -1;
@@ -1374,7 +1376,7 @@
 {
     u8 startHeap, startQuit, startJdwp;
     u8 endHeap, endQuit, endJdwp;
-    
+
     startHeap = dvmGetRelativeTimeUsec();
 
     /*
@@ -1594,7 +1596,7 @@
     /*
      * Stop our internal threads.
      */
-    dvmHeapWorkerShutdown();
+    dvmGcThreadShutdown();
 
     if (gDvm.jdwpState != NULL)
         dvmJdwpShutdown(gDvm.jdwpState);
diff --git a/vm/InlineNative.c b/vm/InlineNative.c
index 2323958..aa9c5cf 100644
--- a/vm/InlineNative.c
+++ b/vm/InlineNative.c
@@ -754,7 +754,7 @@
     Method* method = gDvm.inlinedMethods[opIndex];
     if (method == NULL) {
         ClassObject* clazz;
-        
+
         clazz = dvmFindClassNoInit(
                 gDvmInlineOpsTable[opIndex].classDescriptor, NULL);
         if (clazz == NULL) {
diff --git a/vm/Inlines.c b/vm/Inlines.c
index e314448..f1bd621 100644
--- a/vm/Inlines.c
+++ b/vm/Inlines.c
@@ -26,4 +26,3 @@
 
 #undef LOG_TAG
 #include "jdwp/JdwpPriv.h"
-
diff --git a/vm/Inlines.h b/vm/Inlines.h
index cdfaf75..f1580e3 100644
--- a/vm/Inlines.h
+++ b/vm/Inlines.h
@@ -30,4 +30,3 @@
 #else
 # define INLINE
 #endif
-
diff --git a/vm/JarFile.c b/vm/JarFile.c
index a0d24d1..39eb8d1 100644
--- a/vm/JarFile.c
+++ b/vm/JarFile.c
@@ -368,4 +368,3 @@
     free(pJarFile->cacheFileName);
     free(pJarFile);
 }
-
diff --git a/vm/Jni.c b/vm/Jni.c
index 0d84910..9973508 100644
--- a/vm/Jni.c
+++ b/vm/Jni.c
@@ -2910,7 +2910,7 @@
         result = NULL;
     } else {
         /* note newStr could come back NULL on OOM */
-        StringObject* newStr = dvmCreateStringFromCstr(bytes, ALLOC_DEFAULT);
+        StringObject* newStr = dvmCreateStringFromCstr(bytes);
         result = addLocalReference(env, (Object*) newStr);
         dvmReleaseTrackedAlloc((Object*)newStr, NULL);
     }
@@ -3093,7 +3093,7 @@
     //LOGV("JNI: set element %d in array %p to %p\n", index, array, value);
 
     Object* obj = dvmDecodeIndirectRef(env, jobj);
-    ((Object**) arrayObj->contents)[index] = obj;
+    dvmSetObjectArrayElement(arrayObj, index, obj);
 
 bail:
     JNI_EXIT();
diff --git a/vm/LinearAlloc.c b/vm/LinearAlloc.c
index 3a79a8b..65db79e 100644
--- a/vm/LinearAlloc.c
+++ b/vm/LinearAlloc.c
@@ -702,4 +702,3 @@
     return (char*) start >= pHdr->mapAddr &&
            ((char*)start + length) <= (pHdr->mapAddr + pHdr->curOffset);
 }
-
diff --git a/vm/Native.c b/vm/Native.c
index 83f32b4..0b10e23 100644
--- a/vm/Native.c
+++ b/vm/Native.c
@@ -815,4 +815,3 @@
     return (void*) dvmHashForeach(gDvm.nativeLibs, findMethodInLib,
         (void*) method);
 }
-
diff --git a/vm/PointerSet.c b/vm/PointerSet.c
index 2c96a74..1d2e814 100644
--- a/vm/PointerSet.c
+++ b/vm/PointerSet.c
@@ -271,4 +271,3 @@
     for (i = 0; i < pSet->count; i++)
         printf(" %p", pSet->list[i]);
 }
-
diff --git a/vm/Profile.c b/vm/Profile.c
index 657dd5a..f2c0c0f 100644
--- a/vm/Profile.c
+++ b/vm/Profile.c
@@ -227,7 +227,8 @@
             LOGE("Can't have %d active profilers\n", newValue);
             dvmAbort();
         }
-    } while (!ATOMIC_CMP_SWAP(&gDvm.activeProfilers, oldValue, newValue));
+    } while (android_atomic_release_cas(oldValue, newValue,
+            &gDvm.activeProfilers) != 0);
 
     LOGD("+++ active profiler count now %d\n", newValue);
 #if defined(WITH_JIT)
@@ -404,7 +405,7 @@
     storeLongLE(state->buf + 8, state->startWhen);
     state->curOffset = TRACE_HEADER_LEN;
 
-    MEM_BARRIER();
+    ANDROID_MEMBAR_FULL();
 
     /*
      * Set the "enabled" flag.  Once we do this, threads will wait to be
@@ -519,7 +520,7 @@
      * after that completes.
      */
     state->traceEnabled = false;
-    MEM_BARRIER();
+    ANDROID_MEMBAR_FULL();
     sched_yield();
     usleep(250 * 1000);
 
@@ -641,7 +642,8 @@
         /* append the profiling data */
         if (fwrite(state->buf, finalCurOffset, 1, state->traceFile) != 1) {
             int err = errno;
-            LOGE("trace fwrite(%d) failed, errno=%d\n", finalCurOffset, err);
+            LOGE("trace fwrite(%d) failed: %s\n",
+                finalCurOffset, strerror(err));
             dvmThrowExceptionFmt("Ljava/lang/RuntimeException;",
                 "Trace data write failed: %s", strerror(err));
         }
@@ -695,7 +697,8 @@
             state->overflow = true;
             return;
         }
-    } while (!ATOMIC_CMP_SWAP(&state->curOffset, oldOffset, newOffset));
+    } while (android_atomic_release_cas(oldOffset, newOffset,
+            &state->curOffset) != 0);
 
     //assert(METHOD_ACTION((u4) method) == 0);
 
diff --git a/vm/Properties.c b/vm/Properties.c
index 91288c2..288085b 100644
--- a/vm/Properties.c
+++ b/vm/Properties.c
@@ -111,8 +111,8 @@
         value = "";
     }
 
-    keyStr = dvmCreateStringFromCstr(key, ALLOC_DEFAULT);
-    valueStr = dvmCreateStringFromCstr(value, ALLOC_DEFAULT);
+    keyStr = dvmCreateStringFromCstr(key);
+    valueStr = dvmCreateStringFromCstr(value);
     if (keyStr == NULL || valueStr == NULL) {
         LOGW("setProperty string creation failed\n");
         goto bail;
@@ -199,7 +199,7 @@
     setProperty(propObj, put, "file.separator", "/");
     setProperty(propObj, put, "line.separator", "\n");
     setProperty(propObj, put, "path.separator", ":");
-    
+
     /*
      * These show up elsewhere, so do them here too.
      */
@@ -265,7 +265,7 @@
         goto bail;
     }
 
-    keyObj = dvmCreateStringFromCstr(key, ALLOC_DEFAULT);
+    keyObj = dvmCreateStringFromCstr(key);
     if (keyObj == NULL)
         goto bail;
 
diff --git a/vm/README.txt b/vm/README.txt
index e00e240..1be1a63 100644
--- a/vm/README.txt
+++ b/vm/README.txt
@@ -17,4 +17,3 @@
 work correctly.
 
 - Use of gcc-specific and C99 constructs is allowed.
-
diff --git a/vm/RawDexFile.c b/vm/RawDexFile.c
index c55fee6..3402ff4 100644
--- a/vm/RawDexFile.c
+++ b/vm/RawDexFile.c
@@ -41,4 +41,3 @@
     free(pRawDexFile->cacheFileName);
     free(pRawDexFile);
 }
-
diff --git a/vm/ReferenceTable.c b/vm/ReferenceTable.c
index 310669d..8984d5f 100644
--- a/vm/ReferenceTable.c
+++ b/vm/ReferenceTable.c
@@ -291,4 +291,3 @@
     LOGW("Memory held directly by tracked refs is %d bytes\n", total);
     free(tableCopy);
 }
-
diff --git a/vm/StdioConverter.c b/vm/StdioConverter.c
index 520d984..987fdf0 100644
--- a/vm/StdioConverter.c
+++ b/vm/StdioConverter.c
@@ -286,4 +286,3 @@
 
     return true;
 }
-
diff --git a/vm/StdioConverter.h b/vm/StdioConverter.h
index eef4a72..ffbf807 100644
--- a/vm/StdioConverter.h
+++ b/vm/StdioConverter.h
@@ -23,4 +23,3 @@
 void dvmStdioConverterShutdown(void);
 
 #endif /*_DALVIK_STDOUTCONVERTER*/
-
diff --git a/vm/Sync.c b/vm/Sync.c
index 8f906ac..1f0b2c2 100644
--- a/vm/Sync.c
+++ b/vm/Sync.c
@@ -170,8 +170,8 @@
     /* replace the head of the list with the new monitor */
     do {
         mon->next = gDvm.monitorList;
-    } while (!ATOMIC_CMP_SWAP((int32_t*)(void*)&gDvm.monitorList,
-                              (int32_t)mon->next, (int32_t)mon));
+    } while (android_atomic_release_cas((int32_t)mon->next, (int32_t)mon,
+            (int32_t*)(void*)&gDvm.monitorList) != 0);
 
     return mon;
 }
@@ -894,8 +894,7 @@
     thin &= LW_HASH_STATE_MASK << LW_HASH_STATE_SHIFT;
     thin |= (u4)mon | LW_SHAPE_FAT;
     /* Publish the updated lock word. */
-    MEM_BARRIER();
-    obj->lock = thin;
+    android_atomic_release_store(thin, (int32_t *)&obj->lock);
 }
 
 /*
@@ -937,7 +936,8 @@
              * will have tried this before calling out to the VM.
              */
             newThin = thin | (threadId << LW_LOCK_OWNER_SHIFT);
-            if (!ATOMIC_CMP_SWAP((int32_t *)thinp, thin, newThin)) {
+            if (android_atomic_release_cas(thin, newThin,
+                    (int32_t*)thinp) != 0) {
                 /*
                  * The acquire failed.  Try again.
                  */
@@ -969,8 +969,8 @@
                          * owner field.
                          */
                         newThin = thin | (threadId << LW_LOCK_OWNER_SHIFT);
-                        if (ATOMIC_CMP_SWAP((int32_t *)thinp,
-                                            thin, newThin)) {
+                        if (android_atomic_release_cas(thin, newThin,
+                                (int32_t *)thinp) == 0) {
                             /*
                              * The acquire succeed.  Break out of the
                              * loop and proceed to inflate the lock.
@@ -1291,7 +1291,6 @@
      * something.
      */
     thread->interrupted = true;
-    MEM_BARRIER();
 
     /*
      * Is the thread waiting?
@@ -1346,7 +1345,6 @@
          * aligned word following the instance data.
          */
         assert(obj->clazz != gDvm.classJavaLangClass);
-        assert(obj->clazz != gDvm.unlinkedJavaLangClass);
         if (IS_CLASS_FLAG_SET(obj->clazz, CLASS_ISARRAY)) {
             size = dvmArrayObjectSize((ArrayObject *)obj);
             size = (size + 2) & ~2;
@@ -1379,9 +1377,10 @@
              */
             lock = DVM_LOCK_INITIAL_THIN_VALUE;
             lock |= (LW_HASH_STATE_HASHED << LW_HASH_STATE_SHIFT);
-            if (ATOMIC_CMP_SWAP((int32_t *)lw,
+            if (android_atomic_release_cas(
                                 (int32_t)DVM_LOCK_INITIAL_THIN_VALUE,
-                                (int32_t)lock)) {
+                                (int32_t)lock,
+                                (int32_t *)lw) == 0) {
                 /*
                  * A new lockword has been installed with a hash state
                  * of hashed.  Use the raw object address.
diff --git a/vm/Thread.c b/vm/Thread.c
index 3c1267a..56cafb4 100644
--- a/vm/Thread.c
+++ b/vm/Thread.c
@@ -629,7 +629,6 @@
     int threadId = 0;
     bool doWait = false;
 
-    //dvmEnterCritical(self);
     dvmLockThreadList(self);
 
     if (self != NULL)
@@ -820,7 +819,7 @@
     }
     dvmReleaseTrackedAlloc(threadObj, NULL);
 
-    threadNameStr = dvmCreateStringFromCstr("main", ALLOC_DEFAULT);
+    threadNameStr = dvmCreateStringFromCstr("main");
     if (threadNameStr == NULL)
         return false;
     dvmReleaseTrackedAlloc((Object*)threadNameStr, NULL);
@@ -899,12 +898,7 @@
 /*
  * Alloc and initialize a Thread struct.
  *
- * "threadObj" is the java.lang.Thread object.  It will be NULL for the
- * main VM thread, but non-NULL for everything else.
- *
- * Does not create any objects, just stuff on the system (malloc) heap.  (If
- * this changes, we need to use ALLOC_NO_GC.  And also verify that we're
- * ready to load classes at the time this is called.)
+ * Does not create any objects, just stuff on the system (malloc) heap.
  */
 static Thread* allocThread(int interpStackSize)
 {
@@ -1381,6 +1375,9 @@
  * objects.  We also need to create one of our internal Thread objects.
  *
  * Pass in a stack size of 0 to get the default.
+ *
+ * The "threadObj" reference must be pinned by the caller to prevent the GC
+ * from moving it around (e.g. added to the tracked allocation list).
  */
 bool dvmCreateInterpThread(Object* threadObj, int reqStackSize)
 {
@@ -1943,56 +1940,16 @@
     Method* init;
     bool ok, ret;
 
-    /* establish a basic sense of self */
+    /* allocate thread struct, and establish a basic sense of self */
     self = allocThread(gDvm.stackSize);
     if (self == NULL)
         goto fail;
     setThreadSelf(self);
 
     /*
-     * Create Thread and VMThread objects.  We have to use ALLOC_NO_GC
-     * because this thread is not yet visible to the VM.  We could also
-     * just grab the GC lock earlier, but that leaves us executing
-     * interpreted code with the lock held, which is not prudent.
-     *
-     * The alloc calls will block if a GC is in progress, so we don't need
-     * to check for global suspension here.
-     *
-     * It's also possible for the allocation calls to *cause* a GC.
-     */
-    //BUG: deadlock if a GC happens here during HeapWorker creation
-    threadObj = dvmAllocObject(gDvm.classJavaLangThread, ALLOC_NO_GC);
-    if (threadObj == NULL)
-        goto fail;
-    vmThreadObj = dvmAllocObject(gDvm.classJavaLangVMThread, ALLOC_NO_GC);
-    if (vmThreadObj == NULL)
-        goto fail;
-
-    self->threadObj = threadObj;
-    dvmSetFieldInt(vmThreadObj, gDvm.offJavaLangVMThread_vmData, (u4)self);
-
-    /*
-     * Do some java.lang.Thread constructor prep before we lock stuff down.
-     */
-    if (pArgs->name != NULL) {
-        threadNameStr = dvmCreateStringFromCstr(pArgs->name, ALLOC_NO_GC);
-        if (threadNameStr == NULL) {
-            assert(dvmCheckException(dvmThreadSelf()));
-            goto fail;
-        }
-    }
-
-    init = dvmFindDirectMethodByDescriptor(gDvm.classJavaLangThread, "<init>",
-            "(Ljava/lang/ThreadGroup;Ljava/lang/String;IZ)V");
-    if (init == NULL) {
-        assert(dvmCheckException(dvmThreadSelf()));
-        goto fail;
-    }
-
-    /*
-     * Finish our thread prep.  We need to do this before invoking any
-     * interpreted code.  prepareThread() requires that we hold the thread
-     * list lock.
+     * Finish our thread prep.  We need to do this before adding ourselves
+     * to the thread list or invoking any interpreted code.  prepareThread()
+     * requires that we hold the thread list lock.
      */
     dvmLockThreadList(self);
     ok = prepareThread(self);
@@ -2014,20 +1971,11 @@
         goto fail;
 
     /*
-     * The native side of the thread is ready;  add it to the list.
+     * The native side of the thread is ready; add it to the list.  Once
+     * it's on the list the thread is visible to the JDWP code and the GC.
      */
     LOG_THREAD("threadid=%d: adding to list (attached)\n", self->threadId);
 
-    /* Start off in VMWAIT, because we may be about to block
-     * on the heap lock, and we don't want any suspensions
-     * to wait for us.
-     */
-    self->status = THREAD_VMWAIT;
-
-    /*
-     * Add ourselves to the thread list.  Once we finish here we are
-     * visible to the debugger and the GC.
-     */
     dvmLockThreadList(self);
 
     self->next = gDvm.threadList->next;
@@ -2041,20 +1989,57 @@
     dvmUnlockThreadList();
 
     /*
-     * It's possible that a GC is currently running.  Our thread
-     * wasn't in the list when the GC started, so it's not properly
-     * suspended in that case.  Synchronize on the heap lock (held
-     * when a GC is happening) to guarantee that any GCs from here
-     * on will see this thread in the list.
+     * Switch state from initializing to running.
+     *
+     * It's possible that a GC began right before we added ourselves
+     * to the thread list, and is still going.  That means our thread
+     * suspend count won't reflect the fact that we should be suspended.
+     * To deal with this, we transition to VMWAIT, pulse the heap lock,
+     * and then advance to RUNNING.  That will ensure that we stall until
+     * the GC completes.
+     *
+     * Once we're in RUNNING, we're like any other thread in the VM (except
+     * for the lack of an initialized threadObj).  We're then free to
+     * allocate and initialize objects.
      */
+    assert(self->status == THREAD_INITIALIZING);
+    dvmChangeStatus(self, THREAD_VMWAIT);
     dvmLockMutex(&gDvm.gcHeapLock);
     dvmUnlockMutex(&gDvm.gcHeapLock);
+    dvmChangeStatus(self, THREAD_RUNNING);
 
     /*
-     * Switch to the running state now that we're ready for
-     * suspensions.  This call may suspend.
+     * Create Thread and VMThread objects.
      */
-    dvmChangeStatus(self, THREAD_RUNNING);
+    threadObj = dvmAllocObject(gDvm.classJavaLangThread, ALLOC_DEFAULT);
+    vmThreadObj = dvmAllocObject(gDvm.classJavaLangVMThread, ALLOC_DEFAULT);
+    if (threadObj == NULL || vmThreadObj == NULL)
+        goto fail_unlink;
+
+    /*
+     * This makes threadObj visible to the GC.  We still have it in the
+     * tracked allocation table, so it can't move around on us.
+     */
+    self->threadObj = threadObj;
+    dvmSetFieldInt(vmThreadObj, gDvm.offJavaLangVMThread_vmData, (u4)self);
+
+    /*
+     * Create a string for the thread name.
+     */
+    if (pArgs->name != NULL) {
+        threadNameStr = dvmCreateStringFromCstr(pArgs->name);
+        if (threadNameStr == NULL) {
+            assert(dvmCheckException(dvmThreadSelf()));
+            goto fail_unlink;
+        }
+    }
+
+    init = dvmFindDirectMethodByDescriptor(gDvm.classJavaLangThread, "<init>",
+            "(Ljava/lang/ThreadGroup;Ljava/lang/String;IZ)V");
+    if (init == NULL) {
+        assert(dvmCheckException(self));
+        goto fail_unlink;
+    }
 
     /*
      * Now we're ready to run some interpreted code.
@@ -2074,8 +2059,6 @@
         LOGE("exception thrown while constructing attached thread object\n");
         goto fail_unlink;
     }
-    //if (isDaemon)
-    //    dvmSetFieldBoolean(threadObj, gDvm.offJavaLangThread_daemon, true);
 
     /*
      * Set the VMThread field, which tells interpreted code that we're alive.
@@ -2085,8 +2068,14 @@
      * trying to start threads against anything it sees, which would
      * generally cause problems for all thread creation.  However, for
      * correctness we test "vmThread" before setting it.
+     *
+     * TODO: this still has a race, it's just smaller.  Not sure this is
+     * worth putting effort into fixing.  Need to hold a lock while
+     * fiddling with the field, or maybe initialize the Thread object in a
+     * way that ensures another thread can't call start() on it.
      */
     if (dvmGetFieldObject(threadObj, gDvm.offJavaLangThread_vmThread) != NULL) {
+        LOGW("WOW: thread start hijack\n");
         dvmThrowException("Ljava/lang/IllegalThreadStateException;",
             "thread has already been started");
         /* We don't want to free anything associated with the thread
@@ -2102,18 +2091,15 @@
          * already present seems like a bad idea.  TODO: figure this out. ]
          */
         ret = false;
-    } else
+    } else {
         ret = true;
+    }
     dvmSetFieldObject(threadObj, gDvm.offJavaLangThread_vmThread, vmThreadObj);
 
-    /* These are now reachable from the thread groups. */
-    dvmClearAllocFlags(threadObj, ALLOC_NO_GC);
-    dvmClearAllocFlags(vmThreadObj, ALLOC_NO_GC);
-
-    /*
-     * The thread is ready to go;  let the debugger see it.
-     */
-    self->threadObj = threadObj;
+    /* we can now safely un-pin these */
+    dvmReleaseTrackedAlloc(threadObj, self);
+    dvmReleaseTrackedAlloc(vmThreadObj, self);
+    dvmReleaseTrackedAlloc((Object*)threadNameStr, self);
 
     LOG_THREAD("threadid=%d: attached from native, name=%s\n",
         self->threadId, pArgs->name);
@@ -2132,8 +2118,9 @@
     dvmUnlockThreadList();
     /* fall through to "fail" */
 fail:
-    dvmClearAllocFlags(threadObj, ALLOC_NO_GC);
-    dvmClearAllocFlags(vmThreadObj, ALLOC_NO_GC);
+    dvmReleaseTrackedAlloc(threadObj, self);
+    dvmReleaseTrackedAlloc(vmThreadObj, self);
+    dvmReleaseTrackedAlloc((Object*)threadNameStr, self);
     if (self != NULL) {
         if (self->jniEnv != NULL) {
             dvmDestroyJNIEnv(self->jniEnv);
@@ -3471,11 +3458,24 @@
     char schedstatBuf[64];      // contents of /proc/[pid]/task/[tid]/schedstat
     int schedstatFd;
 
+    /*
+     * Get the java.lang.Thread object.  This function gets called from
+     * some weird debug contexts, so it's possible that there's a GC in
+     * progress on some other thread.  To decrease the chances of the
+     * thread object being moved out from under us, we add the reference
+     * to the tracked allocation list, which pins it in place.
+     *
+     * If threadObj is NULL, the thread is still in the process of being
+     * attached to the VM, and there's really nothing interesting to
+     * say about it yet.
+     */
     threadObj = thread->threadObj;
     if (threadObj == NULL) {
-        LOGW("Can't dump thread %d: threadObj not set\n", thread->threadId);
+        LOGI("Can't dump thread %d: threadObj not set\n", thread->threadId);
         return;
     }
+    dvmAddTrackedAlloc(threadObj, NULL);
+
     nameStr = (StringObject*) dvmGetFieldObject(threadObj,
                 gDvm.offJavaLangThread_name);
     threadName = dvmCreateCstrFromString(nameStr);
@@ -3510,7 +3510,7 @@
         }
     }
     if (groupName == NULL)
-        groupName = strdup("(BOGUS GROUP)");
+        groupName = strdup("(null; initializing?)");
 
     dvmPrintDebugMessage(target,
         "\"%s\"%s prio=%d tid=%d %s%s\n",
@@ -3572,9 +3572,9 @@
     else
         dvmDumpThreadStack(target, thread);
 
+    dvmReleaseTrackedAlloc(threadObj, NULL);
     free(threadName);
     free(groupName);
-
 }
 
 /*
diff --git a/vm/UtfString.c b/vm/UtfString.c
index 8e20a0f..0b81c6d 100644
--- a/vm/UtfString.c
+++ b/vm/UtfString.c
@@ -36,6 +36,10 @@
  * String implements java/lang/CharSequence, but CharSequence doesn't exist)
  * we can try to create an exception string internally before anything has
  * really tried to use String.  In that case we basically self-destruct.
+ *
+ * We're expecting to be essentially single-threaded at this point.
+ * We employ atomics to ensure everything is observed correctly, and also
+ * to guarantee that we do detect a problem if our assumption is wrong.
  */
 static bool stringStartup()
 {
@@ -44,9 +48,12 @@
         assert(false);
         return false;
     }
-    assert(gDvm.javaLangStringReady == 0);
 
-    gDvm.javaLangStringReady = -1;
+    if (android_atomic_acquire_cas(0, -1, &gDvm.javaLangStringReady) != 0) {
+        LOGE("ERROR: initial string-ready state not 0 (%d)\n",
+            gDvm.javaLangStringReady);
+        return false;
+    }
 
     if (gDvm.classJavaLangString == NULL)
         gDvm.classJavaLangString =
@@ -94,7 +101,7 @@
     if (badValue)
         return false;
 
-    gDvm.javaLangStringReady = 1;
+    android_atomic_release_store(1, &gDvm.javaLangStringReady);
 
     return true;
 }
@@ -250,39 +257,32 @@
 /*
  * Create a new java/lang/String object, using the string data in "utf8Str".
  *
- * Note that "allocFlags" affects both of the allocations here.  If you
- * use ALLOC_DONT_TRACK in a context where a GC could happen between the
- * two allocations, you could lose the array reference.
+ * The caller must call dvmReleaseTrackedAlloc() on the return value.
  *
  * Returns NULL and throws an exception on failure.
  */
-StringObject* dvmCreateStringFromCstr(const char* utf8Str, int allocFlags)
+StringObject* dvmCreateStringFromCstr(const char* utf8Str)
 {
     assert(utf8Str != NULL);
-
-    return dvmCreateStringFromCstrAndLength(utf8Str, dvmUtf8Len(utf8Str),
-            allocFlags);
+    return dvmCreateStringFromCstrAndLength(utf8Str, dvmUtf8Len(utf8Str));
 }
 
 /*
  * Create a java/lang/String from a C string, given its UTF-16 length
  * (number of UTF-16 code points).
  *
- * The caller must call dvmReleaseTrackedAlloc() on the return value or
- * use a non-default value for "allocFlags".  It is never appropriate
- * to use ALLOC_DONT_TRACK with this function.
+ * The caller must call dvmReleaseTrackedAlloc() on the return value.
  *
  * Returns NULL and throws an exception on failure.
  */
 StringObject* dvmCreateStringFromCstrAndLength(const char* utf8Str,
-    u4 utf16Length, int allocFlags)
+    u4 utf16Length)
 {
     StringObject* newObj;
     ArrayObject* chars;
     u4 hashCode = 0;
 
     //LOGV("Creating String from '%s'\n", utf8Str);
-    assert(allocFlags != ALLOC_DONT_TRACK);     /* don't currently need */
     assert(utf8Str != NULL);
 
     if (gDvm.javaLangStringReady <= 0) {
@@ -298,13 +298,13 @@
     }
 
     newObj = (StringObject*) dvmAllocObject(gDvm.classJavaLangString,
-                allocFlags);
+                ALLOC_DEFAULT);
     if (newObj == NULL)
         return NULL;
 
-    chars = dvmAllocPrimitiveArray('C', utf16Length, allocFlags);
+    chars = dvmAllocPrimitiveArray('C', utf16Length, ALLOC_DEFAULT);
     if (chars == NULL) {
-        dvmReleaseTrackedAllocIFN((Object*) newObj, NULL, allocFlags);
+        dvmReleaseTrackedAlloc((Object*) newObj, NULL);
         return NULL;
     }
     dvmConvertUtf8ToUtf16((u2*)chars->contents, utf8Str);
@@ -312,7 +312,7 @@
 
     dvmSetFieldObject((Object*)newObj, STRING_FIELDOFF_VALUE,
         (Object*)chars);
-    dvmReleaseTrackedAllocIFN((Object*) chars, NULL, allocFlags);
+    dvmReleaseTrackedAlloc((Object*) chars, NULL);
     dvmSetFieldInt((Object*)newObj, STRING_FIELDOFF_COUNT, utf16Length);
     dvmSetFieldInt((Object*)newObj, STRING_FIELDOFF_HASHCODE, hashCode);
     /* leave offset set to zero */
@@ -521,4 +521,3 @@
                   (const u2*) chars2->contents + offset2,
                   len1 * sizeof(u2));
 }
-
diff --git a/vm/UtfString.h b/vm/UtfString.h
index 8f0f972..9308d77 100644
--- a/vm/UtfString.h
+++ b/vm/UtfString.h
@@ -58,26 +58,22 @@
 /*
  * Create a java/lang/String from a C string.
  *
- * The caller must call dvmReleaseTrackedAlloc() on the return value or
- * use a non-default value for "allocFlags".  It is never appropriate
- * to use ALLOC_DONT_TRACK with this function.
+ * The caller must call dvmReleaseTrackedAlloc() on the return value.
  *
  * Returns NULL and throws an exception on failure.
  */
-StringObject* dvmCreateStringFromCstr(const char* utf8Str, int allocFlags);
+StringObject* dvmCreateStringFromCstr(const char* utf8Str);
 
 /*
  * Create a java/lang/String from a C string, given its UTF-16 length
  * (number of UTF-16 code points).
  *
- * The caller must call dvmReleaseTrackedAlloc() on the return value or
- * use a non-default value for "allocFlags".  It is never appropriate
- * to use ALLOC_DONT_TRACK with this function.
+ * The caller must call dvmReleaseTrackedAlloc() on the return value.
  *
  * Returns NULL and throws an exception on failure.
  */
 StringObject* dvmCreateStringFromCstrAndLength(const char* utf8Str,
-    u4 utf16Length, int allocFlags);
+    u4 utf16Length);
 
 /*
  * Compute the number of characters in a "modified UTF-8" string.  This will
diff --git a/vm/alloc/Alloc.c b/vm/alloc/Alloc.c
index e46f9c2..61a1350 100644
--- a/vm/alloc/Alloc.c
+++ b/vm/alloc/Alloc.c
@@ -47,8 +47,16 @@
     if (!dvmHeapWorkerStartup()) {
         return false;
     }
-    dvmHeapStartupAfterZygote();
-    return true;
+    return dvmHeapStartupAfterZygote();
+}
+
+/*
+ * Shutdown the threads internal to the garbage collector.
+ */
+void dvmGcThreadShutdown(void)
+{
+    dvmHeapWorkerShutdown();
+    dvmHeapThreadShutdown();
 }
 
 /*
@@ -100,7 +108,7 @@
     if (msg == NULL) {
         msgStr = NULL;
     } else {
-        msgStr = dvmCreateStringFromCstr(msg, ALLOC_DEFAULT);
+        msgStr = dvmCreateStringFromCstr(msg);
         if (msgStr == NULL) {
             LOGW("Could not allocate message string \"%s\"\n", msg);
             dvmReleaseTrackedAlloc(obj, self);
@@ -175,8 +183,6 @@
     newObj = dvmMalloc(clazz->objectSize, flags);
     if (newObj != NULL) {
         DVM_OBJECT_INIT(newObj, clazz);
-        LOGVV("AllocObject: %s (%d)\n", clazz->descriptor,
-            (int) clazz->objectSize);
 #if WITH_HPROF && WITH_HPROF_STACK
         hprofFillInStackTrace(newObj);
 #endif
@@ -227,12 +233,7 @@
 
     memcpy(copy, obj, size);
     DVM_LOCK_INIT(&copy->lock);
-
-    //LOGV("CloneObject: %p->%p %s (%d)\n", obj, copy, obj->clazz->name, size);
-
-    // TODO: deal with reference classes
-
-    /* don't call dvmReleaseTrackedAlloc -- the caller must do that */
+    dvmWriteBarrierObject(copy);
 
     return copy;
 }
@@ -253,8 +254,6 @@
     if (self == NULL)
         self = dvmThreadSelf();
 
-    //LOGI("TRACK ADD %p\n", obj);
-
     assert(self != NULL);
     if (!dvmAddToReferenceTable(&self->internalLocalRefTable, obj)) {
         LOGE("threadid=%d: unable to add %p to internal ref table\n",
@@ -279,9 +278,6 @@
         self = dvmThreadSelf();
     assert(self != NULL);
 
-    //LOGI("TRACK REM %p (%s)\n", obj,
-    //    (obj->clazz != NULL) ? obj->clazz->name : "");
-
     if (!dvmRemoveFromReferenceTable(&self->internalLocalRefTable,
             self->internalLocalRefTable.table, obj))
     {
@@ -299,7 +295,6 @@
 {
     dvmLockHeap();
 
-    LOGVV("Explicit GC\n");
     dvmCollectGarbageInternal(collectSoftReferences, GC_EXPLICIT);
 
     dvmUnlockHeap();
diff --git a/vm/alloc/Alloc.h b/vm/alloc/Alloc.h
index 8532a97..8244ce7 100644
--- a/vm/alloc/Alloc.h
+++ b/vm/alloc/Alloc.h
@@ -28,6 +28,7 @@
 bool dvmCreateStockExceptions(void);
 bool dvmGcStartupAfterZygote(void);
 void dvmGcShutdown(void);
+void dvmGcThreadShutdown(void);
 
 /*
  * Do any last-minute preparation before we call fork() for the first time.
@@ -38,7 +39,7 @@
  * Basic allocation function.
  *
  * The new object will be added to the "tracked alloc" table unless
- * flags is ALLOC_DONT_TRACK or ALLOC_NO_GC.
+ * flags is ALLOC_DONT_TRACK.
  *
  * Returns NULL and throws an exception on failure.
  */
@@ -48,25 +49,17 @@
  * Allocate a new object.
  *
  * The new object will be added to the "tracked alloc" table unless
- * flags is ALLOC_DONT_TRACK or ALLOC_NO_GC.
+ * flags is ALLOC_DONT_TRACK.
  *
  * Returns NULL and throws an exception on failure.
  */
 Object* dvmAllocObject(ClassObject* clazz, int flags);
 
-/*
- * Clear flags set by dvmMalloc.  Pass in a bit mask of the flags that
- * should be cleared.
- */
-void dvmClearAllocFlags(Object* obj, int mask);
-
 /* flags for dvmMalloc */
 enum {
     ALLOC_DEFAULT       = 0x00,
-    ALLOC_NO_GC         = 0x01,     /* do not garbage collect this object */
-    ALLOC_DONT_TRACK    = 0x02,     /* don't add to internal tracking list */
-    ALLOC_FINALIZABLE   = 0x04,     /* call finalize() before freeing */
-    // ALLOC_NO_MOVE?
+    ALLOC_DONT_TRACK    = 0x01,     /* don't add to internal tracking list */
+    ALLOC_FINALIZABLE   = 0x02,     /* call finalize() before freeing */
 };
 
 /*
@@ -94,21 +87,16 @@
 void dvmReleaseTrackedAlloc(Object* obj, Thread* self);
 
 /*
- * Like dvmReleaseTrackedAlloc, but only does the release if "allocFlags"
- * indicates that it's necessary to do so.
- */
-INLINE void dvmReleaseTrackedAllocIFN(Object* obj, Thread* self, int allocFlags)
-{
-    if ((allocFlags & (ALLOC_NO_GC|ALLOC_DONT_TRACK)) == 0)
-        dvmReleaseTrackedAlloc(obj, self);
-}
-
-/*
  * Returns true iff <obj> points to a valid allocated object.
  */
 bool dvmIsValidObject(const Object* obj);
 
 /*
+ * Returns true iff <ptr> points within allocation-managed address space.
+ */
+bool dvmIsValidObjectAddress(const void *ptr);
+
+/*
  * Create a copy of an object.
  *
  * The new object will be added to the "tracked alloc" table.
diff --git a/vm/alloc/Copying.c b/vm/alloc/Copying.c
index a2532ac..2dd8127 100644
--- a/vm/alloc/Copying.c
+++ b/vm/alloc/Copying.c
@@ -286,6 +286,7 @@
     }
 }
 
+#ifndef NDEBUG
 static int isValidAddress(const HeapSource *heapSource, const u1 *addr)
 {
     size_t block;
@@ -294,6 +295,7 @@
     return heapSource->baseBlock <= block &&
            heapSource->limitBlock > block;
 }
+#endif
 
 /*
  * Iterate over the block map looking for a contiguous run of free
@@ -681,6 +683,12 @@
     return addr;
 }
 
+bool dvmHeapSourceContainsAddress(const void *ptr)
+{
+    HeapSource *heapSource = gDvm.gcHeap->heapSource;
+    return dvmHeapBitmapCoversAddress(&heapSource->allocBits, ptr);
+}
+
 /*
  * Returns true if the given address is within the heap and points to
  * the header of a live object.
@@ -993,10 +1001,12 @@
     return getReferenceFlags(obj) & CLASS_ISWEAKREFERENCE;
 }
 
+#ifndef NDEBUG
 static bool isPhantomReference(const Object *obj)
 {
     return getReferenceFlags(obj) & CLASS_ISPHANTOMREFERENCE;
 }
+#endif
 
 /*
  * Returns true if the reference was registered with a reference queue
@@ -1027,26 +1037,12 @@
 /*
  * Schedules a reference to be appended to its reference queue.
  */
-static void enqueueReference(const Object *ref)
+static void enqueueReference(Object *ref)
 {
-    LargeHeapRefTable **table;
-    Object *op;
-
-    assert(((uintptr_t)ref & 3) == 0);
-    assert((WORKER_ENQUEUE & ~3) == 0);
+    assert(ref != NULL);
     assert(dvmGetFieldObject(ref, gDvm.offJavaLangRefReference_queue) != NULL);
     assert(dvmGetFieldObject(ref, gDvm.offJavaLangRefReference_queueNext) == NULL);
-    /*
-     * Set the enqueue bit in the bottom of the pointer.  Assumes that
-     * objects are 8-byte aligned.
-     *
-     * Note that we are adding the *Reference* (which is by definition
-     * already black at this point) to this list; we're not adding the
-     * referent (which has already been cleared).
-     */
-    table = &gDvm.gcHeap->referenceOperations;
-    op = (Object *)((uintptr_t)ref | WORKER_ENQUEUE);
-    if (!dvmHeapAddRefToLargeTable(table, op)) {
+    if (!dvmHeapAddRefToLargeTable(&gDvm.gcHeap->referenceOperations, ref)) {
         LOGE("no room for any more reference operations");
         dvmAbort();
     }
@@ -1065,17 +1061,18 @@
  */
 void clearWhiteReferences(Object **list)
 {
-    size_t referentOffset, vmDataOffset;
+    size_t referentOffset, queueNextOffset;
     bool doSignal;
 
-    vmDataOffset = gDvm.offJavaLangRefReference_vmData;
+    queueNextOffset = gDvm.offJavaLangRefReference_queueNext;
     referentOffset = gDvm.offJavaLangRefReference_referent;
     doSignal = false;
     while (*list != NULL) {
         Object *ref = *list;
         JValue *field = dvmFieldPtr(ref, referentOffset);
         Object *referent = field->l;
-        *list = dvmGetFieldObject(ref, vmDataOffset);
+        *list = dvmGetFieldObject(ref, queueNextOffset);
+        dvmSetFieldObject(ref, queueNextOffset, NULL);
         assert(referent != NULL);
         if (isForward(referent->clazz)) {
             field->l = referent = getForward(referent->clazz);
@@ -1108,11 +1105,11 @@
 {
     Object *ref;
     Object *prev, *next;
-    size_t referentOffset, vmDataOffset;
+    size_t referentOffset, queueNextOffset;
     unsigned counter;
     bool white;
 
-    vmDataOffset = gDvm.offJavaLangRefReference_vmData;
+    queueNextOffset = gDvm.offJavaLangRefReference_queueNext;
     referentOffset = gDvm.offJavaLangRefReference_referent;
     counter = 0;
     prev = next = NULL;
@@ -1120,7 +1117,7 @@
     while (ref != NULL) {
         JValue *field = dvmFieldPtr(ref, referentOffset);
         Object *referent = field->l;
-        next = dvmGetFieldObject(ref, vmDataOffset);
+        next = dvmGetFieldObject(ref, queueNextOffset);
         assert(referent != NULL);
         if (isForward(referent->clazz)) {
             /* Referent is black. */
@@ -1137,8 +1134,8 @@
         if (white) {
             /* Referent is black, unlink it. */
             if (prev != NULL) {
-                dvmSetFieldObject(ref, vmDataOffset, NULL);
-                dvmSetFieldObject(prev, vmDataOffset, next);
+                dvmSetFieldObject(ref, queueNextOffset, NULL);
+                dvmSetFieldObject(prev, queueNextOffset, next);
             }
         } else {
             /* Referent is white, skip over it. */
@@ -1169,7 +1166,7 @@
     /* Create a table that the new pending refs will
      * be added to.
      */
-    if (!dvmHeapInitHeapRefTable(&newPendingRefs, 128)) {
+    if (!dvmHeapInitHeapRefTable(&newPendingRefs)) {
         //TODO: mark all finalizable refs and hope that
         //      we can schedule them next time.  Watch out,
         //      because we may be expecting to free up space
@@ -1266,7 +1263,7 @@
 {
     Object *referent;
     Object **queue;
-    size_t referentOffset, vmDataOffset;
+    size_t referentOffset, queueNextOffset;
 
     assert(obj != NULL);
     LOG_SCAV("scavengeReferenceObject(obj=%p),'%s'", obj, obj->clazz->descriptor);
@@ -1284,8 +1281,8 @@
         assert(isPhantomReference(obj));
         queue = &gDvm.gcHeap->phantomReferences;
     }
-    vmDataOffset = gDvm.offJavaLangRefReference_vmData;
-    dvmSetFieldObject(obj, vmDataOffset, *queue);
+    queueNextOffset = gDvm.offJavaLangRefReference_queueNext;
+    dvmSetFieldObject(obj, queueNextOffset, *queue);
     *queue = obj;
     LOG_SCAV("scavengeReferenceObject: enqueueing %p", obj);
 }
@@ -1423,10 +1420,6 @@
         // LOG_SCAV("scavangeReference %p has a NULL class object", fromObj);
         assert(!"implemented");
         toObj = NULL;
-    } else if (clazz == gDvm.unlinkedJavaLangClass) {
-        // LOG_SCAV("scavangeReference %p is an unlinked class object", fromObj);
-        assert(!"implemented");
-        toObj = NULL;
     } else {
         toObj = transportObject(fromObj);
     }
@@ -1444,7 +1437,6 @@
     assert(obj != NULL);
     assert(obj->clazz != NULL);
     assert(!((uintptr_t)obj->clazz & 0x1));
-    assert(obj->clazz != gDvm.unlinkedJavaLangClass);
     clazz = obj->clazz;
     if (clazz == gDvm.classJavaLangClass) {
         scavengeClassObject((ClassObject *)obj);
@@ -1461,27 +1453,6 @@
  * External root scavenging routines.
  */
 
-static void scavengeHashTable(HashTable *table)
-{
-    HashEntry *entry;
-    void *obj;
-    int i;
-
-    if (table == NULL) {
-        return;
-    }
-    dvmHashTableLock(table);
-    for (i = 0; i < table->tableSize; ++i) {
-        entry = &table->pEntries[i];
-        obj = entry->data;
-        if (obj == NULL || obj == HASH_TOMBSTONE) {
-            continue;
-        }
-        scavengeReference((Object **)(void *)&entry->data);
-    }
-    dvmHashTableUnlock(table);
-}
-
 static void pinHashTableEntries(HashTable *table)
 {
     HashEntry *entry;
@@ -1597,18 +1568,12 @@
     }
 }
 
-static void scavengeLargeHeapRefTable(LargeHeapRefTable *table, bool stripLowBits)
+static void scavengeLargeHeapRefTable(LargeHeapRefTable *table)
 {
     for (; table != NULL; table = table->next) {
         Object **ref = table->refs.table;
         for (; ref < table->refs.nextEntry; ++ref) {
-            if (stripLowBits) {
-                Object *obj = (Object *)((uintptr_t)*ref & ~3);
-                scavengeReference(&obj);
-                *ref = (Object *)((uintptr_t)obj | ((uintptr_t)*ref & 3));
-            } else {
-                scavengeReference(ref);
-            }
+            scavengeReference(ref);
         }
     }
 }
@@ -1759,7 +1724,6 @@
                     if (bits == 1) {
                         /* set bit 9 so we can tell when we're empty */
                         bits = *regVector++ | 0x0100;
-                        LOGVV("loaded bits: 0x%02x\n", bits & 0xff);
                     }
 
                     if (rval != 0 && (bits & 0x01) != 0) {
@@ -2017,9 +1981,6 @@
             size = objectSize((Object *)cursor);
             size = alignUp(size, ALLOC_ALIGNMENT);
             cursor += size;
-        } else if (word == 0 && cursor == (u1 *)gDvm.unlinkedJavaLangClass) {
-            size = sizeof(ClassObject);
-            cursor += size;
         } else {
             /* Check for padding. */
             while (*(u4 *)cursor == 0) {
@@ -2038,8 +1999,7 @@
 
     assert(obj != NULL);
     assert(obj->clazz != NULL);
-    if (obj->clazz == gDvm.classJavaLangClass ||
-        obj->clazz == gDvm.unlinkedJavaLangClass) {
+    if (obj->clazz == gDvm.classJavaLangClass) {
         size = dvmClassObjectSize((ClassObject *)obj);
     } else if (IS_CLASS_FLAG_SET(obj->clazz, CLASS_ISARRAY)) {
         size = dvmArrayObjectSize((ArrayObject *)obj);
@@ -2078,9 +2038,6 @@
             size = objectSize((Object *)cursor);
             size = alignUp(size, ALLOC_ALIGNMENT);
             cursor += size;
-        } else if (word == 0 && cursor == (u1 *)gDvm.unlinkedJavaLangClass) {
-            size = sizeof(ClassObject);
-            cursor += size;
         } else {
             /* Check for padding. */
             while (*(unsigned long *)cursor == 0) {
@@ -2252,8 +2209,8 @@
     pinThreadList();
     pinReferenceTable(&gDvm.jniGlobalRefTable);
     pinReferenceTable(&gDvm.jniPinRefTable);
-    pinReferenceTable(&gcHeap->nonCollectableRefs);
     pinHashTableEntries(gDvm.loadedClasses);
+    pinHashTableEntries(gDvm.dbgRegistry);
     pinPrimitiveClasses();
     pinInternedStrings();
 
@@ -2282,19 +2239,16 @@
     scavengeThreadList();
 
     LOG_SCAV("Scavenging gDvm.gcHeap->referenceOperations");
-    scavengeLargeHeapRefTable(gcHeap->referenceOperations, true);
+    scavengeLargeHeapRefTable(gcHeap->referenceOperations);
 
     LOG_SCAV("Scavenging gDvm.gcHeap->pendingFinalizationRefs");
-    scavengeLargeHeapRefTable(gcHeap->pendingFinalizationRefs, false);
+    scavengeLargeHeapRefTable(gcHeap->pendingFinalizationRefs);
 
     LOG_SCAV("Scavenging random global stuff");
     scavengeReference(&gDvm.outOfMemoryObj);
     scavengeReference(&gDvm.internalErrorObj);
     scavengeReference(&gDvm.noClassDefFoundErrorObj);
 
-    LOG_SCAV("Scavenging gDvm.dbgRegistry");
-    scavengeHashTable(gDvm.dbgRegistry);
-
     // LOG_SCAV("Scavenging gDvm.internedString");
     scavengeInternedStrings();
 
diff --git a/vm/alloc/DdmHeap.c b/vm/alloc/DdmHeap.c
index 6b11757..4cb5cae 100644
--- a/vm/alloc/DdmHeap.c
+++ b/vm/alloc/DdmHeap.c
@@ -36,12 +36,12 @@
 
 /*
  * Chunk HPIF (client --> server)
- * 
+ *
  * Heap Info. General information about the heap,
  * suitable for a summary display.
- * 
+ *
  *   [u4]: number of heaps
- * 
+ *
  *   For each heap:
  *     [u4]: heap ID
  *     [u8]: timestamp in ms since Unix epoch
@@ -274,7 +274,7 @@
         state = HPSG_STATE(SOLIDITY_FREE, 0);
     } else {
         const Object *obj = userptr;
-        /* If we're looking at the native heap, we'll just return 
+        /* If we're looking at the native heap, we'll just return
          * (SOLIDITY_HARD, KIND_NATIVE) for all allocated chunks
          */
         bool native = ctx->type == CHUNK_TYPE("NHSG");
@@ -290,9 +290,7 @@
                  * but hasn't been initialized yet.
                  */
                 state = HPSG_STATE(SOLIDITY_HARD, KIND_OBJECT);
-            } else if (clazz == gDvm.unlinkedJavaLangClass ||
-                       clazz == gDvm.classJavaLangClass)
-            {
+            } else if (clazz == gDvm.classJavaLangClass) {
                 state = HPSG_STATE(SOLIDITY_HARD, KIND_CLASS_OBJECT);
             } else if (IS_CLASS_FLAG_SET(clazz, CLASS_ISARRAY)) {
                 if (IS_CLASS_FLAG_SET(clazz, CLASS_ISOBJECTARRAY)) {
@@ -365,7 +363,7 @@
 walkHeap(bool merge, bool native)
 {
     HeapChunkContext ctx;
-    
+
     memset(&ctx, 0, sizeof(ctx));
     ctx.bufLen = HPSx_CHUNK_SIZE;
     ctx.buf = (u1 *)malloc(ctx.bufLen);
diff --git a/vm/alloc/Heap.c b/vm/alloc/Heap.c
index f4d8e7b..80b5030 100644
--- a/vm/alloc/Heap.c
+++ b/vm/alloc/Heap.c
@@ -36,11 +36,9 @@
 #include <limits.h>
 #include <errno.h>
 
-#define kNonCollectableRefDefault   16
-#define kFinalizableRefDefault      128
-
 static const char* GcReasonStr[] = {
     [GC_FOR_MALLOC] = "GC_FOR_MALLOC",
+    [GC_CONCURRENT] = "GC_CONCURRENT",
     [GC_EXPLICIT] = "GC_EXPLICIT",
     [GC_EXTERNAL_ALLOC] = "GC_EXTERNAL_ALLOC",
     [GC_HPROF_DUMP_HEAP] = "GC_HPROF_DUMP_HEAP"
@@ -76,20 +74,8 @@
     gcHeap->hprofDumpOnGc = false;
     gcHeap->hprofContext = NULL;
 #endif
-
-    /* This needs to be set before we call dvmHeapInitHeapRefTable().
-     */
     gDvm.gcHeap = gcHeap;
 
-    /* Set up the table we'll use for ALLOC_NO_GC.
-     */
-    if (!dvmHeapInitHeapRefTable(&gcHeap->nonCollectableRefs,
-                           kNonCollectableRefDefault))
-    {
-        LOGE_HEAP("Can't allocate GC_NO_ALLOC table\n");
-        goto fail;
-    }
-
     /* Set up the lists and lock we'll use for finalizable
      * and reference objects.
      */
@@ -104,18 +90,15 @@
     dvmInitializeHeapWorkerState();
 
     return true;
-
-fail:
-    dvmHeapSourceShutdown(&gcHeap);
-    return false;
 }
 
-void dvmHeapStartupAfterZygote()
+bool dvmHeapStartupAfterZygote(void)
 {
     /* Update our idea of the last GC start time so that we
      * don't use the last time that Zygote happened to GC.
      */
     gDvm.gcHeap->gcStartTime = dvmGetRelativeTimeUsec();
+    return dvmHeapSourceStartupAfterZygote();
 }
 
 void dvmHeapShutdown()
@@ -127,8 +110,6 @@
          * The process may stick around, so we don't
          * want to leak any native memory.
          */
-        dvmHeapFreeHeapRefTable(&gDvm.gcHeap->nonCollectableRefs);
-
         dvmHeapFreeLargeTable(gDvm.gcHeap->finalizableRefs);
         gDvm.gcHeap->finalizableRefs = NULL;
 
@@ -148,6 +129,14 @@
 }
 
 /*
+ * Shutdown any threads internal to the heap.
+ */
+void dvmHeapThreadShutdown(void)
+{
+    dvmHeapSourceThreadShutdown();
+}
+
+/*
  * We've been asked to allocate something we can't, e.g. an array so
  * large that (length * elementWidth) is larger than 2^31.
  *
@@ -211,30 +200,11 @@
 
     assert(op != NULL);
 
-    obj = NULL;
-
     dvmLockMutex(&gDvm.heapWorkerListLock);
 
-    /* We must handle reference operations before finalizations.
-     * If:
-     *     a) Someone subclasses WeakReference and overrides clear()
-     *     b) A reference of this type is the last reference to
-     *        a finalizable object
-     * then we need to guarantee that the overridden clear() is called
-     * on the reference before finalize() is called on the referent.
-     * Both of these operations will always be scheduled at the same
-     * time, so handling reference operations first will guarantee
-     * the required order.
-     */
     obj = dvmHeapGetNextObjectFromLargeTable(&gcHeap->referenceOperations);
     if (obj != NULL) {
-        uintptr_t workBits;
-
-        workBits = (uintptr_t)obj & WORKER_ENQUEUE;
-        assert(workBits != 0);
-        obj = (Object *)((uintptr_t)obj & ~WORKER_ENQUEUE);
-
-        *op = workBits;
+        *op = WORKER_ENQUEUE;
     } else {
         obj = dvmHeapGetNextObjectFromLargeTable(
                 &gcHeap->pendingFinalizationRefs);
@@ -246,9 +216,6 @@
     if (obj != NULL) {
         /* Don't let the GC collect the object until the
          * worker thread is done with it.
-         *
-         * This call is safe;  it uses thread-local storage
-         * and doesn't acquire any locks.
          */
         dvmAddTrackedAlloc(obj, NULL);
     }
@@ -436,10 +403,6 @@
  * In rare circumstances (JNI AttachCurrentThread) we can be called
  * from a non-VM thread.
  *
- * We implement ALLOC_NO_GC by maintaining an internal list of objects
- * that should not be collected.  This requires no actual flag storage in
- * the object itself, which is good, but makes flag queries expensive.
- *
  * Use ALLOC_DONT_TRACK when we either don't want to track an allocation
  * (because it's being done for the interpreter "new" operation and will
  * be part of the root set immediately) or we can't (because this allocation
@@ -454,14 +417,6 @@
     GcHeap *gcHeap = gDvm.gcHeap;
     void *ptr;
 
-#if 0
-    /* handy for spotting large allocations */
-    if (size >= 100000) {
-        LOGI("dvmMalloc(%d):\n", size);
-        dvmDumpThread(dvmThreadSelf(), false);
-    }
-#endif
-
 #if defined(WITH_ALLOC_LIMITS)
     /*
      * See if they've exceeded the allocation limit for this thread.
@@ -512,11 +467,6 @@
         if ((flags & ALLOC_FINALIZABLE) != 0) {
             /* This object is an instance of a class that
              * overrides finalize().  Add it to the finalizable list.
-             *
-             * Note that until DVM_OBJECT_INIT() is called on this
-             * object, its clazz will be NULL.  Since the object is
-             * in this table, it will be scanned as part of the root
-             * set.  scanObject() explicitly deals with the NULL clazz.
              */
             if (!dvmHeapAddRefToLargeTable(&gcHeap->finalizableRefs,
                                     (Object *)ptr))
@@ -527,25 +477,6 @@
             }
         }
 
-        /* The caller may not want us to collect this object.
-         * If not, throw it in the nonCollectableRefs table, which
-         * will be added to the root set when we GC.
-         *
-         * Note that until DVM_OBJECT_INIT() is called on this
-         * object, its clazz will be NULL.  Since the object is
-         * in this table, it will be scanned as part of the root
-         * set.  scanObject() explicitly deals with the NULL clazz.
-         */
-        if ((flags & ALLOC_NO_GC) != 0) {
-            if (!dvmHeapAddToHeapRefTable(&gcHeap->nonCollectableRefs, ptr)) {
-                LOGE_HEAP("dvmMalloc(): no room for any more "
-                        "ALLOC_NO_GC objects: %zd\n",
-                        dvmHeapNumHeapRefTableEntries(
-                                &gcHeap->nonCollectableRefs));
-                dvmAbort();
-            }
-        }
-
 #ifdef WITH_PROFILER
         if (gDvm.allocProf.enabled) {
             Thread* self = dvmThreadSelf();
@@ -578,13 +509,10 @@
 
     if (ptr != NULL) {
         /*
-         * If this block is immediately GCable, and they haven't asked us not
-         * to track it, add it to the internal tracking list.
-         *
-         * If there's no "self" yet, we can't track it.  Calls made before
-         * the Thread exists should use ALLOC_NO_GC.
+         * If caller hasn't asked us not to track it, add it to the
+         * internal tracking list.
          */
-        if ((flags & (ALLOC_DONT_TRACK | ALLOC_NO_GC)) == 0) {
+        if ((flags & ALLOC_DONT_TRACK) == 0) {
             dvmAddTrackedAlloc(ptr, NULL);
         }
     } else {
@@ -624,29 +552,17 @@
 }
 
 /*
- * Clear flags that were passed into dvmMalloc() et al.
- * e.g., ALLOC_NO_GC, ALLOC_DONT_TRACK.
+ * Returns true iff <obj> points to a word-aligned address within Heap
+ * address space.
  */
-void dvmClearAllocFlags(Object *obj, int mask)
+bool dvmIsValidObjectAddress(const void* ptr)
 {
-    if ((mask & ALLOC_NO_GC) != 0) {
-        dvmLockHeap();
-        if (dvmIsValidObject(obj)) {
-            if (!dvmHeapRemoveFromHeapRefTable(&gDvm.gcHeap->nonCollectableRefs,
-                                               obj))
-            {
-                LOGE_HEAP("dvmMalloc(): failed to remove ALLOC_NO_GC bit from "
-                        "object 0x%08x\n", (uintptr_t)obj);
-                dvmAbort();
-            }
-//TODO: shrink if the table is very empty
-        }
-        dvmUnlockHeap();
+    /* Don't bother if it's not 4-byte aligned.
+     */
+    if (((uintptr_t)ptr & (4-1)) == 0) {
+        return dvmHeapSourceContainsAddress(ptr);
     }
-
-    if ((mask & ALLOC_DONT_TRACK) != 0) {
-        dvmReleaseTrackedAlloc(obj, NULL);
-    }
+    return false;
 }
 
 size_t dvmObjectSizeInHeap(const Object *obj)
@@ -665,26 +581,6 @@
 }
 
 /*
- * Suspend the VM as for a GC, and assert-fail if any object has any
- * corrupt references.
- */
-void dvmHeapSuspendAndVerify()
-{
-    /* Suspend the VM. */
-    dvmSuspendAllThreads(SUSPEND_FOR_VERIFY);
-    dvmLockMutex(&gDvm.heapWorkerLock);
-    dvmAssertHeapWorkerThreadRunning();
-    dvmLockMutex(&gDvm.heapWorkerListLock);
-
-    verifyHeap();
-
-    /* Resume the VM. */
-    dvmUnlockMutex(&gDvm.heapWorkerListLock);
-    dvmUnlockMutex(&gDvm.heapWorkerLock);
-    dvmResumeAllThreads(SUSPEND_FOR_VERIFY);
-}
-
-/*
  * Initiate garbage collection.
  *
  * NOTES:
@@ -707,17 +603,7 @@
     int numFreed;
     size_t sizeFreed;
     GcMode gcMode;
-
-#if DVM_TRACK_HEAP_MARKING
-    /* Since weak and soft references are always cleared,
-     * they don't require any marking.
-     * (Soft are lumped into strong when they aren't cleared.)
-     */
-    size_t strongMarkCount = 0;
-    size_t strongMarkSize = 0;
-    size_t finalizeMarkCount = 0;
-    size_t finalizeMarkSize = 0;
-#endif
+    int oldThreadPriority = kInvalidPriority;
 
     /* The heap lock must be held.
      */
@@ -740,32 +626,37 @@
 
     dvmSuspendAllThreads(SUSPEND_FOR_GC);
 
-    /* Get the priority (the "nice" value) of the current thread.  The
-     * getpriority() call can legitimately return -1, so we have to
-     * explicitly test errno.
+    /*
+     * If we are not marking concurrently raise the priority of the
+     * thread performing the garbage collection.
      */
-    errno = 0;
-    int oldThreadPriority = kInvalidPriority;
-    int priorityResult = getpriority(PRIO_PROCESS, 0);
-    if (errno != 0) {
-        LOGI_HEAP("getpriority(self) failed: %s\n", strerror(errno));
-    } else if (priorityResult > ANDROID_PRIORITY_NORMAL) {
-        /* Current value is numerically greater than "normal", which
-         * in backward UNIX terms means lower priority.
+    if (reason != GC_CONCURRENT) {
+        /* Get the priority (the "nice" value) of the current thread.  The
+         * getpriority() call can legitimately return -1, so we have to
+         * explicitly test errno.
          */
+        errno = 0;
+        int priorityResult = getpriority(PRIO_PROCESS, 0);
+        if (errno != 0) {
+            LOGI_HEAP("getpriority(self) failed: %s\n", strerror(errno));
+        } else if (priorityResult > ANDROID_PRIORITY_NORMAL) {
+            /* Current value is numerically greater than "normal", which
+             * in backward UNIX terms means lower priority.
+             */
 
-        if (priorityResult >= ANDROID_PRIORITY_BACKGROUND) {
-            set_sched_policy(dvmGetSysThreadId(), SP_FOREGROUND);
-        }
+            if (priorityResult >= ANDROID_PRIORITY_BACKGROUND) {
+                set_sched_policy(dvmGetSysThreadId(), SP_FOREGROUND);
+            }
 
-        if (setpriority(PRIO_PROCESS, 0, ANDROID_PRIORITY_NORMAL) != 0) {
-            LOGI_HEAP("Unable to elevate priority from %d to %d\n",
-                priorityResult, ANDROID_PRIORITY_NORMAL);
-        } else {
-            /* priority elevated; save value so we can restore it later */
-            LOGD_HEAP("Elevating priority from %d to %d\n",
-                priorityResult, ANDROID_PRIORITY_NORMAL);
-            oldThreadPriority = priorityResult;
+            if (setpriority(PRIO_PROCESS, 0, ANDROID_PRIORITY_NORMAL) != 0) {
+                LOGI_HEAP("Unable to elevate priority from %d to %d\n",
+                          priorityResult, ANDROID_PRIORITY_NORMAL);
+            } else {
+                /* priority elevated; save value so we can restore it later */
+                LOGD_HEAP("Elevating priority from %d to %d\n",
+                          priorityResult, ANDROID_PRIORITY_NORMAL);
+                oldThreadPriority = priorityResult;
+            }
         }
     }
 
@@ -845,10 +736,6 @@
         LOGD_HEAP("GC! (%d sec since last GC)\n",
                 (int)(timeSinceLastGc / 1000));
     }
-#if DVM_TRACK_HEAP_MARKING
-    gcHeap->markCount = 0;
-    gcHeap->markSize = 0;
-#endif
 
     /* Set up the marking context.
      */
@@ -869,18 +756,38 @@
     gcHeap->weakReferences = NULL;
     gcHeap->phantomReferences = NULL;
 
+    if (reason == GC_CONCURRENT) {
+        /*
+         * We are performing a concurrent collection.  Resume all
+         * threads for the duration of the recursive mark.
+         */
+        dvmResumeAllThreads(SUSPEND_FOR_GC);
+    }
+
     /* Recursively mark any objects that marked objects point to strongly.
      * If we're not collecting soft references, soft-reachable
      * objects will also be marked.
      */
     LOGD_HEAP("Recursing...");
     dvmHeapScanMarkedObjects();
-#if DVM_TRACK_HEAP_MARKING
-    strongMarkCount = gcHeap->markCount;
-    strongMarkSize = gcHeap->markSize;
-    gcHeap->markCount = 0;
-    gcHeap->markSize = 0;
-#endif
+
+    if (reason == GC_CONCURRENT) {
+        /*
+         * We are performing a concurrent collection.  Perform the
+         * final thread suspension.
+         */
+        dvmSuspendAllThreads(SUSPEND_FOR_GC);
+        /*
+         * As no barrier intercepts root updates, we conservatively
+         * assume all roots may be gray and re-mark them.
+         */
+        dvmHeapMarkRootSet();
+        /*
+         * Recursively mark gray objects pointed to by the roots or by
+         * heap objects dirtied during the concurrent mark.
+         */
+        dvmMarkDirtyObjects();
+    }
 
     /* All strongly-reachable objects have now been marked.
      */
@@ -898,12 +805,6 @@
      */
     LOGD_HEAP("Finding finalizations...");
     dvmHeapScheduleFinalizations();
-#if DVM_TRACK_HEAP_MARKING
-    finalizeMarkCount = gcHeap->markCount;
-    finalizeMarkSize = gcHeap->markSize;
-    gcHeap->markCount = 0;
-    gcHeap->markSize = 0;
-#endif
 
     LOGD_HEAP("Handling f-reachable soft references...");
     dvmClearWhiteRefs(&gcHeap->softReferences);
@@ -918,11 +819,6 @@
     LOGD_HEAP("Handling phantom references...");
     dvmClearWhiteRefs(&gcHeap->phantomReferences);
 
-#if DVM_TRACK_HEAP_MARKING
-    LOGI_HEAP("Marked objects: %dB strong, %dB final\n",
-              strongMarkSize, finalizeMarkSize);
-#endif
-
 #ifdef WITH_DEADLOCK_PREDICTION
     dvmDumpMonitorInfo("before sweep");
 #endif
@@ -996,16 +892,18 @@
 #endif
 
     dvmResumeAllThreads(SUSPEND_FOR_GC);
-    if (oldThreadPriority != kInvalidPriority) {
-        if (setpriority(PRIO_PROCESS, 0, oldThreadPriority) != 0) {
-            LOGW_HEAP("Unable to reset priority to %d: %s\n",
-                oldThreadPriority, strerror(errno));
-        } else {
-            LOGD_HEAP("Reset priority to %d\n", oldThreadPriority);
-        }
+    if (reason != GC_CONCURRENT) {
+        if (oldThreadPriority != kInvalidPriority) {
+            if (setpriority(PRIO_PROCESS, 0, oldThreadPriority) != 0) {
+                LOGW_HEAP("Unable to reset priority to %d: %s\n",
+                          oldThreadPriority, strerror(errno));
+            } else {
+                LOGD_HEAP("Reset priority to %d\n", oldThreadPriority);
+            }
 
-        if (oldThreadPriority >= ANDROID_PRIORITY_BACKGROUND) {
-            set_sched_policy(dvmGetSysThreadId(), SP_BACKGROUND);
+            if (oldThreadPriority >= ANDROID_PRIORITY_BACKGROUND) {
+                set_sched_policy(dvmGetSysThreadId(), SP_BACKGROUND);
+            }
         }
     }
     gcElapsedTime = (dvmGetRelativeTimeUsec() - gcHeap->gcStartTime) / 1000;
diff --git a/vm/alloc/Heap.h b/vm/alloc/Heap.h
index 0b0bc47..95740c1 100644
--- a/vm/alloc/Heap.h
+++ b/vm/alloc/Heap.h
@@ -31,7 +31,7 @@
  * This needs to be called before the first allocation or GC that
  * happens after forking.
  */
-void dvmHeapStartupAfterZygote(void);
+bool dvmHeapStartupAfterZygote(void);
 
 /*
  * Tear down the GC heap.
@@ -41,6 +41,12 @@
  */
 void dvmHeapShutdown(void);
 
+/*
+ * Stops any threads internal to the garbage collector.  Called before
+ * the heap itself is shutdown.
+ */
+void dvmHeapThreadShutdown(void);
+
 #if 0       // needs to be in Alloc.h so debug code can find it.
 /*
  * Returns a number of bytes greater than or
@@ -62,6 +68,8 @@
 typedef enum {
     /* Not enough space for an "ordinary" Object to be allocated. */
     GC_FOR_MALLOC,
+    /* Automatic GC triggered by exceeding a heap occupancy threshold. */
+    GC_CONCURRENT,
     /* Explicit GC via Runtime.gc(), VMRuntime.gc(), or SIGUSR1. */
     GC_EXPLICIT,
     /* GC to try to reduce heap footprint to allow more non-GC'ed memory. */
@@ -71,12 +79,6 @@
 } GcReason;
 
 /*
- * Suspend the VM as for a GC, and assert-fail if any object has any
- * corrupt references.
- */
-void dvmHeapSuspendAndVerify();
-
-/*
  * Run the garbage collector without doing any locking.
  */
 void dvmCollectGarbageInternal(bool clearSoftRefs, GcReason reason);
diff --git a/vm/alloc/HeapDebug.c b/vm/alloc/HeapDebug.c
index 86d5833..cb8fb48 100644
--- a/vm/alloc/HeapDebug.c
+++ b/vm/alloc/HeapDebug.c
@@ -122,17 +122,17 @@
     /* Enough to quiet down gcc for unitialized variable check */
     perHeapActualSize[0] = perHeapAllowedSize[0] = perHeapNumAllocated[0] =
                            perHeapSizeAllocated[0] = 0;
-    actualSize = dvmHeapSourceGetValue(HS_FOOTPRINT, perHeapActualSize, 
+    actualSize = dvmHeapSourceGetValue(HS_FOOTPRINT, perHeapActualSize,
                                        HEAP_SOURCE_MAX_HEAP_COUNT);
-    allowedSize = dvmHeapSourceGetValue(HS_ALLOWED_FOOTPRINT, 
+    allowedSize = dvmHeapSourceGetValue(HS_ALLOWED_FOOTPRINT,
                       perHeapAllowedSize, HEAP_SOURCE_MAX_HEAP_COUNT);
     numAllocated = dvmHeapSourceGetValue(HS_OBJECTS_ALLOCATED,
                       perHeapNumAllocated, HEAP_SOURCE_MAX_HEAP_COUNT);
     sizeAllocated = dvmHeapSourceGetValue(HS_BYTES_ALLOCATED,
                       perHeapSizeAllocated, HEAP_SOURCE_MAX_HEAP_COUNT);
 
-    /* 
-     * Construct the the first 64-bit value to write to the log. 
+    /*
+     * Construct the the first 64-bit value to write to the log.
      * Global information:
      *
      * [63   ] Must be zero
diff --git a/vm/alloc/HeapInternal.h b/vm/alloc/HeapInternal.h
index f078fdd..728af95 100644
--- a/vm/alloc/HeapInternal.h
+++ b/vm/alloc/HeapInternal.h
@@ -27,11 +27,6 @@
 struct GcHeap {
     HeapSource      *heapSource;
 
-    /* List of heap objects that the GC should never collect.
-     * These should be included in the root set of objects.
-     */
-    HeapRefTable    nonCollectableRefs;
-
     /* List of heap objects that will require finalization when
      * collected.  I.e., instance objects
      *
@@ -109,15 +104,6 @@
      */
     bool            gcRunning;
 
-#if DVM_TRACK_HEAP_MARKING
-    /* Every time an unmarked object becomes marked, markCount
-     * is incremented and markSize increases by the size of
-     * that object.
-     */
-    size_t          markCount;
-    size_t          markSize;
-#endif
-
     /*
      * Debug control values
      */
diff --git a/vm/alloc/HeapSource.c b/vm/alloc/HeapSource.c
index 31df823..544230d 100644
--- a/vm/alloc/HeapSource.c
+++ b/vm/alloc/HeapSource.c
@@ -43,6 +43,12 @@
 #define HEAP_IDEAL_FREE             (2 * 1024 * 1024)
 #define HEAP_MIN_FREE               (HEAP_IDEAL_FREE / 4)
 
+/*
+ * When the number of bytes allocated since the previous GC exceeds
+ * this threshold a concurrent garbage collection is triggered.
+ */
+#define OCCUPANCY_THRESHOLD (256 << 10)
+
 #define HS_BOILERPLATE() \
     do { \
         assert(gDvm.gcHeap != NULL); \
@@ -110,6 +116,12 @@
      */
     size_t bytesAllocated;
 
+    /*
+     * The number of bytes allocated after the previous garbage
+     * collection.
+     */
+    size_t prevBytesAllocated;
+
     /* Number of objects currently allocated from this mspace.
      */
     size_t objectsAllocated;
@@ -192,6 +204,15 @@
      * The mark bitmap.
      */
     HeapBitmap markBits;
+
+    /*
+     * State for the GC daemon.
+     */
+    bool hasGcThread;
+    pthread_t gcThread;
+    bool gcThreadShutdown;
+    pthread_mutex_t gcThreadMutex;
+    pthread_cond_t gcThreadCond;
 };
 
 #define hs2heap(hs_) (&((hs_)->heaps[0]))
@@ -282,8 +303,7 @@
     assert(heap->bytesAllocated < mspace_footprint(heap->msp));
 }
 
-static inline void
-countFree(Heap *heap, const void *ptr, bool isObj)
+static void countFree(Heap *heap, const void *ptr, bool isObj)
 {
     HeapSource *hs;
     size_t delta;
@@ -292,6 +312,7 @@
     assert(delta > 0);
     if (delta < heap->bytesAllocated) {
         heap->bytesAllocated -= delta;
+        heap->prevBytesAllocated = heap->bytesAllocated;
     } else {
         heap->bytesAllocated = 0;
     }
@@ -332,8 +353,8 @@
         /* There's no guarantee that errno has meaning when the call
          * fails, but it often does.
          */
-        LOGE_HEAP("Can't create VM heap of size (%u,%u) (errno=%d)\n",
-            startSize/2, absoluteMaxSize, errno);
+        LOGE_HEAP("Can't create VM heap of size (%u,%u): %s\n",
+            startSize/2, absoluteMaxSize, strerror(errno));
     }
 
     return msp;
@@ -400,6 +421,47 @@
 }
 
 /*
+ * The garbage collection daemon.  Initiates a concurrent collection
+ * when signaled.
+ */
+static void *gcDaemonThread(void* arg)
+{
+    dvmChangeStatus(NULL, THREAD_VMWAIT);
+    dvmLockMutex(&gHs->gcThreadMutex);
+    while (gHs->gcThreadShutdown != true) {
+        dvmWaitCond(&gHs->gcThreadCond, &gHs->gcThreadMutex);
+        dvmLockHeap();
+        dvmChangeStatus(NULL, THREAD_RUNNING);
+        dvmCollectGarbageInternal(false, GC_CONCURRENT);
+        dvmChangeStatus(NULL, THREAD_VMWAIT);
+        dvmUnlockHeap();
+    }
+    dvmChangeStatus(NULL, THREAD_RUNNING);
+    return NULL;
+}
+
+static bool gcDaemonStartup(void)
+{
+    dvmInitMutex(&gHs->gcThreadMutex);
+    pthread_cond_init(&gHs->gcThreadCond, NULL);
+    gHs->gcThreadShutdown = false;
+    gHs->hasGcThread = dvmCreateInternalThread(&gHs->gcThread, "GC",
+                                               gcDaemonThread, NULL);
+    return gHs->hasGcThread;
+}
+
+static void gcDaemonShutdown(void)
+{
+    if (gDvm.concurrentMarkSweep) {
+        dvmLockMutex(&gHs->gcThreadMutex);
+        gHs->gcThreadShutdown = true;
+        dvmSignalCond(&gHs->gcThreadCond);
+        dvmUnlockMutex(&gHs->gcThreadMutex);
+        pthread_join(gHs->gcThread, NULL);
+    }
+}
+
+/*
  * Initializes the heap source; must be called before any other
  * dvmHeapSource*() functions.  Returns a GcHeap structure
  * allocated from the heap source.
@@ -427,7 +489,7 @@
      * among the heaps managed by the garbage collector.
      */
     length = ALIGN_UP_TO_PAGE_SIZE(absoluteMaxSize);
-    fd = ashmem_create_region("the-java-heap", length);
+    fd = ashmem_create_region("dalvik-heap", length);
     if (fd == -1) {
         return NULL;
     }
@@ -472,6 +534,7 @@
     hs->softLimit = INT_MAX;    // no soft limit at first
     hs->numHeaps = 0;
     hs->sawZygote = gDvm.zygote;
+    hs->hasGcThread = false;
     hs->heapBase = base;
     hs->heapLength = length;
     if (!addNewHeap(hs, msp, absoluteMaxSize)) {
@@ -502,6 +565,11 @@
     return NULL;
 }
 
+bool dvmHeapSourceStartupAfterZygote(void)
+{
+    return gDvm.concurrentMarkSweep ? gcDaemonStartup() : true;
+}
+
 /*
  * This is called while in zygote mode, right before we fork() for the
  * first time.  We create a heap for all future zygote process allocations,
@@ -529,6 +597,11 @@
     return true;
 }
 
+void dvmHeapSourceThreadShutdown(void)
+{
+    gcDaemonShutdown();
+}
+
 /*
  * Tears down the entire GcHeap structure and all of the substructures
  * attached to it.  This call has the side effect of setting the given
@@ -650,7 +723,7 @@
 /*
  * Get the bitmap representing all live objects.
  */
-HeapBitmap *dvmHeapSourceGetLiveBits()
+HeapBitmap *dvmHeapSourceGetLiveBits(void)
 {
     HS_BOILERPLATE();
 
@@ -721,12 +794,15 @@
     heap = hs2heap(hs);
 
     if (heap->bytesAllocated + n <= hs->softLimit) {
-// TODO: allocate large blocks (>64k?) as separate mmap regions so that
-//       they don't increase the high-water mark when they're freed.
-// TODO: zero out large objects using madvise
         ptr = mspace_calloc(heap->msp, 1, n);
         if (ptr != NULL) {
             countAllocation(heap, ptr, true);
+            size_t allocated = heap->bytesAllocated - heap->prevBytesAllocated;
+            if (allocated > OCCUPANCY_THRESHOLD) {
+                if (hs->hasGcThread == true) {
+                    dvmSignalCond(&gHs->gcThreadCond);
+                }
+            }
         }
     } else {
         /* This allocation would push us over the soft limit;
@@ -924,6 +1000,17 @@
 }
 
 /*
+ * Returns true iff <ptr> is in the heap source.
+ */
+bool
+dvmHeapSourceContainsAddress(const void *ptr)
+{
+    HS_BOILERPLATE();
+
+    return (dvmHeapBitmapCoversAddress(&gHs->liveBits, ptr));
+}
+
+/*
  * Returns true iff <ptr> was allocated from the heap source.
  */
 bool
@@ -931,7 +1018,7 @@
 {
     HS_BOILERPLATE();
 
-    if (dvmHeapBitmapCoversAddress(&gHs->liveBits, ptr)) {
+    if (dvmHeapSourceContainsAddress(ptr)) {
         return dvmHeapBitmapIsObjectBitSet(&gHs->liveBits, ptr) != 0;
     }
     return false;
@@ -1166,7 +1253,7 @@
 
     hs->targetUtilization =
             (size_t)(newTarget * (float)HEAP_UTILIZATION_MAX);
-    LOGV("Set heap target utilization to %zd/%d (%f)\n", 
+    LOGV("Set heap target utilization to %zd/%d (%f)\n",
             hs->targetUtilization, HEAP_UTILIZATION_MAX, newTarget);
 }
 
@@ -1373,7 +1460,7 @@
         /* Return any whole free pages to the system.
          */
         bytesTrimmed[i] = 0;
-        mspace_walk_free_pages(heap->msp, releasePagesInRange, 
+        mspace_walk_free_pages(heap->msp, releasePagesInRange,
                                &bytesTrimmed[i]);
         heapBytes += bytesTrimmed[i];
     }
@@ -1474,7 +1561,7 @@
  * Tries to update the internal count of externally-allocated memory.
  * If there's enough room for that memory, returns true.  If not, returns
  * false and does not update the count.
- * 
+ *
  * The caller must ensure externalAllocPossible(hs, n) == true.
  */
 static bool
diff --git a/vm/alloc/HeapSource.h b/vm/alloc/HeapSource.h
index 1857f2c..fb8fdf1 100644
--- a/vm/alloc/HeapSource.h
+++ b/vm/alloc/HeapSource.h
@@ -36,6 +36,14 @@
 
 /*
  * If the HeapSource was created while in zygote mode, this
+ * will create a new heap for post-zygote allocations.
+ * Having a separate heap should maximize the number of pages
+ * that a given app_process shares with the zygote process.
+ */
+bool dvmHeapSourceStartupAfterZygote(void);
+
+/*
+ * If the HeapSource was created while in zygote mode, this
  * will create an additional zygote heap before the first fork().
  * Having a separate heap should reduce the number of shared
  * pages subsequently touched by the zygote process.
@@ -43,6 +51,12 @@
 bool dvmHeapSourceStartupBeforeFork(void);
 
 /*
+ * Shutdown any threads internal to the heap source.  This should be
+ * called before the heap source itself is shutdown.
+ */
+void dvmHeapSourceThreadShutdown(void);
+
+/*
  * Tears down the heap source and frees any resources associated with it.
  */
 void dvmHeapSourceShutdown(GcHeap **gcHeap);
@@ -57,7 +71,7 @@
 /*
  * Get the bitmap representing all live objects.
  */
-HeapBitmap *dvmHeapSourceGetLiveBits();
+HeapBitmap *dvmHeapSourceGetLiveBits(void);
 
 /*
  * Returns the requested value. If the per-heap stats are requested, fill
@@ -71,7 +85,7 @@
     HS_EXTERNAL_BYTES_ALLOCATED,
     HS_EXTERNAL_LIMIT
 };
-size_t dvmHeapSourceGetValue(enum HeapSourceValueSpec spec, 
+size_t dvmHeapSourceGetValue(enum HeapSourceValueSpec spec,
                              size_t perHeapStats[], size_t arrayLen);
 
 /*
@@ -104,6 +118,11 @@
 bool dvmHeapSourceContains(const void *ptr);
 
 /*
+ * Returns true iff <ptr> is within the address space managed by heap source.
+ */
+bool dvmHeapSourceContainsAddress(const void *ptr);
+
+/*
  * Returns the value of the requested flag.
  */
 enum HeapSourcePtrFlag {
diff --git a/vm/alloc/HeapTable.c b/vm/alloc/HeapTable.c
index 7d42600..e9f2729 100644
--- a/vm/alloc/HeapTable.c
+++ b/vm/alloc/HeapTable.c
@@ -20,17 +20,8 @@
 
 #include <limits.h> // for INT_MAX
 
-static void *heapTableRealloc(void *oldPtr, size_t newSize)
-{
-    /* Don't just call realloc(), in case the native system
-     * doesn't malloc() on realloc(NULL).
-     */
-    if (oldPtr != NULL) {
-        return realloc(oldPtr, newSize);
-    } else {
-        return malloc(newSize);
-    }
-}
+static const int kLargeHeapRefTableNElems = 1024;
+static const int  kFinalizableRefDefault = 128;
 
 void dvmHeapHeapTableFree(void *ptr)
 {
@@ -40,10 +31,10 @@
 #define heapRefTableIsFull(refs) \
     dvmIsReferenceTableFull(refs)
 
-bool dvmHeapInitHeapRefTable(HeapRefTable *refs, size_t nelems)
+bool dvmHeapInitHeapRefTable(HeapRefTable *refs)
 {
     memset(refs, 0, sizeof(*refs));
-    return dvmInitReferenceTable(refs, nelems, INT_MAX);
+    return dvmInitReferenceTable(refs, kFinalizableRefDefault, INT_MAX);
 }
 
 /* Frees the array inside the HeapRefTable, not the HeapRefTable itself.
@@ -57,7 +48,6 @@
  * Large, non-contiguous reference tables
  */
 
-#define kLargeHeapRefTableNElems 1024
 bool dvmHeapAddRefToLargeTable(LargeHeapRefTable **tableP, Object *ref)
 {
     LargeHeapRefTable *table;
@@ -98,13 +88,14 @@
 
     /* Allocate a new table.
      */
-    table = (LargeHeapRefTable *)heapTableRealloc(NULL,
-            sizeof(LargeHeapRefTable));
+    table = calloc(1, sizeof(LargeHeapRefTable));
     if (table == NULL) {
         LOGE_HEAP("Can't allocate a new large ref table\n");
         return false;
     }
-    if (!dvmHeapInitHeapRefTable(&table->refs, kLargeHeapRefTableNElems)) {
+    if (!dvmInitReferenceTable(&table->refs,
+                               kLargeHeapRefTableNElems,
+                               INT_MAX)) {
         LOGE_HEAP("Can't initialize a new large ref table\n");
         dvmHeapHeapTableFree(table);
         return false;
@@ -132,8 +123,7 @@
 
     /* Allocate a node.
      */
-    table = (LargeHeapRefTable *)heapTableRealloc(NULL,
-            sizeof(LargeHeapRefTable));
+    table = calloc(1, sizeof(LargeHeapRefTable));
     if (table == NULL) {
         LOGE_HEAP("Can't allocate a new large ref table\n");
         return false;
@@ -193,28 +183,16 @@
     return obj;
 }
 
-void dvmHeapMarkLargeTableRefs(LargeHeapRefTable *table, bool stripLowBits)
+void dvmHeapMarkLargeTableRefs(LargeHeapRefTable *table)
 {
     while (table != NULL) {
         Object **ref, **lastRef;
 
         ref = table->refs.table;
         lastRef = table->refs.nextEntry;
-        if (stripLowBits) {
-            /* This case is used for marking reference objects that
-             * are still waiting for the heap worker thread to push
-             * them onto their reference queue.
-             */
-            while (ref < lastRef) {
-                dvmMarkObjectNonNull((Object *)((uintptr_t)*ref++ & ~3));
-            }
-        } else {
-            while (ref < lastRef) {
-                dvmMarkObjectNonNull(*ref++);
-            }
+        while (ref < lastRef) {
+            dvmMarkObjectNonNull(*ref++);
         }
         table = table->next;
     }
 }
-
-
diff --git a/vm/alloc/HeapTable.h b/vm/alloc/HeapTable.h
index a49bea9..55851b9 100644
--- a/vm/alloc/HeapTable.h
+++ b/vm/alloc/HeapTable.h
@@ -27,12 +27,12 @@
     HeapRefTable refs;
 };
 
-bool dvmHeapInitHeapRefTable(HeapRefTable *refs, size_t nelems);
+bool dvmHeapInitHeapRefTable(HeapRefTable *refs);
 void dvmHeapFreeHeapRefTable(HeapRefTable *refs);
 void dvmHeapFreeLargeTable(LargeHeapRefTable *table);
 void dvmHeapHeapTableFree(void *ptr);
 bool dvmHeapAddRefToLargeTable(LargeHeapRefTable **tableP, Object *ref);
-void dvmHeapMarkLargeTableRefs(LargeHeapRefTable *table, bool stripLowBits);
+void dvmHeapMarkLargeTableRefs(LargeHeapRefTable *table);
 bool dvmHeapAddTableToLargeTable(LargeHeapRefTable **tableP,
         HeapRefTable *refs);
 Object *dvmHeapGetNextObjectFromLargeTable(LargeHeapRefTable **pTable);
diff --git a/vm/alloc/HeapWorker.c b/vm/alloc/HeapWorker.c
index bf924cd..4521e34 100644
--- a/vm/alloc/HeapWorker.c
+++ b/vm/alloc/HeapWorker.c
@@ -76,9 +76,7 @@
      * so this should not get stuck.
      */
     while (!gDvm.heapWorkerReady) {
-        int cc __attribute__ ((__unused__));
-        cc = pthread_cond_wait(&gDvm.heapWorkerCond, &gDvm.heapWorkerLock);
-        assert(cc == 0);
+        dvmWaitCond(&gDvm.heapWorkerCond, &gDvm.heapWorkerLock);
     }
 
     dvmUnlockMutex(&gDvm.heapWorkerLock);
@@ -193,6 +191,26 @@
     }
 }
 
+/*
+ * Acquires a mutex, transitioning to the VMWAIT state if the mutex is
+ * held.  This allows the thread to suspend while it waits for another
+ * thread to release the mutex.
+ */
+static void lockMutex(pthread_mutex_t *mu)
+{
+    Thread *self;
+    ThreadStatus oldStatus;
+
+    assert(mu != NULL);
+    if (dvmTryLockMutex(mu) != 0) {
+        self = dvmThreadSelf();
+        assert(self != NULL);
+        oldStatus = dvmChangeStatus(self, THREAD_VMWAIT);
+        dvmLockMutex(mu);
+        dvmChangeStatus(self, oldStatus);
+    }
+}
+
 static void callMethod(Thread *self, Object *obj, Method *method)
 {
     JValue unused;
@@ -225,7 +243,10 @@
     } else {
         dvmCallMethod(self, method, obj, &unused);
     }
-    dvmLockMutex(&gDvm.heapWorkerLock);
+    /*
+     * Reacquire the heap worker lock in a suspend-friendly way.
+     */
+    lockMutex(&gDvm.heapWorkerLock);
 
     gDvm.gcHeap->heapWorkerCurrentObject = NULL;
     gDvm.gcHeap->heapWorkerCurrentMethod = NULL;
@@ -277,15 +298,14 @@
             assert(method->clazz != gDvm.classJavaLangObject);
             callMethod(self, obj, method);
         } else {
-            if (op & WORKER_ENQUEUE) {
-                assert(dvmGetFieldObject(
-                           obj, gDvm.offJavaLangRefReference_queue) != NULL);
-                assert(dvmGetFieldObject(
-                           obj, gDvm.offJavaLangRefReference_queueNext) == NULL);
-                numReferencesEnqueued++;
-                callMethod(self, obj,
-                        gDvm.methJavaLangRefReference_enqueueInternal);
-            }
+            assert(op == WORKER_ENQUEUE);
+            assert(dvmGetFieldObject(
+                       obj, gDvm.offJavaLangRefReference_queue) != NULL);
+            assert(dvmGetFieldObject(
+                       obj, gDvm.offJavaLangRefReference_queueNext) == NULL);
+            numReferencesEnqueued++;
+            callMethod(self, obj,
+                       gDvm.methJavaLangRefReference_enqueueInternal);
         }
 
         /* Let the GC collect the object.
@@ -303,7 +323,6 @@
 static void* heapWorkerThreadStart(void* arg)
 {
     Thread *self = dvmThreadSelf();
-    int cc;
 
     UNUSED_PARAMETER(arg);
 
@@ -312,8 +331,7 @@
     /* tell the main thread that we're ready */
     dvmLockMutex(&gDvm.heapWorkerLock);
     gDvm.heapWorkerReady = true;
-    cc = pthread_cond_signal(&gDvm.heapWorkerCond);
-    assert(cc == 0);
+    dvmSignalCond(&gDvm.heapWorkerCond);
     dvmUnlockMutex(&gDvm.heapWorkerLock);
 
     dvmLockMutex(&gDvm.heapWorkerLock);
@@ -325,8 +343,7 @@
         dvmChangeStatus(NULL, THREAD_VMWAIT);
 
         /* Signal anyone who wants to know when we're done. */
-        cc = pthread_cond_broadcast(&gDvm.heapWorkerIdleCond);
-        assert(cc == 0);
+        dvmBroadcastCond(&gDvm.heapWorkerIdleCond);
 
         /* Trim the heap if we were asked to. */
         trimtime = gDvm.gcHeap->heapWorkerNextTrim;
@@ -343,7 +360,7 @@
 #endif
 
             if (trimtime.tv_sec < now.tv_sec ||
-                (trimtime.tv_sec == now.tv_sec && 
+                (trimtime.tv_sec == now.tv_sec &&
                  trimtime.tv_nsec <= now.tv_nsec))
             {
                 size_t madvisedSizes[HEAP_SOURCE_MAX_HEAP_COUNT];
@@ -374,6 +391,7 @@
 
         /* sleep until signaled */
         if (timedwait) {
+            int cc __attribute__ ((__unused__));
 #ifdef HAVE_TIMEDWAIT_MONOTONIC
             cc = pthread_cond_timedwait_monotonic(&gDvm.heapWorkerCond,
                     &gDvm.heapWorkerLock, &trimtime);
@@ -381,10 +399,9 @@
             cc = pthread_cond_timedwait(&gDvm.heapWorkerCond,
                     &gDvm.heapWorkerLock, &trimtime);
 #endif
-            assert(cc == 0 || cc == ETIMEDOUT || cc == EINTR);
+            assert(cc == 0 || cc == ETIMEDOUT);
         } else {
-            cc = pthread_cond_wait(&gDvm.heapWorkerCond, &gDvm.heapWorkerLock);
-            assert(cc == 0);
+            dvmWaitCond(&gDvm.heapWorkerCond, &gDvm.heapWorkerLock);
         }
 
         /* dvmChangeStatus() may block;  don't hold heapWorkerLock.
@@ -410,14 +427,11 @@
  */
 void dvmSignalHeapWorker(bool shouldLock)
 {
-    int cc;
-
     if (shouldLock) {
         dvmLockMutex(&gDvm.heapWorkerLock);
     }
 
-    cc = pthread_cond_signal(&gDvm.heapWorkerCond);
-    assert(cc == 0);
+    dvmSignalCond(&gDvm.heapWorkerCond);
 
     if (shouldLock) {
         dvmUnlockMutex(&gDvm.heapWorkerLock);
@@ -429,8 +443,6 @@
  */
 void dvmWaitForHeapWorkerIdle()
 {
-    int cc;
-
     assert(gDvm.heapWorkerReady);
 
     dvmChangeStatus(NULL, THREAD_VMWAIT);
@@ -443,8 +455,7 @@
     //     need to detect when this is called from the HeapWorker
     //     context and just give up.
     dvmSignalHeapWorker(false);
-    cc = pthread_cond_wait(&gDvm.heapWorkerIdleCond, &gDvm.heapWorkerLock);
-    assert(cc == 0);
+    dvmWaitCond(&gDvm.heapWorkerIdleCond, &gDvm.heapWorkerLock);
 
     dvmUnlockMutex(&gDvm.heapWorkerLock);
 
diff --git a/vm/alloc/HeapWorker.h b/vm/alloc/HeapWorker.h
index 2734aef..45587ff 100644
--- a/vm/alloc/HeapWorker.h
+++ b/vm/alloc/HeapWorker.h
@@ -76,11 +76,7 @@
  */
 typedef enum HeapWorkerOperation {
     WORKER_FINALIZE = 0,
-
-    /* Required: WORKER_ENQUEUE <= (4-1)
-     * This value will be stuffed in the low bits of a pointer.
-     */
-    WORKER_ENQUEUE = (1<<0),
+    WORKER_ENQUEUE = 1,
 } HeapWorkerOperation;
 
 /*
diff --git a/vm/alloc/MarkSweep.c b/vm/alloc/MarkSweep.c
index bf869c6..1abdffa 100644
--- a/vm/alloc/MarkSweep.c
+++ b/vm/alloc/MarkSweep.c
@@ -20,13 +20,12 @@
 #include "alloc/HeapInternal.h"
 #include "alloc/HeapSource.h"
 #include "alloc/MarkSweep.h"
+#include "alloc/Visit.h"
 #include <limits.h>     // for ULONG_MAX
 #include <sys/mman.h>   // for madvise(), mmap()
 #include <cutils/ashmem.h>
 #include <errno.h>
 
-#define VERBOSE_GC          0
-
 #define GC_LOG_TAG      LOG_TAG "-gc"
 
 #if LOG_NDEBUG
@@ -37,25 +36,11 @@
 #define LOGD_GC(...)    LOG(LOG_DEBUG, GC_LOG_TAG, __VA_ARGS__)
 #endif
 
-#if VERBOSE_GC
-#define LOGVV_GC(...)   LOGV_GC(__VA_ARGS__)
-#else
-#define LOGVV_GC(...)   ((void)0)
-#endif
-
 #define LOGI_GC(...)    LOG(LOG_INFO, GC_LOG_TAG, __VA_ARGS__)
 #define LOGW_GC(...)    LOG(LOG_WARN, GC_LOG_TAG, __VA_ARGS__)
 #define LOGE_GC(...)    LOG(LOG_ERROR, GC_LOG_TAG, __VA_ARGS__)
 
 #define LOG_SCAN(...)   LOGV_GC("SCAN: " __VA_ARGS__)
-#define LOG_MARK(...)   LOGV_GC("MARK: " __VA_ARGS__)
-#define LOG_SWEEP(...)  LOGV_GC("SWEEP: " __VA_ARGS__)
-#define LOG_REF(...)    LOGV_GC("REF: " __VA_ARGS__)
-
-#define LOGV_SCAN(...)  LOGVV_GC("SCAN: " __VA_ARGS__)
-#define LOGV_MARK(...)  LOGVV_GC("MARK: " __VA_ARGS__)
-#define LOGV_SWEEP(...) LOGVV_GC("SWEEP: " __VA_ARGS__)
-#define LOGV_REF(...)   LOGVV_GC("REF: " __VA_ARGS__)
 
 #define ALIGN_UP_TO_PAGE_SIZE(p) \
     (((size_t)(p) + (SYSTEM_PAGE_SIZE - 1)) & ~(SYSTEM_PAGE_SIZE - 1))
@@ -165,17 +150,6 @@
             hprofMarkRootObject(gDvm.gcHeap->hprofContext, obj, 0);
         }
 #endif
-#if DVM_TRACK_HEAP_MARKING
-        gDvm.gcHeap->markCount++;
-        gDvm.gcHeap->markSize += dvmHeapSourceChunkSize((void *)obj) +
-                HEAP_SOURCE_CHUNK_OVERHEAD;
-#endif
-
-        /* obj->clazz can be NULL if we catch an object between
-         * dvmMalloc() and DVM_OBJECT_INIT().  This is ok.
-         */
-        LOGV_MARK("0x%08x %s\n", (uint)obj,
-                obj->clazz == NULL ? "<null class>" : obj->clazz->name);
     }
 }
 
@@ -236,11 +210,7 @@
  */
 void dvmHeapMarkRootSet()
 {
-    HeapRefTable *refs;
-    GcHeap *gcHeap;
-    Object **op;
-
-    gcHeap = gDvm.gcHeap;
+    GcHeap *gcHeap = gDvm.gcHeap;
 
     HPROF_SET_GC_SCAN_STATE(HPROF_ROOT_STICKY_CLASS, 0);
 
@@ -273,12 +243,12 @@
     HPROF_SET_GC_SCAN_STATE(HPROF_ROOT_REFERENCE_CLEANUP, 0);
 
     LOG_SCAN("pending reference operations\n");
-    dvmHeapMarkLargeTableRefs(gcHeap->referenceOperations, true);
+    dvmHeapMarkLargeTableRefs(gcHeap->referenceOperations);
 
     HPROF_SET_GC_SCAN_STATE(HPROF_ROOT_FINALIZING, 0);
 
     LOG_SCAN("pending finalizations\n");
-    dvmHeapMarkLargeTableRefs(gcHeap->pendingFinalizationRefs, false);
+    dvmHeapMarkLargeTableRefs(gcHeap->pendingFinalizationRefs);
 
     HPROF_SET_GC_SCAN_STATE(HPROF_ROOT_DEBUGGER, 0);
 
@@ -287,15 +257,6 @@
 
     HPROF_SET_GC_SCAN_STATE(HPROF_ROOT_VM_INTERNAL, 0);
 
-    /* Mark all ALLOC_NO_GC objects.
-     */
-    LOG_SCAN("ALLOC_NO_GC objects\n");
-    refs = &gcHeap->nonCollectableRefs;
-    op = refs->table;
-    while ((uintptr_t)op < (uintptr_t)refs->nextEntry) {
-        dvmMarkObjectNonNull(*(op++));
-    }
-
     /* Mark any special objects we have sitting around.
      */
     LOG_SCAN("special objects\n");
@@ -363,7 +324,10 @@
     if (IS_CLASS_FLAG_SET(obj, CLASS_ISARRAY)) {
         markObject((Object *)obj->elementClass, ctx);
     }
-    markObject((Object *)obj->super, ctx);
+    /* Do super and the interfaces contain Objects and not dex idx values? */
+    if (obj->status > CLASS_IDX) {
+        markObject((Object *)obj->super, ctx);
+    }
     markObject(obj->classLoader, ctx);
     /* Scan static field references. */
     for (i = 0; i < obj->sfieldCount; ++i) {
@@ -375,8 +339,10 @@
     /* Scan the instance fields. */
     scanInstanceFields((const Object *)obj, ctx);
     /* Scan interface references. */
-    for (i = 0; i < obj->interfaceCount; ++i) {
-        markObject((Object *)obj->interfaces[i], ctx);
+    if (obj->status > CLASS_IDX) {
+        for (i = 0; i < obj->interfaceCount; ++i) {
+            markObject((Object *)obj->interfaces[i], ctx);
+        }
     }
 }
 
@@ -407,11 +373,10 @@
  * referent has not yet been marked, put it on the appropriate list in
  * the gcHeap for later processing.
  */
-static void delayReferenceReferent(const DataObject *obj,
-                                   GcMarkContext *ctx)
+static void delayReferenceReferent(Object *obj, GcMarkContext *ctx)
 {
     assert(obj != NULL);
-    assert(obj->obj.clazz != NULL);
+    assert(obj->clazz != NULL);
     assert(ctx != NULL);
 
     GcHeap *gcHeap = gDvm.gcHeap;
@@ -426,8 +391,7 @@
      * If the referent already has a strong mark (isMarked(referent)),
      * we don't care about its reference status.
      */
-    referent = dvmGetFieldObject((Object *)obj,
-                                 gDvm.offJavaLangRefReference_referent);
+    referent = dvmGetFieldObject(obj, gDvm.offJavaLangRefReference_referent);
     if (referent != NULL && !isMarked(referent, ctx))
     {
         u4 refFlags;
@@ -435,21 +399,18 @@
         /* Find out what kind of reference is pointing
          * to referent.
          */
-        refFlags = GET_CLASS_FLAG_GROUP(obj->obj.clazz,
+        refFlags = GET_CLASS_FLAG_GROUP(obj->clazz,
                                         CLASS_ISREFERENCE |
                                         CLASS_ISWEAKREFERENCE |
                                         CLASS_ISPHANTOMREFERENCE);
 
-        /* We use the vmData field of Reference objects
-         * as a next pointer in a singly-linked list.
-         * That way, we don't need to allocate any memory
-         * while we're doing a GC.
-         */
 #define ADD_REF_TO_LIST(list, ref)                                      \
         do {                                                            \
-            Object *ARTL_ref_ = (/*de-const*/Object *)(ref);            \
+            Object *ARTL_ref_ = ref;                                    \
+            assert(dvmGetFieldObject(ARTL_ref_,                         \
+                gDvm.offJavaLangRefReference_queueNext) == NULL);       \
             dvmSetFieldObject(ARTL_ref_,                                \
-                              gDvm.offJavaLangRefReference_vmData, list); \
+                gDvm.offJavaLangRefReference_queueNext, list);          \
             list = ARTL_ref_;                                           \
         } while (false)
 
@@ -484,7 +445,7 @@
 /*
  * Scans the header and field references of a data object.
  */
-static void scanDataObject(const DataObject *obj, GcMarkContext *ctx)
+static void scanDataObject(DataObject *obj, GcMarkContext *ctx)
 {
     assert(obj != NULL);
     assert(obj->obj.clazz != NULL);
@@ -493,9 +454,8 @@
     markObject((Object *)obj->obj.clazz, ctx);
     /* Scan the instance fields. */
     scanInstanceFields((const Object *)obj, ctx);
-
     if (IS_CLASS_FLAG_SET(obj->obj.clazz, CLASS_ISREFERENCE)) {
-        delayReferenceReferent(obj, ctx);
+        delayReferenceReferent((Object *)obj, ctx);
     }
 }
 
@@ -505,29 +465,21 @@
  */
 static void scanObject(const Object *obj, GcMarkContext *ctx)
 {
-    ClassObject *clazz;
-
     assert(obj != NULL);
     assert(ctx != NULL);
-    /* Check that the object is aligned. */
-    assert(((uintptr_t)obj & 7) == 0);
-    clazz = obj->clazz;
-    /* Check that the class object is aligned. */
-    assert(((uintptr_t)clazz & 7) == 0);
+    assert(obj->clazz != NULL);
+#if WITH_HPROF
+    if (gDvm.gcHeap->hprofContext != NULL) {
+        hprofDumpHeapObject(gDvm.gcHeap->hprofContext, obj);
+    }
+#endif
     /* Dispatch a type-specific scan routine. */
-    if (clazz == gDvm.classJavaLangClass) {
+    if (obj->clazz == gDvm.classJavaLangClass) {
         scanClassObject((ClassObject *)obj, ctx);
-    } else if (clazz == NULL) {
-        return;
-    } else if (clazz == gDvm.unlinkedJavaLangClass) {
-        return;
+    } else if (IS_CLASS_FLAG_SET(obj->clazz, CLASS_ISARRAY)) {
+        scanArrayObject((ArrayObject *)obj, ctx);
     } else {
-        assert(clazz != NULL);
-        if (IS_CLASS_FLAG_SET(clazz, CLASS_ISARRAY)) {
-            scanArrayObject((ArrayObject *)obj, ctx);
-        } else {
-            scanDataObject((DataObject *)obj, ctx);
-        }
+        scanDataObject((DataObject *)obj, ctx);
     }
 }
 
@@ -595,6 +547,53 @@
     LOG_SCAN("done with marked objects\n");
 }
 
+static void dirtyObjectVisitor(void *ptr, void *arg)
+{
+    markObject(*(Object **)ptr, (GcMarkContext *)arg);
+}
+
+/*
+ * Callback applied to each gray object to blacken it.
+ */
+static bool dirtyObjectCallback(size_t numPtrs, void **ptrs,
+                                const void *finger, void *arg)
+{
+    GcMarkContext *ctx;
+    size_t i;
+
+    ctx = (GcMarkContext *)arg;
+    for (i = 0; i < numPtrs; ++i) {
+        dvmVisitObject(dirtyObjectVisitor, ptrs[i], ctx);
+    }
+    return true;
+}
+
+/*
+ * Re-mark dirtied objects.  Iterates through all blackened objects
+ * looking for references to white objects.
+ */
+void dvmMarkDirtyObjects(void)
+{
+    HeapBitmap markBits[HEAP_SOURCE_MAX_HEAP_COUNT];
+    HeapBitmap liveBits[HEAP_SOURCE_MAX_HEAP_COUNT];
+    GcMarkContext *ctx;
+    size_t numBitmaps;
+    size_t i;
+
+    ctx = &gDvm.gcHeap->markContext;
+    /*
+     * The finger must have been set to the maximum value to ensure
+     * that gray objects will be pushed onto the mark stack.
+     */
+    assert(ctx->finger == (void *)ULONG_MAX);
+    numBitmaps = dvmHeapSourceGetNumHeaps();
+    dvmHeapSourceGetObjectBitmaps(liveBits, markBits, numBitmaps);
+    for (i = 0; i < numBitmaps; i++) {
+        dvmHeapBitmapWalk(&markBits[i], dirtyObjectCallback, ctx);
+    }
+    processMarkStack(ctx);
+}
+
 /** Clear the referent field.
  */
 static void clearReference(Object *reference)
@@ -640,24 +639,10 @@
  */
 static void enqueueReference(Object *ref)
 {
-    LargeHeapRefTable **table;
-    Object *op;
-
-    assert(((uintptr_t)ref & 3) == 0);
-    assert((WORKER_ENQUEUE & ~3) == 0);
+    assert(ref != NULL);
     assert(dvmGetFieldObject(ref, gDvm.offJavaLangRefReference_queue) != NULL);
     assert(dvmGetFieldObject(ref, gDvm.offJavaLangRefReference_queueNext) == NULL);
-    /* Stuff the enqueue bit in the bottom of the pointer.
-     * Assumes that objects are 8-byte aligned.
-     *
-     * Note that we are adding the *Reference* (which
-     * is by definition already marked at this point) to
-     * this list; we're not adding the referent (which
-     * has already been cleared).
-     */
-    table = &gDvm.gcHeap->referenceOperations;
-    op = (Object *)((uintptr_t)ref | WORKER_ENQUEUE);
-    if (!dvmHeapAddRefToLargeTable(table, op)) {
+    if (!dvmHeapAddRefToLargeTable(&gDvm.gcHeap->referenceOperations, ref)) {
         LOGE_HEAP("enqueueReference(): no room for any more "
                   "reference operations\n");
         dvmAbort();
@@ -675,19 +660,19 @@
     GcMarkContext *markContext;
     Object *ref, *referent;
     Object *prev, *next;
-    size_t referentOffset, vmDataOffset;
+    size_t referentOffset, queueNextOffset;
     unsigned counter;
     bool marked;
 
     markContext = &gDvm.gcHeap->markContext;
-    vmDataOffset = gDvm.offJavaLangRefReference_vmData;
+    queueNextOffset = gDvm.offJavaLangRefReference_queueNext;
     referentOffset = gDvm.offJavaLangRefReference_referent;
     counter = 0;
     prev = next = NULL;
     ref = *list;
     while (ref != NULL) {
         referent = dvmGetFieldObject(ref, referentOffset);
-        next = dvmGetFieldObject(ref, vmDataOffset);
+        next = dvmGetFieldObject(ref, queueNextOffset);
         assert(referent != NULL);
         marked = isMarked(referent, markContext);
         if (!marked && ((++counter) & 1)) {
@@ -699,8 +684,8 @@
         if (marked) {
             /* Referent is black, unlink it. */
             if (prev != NULL) {
-                dvmSetFieldObject(ref, vmDataOffset, NULL);
-                dvmSetFieldObject(prev, vmDataOffset, next);
+                dvmSetFieldObject(ref, queueNextOffset, NULL);
+                dvmSetFieldObject(prev, queueNextOffset, next);
             }
         } else {
             /* Referent is white, skip over it. */
@@ -724,17 +709,18 @@
 {
     GcMarkContext *markContext;
     Object *ref, *referent;
-    size_t referentOffset, vmDataOffset;
+    size_t referentOffset, queueNextOffset;
     bool doSignal;
 
     markContext = &gDvm.gcHeap->markContext;
-    vmDataOffset = gDvm.offJavaLangRefReference_vmData;
+    queueNextOffset = gDvm.offJavaLangRefReference_queueNext;
     referentOffset = gDvm.offJavaLangRefReference_referent;
     doSignal = false;
     while (*list != NULL) {
         ref = *list;
         referent = dvmGetFieldObject(ref, referentOffset);
-        *list = dvmGetFieldObject(ref, vmDataOffset);
+        *list = dvmGetFieldObject(ref, queueNextOffset);
+        dvmSetFieldObject(ref, queueNextOffset, NULL);
         assert(referent != NULL);
         if (!isMarked(referent, markContext)) {
             /* Referent is "white", clear it. */
@@ -775,7 +761,7 @@
     /* Create a table that the new pending refs will
      * be added to.
      */
-    if (!dvmHeapInitHeapRefTable(&newPendingRefs, 128)) {
+    if (!dvmHeapInitHeapRefTable(&newPendingRefs)) {
         //TODO: mark all finalizable refs and hope that
         //      we can schedule them next time.  Watch out,
         //      because we may be expecting to free up space
@@ -898,13 +884,6 @@
 
         obj = (Object *)*ptrs++;
 
-        /* NOTE: Dereferencing clazz is dangerous.  If obj was the last
-         * one to reference its class object, the class object could be
-         * on the sweep list, and could already have been swept, leaving
-         * us with a stale pointer.
-         */
-        LOGV_SWEEP("FREE: 0x%08x %s\n", (uint)obj, obj->clazz->name);
-
         /* This assumes that java.lang.Class will never go away.
          * If it can, and we were the last reference to it, it
          * could have already been swept.  However, even in that case,
@@ -912,7 +891,6 @@
          * value.
          */
         if (obj->clazz == classJavaLangClass) {
-            LOGV_SWEEP("---------------> %s\n", ((ClassObject *)obj)->name);
             /* dvmFreeClassInnards() may have already been called,
              * but it's safe to call on the same ClassObject twice.
              */
diff --git a/vm/alloc/MarkSweep.h b/vm/alloc/MarkSweep.h
index 5e5a0eb..d344aae 100644
--- a/vm/alloc/MarkSweep.h
+++ b/vm/alloc/MarkSweep.h
@@ -47,6 +47,7 @@
 bool dvmHeapBeginMarkStep(GcMode mode);
 void dvmHeapMarkRootSet(void);
 void dvmHeapScanMarkedObjects(void);
+void dvmMarkDirtyObjects(void);
 void dvmHandleSoftRefs(Object **list);
 void dvmClearWhiteRefs(Object **list);
 void dvmHeapScheduleFinalizations(void);
diff --git a/vm/alloc/Verify.c b/vm/alloc/Verify.c
index 212b6ea..2bb8808 100644
--- a/vm/alloc/Verify.c
+++ b/vm/alloc/Verify.c
@@ -15,14 +15,15 @@
  */
 
 #include "Dalvik.h"
+#include "alloc/HeapBitmap.h"
 #include "alloc/HeapSource.h"
 #include "alloc/Verify.h"
-#include "alloc/HeapBitmap.h"
+#include "alloc/Visit.h"
 
 /*
  * Helper routine for verifyRefernce that masks low-tag bits before
  * applying verification checks.  TODO: eliminate the use of low-tag
- * bits and move this code into verfiyReference.
+ * bits and move this code into verifyReference.
  */
 static void verifyReferenceUnmask(const void *addr, uintptr_t mask)
 {
@@ -51,105 +52,9 @@
     verifyReferenceUnmask(addr, 0);
 }
 
-/*
- * Verifies instance fields.
- */
-static void verifyInstanceFields(const Object *obj)
+static void visitorCallback(void *addr, void *arg)
 {
-    ClassObject *clazz;
-    int i;
-
-    assert(obj != NULL);
-    assert(obj->clazz != NULL);
-    LOGV("Entering verifyInstanceFields(obj=%p)", obj);
-    /* TODO(cshapiro): check reference offsets bitmap for agreement. */
-    for (clazz = obj->clazz; clazz != NULL; clazz = clazz->super) {
-        InstField *field = clazz->ifields;
-        for (i = 0; i < clazz->ifieldRefCount; ++i, ++field) {
-            void *addr = BYTE_OFFSET((Object *)obj, field->byteOffset);
-            verifyReference(&((JValue *)addr)->l);
-        }
-    }
-    LOGV("Exiting verifyInstanceFields(obj=%p)", obj);
-}
-
-/*
- * Verifies the header, static field references, and interface
- * pointers of a class object.
- */
-static void verifyClassObject(const ClassObject *obj)
-{
-    int i;
-
-    LOGV("Entering verifyClassObject(obj=%p)", obj);
-    if (obj == gDvm.unlinkedJavaLangClass) {
-        assert(obj->obj.clazz == NULL);
-        goto exit;
-    }
-    verifyReference(&obj->obj.clazz);
-    assert(!strcmp(obj->obj.clazz->descriptor, "Ljava/lang/Class;"));
-    if (IS_CLASS_FLAG_SET(obj, CLASS_ISARRAY)) {
-        verifyReference(&obj->elementClass);
-    }
-    verifyReference(&obj->super);
-    verifyReference(&obj->classLoader);
-    /* Verify static field references. */
-    for (i = 0; i < obj->sfieldCount; ++i) {
-        char ch = obj->sfields[i].field.signature[0];
-        if (ch == '[' || ch == 'L') {
-            verifyReference(&obj->sfields[i].value.l);
-        }
-    }
-    /* Verify the instance fields. */
-    verifyInstanceFields((const Object *)obj);
-    /* Verify interface references. */
-    for (i = 0; i < obj->interfaceCount; ++i) {
-        verifyReference(&obj->interfaces[i]);
-    }
-exit:
-    LOGV("Exiting verifyClassObject(obj=%p)", obj);
-}
-
-/*
- * Verifies the header of all array objects.  If the array object is
- * specialized to a reference type, verifies the array data as well.
- */
-static void verifyArrayObject(const ArrayObject *array)
-{
-    size_t i;
-
-    LOGV("Entering verifyArrayObject(array=%p)", array);
-    /* Verify the class object reference. */
-    assert(array->obj.clazz != NULL);
-    verifyReference(&array->obj.clazz);
-    if (IS_CLASS_FLAG_SET(array->obj.clazz, CLASS_ISOBJECTARRAY)) {
-        /* Verify the array contents. */
-        Object **contents = (Object **)array->contents;
-        for (i = 0; i < array->length; ++i) {
-            verifyReference(&contents[i]);
-        }
-    }
-    LOGV("Exiting verifyArrayObject(array=%p)", array);
-}
-
-/*
- * Verifies the header and field references of a data object.
- */
-static void verifyDataObject(const DataObject *obj)
-{
-    LOGV("Entering verifyDataObject(obj=%p)", obj);
-    /* Verify the class object. */
-    assert(obj->obj.clazz != NULL);
-    verifyReference(&obj->obj.clazz);
-    /* Verify the instance fields. */
-    verifyInstanceFields((const Object *)obj);
-    if (IS_CLASS_FLAG_SET(obj->obj.clazz, CLASS_ISREFERENCE)) {
-        /* Verify the hidden Reference.referent field. */
-        size_t offset = gDvm.offJavaLangRefReference_referent;
-        void *addr = BYTE_OFFSET((Object *)obj, offset);
-        verifyReference(&((JValue *)addr)->l);
-    }
-    LOGV("Exiting verifyDataObject(obj=%p)", obj);
+    verifyReference(addr);
 }
 
 /*
@@ -158,27 +63,8 @@
  */
 void dvmVerifyObject(const Object *obj)
 {
-    ClassObject *clazz;
-
     LOGV("Entering dvmVerifyObject(obj=%p)", obj);
-    assert(obj != NULL);
-    /* Check that the object is aligned. */
-    assert(((uintptr_t)obj & 7) == 0);
-    clazz = obj->clazz;
-    /* Check that the class object is aligned. */
-    assert(((uintptr_t)clazz & 7) == 0);
-    /* Dispatch a type-specific verification routine. */
-    if (clazz == gDvm.classJavaLangClass ||
-        obj == (Object *)gDvm.unlinkedJavaLangClass) {
-        verifyClassObject((ClassObject *)obj);
-    } else {
-        assert(clazz != NULL);
-        if (IS_CLASS_FLAG_SET(clazz, CLASS_ISARRAY)) {
-            verifyArrayObject((ArrayObject *)obj);
-        } else {
-            verifyDataObject((DataObject *)obj);
-        }
-    }
+    dvmVisitObject(visitorCallback, (Object *)obj, NULL);
     LOGV("Exiting dvmVerifyObject(obj=%p)", obj);
 }
 
@@ -250,29 +136,13 @@
 }
 
 /*
- * Applies the verify routine to a heap worker reference operation.
- */
-static void verifyReferenceOperation(const void *arg)
-{
-    assert(arg != NULL);
-    verifyReferenceUnmask(arg, 0x3);
-}
-
-/*
  * Verifies a large heap reference table.  These objects are list
  * heads.  As such, it is valid for table to be NULL.
  */
-static void verifyLargeHeapRefTable(LargeHeapRefTable *table,
-                                    void (*callback)(const void *arg))
+static void verifyLargeHeapRefTable(const LargeHeapRefTable *table)
 {
-    Object **ref;
-
-    assert(callback != NULL);
     for (; table != NULL; table = table->next) {
-        for (ref = table->refs.table; ref < table->refs.nextEntry; ++ref) {
-            assert(ref != NULL);
-            (*callback)(ref);
-        }
+        verifyReferenceTable(&table->refs);
     }
 }
 
@@ -392,11 +262,8 @@
     verifyHashTable(gDvm.internedStrings, verifyStringReference);
     verifyReferenceTable(&gDvm.jniGlobalRefTable);
     verifyReferenceTable(&gDvm.jniPinRefTable);
-    verifyReferenceTable(&gDvm.gcHeap->nonCollectableRefs);
-    verifyLargeHeapRefTable(gDvm.gcHeap->referenceOperations,
-                            verifyReferenceOperation);
-    verifyLargeHeapRefTable(gDvm.gcHeap->pendingFinalizationRefs,
-                            verifyReference);
+    verifyLargeHeapRefTable(gDvm.gcHeap->referenceOperations);
+    verifyLargeHeapRefTable(gDvm.gcHeap->pendingFinalizationRefs);
     verifyThreads();
     /* TODO: verify cached global references. */
 }
diff --git a/vm/alloc/Visit.c b/vm/alloc/Visit.c
new file mode 100644
index 0000000..8d47220
--- /dev/null
+++ b/vm/alloc/Visit.c
@@ -0,0 +1,169 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "Dalvik.h"
+#include "alloc/clz.h"
+#include "alloc/Visit.h"
+
+/*
+ * Visits the instance fields of a class or data object.
+ */
+static void visitInstanceFields(Visitor *visitor, Object *obj, void *arg)
+{
+    assert(visitor != NULL);
+    assert(obj != NULL);
+    assert(obj->clazz != NULL);
+    LOGV("Entering visitInstanceFields(visitor=%p,obj=%p)", visitor, obj);
+    if (obj->clazz->refOffsets != CLASS_WALK_SUPER) {
+        size_t refOffsets = obj->clazz->refOffsets;
+        while (refOffsets != 0) {
+            size_t rshift = CLZ(refOffsets);
+            size_t offset = CLASS_OFFSET_FROM_CLZ(rshift);
+            Object **ref = BYTE_OFFSET(obj, offset);
+            (*visitor)(ref, arg);
+            refOffsets &= ~(CLASS_HIGH_BIT >> rshift);
+        }
+    } else {
+        ClassObject *clazz;
+        for (clazz = obj->clazz; clazz != NULL; clazz = clazz->super) {
+            InstField *field = clazz->ifields;
+            int i;
+            for (i = 0; i < clazz->ifieldRefCount; ++i, ++field) {
+                size_t offset = field->byteOffset;
+                Object **ref = BYTE_OFFSET(obj, offset);
+                (*visitor)(ref, arg);
+            }
+        }
+    }
+    LOGV("Exiting visitInstanceFields(visitor=%p,obj=%p)", visitor, obj);
+}
+
+/*
+ * Visits the static fields of a class object.
+ */
+static void visitStaticFields(Visitor *visitor, ClassObject *clazz, void *arg)
+{
+    int i;
+
+    assert(visitor != NULL);
+    assert(clazz != NULL);
+    for (i = 0; i < clazz->sfieldCount; ++i) {
+        char ch = clazz->sfields[i].field.signature[0];
+        if (ch == '[' || ch == 'L') {
+            (*visitor)(&clazz->sfields[i].value.l, arg);
+        }
+    }
+}
+
+/*
+ * Visit the interfaces of a class object.
+ */
+static void visitInterfaces(Visitor *visitor, ClassObject *clazz, void *arg)
+{
+    int i;
+
+    assert(visitor != NULL);
+    assert(clazz != NULL);
+    for (i = 0; i < clazz->interfaceCount; ++i) {
+        (*visitor)(&clazz->interfaces[i], arg);
+    }
+}
+
+/*
+ * Visits all the references stored in a class object instance.
+ */
+static void visitClassObject(Visitor *visitor, ClassObject *obj, void *arg)
+{
+    assert(visitor != NULL);
+    assert(obj != NULL);
+    LOGV("Entering visitClassObject(visitor=%p,obj=%p)", visitor, obj);
+    assert(!strcmp(obj->obj.clazz->descriptor, "Ljava/lang/Class;"));
+    (*visitor)(&obj->obj.clazz, arg);
+    if (IS_CLASS_FLAG_SET(obj, CLASS_ISARRAY)) {
+        (*visitor)(&obj->elementClass, arg);
+    }
+    if (obj->status > CLASS_IDX) {
+        (*visitor)(&obj->super, arg);
+    }
+    (*visitor)(&obj->classLoader, arg);
+    visitInstanceFields(visitor, (Object *)obj, arg);
+    visitStaticFields(visitor, obj, arg);
+    if (obj->status > CLASS_IDX) {
+        visitInterfaces(visitor, obj, arg);
+    }
+    LOGV("Exiting visitClassObject(visitor=%p,obj=%p)", visitor, obj);
+}
+
+/*
+ * Visits the class object and, if the array is typed as an object
+ * array, all of the array elements.
+ */
+static void visitArrayObject(Visitor *visitor, Object *obj, void *arg)
+{
+    assert(visitor != NULL);
+    assert(obj != NULL);
+    assert(obj->clazz != NULL);
+    LOGV("Entering visitArrayObject(visitor=%p,obj=%p)", visitor, obj);
+    (*visitor)(&obj->clazz, arg);
+    if (IS_CLASS_FLAG_SET(obj->clazz, CLASS_ISOBJECTARRAY)) {
+        ArrayObject *array = (ArrayObject *)obj;
+        Object **contents = (Object **)array->contents;
+        size_t i;
+        for (i = 0; i < array->length; ++i) {
+            (*visitor)(&contents[i], arg);
+        }
+    }
+    LOGV("Exiting visitArrayObject(visitor=%p,obj=%p)", visitor, obj);
+}
+
+/*
+ * Visits the class object and reference typed instance fields of a
+ * data object.
+ */
+static void visitDataObject(Visitor *visitor, Object *obj, void *arg)
+{
+    assert(visitor != NULL);
+    assert(obj != NULL);
+    assert(obj->clazz != NULL);
+    LOGV("Entering visitDataObject(visitor=%p,obj=%p)", visitor, obj);
+    (*visitor)(&obj->clazz, arg);
+    visitInstanceFields(visitor, obj, arg);
+    if (IS_CLASS_FLAG_SET(obj->clazz, CLASS_ISREFERENCE)) {
+        size_t offset = gDvm.offJavaLangRefReference_referent;
+        Object **ref = BYTE_OFFSET(obj, offset);
+        (*visitor)(ref, arg);
+    }
+    LOGV("Exiting visitDataObject(visitor=%p,obj=%p)", visitor, obj);
+}
+
+/*
+ * Visits all of the reference stored in an object.
+ */
+void dvmVisitObject(Visitor *visitor, Object *obj, void *arg)
+{
+    assert(visitor != NULL);
+    assert(obj != NULL);
+    assert(obj->clazz != NULL);
+    LOGV("Entering dvmVisitObject(visitor=%p,obj=%p)", visitor, obj);
+    if (obj->clazz == gDvm.classJavaLangClass) {
+        visitClassObject(visitor, (ClassObject *)obj, arg);
+    } else if (IS_CLASS_FLAG_SET(obj->clazz, CLASS_ISARRAY)) {
+        visitArrayObject(visitor, obj, arg);
+    } else {
+        visitDataObject(visitor, obj, arg);
+    }
+    LOGV("Exiting dvmVisitObject(visitor=%p,obj=%p)", visitor, obj);
+}
diff --git a/dexdump/OpCodeNames.h b/vm/alloc/Visit.h
similarity index 67%
copy from dexdump/OpCodeNames.h
copy to vm/alloc/Visit.h
index 1aec0d1..343d567 100644
--- a/dexdump/OpCodeNames.h
+++ b/vm/alloc/Visit.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright (C) 2010 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -13,14 +13,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-/*
- * Dalvik opcode names.
- */ 
-#ifndef _DEXDUMP_OPCODENAMES
-#define _DEXDUMP_OPCODENAMES
 
-#include "libdex/OpCode.h"
+#ifndef _DALVIK_ALLOC_VISIT
+#define _DALVIK_ALLOC_VISIT
 
-const char* getOpcodeName(OpCode op);
+#include "Dalvik.h"
 
-#endif /*_DEXDUMP_OPCODENAMES*/
+typedef void Visitor(void *obj, void *arg);
+
+void dvmVisitObject(Visitor *visitor, Object *obj, void *arg);
+
+#endif /* _DALVIK_ALLOC_VISIT */
diff --git a/vm/alloc/WriteBarrier.h b/vm/alloc/WriteBarrier.h
new file mode 100644
index 0000000..fef993e
--- /dev/null
+++ b/vm/alloc/WriteBarrier.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * Note writes to the heap. These functions must be called if a field
+ * of an Object in the heap changes, and before any GC safe-point. The
+ * call is not needed if NULL is stored in the field.
+ */
+
+/*
+ * The address within the Object has been written, and perhaps changed.
+ */
+INLINE void dvmWriteBarrierField(const Object *obj, void *addr) {
+}
+
+/*
+ * All of the Object may have changed.
+ */
+INLINE void dvmWriteBarrierObject(const Object *obj) {
+}
+
+/*
+ * Some or perhaps all of the array indexes in the Array, greater than
+ * or equal to start and strictly less than end, have been written,
+ * and perhaps changed.
+ */
+INLINE void dvmWriteBarrierArray(const ArrayObject* obj,
+                                 size_t start, size_t end) {
+}
diff --git a/vm/alloc/clz.c b/vm/alloc/clz.c
index 2ec873e..3488975 100644
--- a/vm/alloc/clz.c
+++ b/vm/alloc/clz.c
@@ -47,4 +47,3 @@
     return e;
 #endif
 }
-
diff --git a/vm/analysis/CodeVerify.c b/vm/analysis/CodeVerify.c
index 7b5f2fb..4310a06 100644
--- a/vm/analysis/CodeVerify.c
+++ b/vm/analysis/CodeVerify.c
@@ -123,9 +123,9 @@
     VerifyError* pFailure);
 static void verifyRegisterType(const RegType* insnRegs, const int insnRegCount,\
     u4 vsrc, RegType checkType, VerifyError* pFailure);
-static bool doCodeVerification(Method* meth, InsnFlags* insnFlags,\
+static bool doCodeVerification(const Method* meth, InsnFlags* insnFlags,\
     RegisterTable* regTable, UninitInstanceMap* uninitMap);
-static bool verifyInstruction(Method* meth, InsnFlags* insnFlags,\
+static bool verifyInstruction(const Method* meth, InsnFlags* insnFlags,\
     RegisterTable* regTable, RegType* workRegs, int insnIdx,
     UninitInstanceMap* uninitMap, int* pStartGuess);
 static ClassObject* findCommonSuperclass(ClassObject* c1, ClassObject* c2);
@@ -2936,12 +2936,9 @@
  * The verifier explicitly locks out breakpoint activity, so there should
  * be no clashes with the debugger.
  *
- * IMPORTANT: this may replace meth->insns with a pointer to a new copy of
- * the instructions.
- *
  * Returns "true" on success.
  */
-static bool replaceFailingInstruction(Method* meth, InsnFlags* insnFlags,
+static bool replaceFailingInstruction(const Method* meth, InsnFlags* insnFlags,
     int insnIdx, VerifyError failure)
 {
     VerifyErrorRefType refType;
@@ -3062,7 +3059,7 @@
  * that the feature isn't disabled when verification is turned off.  At
  * some point we may need to revisit this choice.
  */
-static void replaceVolatileInstruction(Method* meth, InsnFlags* insnFlags,
+static void replaceVolatileInstruction(const Method* meth, InsnFlags* insnFlags,
     int insnIdx)
 {
     u2* oldInsns = (u2*)meth->insns + insnIdx;
@@ -3102,11 +3099,11 @@
 /*
  * Entry point for the detailed code-flow analysis.
  */
-bool dvmVerifyCodeFlow(Method* meth, InsnFlags* insnFlags,
-    UninitInstanceMap* uninitMap)
+bool dvmVerifyCodeFlow(VerifierData* vdata)
 {
     bool result = false;
-    const int insnsSize = dvmGetMethodInsnsSize(meth);
+    const Method* meth = vdata->method;
+    const int insnsSize = vdata->insnsSize;
     const bool generateRegisterMap = gDvm.generateRegisterMaps;
     RegisterTable regTable;
 
@@ -3150,37 +3147,32 @@
      * also going to create the register map, we need to retain the
      * register lists for a larger set of addresses.
      */
-    if (!initRegisterTable(meth, insnFlags, &regTable,
+    if (!initRegisterTable(meth, vdata->insnFlags, &regTable,
             generateRegisterMap ? kTrackRegsGcPoints : kTrackRegsBranches))
         goto bail;
 
+    vdata->addrRegs = NULL;     /* don't set this until we need it */
+
     /*
      * Initialize the types of the registers that correspond to the
      * method arguments.  We can determine this from the method signature.
      */
-    if (!setTypesFromSignature(meth, regTable.addrRegs[0], uninitMap))
+    if (!setTypesFromSignature(meth, regTable.addrRegs[0], vdata->uninitMap))
         goto bail;
 
     /*
      * Run the verifier.
      */
-    if (!doCodeVerification(meth, insnFlags, &regTable, uninitMap))
+    if (!doCodeVerification(meth, vdata->insnFlags, &regTable, vdata->uninitMap))
         goto bail;
 
     /*
      * Generate a register map.
      */
     if (generateRegisterMap) {
-        RegisterMap* pMap;
-        VerifierData vd;
+        vdata->addrRegs = regTable.addrRegs;
 
-        vd.method = meth;
-        vd.insnsSize = insnsSize;
-        vd.insnRegCount = meth->registersSize;
-        vd.insnFlags = insnFlags;
-        vd.addrRegs = regTable.addrRegs;
-        
-        pMap = dvmGenerateRegisterMapV(&vd);
+        RegisterMap* pMap = dvmGenerateRegisterMapV(vdata);
         if (pMap != NULL) {
             /*
              * Tuck it into the Method struct.  It will either get used
@@ -3253,7 +3245,7 @@
  * instruction if a register contains an uninitialized instance created
  * by that same instrutcion.
  */
-static bool doCodeVerification(Method* meth, InsnFlags* insnFlags,
+static bool doCodeVerification(const Method* meth, InsnFlags* insnFlags,
     RegisterTable* regTable, UninitInstanceMap* uninitMap)
 {
     const int insnsSize = dvmGetMethodInsnsSize(meth);
@@ -3487,7 +3479,7 @@
  * This may alter meth->insns if we need to replace an instruction with
  * throw-verification-error.
  */
-static bool verifyInstruction(Method* meth, InsnFlags* insnFlags,
+static bool verifyInstruction(const Method* meth, InsnFlags* insnFlags,
     RegisterTable* regTable, RegType* workRegs, int insnIdx,
     UninitInstanceMap* uninitMap, int* pStartGuess)
 {
@@ -3506,13 +3498,12 @@
      *     and switch statements.
      * (3) Exception handlers.  Applies to any instruction that can
      *     throw an exception that is handled by an encompassing "try"
-     *     block.  (We simplify this to be any instruction that can
-     *     throw any exception.)
+     *     block.
      *
      * We can also return, in which case there is no successor instruction
      * from this point.
      *
-     * The behavior can be determined from the InstrFlags.
+     * The behavior can be determined from the InstructionFlags.
      */
 
     const DexFile* pDexFile = meth->clazz->pDvmDex->pDexFile;
@@ -4468,6 +4459,7 @@
         break;
 
     case OP_IGET:
+    case OP_IGET_VOLATILE:
         tmpType = kRegTypeInteger;
         goto iget_1nr_common;
     case OP_IGET_BOOLEAN:
@@ -4557,6 +4549,7 @@
         }
         break;
     case OP_IGET_OBJECT:
+    case OP_IGET_OBJECT_VOLATILE:
         {
             ClassObject* fieldClass;
             InstField* instField;
@@ -4586,6 +4579,7 @@
         }
         break;
     case OP_IPUT:
+    case OP_IPUT_VOLATILE:
         tmpType = kRegTypeInteger;
         goto iput_1nr_common;
     case OP_IPUT_BOOLEAN:
@@ -4696,6 +4690,7 @@
         }
         break;
     case OP_IPUT_OBJECT:
+    case OP_IPUT_OBJECT_VOLATILE:
         {
             ClassObject* fieldClass;
             ClassObject* valueClass;
@@ -4757,6 +4752,7 @@
         break;
 
     case OP_SGET:
+    case OP_SGET_VOLATILE:
         tmpType = kRegTypeInteger;
         goto sget_1nr_common;
     case OP_SGET_BOOLEAN:
@@ -4840,6 +4836,7 @@
         }
         break;
     case OP_SGET_OBJECT:
+    case OP_SGET_OBJECT_VOLATILE:
         {
             StaticField* staticField;
             ClassObject* fieldClass;
@@ -4864,6 +4861,7 @@
         }
         break;
     case OP_SPUT:
+    case OP_SPUT_VOLATILE:
         tmpType = kRegTypeInteger;
         goto sput_1nr_common;
     case OP_SPUT_BOOLEAN:
@@ -4967,6 +4965,7 @@
         }
         break;
     case OP_SPUT_OBJECT:
+    case OP_SPUT_OBJECT_VOLATILE:
         {
             ClassObject* fieldClass;
             ClassObject* valueClass;
@@ -5506,16 +5505,8 @@
     case OP_UNUSED_73:
     case OP_UNUSED_79:
     case OP_UNUSED_7A:
-    case OP_UNUSED_E3:
-    case OP_UNUSED_E4:
-    case OP_UNUSED_E5:
-    case OP_UNUSED_E6:
-    case OP_UNUSED_E7:
     case OP_BREAKPOINT:
     case OP_UNUSED_F1:
-    case OP_UNUSED_FC:
-    case OP_UNUSED_FD:
-    case OP_UNUSED_FE:
     case OP_UNUSED_FF:
         failure = VERIFY_ERROR_GENERIC;
         break;
@@ -5832,4 +5823,3 @@
                 NULL, logLocalsCb, &addr);
     }
 }
-
diff --git a/vm/analysis/CodeVerify.h b/vm/analysis/CodeVerify.h
index 1b93655..a7ddc95 100644
--- a/vm/analysis/CodeVerify.h
+++ b/vm/analysis/CodeVerify.h
@@ -106,7 +106,65 @@
  */
 typedef u4 RegType;
 
-/* table with merge logic for primitive types */
+/*
+ * Table that maps uninitialized instances to classes, based on the
+ * address of the new-instance instruction.
+ */
+typedef struct UninitInstanceMap {
+    int numEntries;
+    struct {
+        int             addr;   /* code offset, or -1 for method arg ("this") */
+        ClassObject*    clazz;  /* class created at this address */
+    } map[1];
+} UninitInstanceMap;
+#define kUninitThisArgAddr  (-1)
+#define kUninitThisArgSlot  0
+
+/*
+ * Various bits of data generated by the verifier, wrapped up in a package
+ * for ease of use by the register map generator.
+ */
+typedef struct VerifierData {
+    /*
+     * The method we're working on.
+     */
+    const Method*   method;
+
+    /*
+     * Number of code units of instructions in the method.  A cache of the
+     * value calculated by dvmGetMethodInsnsSize().
+     */
+    u4              insnsSize;
+
+    /*
+     * Number of registers we track for each instruction.  This is equal
+     * to the method's declared "registersSize".  (Does not include the
+     * pending return value.)
+     */
+    u4              insnRegCount;
+
+    /*
+     * Instruction widths and flags, one entry per code unit.
+     */
+    InsnFlags*      insnFlags;
+
+    /*
+     * Uninitialized instance map, used for tracking the movement of
+     * objects that have been allocated but not initialized.
+     */
+    UninitInstanceMap* uninitMap;
+
+    /*
+     * Array of SRegType arrays, one entry per code unit.  We only need
+     * entries for code units that hold the start of an "interesting"
+     * instruction.  For register map generation, we're only interested
+     * in GC points.
+     */
+    RegType**       addrRegs;
+} VerifierData;
+
+
+/* table with static merge logic for primitive types */
 extern const char gDvmMergeTab[kRegTypeMAX][kRegTypeMAX];
 
 
@@ -209,20 +267,6 @@
 
 
 /*
- * Table that maps uninitialized instances to classes, based on the
- * address of the new-instance instruction.
- */
-typedef struct UninitInstanceMap {
-    int numEntries;
-    struct {
-        int             addr;   /* code offset, or -1 for method arg ("this") */
-        ClassObject*    clazz;  /* class created at this address */
-    } map[1];
-} UninitInstanceMap;
-#define kUninitThisArgAddr  (-1)
-#define kUninitThisArgSlot  0
-
-/*
  * Create a new UninitInstanceMap.
  */
 UninitInstanceMap* dvmCreateUninitInstanceMap(const Method* meth,
@@ -239,7 +283,7 @@
  * different class is already associated with the address (shouldn't
  * happen either).
  */
-//int dvmSetUninitInstance(UninitInstanceMap* uninitMap, int addr, 
+//int dvmSetUninitInstance(UninitInstanceMap* uninitMap, int addr,
 //    ClassObject* clazz);
 
 /*
@@ -259,7 +303,6 @@
  * Verify bytecode in "meth".  "insnFlags" should be populated with
  * instruction widths and "in try" flags.
  */
-bool dvmVerifyCodeFlow(Method* meth, InsnFlags* insnFlags,
-    UninitInstanceMap* uninitMap);
+bool dvmVerifyCodeFlow(VerifierData* vdata);
 
 #endif /*_DALVIK_CODEVERIFY*/
diff --git a/vm/analysis/DexPrepare.c b/vm/analysis/DexPrepare.c
index 3cba906..2bf33a3 100644
--- a/vm/analysis/DexPrepare.c
+++ b/vm/analysis/DexPrepare.c
@@ -943,7 +943,7 @@
             LOGD("DexOpt: not verifying '%s': multiple definitions\n",
                 classDescriptor);
         } else {
-            if (dvmVerifyClass(clazz, VERIFY_DEFAULT)) {
+            if (dvmVerifyClass(clazz)) {
                 /*
                  * Set the "is preverified" flag in the DexClassDef.  We
                  * do it here, rather than in the ClassObject structure,
@@ -951,8 +951,7 @@
                  */
                 assert((clazz->accessFlags & JAVA_FLAGS_MASK) ==
                     pClassDef->accessFlags);
-                ((DexClassDef*)pClassDef)->accessFlags |=
-                    CLASS_ISPREVERIFIED;
+                ((DexClassDef*)pClassDef)->accessFlags |= CLASS_ISPREVERIFIED;
                 verified = true;
             } else {
                 // TODO: log when in verbose mode
@@ -1031,7 +1030,7 @@
  * If this changes, update DEX_OPT_MAGIC_VERS.
  */
 static const size_t kMinDepSize = 4 * 4;
-static const size_t kMaxDepSize = 4 * 4 + 1024;     // sanity check
+static const size_t kMaxDepSize = 4 * 4 + 2048;     // sanity check
 
 /*
  * Read the "opt" header, verify it, then read the dependencies section
@@ -1441,4 +1440,3 @@
     adler = adler32(adler, addr + nonSum, len - nonSum);
     pHeader->checksum = adler;
 }
-
diff --git a/vm/analysis/DexVerify.c b/vm/analysis/DexVerify.c
index 9309a11..b934481 100644
--- a/vm/analysis/DexVerify.c
+++ b/vm/analysis/DexVerify.c
@@ -23,9 +23,8 @@
 
 
 /* fwd */
-static bool verifyMethod(Method* meth, int verifyFlags);
-static bool verifyInstructions(const Method* meth, InsnFlags* insnFlags,
-    int verifyFlags);
+static bool verifyMethod(Method* meth);
+static bool verifyInstructions(VerifierData* vdata);
 
 
 /*
@@ -66,7 +65,7 @@
  *
  * Returns "true" on success.
  */
-bool dvmVerifyClass(ClassObject* clazz, int verifyFlags)
+bool dvmVerifyClass(ClassObject* clazz)
 {
     int i;
 
@@ -75,16 +74,14 @@
         return true;
     }
 
-    // TODO - verify class structure in DEX?
-
     for (i = 0; i < clazz->directMethodCount; i++) {
-        if (!verifyMethod(&clazz->directMethods[i], verifyFlags)) {
+        if (!verifyMethod(&clazz->directMethods[i])) {
             LOG_VFY("Verifier rejected class %s\n", clazz->descriptor);
             return false;
         }
     }
     for (i = 0; i < clazz->virtualMethodCount; i++) {
-        if (!verifyMethod(&clazz->virtualMethods[i], verifyFlags)) {
+        if (!verifyMethod(&clazz->virtualMethods[i])) {
             LOG_VFY("Verifier rejected class %s\n", clazz->descriptor);
             return false;
         }
@@ -98,36 +95,53 @@
  * Perform verification on a single method.
  *
  * We do this in three passes:
- *  (1) Walk through all code units, determining instruction lengths.
- *  (2) Do static checks, including branch target and operand validation.
- *  (3) Do structural checks, including data-flow analysis.
+ *  (1) Walk through all code units, determining instruction locations,
+ *      widths, and other characteristics.
+ *  (2) Walk through all code units, performing static checks on
+ *      operands.
+ *  (3) Iterate through the method, checking type safety and looking
+ *      for code flow problems.
  *
  * Some checks may be bypassed depending on the verification mode.  We can't
  * turn this stuff off completely if we want to do "exact" GC.
  *
- * - operands of getfield, putfield, getstatic, putstatic must be valid
- * - operands of method invocation instructions must be valid
- *
+ * TODO: cite source?
+ * Confirmed here:
  * - code array must not be empty
  * - (N/A) code_length must be less than 65536
+ * Confirmed by dvmComputeCodeWidths():
  * - opcode of first instruction begins at index 0
  * - only documented instructions may appear
  * - each instruction follows the last
- * - (below) last byte of last instruction is at (code_length-1)
+ * - last byte of last instruction is at (code_length-1)
  */
-static bool verifyMethod(Method* meth, int verifyFlags)
+static bool verifyMethod(Method* meth)
 {
     bool result = false;
-    UninitInstanceMap* uninitMap = NULL;
-    InsnFlags* insnFlags = NULL;
     int newInstanceCount;
 
     /*
-     * If there aren't any instructions, make sure that's expected, then
-     * exit successfully. Note: meth->insns gets set to a native function
-     * pointer on first call.
+     * Verifier state blob.  Various values will be cached here so we
+     * can avoid expensive lookups and pass fewer arguments around.
      */
-    if (dvmGetMethodInsnsSize(meth) == 0) {
+    VerifierData vdata;
+#if 1   // ndef NDEBUG
+    memset(&vdata, 0x99, sizeof(vdata));
+#endif
+
+    vdata.method = meth;
+    vdata.insnsSize = dvmGetMethodInsnsSize(meth);
+    vdata.insnRegCount = meth->registersSize;
+    vdata.insnFlags = NULL;
+    vdata.uninitMap = NULL;
+
+    /*
+     * If there aren't any instructions, make sure that's expected, then
+     * exit successfully.  Note: for native methods, meth->insns gets set
+     * to a native function pointer on first call, so don't use that as
+     * an indicator.
+     */
+    if (vdata.insnsSize == 0) {
         if (!dvmIsNativeMethod(meth) && !dvmIsAbstractMethod(meth)) {
             LOG_VFY_METH(meth,
                 "VFY: zero-length code in concrete non-native method\n");
@@ -153,9 +167,9 @@
      * TODO: Consider keeping a reusable pre-allocated array sitting
      * around for smaller methods.
      */
-    insnFlags = (InsnFlags*)
+    vdata.insnFlags = (InsnFlags*)
         calloc(dvmGetMethodInsnsSize(meth), sizeof(InsnFlags));
-    if (insnFlags == NULL)
+    if (vdata.insnFlags == NULL)
         goto bail;
 
     /*
@@ -163,26 +177,27 @@
      * Count up the #of occurrences of new-instance instructions while we're
      * at it.
      */
-    if (!dvmComputeCodeWidths(meth, insnFlags, &newInstanceCount))
+    if (!dvmComputeCodeWidths(meth, vdata.insnFlags, &newInstanceCount))
         goto bail;
 
     /*
      * Allocate a map to hold the classes of uninitialized instances.
      */
-    uninitMap = dvmCreateUninitInstanceMap(meth, insnFlags, newInstanceCount);
-    if (uninitMap == NULL)
+    vdata.uninitMap = dvmCreateUninitInstanceMap(meth, vdata.insnFlags,
+        newInstanceCount);
+    if (vdata.uninitMap == NULL)
         goto bail;
 
     /*
      * Set the "in try" flags for all instructions guarded by a "try" block.
      */
-    if (!dvmSetTryFlags(meth, insnFlags))
+    if (!dvmSetTryFlags(meth, vdata.insnFlags))
         goto bail;
 
     /*
      * Perform static instruction verification.
      */
-    if (!verifyInstructions(meth, insnFlags, verifyFlags))
+    if (!verifyInstructions(&vdata))
         goto bail;
 
     /*
@@ -193,7 +208,7 @@
      * analysis, but we still need to verify that nothing actually tries
      * to use a register.
      */
-    if (!dvmVerifyCodeFlow(meth, insnFlags, uninitMap)) {
+    if (!dvmVerifyCodeFlow(&vdata)) {
         //LOGD("+++ %s failed code flow\n", meth->name);
         goto bail;
     }
@@ -202,8 +217,8 @@
     result = true;
 
 bail:
-    dvmFreeUninitInstanceMap(uninitMap);
-    free(insnFlags);
+    dvmFreeUninitInstanceMap(vdata.uninitMap);
+    free(vdata.insnFlags);
     return result;
 }
 
@@ -254,7 +269,7 @@
         LOG_VFY_METH(meth,
             "VFY: invalid array data end: at %d, data offset %d, end %d, "
             "count %d\n",
-            curOffset, offsetToArrayData, 
+            curOffset, offsetToArrayData,
             curOffset + offsetToArrayData + tableSize,
             insnCount);
         return false;
@@ -473,17 +488,18 @@
  * code-flow analysis sometimes has to process the same instruction several
  * times).
  */
-static bool verifyInstructions(const Method* meth, InsnFlags* insnFlags,
-    int verifyFlags)
+static bool verifyInstructions(VerifierData* vdata)
 {
-    const int insnCount = dvmGetMethodInsnsSize(meth);
+    const Method* meth = vdata->method;
+    InsnFlags* insnFlags = vdata->insnFlags;
+    const size_t insnCount = vdata->insnsSize;
     const u2* insns = meth->insns;
     int i;
 
     /* the start of the method is a "branch target" */
     dvmInsnSetBranchTarget(insnFlags, 0, true);
 
-    for (i = 0; i < insnCount; /**/) {
+    for (i = 0; i < (int) insnCount; /**/) {
         /*
          * These types of instructions can be GC points.  To support precise
          * GC, all such instructions must export the PC in the interpreter,
@@ -505,7 +521,7 @@
             int offset = -1;
             bool unused;
             if (dvmGetBranchTarget(meth, insnFlags, i, &offset, &unused)) {
-                if (offset < 0) {
+                if (offset <= 0) {
                     dvmInsnSetGcPoint(insnFlags, i, true);
                 }
             } else {
@@ -655,10 +671,8 @@
         case OP_INVOKE_VIRTUAL_QUICK_RANGE:
         case OP_INVOKE_SUPER_QUICK:
         case OP_INVOKE_SUPER_QUICK_RANGE:
-            if ((verifyFlags & VERIFY_ALLOW_OPT_INSTRS) == 0) {
-                LOG_VFY("VFY: not expecting optimized instructions\n");
-                return false;
-            }
+            LOG_VFY("VFY: not expecting optimized instructions\n");
+            return false;
             break;
 
         default:
@@ -672,7 +686,7 @@
     }
 
     /* make sure the last instruction ends at the end of the insn area */
-    if (i != insnCount) {
+    if (i != (int) insnCount) {
         LOG_VFY_METH(meth,
             "VFY: code did not end when expected (end at %d, count %d)\n",
             i, insnCount);
@@ -681,4 +695,3 @@
 
     return true;
 }
-
diff --git a/vm/analysis/DexVerify.h b/vm/analysis/DexVerify.h
index 9deaad9..ab2af52 100644
--- a/vm/analysis/DexVerify.h
+++ b/vm/analysis/DexVerify.h
@@ -32,30 +32,19 @@
     VERIFY_MODE_ALL
 } DexClassVerifyMode;
 
-/*
- * Bit values for dvmVerifyClass() "verifyFlags" arg.
- *
- * (Verification is currently a prerequisite for optimization, not an
- * after-effect, so we don't currently use VERIFY_ALLOW_OPT_INSTRS.)
- */
-enum {
-    VERIFY_DEFAULT              = 0,
-    VERIFY_ALLOW_OPT_INSTRS     = 1,    // allow instrs emitted by optimizer
-};
-
 bool dvmVerificationStartup(void);
 void dvmVerificationShutdown(void);
 
 /*
- * Perform verification on all classes loaded from this DEX file.  This
- * should be done before optimization.
+ * Perform verification on all classes loaded from this DEX file.  If
+ * enabled, it must happen before optimization.
  */
 bool dvmVerifyAllClasses(DexFile* pDexFile);
 
 /*
  * Verify a single class.
  */
-bool dvmVerifyClass(ClassObject* clazz, int verifyFlags);
+bool dvmVerifyClass(ClassObject* clazz);
 
 /*
  * Release the storage associated with a RegisterMap.
diff --git a/vm/analysis/Optimize.c b/vm/analysis/Optimize.c
index 82d50cd..6703553 100644
--- a/vm/analysis/Optimize.c
+++ b/vm/analysis/Optimize.c
@@ -156,6 +156,8 @@
 /*
  * Optimize instructions in a method.
  *
+ * This does a single pass through the code, examining each instruction.
+ *
  * Returns "true" if all went well, "false" if we bailed out early when
  * something failed.
  */
@@ -253,17 +255,7 @@
             ;
         }
 
-        if (*insns == kPackedSwitchSignature) {
-            width = 4 + insns[1] * 2;
-        } else if (*insns == kSparseSwitchSignature) {
-            width = 2 + insns[1] * 4;
-        } else if (*insns == kArrayDataSignature) {
-            u2 elemWidth = insns[1];
-            u4 len = insns[2] | (((u4)insns[3]) << 16);
-            width = 4 + (elemWidth * len + 1) / 2;
-        } else {
-            width = dexGetInstrWidthAbs(gDvm.instrWidth, inst);
-        }
+        width = dexGetInstrOrTableWidthAbs(gDvm.instrWidth, insns);
         assert(width > 0);
 
         insns += width;
@@ -976,4 +968,3 @@
 
     return false;
 }
-
diff --git a/vm/analysis/ReduceConstants.c b/vm/analysis/ReduceConstants.c
index 308db87..69657e3 100644
--- a/vm/analysis/ReduceConstants.c
+++ b/vm/analysis/ReduceConstants.c
@@ -189,7 +189,7 @@
 */
 /*
 Output Formats
- 
+
 There are two possible output formats, from which we choose based on how
 we plan to take advantage of the remapped constants.  At most one of these
 will appear in the DEX.
@@ -1057,4 +1057,3 @@
 
     return pIndexMapSet;
 }
-
diff --git a/vm/analysis/RegisterMap.c b/vm/analysis/RegisterMap.c
index 8ab37f0..f7d92cd 100644
--- a/vm/analysis/RegisterMap.c
+++ b/vm/analysis/RegisterMap.c
@@ -224,7 +224,7 @@
      * since we don't count method entry as a GC point.
      */
     gcPointCount = 0;
-    for (i = 0; i < vdata->insnsSize; i++) {
+    for (i = 0; i < (int) vdata->insnsSize; i++) {
         if (dvmInsnIsGcPoint(vdata->insnFlags, i))
             gcPointCount++;
     }
@@ -254,7 +254,7 @@
      * Populate it.
      */
     mapData = pMap->data;
-    for (i = 0; i < vdata->insnsSize; i++) {
+    for (i = 0; i < (int) vdata->insnsSize; i++) {
         if (dvmInsnIsGcPoint(vdata->insnFlags, i)) {
             assert(vdata->addrRegs[i] != NULL);
             if (format == kRegMapFormatCompact8) {
@@ -3270,4 +3270,3 @@
 }
 
 #endif /*#if 0*/
-
diff --git a/vm/analysis/RegisterMap.h b/vm/analysis/RegisterMap.h
index dc17b1d..7897d45 100644
--- a/vm/analysis/RegisterMap.h
+++ b/vm/analysis/RegisterMap.h
@@ -228,50 +228,6 @@
  */
 void dvmFreeRegisterMapBuilder(RegisterMapBuilder* pBuilder);
 
-
-/*
- * Generate the register map for a previously-verified method.
- *
- * Returns a pointer to a newly-allocated RegisterMap.
- */
-//RegisterMap* dvmGenerateRegisterMap(const Method* meth);
-
-/*
- * Various bits of data generated by the verifier, wrapped up in a package
- * for ease of use by the register map generator.
- */
-typedef struct VerifierData {
-    /*
-     * The method we're working on.
-     */
-    const Method* method;
-
-    /*
-     * Number of instructions in the method.
-     */
-    int         insnsSize;
-
-    /*
-     * Number of registers we track for each instruction.  This is equal
-     * to the method's declared "registersSize".  (Does not include the
-     * pending return value.)
-     */
-    int         insnRegCount;
-
-    /*
-     * Instruction widths and flags, one entry per code unit.
-     */
-    InsnFlags*  insnFlags;
-
-    /*
-     * Array of SRegType arrays, one entry per code unit.  We only need
-     * entries for code units that hold the start of an "interesting"
-     * instruction.  For register map generation, we're only interested
-     * in GC points.
-     */
-    RegType**   addrRegs;
-} VerifierData;
-
 /*
  * Generate the register map for a method that has just been verified
  * (i.e. we're doing this as part of verification).
diff --git a/vm/analysis/VerifySubs.c b/vm/analysis/VerifySubs.c
index 16f128e..2285aef 100644
--- a/vm/analysis/VerifySubs.c
+++ b/vm/analysis/VerifySubs.c
@@ -32,52 +32,35 @@
  * If "pNewInstanceCount" is not NULL, it will be set to the number of
  * new-instance instructions in the method.
  *
+ * Performs some static checks, notably:
+ * - opcode of first instruction begins at index 0
+ * - only documented instructions may appear
+ * - each instruction follows the last
+ * - last byte of last instruction is at (code_length-1)
+ *
  * Logs an error and returns "false" on failure.
  */
 bool dvmComputeCodeWidths(const Method* meth, InsnFlags* insnFlags,
     int* pNewInstanceCount)
 {
-    const int insnCount = dvmGetMethodInsnsSize(meth);
+    size_t insnCount = dvmGetMethodInsnsSize(meth);
     const u2* insns = meth->insns;
     bool result = false;
     int newInstanceCount = 0;
     int i;
 
 
-    for (i = 0; i < insnCount; /**/) {
-        int width;
-
-        /*
-         * Switch tables and array data tables are identified with
-         * "extended NOP" opcodes.  They contain no executable code,
-         * so we can just skip past them.
-         */
-        if (*insns == kPackedSwitchSignature) {
-            width = 4 + insns[1] * 2;
-        } else if (*insns == kSparseSwitchSignature) {
-            width = 2 + insns[1] * 4;
-        } else if (*insns == kArrayDataSignature) {
-            u4 size = insns[2] | (((u4)insns[3]) << 16);
-            width = 4 + (insns[1] * size + 1) / 2;
-        } else {
-            int instr = *insns & 0xff;
-            width = dexGetInstrWidthAbs(gDvm.instrWidth, instr);
-            if (width == 0) {
-                LOG_VFY_METH(meth,
-                    "VFY: invalid post-opt instruction (0x%x)\n", instr);
-                LOGI("### instr=%d width=%d table=%d\n",
-                    instr, width, dexGetInstrWidthAbs(gDvm.instrWidth, instr));
-                goto bail;
-            }
-            if (width < 0 || width > 5) {
-                LOGE("VFY: bizarre width value %d\n", width);
-                dvmAbort();
-            }
-
-            if (instr == OP_NEW_INSTANCE)
-                newInstanceCount++;
+    for (i = 0; i < (int) insnCount; /**/) {
+        size_t width = dexGetInstrOrTableWidthAbs(gDvm.instrWidth, insns);
+        if (width == 0) {
+            LOG_VFY_METH(meth,
+                "VFY: invalid post-opt instruction (0x%04x)\n", *insns);
+            goto bail;
         }
 
+        if ((*insns & 0xff) == OP_NEW_INSTANCE)
+            newInstanceCount++;
+
         if (width > 65535) {
             LOG_VFY_METH(meth, "VFY: insane width %d\n", width);
             goto bail;
@@ -471,4 +454,3 @@
     else
         return kRegTypeInteger;
 }
-
diff --git a/vm/arch/arm/CallEABI.S b/vm/arch/arm/CallEABI.S
index 9717e3b..e0d4f5c 100644
--- a/vm/arch/arm/CallEABI.S
+++ b/vm/arch/arm/CallEABI.S
@@ -36,7 +36,7 @@
 Function prototype:
 
 void dvmPlatformInvoke(void* pEnv, ClassObject* clazz, int argInfo, int argc,
-    const u4* argv, const char* signature, void* func, JValue* pReturn) 
+    const u4* argv, const char* signature, void* func, JValue* pReturn)
 
 The method we are calling has the form:
 
diff --git a/vm/arch/arm/CallOldABI.S b/vm/arch/arm/CallOldABI.S
index c098218..2463d3c 100644
--- a/vm/arch/arm/CallOldABI.S
+++ b/vm/arch/arm/CallOldABI.S
@@ -30,7 +30,7 @@
 Function prototype:
 
 void dvmPlatformInvoke(void* pEnv, ClassObject* clazz, int argInfo, int argc,
-    const u4* argv, const char* signature, void* func, JValue* pReturn) 
+    const u4* argv, const char* signature, void* func, JValue* pReturn)
 
 The method we are calling has the form:
 
diff --git a/vm/arch/generic/Call.c b/vm/arch/generic/Call.c
index bb0b641..a39b761 100644
--- a/vm/arch/generic/Call.c
+++ b/vm/arch/generic/Call.c
@@ -102,4 +102,3 @@
 
     ffi_call(&cif, FFI_FN(func), pReturn, values);
 }
-
diff --git a/vm/compiler/Compiler.c b/vm/compiler/Compiler.c
index 9b32703..2368dae 100644
--- a/vm/compiler/Compiler.c
+++ b/vm/compiler/Compiler.c
@@ -180,8 +180,13 @@
     cacheflush((intptr_t) gDvmJit.codeCache,
                (intptr_t) gDvmJit.codeCache + templateSize, 0);
 
-    mprotect(gDvmJit.codeCache, gDvmJit.codeCacheSize,
-             PROTECT_CODE_CACHE_ATTRS);
+    int result = mprotect(gDvmJit.codeCache, gDvmJit.codeCacheSize,
+                          PROTECT_CODE_CACHE_ATTRS);
+
+    if (result == -1) {
+        LOGE("Failed to remove the write permission for the code cache");
+        dvmAbort();
+    }
 
     return true;
 }
diff --git a/vm/compiler/Dataflow.c b/vm/compiler/Dataflow.c
index fe04c67..c5ec123 100644
--- a/vm/compiler/Dataflow.c
+++ b/vm/compiler/Dataflow.c
@@ -17,7 +17,7 @@
 #include "Dalvik.h"
 #include "Dataflow.h"
 #include "Loop.h"
-#include "dexdump/OpCodeNames.h"
+#include "libdex/OpCodeNames.h"
 
 /*
  * Main table containing data flow attributes for each bytecode. The first
@@ -710,19 +710,19 @@
     // E2 OP_USHR_INT_LIT8 vAA, vBB, #+CC
     DF_DA | DF_UB,
 
-    // E3 OP_UNUSED_E3
+    // E3 OP_IGET_VOLATILE
     DF_NOP,
 
-    // E4 OP_UNUSED_E4
+    // E4 OP_IPUT_VOLATILE
     DF_NOP,
 
-    // E5 OP_UNUSED_E5
+    // E5 OP_SGET_VOLATILE
     DF_NOP,
 
-    // E6 OP_UNUSED_E6
+    // E6 OP_SPUT_VOLATILE
     DF_NOP,
 
-    // E7 OP_UNUSED_E7
+    // E7 OP_IGET_OBJECT_VOLATILE
     DF_NOP,
 
     // E8 OP_IGET_WIDE_VOLATILE
@@ -785,13 +785,13 @@
     // FB OP_INVOKE_SUPER_QUICK_RANGE
     DF_FORMAT_3RC,
 
-    // FC OP_UNUSED_FC
+    // FC OP_IPUT_OBJECT_VOLATILE
     DF_NOP,
 
-    // FD OP_UNUSED_FD
+    // FD OP_SGET_OBJECT_VOLATILE
     DF_NOP,
 
-    // FE OP_UNUSED_FE
+    // FE OP_SPUT_OBJECT_VOLATILE
     DF_NOP,
 
     // FF OP_UNUSED_FF
@@ -826,7 +826,7 @@
     char *ret;
 
     buffer[0] = 0;
-    strcpy(buffer, getOpcodeName(opcode));
+    strcpy(buffer, dexGetOpcodeName(opcode));
 
     if (dfAttributes & DF_FORMAT_35C) {
         unsigned int i;
diff --git a/vm/compiler/Loop.c b/vm/compiler/Loop.c
index 0ceaa9f..53daf17 100644
--- a/vm/compiler/Loop.c
+++ b/vm/compiler/Loop.c
@@ -86,6 +86,8 @@
 
 }
 
+#if 0
+/* Debugging routines */
 static void dumpConstants(CompilationUnit *cUnit)
 {
     int i;
@@ -126,6 +128,31 @@
     }
 }
 
+static void dumpHoistedChecks(CompilationUnit *cUnit)
+{
+    LoopAnalysis *loopAnalysis = cUnit->loopAnalysis;
+    unsigned int i;
+
+    for (i = 0; i < loopAnalysis->arrayAccessInfo->numUsed; i++) {
+        ArrayAccessInfo *arrayAccessInfo =
+            GET_ELEM_N(loopAnalysis->arrayAccessInfo,
+                       ArrayAccessInfo*, i);
+        int arrayReg = DECODE_REG(
+            dvmConvertSSARegToDalvik(cUnit, arrayAccessInfo->arrayReg));
+        int idxReg = DECODE_REG(
+            dvmConvertSSARegToDalvik(cUnit, arrayAccessInfo->ivReg));
+        LOGE("Array access %d", i);
+        LOGE("  arrayReg %d", arrayReg);
+        LOGE("  idxReg %d", idxReg);
+        LOGE("  endReg %d", loopAnalysis->endConditionReg);
+        LOGE("  maxC %d", arrayAccessInfo->maxC);
+        LOGE("  minC %d", arrayAccessInfo->minC);
+        LOGE("  opcode %d", loopAnalysis->loopBranchOpcode);
+    }
+}
+
+#endif
+
 /*
  * A loop is considered optimizable if:
  * 1) It has one basic induction variable
@@ -347,29 +374,6 @@
     return !loopBodyCanThrow;
 }
 
-static void dumpHoistedChecks(CompilationUnit *cUnit)
-{
-    LoopAnalysis *loopAnalysis = cUnit->loopAnalysis;
-    unsigned int i;
-
-    for (i = 0; i < loopAnalysis->arrayAccessInfo->numUsed; i++) {
-        ArrayAccessInfo *arrayAccessInfo =
-            GET_ELEM_N(loopAnalysis->arrayAccessInfo,
-                       ArrayAccessInfo*, i);
-        int arrayReg = DECODE_REG(
-            dvmConvertSSARegToDalvik(cUnit, arrayAccessInfo->arrayReg));
-        int idxReg = DECODE_REG(
-            dvmConvertSSARegToDalvik(cUnit, arrayAccessInfo->ivReg));
-        LOGE("Array access %d", i);
-        LOGE("  arrayReg %d", arrayReg);
-        LOGE("  idxReg %d", idxReg);
-        LOGE("  endReg %d", loopAnalysis->endConditionReg);
-        LOGE("  maxC %d", arrayAccessInfo->maxC);
-        LOGE("  minC %d", arrayAccessInfo->minC);
-        LOGE("  opcode %d", loopAnalysis->loopBranchOpcode);
-    }
-}
-
 static void genHoistedChecks(CompilationUnit *cUnit)
 {
     unsigned int i;
diff --git a/vm/compiler/codegen/arm/ArchUtility.c b/vm/compiler/codegen/arm/ArchUtility.c
index 31e7c0b..4e0df28 100644
--- a/vm/compiler/codegen/arm/ArchUtility.c
+++ b/vm/compiler/codegen/arm/ArchUtility.c
@@ -15,7 +15,7 @@
  */
 
 #include "../../CompilerInternals.h"
-#include "dexdump/OpCodeNames.h"
+#include "libdex/OpCodeNames.h"
 #include "ArmLIR.h"
 
 /* Decode and print a ARM register name */
diff --git a/vm/compiler/codegen/arm/Assemble.c b/vm/compiler/codegen/arm/Assemble.c
index abc07c8..05c4a0e 100644
--- a/vm/compiler/codegen/arm/Assemble.c
+++ b/vm/compiler/codegen/arm/Assemble.c
@@ -16,7 +16,7 @@
 
 #include "Dalvik.h"
 #include "libdex/OpCode.h"
-#include "dexdump/OpCodeNames.h"
+#include "libdex/OpCodeNames.h"
 
 #include "../../CompilerInternals.h"
 #include "ArmLIR.h"
@@ -487,19 +487,19 @@
     ENCODING_MAP(kThumb2StrRRI12,       0xf8c00000,
                  kFmtBitBlt, 15, 12, kFmtBitBlt, 19, 16, kFmtBitBlt, 11, 0,
                  kFmtUnused, -1, -1, IS_TERTIARY_OP | REG_USE01 | IS_STORE,
-                 "str", "r!0d,[r!1d, #!2d", 2),
+                 "str", "r!0d, [r!1d, #!2d]", 2),
     ENCODING_MAP(kThumb2LdrRRI12,       0xf8d00000,
                  kFmtBitBlt, 15, 12, kFmtBitBlt, 19, 16, kFmtBitBlt, 11, 0,
                  kFmtUnused, -1, -1, IS_TERTIARY_OP | REG_DEF0_USE1 | IS_LOAD,
-                 "ldr", "r!0d,[r!1d, #!2d", 2),
+                 "ldr", "r!0d, [r!1d, #!2d]", 2),
     ENCODING_MAP(kThumb2StrRRI8Predec,       0xf8400c00,
                  kFmtBitBlt, 15, 12, kFmtBitBlt, 19, 16, kFmtBitBlt, 8, 0,
                  kFmtUnused, -1, -1, IS_TERTIARY_OP | REG_USE01 | IS_STORE,
-                 "str", "r!0d,[r!1d, #-!2d]", 2),
+                 "str", "r!0d, [r!1d, #-!2d]", 2),
     ENCODING_MAP(kThumb2LdrRRI8Predec,       0xf8500c00,
                  kFmtBitBlt, 15, 12, kFmtBitBlt, 19, 16, kFmtBitBlt, 8, 0,
                  kFmtUnused, -1, -1, IS_TERTIARY_OP | REG_DEF0_USE1 | IS_LOAD,
-                 "ldr", "r!0d,[r!1d, #-!2d]", 2),
+                 "ldr", "r!0d, [r!1d, #-!2d]", 2),
     ENCODING_MAP(kThumb2Cbnz,       0xb900, /* Note: does not affect flags */
                  kFmtBitBlt, 2, 0, kFmtImm6, -1, -1, kFmtUnused, -1, -1,
                  kFmtUnused, -1, -1, IS_BINARY_OP | REG_USE0 | IS_BRANCH,
@@ -580,59 +580,59 @@
     ENCODING_MAP(kThumb2LdrRRR,    0xf8500000,
                  kFmtBitBlt, 15, 12, kFmtBitBlt, 19, 16, kFmtBitBlt, 3, 0,
                  kFmtBitBlt, 5, 4, IS_QUAD_OP | REG_DEF0_USE12 | IS_LOAD,
-                 "ldr", "r!0d,[r!1d, r!2d, LSL #!3d]", 2),
+                 "ldr", "r!0d, [r!1d, r!2d, LSL #!3d]", 2),
     ENCODING_MAP(kThumb2LdrhRRR,    0xf8300000,
                  kFmtBitBlt, 15, 12, kFmtBitBlt, 19, 16, kFmtBitBlt, 3, 0,
                  kFmtBitBlt, 5, 4, IS_QUAD_OP | REG_DEF0_USE12 | IS_LOAD,
-                 "ldrh", "r!0d,[r!1d, r!2d, LSL #!3d]", 2),
+                 "ldrh", "r!0d, [r!1d, r!2d, LSL #!3d]", 2),
     ENCODING_MAP(kThumb2LdrshRRR,    0xf9300000,
                  kFmtBitBlt, 15, 12, kFmtBitBlt, 19, 16, kFmtBitBlt, 3, 0,
                  kFmtBitBlt, 5, 4, IS_QUAD_OP | REG_DEF0_USE12 | IS_LOAD,
-                 "ldrsh", "r!0d,[r!1d, r!2d, LSL #!3d]", 2),
+                 "ldrsh", "r!0d, [r!1d, r!2d, LSL #!3d]", 2),
     ENCODING_MAP(kThumb2LdrbRRR,    0xf8100000,
                  kFmtBitBlt, 15, 12, kFmtBitBlt, 19, 16, kFmtBitBlt, 3, 0,
                  kFmtBitBlt, 5, 4, IS_QUAD_OP | REG_DEF0_USE12 | IS_LOAD,
-                 "ldrb", "r!0d,[r!1d, r!2d, LSL #!3d]", 2),
+                 "ldrb", "r!0d, [r!1d, r!2d, LSL #!3d]", 2),
     ENCODING_MAP(kThumb2LdrsbRRR,    0xf9100000,
                  kFmtBitBlt, 15, 12, kFmtBitBlt, 19, 16, kFmtBitBlt, 3, 0,
                  kFmtBitBlt, 5, 4, IS_QUAD_OP | REG_DEF0_USE12 | IS_LOAD,
-                 "ldrsb", "r!0d,[r!1d, r!2d, LSL #!3d]", 2),
+                 "ldrsb", "r!0d, [r!1d, r!2d, LSL #!3d]", 2),
     ENCODING_MAP(kThumb2StrRRR,    0xf8400000,
                  kFmtBitBlt, 15, 12, kFmtBitBlt, 19, 16, kFmtBitBlt, 3, 0,
                  kFmtBitBlt, 5, 4, IS_QUAD_OP | REG_USE012 | IS_STORE,
-                 "str", "r!0d,[r!1d, r!2d, LSL #!3d]", 2),
+                 "str", "r!0d, [r!1d, r!2d, LSL #!3d]", 2),
     ENCODING_MAP(kThumb2StrhRRR,    0xf8200000,
                  kFmtBitBlt, 15, 12, kFmtBitBlt, 19, 16, kFmtBitBlt, 3, 0,
                  kFmtBitBlt, 5, 4, IS_QUAD_OP | REG_USE012 | IS_STORE,
-                 "strh", "r!0d,[r!1d, r!2d, LSL #!3d]", 2),
+                 "strh", "r!0d, [r!1d, r!2d, LSL #!3d]", 2),
     ENCODING_MAP(kThumb2StrbRRR,    0xf8000000,
                  kFmtBitBlt, 15, 12, kFmtBitBlt, 19, 16, kFmtBitBlt, 3, 0,
                  kFmtBitBlt, 5, 4, IS_QUAD_OP | REG_USE012 | IS_STORE,
-                 "strb", "r!0d,[r!1d, r!2d, LSL #!3d]", 2),
+                 "strb", "r!0d, [r!1d, r!2d, LSL #!3d]", 2),
     ENCODING_MAP(kThumb2LdrhRRI12,       0xf8b00000,
                  kFmtBitBlt, 15, 12, kFmtBitBlt, 19, 16, kFmtBitBlt, 11, 0,
                  kFmtUnused, -1, -1, IS_TERTIARY_OP | REG_DEF0_USE1 | IS_LOAD,
-                 "ldrh", "r!0d,[r!1d, #!2d]", 2),
+                 "ldrh", "r!0d, [r!1d, #!2d]", 2),
     ENCODING_MAP(kThumb2LdrshRRI12,       0xf9b00000,
                  kFmtBitBlt, 15, 12, kFmtBitBlt, 19, 16, kFmtBitBlt, 11, 0,
                  kFmtUnused, -1, -1, IS_TERTIARY_OP | REG_DEF0_USE1 | IS_LOAD,
-                 "ldrsh", "r!0d,[r!1d, #!2d]", 2),
+                 "ldrsh", "r!0d, [r!1d, #!2d]", 2),
     ENCODING_MAP(kThumb2LdrbRRI12,       0xf8900000,
                  kFmtBitBlt, 15, 12, kFmtBitBlt, 19, 16, kFmtBitBlt, 11, 0,
                  kFmtUnused, -1, -1, IS_TERTIARY_OP | REG_DEF0_USE1 | IS_LOAD,
-                 "ldrb", "r!0d,[r!1d, #!2d]", 2),
+                 "ldrb", "r!0d, [r!1d, #!2d]", 2),
     ENCODING_MAP(kThumb2LdrsbRRI12,       0xf9900000,
                  kFmtBitBlt, 15, 12, kFmtBitBlt, 19, 16, kFmtBitBlt, 11, 0,
                  kFmtUnused, -1, -1, IS_TERTIARY_OP | REG_DEF0_USE1 | IS_LOAD,
-                 "ldrsb", "r!0d,[r!1d, #!2d]", 2),
+                 "ldrsb", "r!0d, [r!1d, #!2d]", 2),
     ENCODING_MAP(kThumb2StrhRRI12,       0xf8a00000,
                  kFmtBitBlt, 15, 12, kFmtBitBlt, 19, 16, kFmtBitBlt, 11, 0,
                  kFmtUnused, -1, -1, IS_TERTIARY_OP | REG_USE01 | IS_STORE,
-                 "strh", "r!0d,[r!1d, #!2d]", 2),
+                 "strh", "r!0d, [r!1d, #!2d]", 2),
     ENCODING_MAP(kThumb2StrbRRI12,       0xf8800000,
                  kFmtBitBlt, 15, 12, kFmtBitBlt, 19, 16, kFmtBitBlt, 11, 0,
                  kFmtUnused, -1, -1, IS_TERTIARY_OP | REG_USE01 | IS_STORE,
-                 "strb", "r!0d,[r!1d, #!2d]", 2),
+                 "strb", "r!0d, [r!1d, #!2d]", 2),
     ENCODING_MAP(kThumb2Pop,           0xe8bd0000,
                  kFmtBitBlt, 15, 0, kFmtUnused, -1, -1, kFmtUnused, -1, -1,
                  kFmtUnused, -1, -1,
@@ -785,7 +785,7 @@
                  kFmtBitBlt, 15, 12, kFmtBitBlt, 11, 0, kFmtUnused, -1, -1,
                  kFmtUnused, -1, -1,
                  IS_TERTIARY_OP | REG_DEF0 | REG_USE_PC | IS_LOAD,
-                 "ldr", "r!0d,[rpc, #!1d]", 2),
+                 "ldr", "r!0d, [rpc, #!1d]", 2),
     ENCODING_MAP(kThumb2BCond,        0xf0008000,
                  kFmtBrOffset, -1, -1, kFmtBitBlt, 25, 22, kFmtUnused, -1, -1,
                  kFmtUnused, -1, -1,
@@ -852,7 +852,7 @@
     ENCODING_MAP(kThumb2Ldrex,       0xe8500f00,
                  kFmtBitBlt, 15, 12, kFmtBitBlt, 19, 16, kFmtBitBlt, 7, 0,
                  kFmtUnused, -1, -1, IS_TERTIARY_OP | REG_DEF0_USE1 | IS_LOAD,
-                 "ldrex", "r!0d,[r!1d, #!2E]", 2),
+                 "ldrex", "r!0d, [r!1d, #!2E]", 2),
     ENCODING_MAP(kThumb2Strex,       0xe8400000,
                  kFmtBitBlt, 11, 8, kFmtBitBlt, 15, 12, kFmtBitBlt, 19, 16,
                  kFmtBitBlt, 7, 0, IS_QUAD_OP | REG_DEF0_USE12 | IS_STORE,
@@ -1453,7 +1453,7 @@
          * The update order matters - make sure clazz is updated last since it
          * will bring the uninitialized chaining cell to life.
          */
-        MEM_BARRIER();
+        ANDROID_MEMBAR_FULL();
         cellAddr->clazz = newContent->clazz;
         cacheflush((intptr_t) cellAddr, (intptr_t) (cellAddr+1), 0);
         UPDATE_CODE_CACHE_PATCHES();
diff --git a/vm/compiler/codegen/arm/CalloutHelper.h b/vm/compiler/codegen/arm/CalloutHelper.h
index f6d5f4e..d6eb421 100644
--- a/vm/compiler/codegen/arm/CalloutHelper.h
+++ b/vm/compiler/codegen/arm/CalloutHelper.h
@@ -80,9 +80,12 @@
 bool dvmInterpHandleFillArrayData(ArrayObject* arrayObject,// OP_FILL_ARRAY_DATA
                                   const u2* arrayData);
 
-/* Switch dispatch offset calculation for OP_PACKED_SWITCH & OP_SPARSE_SWITCH */
-static s8 findPackedSwitchIndex(const u2* switchData, int testVal, int pc);
-static s8 findSparseSwitchIndex(const u2* switchData, int testVal, int pc);
+/*
+ * Switch dispatch offset calculation for OP_PACKED_SWITCH & OP_SPARSE_SWITCH
+ * Used in CodegenDriver.c
+ * static s8 findPackedSwitchIndex(const u2* switchData, int testVal, int pc);
+ * static s8 findSparseSwitchIndex(const u2* switchData, int testVal, int pc);
+ */
 
 /*
  * Resolve interface callsites - OP_INVOKE_INTERFACE & OP_INVOKE_INTERFACE_RANGE
diff --git a/vm/compiler/codegen/arm/Codegen.h b/vm/compiler/codegen/arm/Codegen.h
index da65bb5..ca0a843 100644
--- a/vm/compiler/codegen/arm/Codegen.h
+++ b/vm/compiler/codegen/arm/Codegen.h
@@ -25,6 +25,7 @@
 #include "compiler/CompilerIR.h"
 #include "CalloutHelper.h"
 
+#if defined(_CODEGEN_C)
 /*
  * loadConstant() sometimes needs to add a small imm to a pre-existing constant
  */
@@ -44,10 +45,16 @@
 
 static bool genConversionPortable(CompilationUnit *cUnit, MIR *mir);
 
+#if defined(WITH_DEADLOCK_PREDICTION) || defined(WITH_MONITOR_TRACKING) || \
+    defined(__ARM_ARCH_5__)
 static void genMonitorPortable(CompilationUnit *cUnit, MIR *mir);
+#endif
 
 static void genInterpSingleStep(CompilationUnit *cUnit, MIR *mir);
 
+#endif
+
+
 #if defined(WITH_SELF_VERIFICATION)
 /* Self Verification memory instruction decoder */
 void dvmSelfVerificationMemOpDecode(int lr, int* sp);
diff --git a/vm/compiler/codegen/arm/CodegenCommon.c b/vm/compiler/codegen/arm/CodegenCommon.c
index 0cec99d..d8854ba 100644
--- a/vm/compiler/codegen/arm/CodegenCommon.c
+++ b/vm/compiler/codegen/arm/CodegenCommon.c
@@ -256,6 +256,7 @@
     return insn;
 }
 
+#if defined(_ARMV7_A) || defined(_ARMV7_A_NEON)
 static ArmLIR *newLIR4(CompilationUnit *cUnit, ArmOpCode opCode,
                            int dest, int src1, int src2, int info)
 {
@@ -271,6 +272,7 @@
     dvmCompilerAppendLIR(cUnit, (LIR *) insn);
     return insn;
 }
+#endif
 
 /*
  * If the next instruction is a move-result or move-result-long,
diff --git a/vm/compiler/codegen/arm/CodegenDriver.c b/vm/compiler/codegen/arm/CodegenDriver.c
index f625771..3e5126a 100644
--- a/vm/compiler/codegen/arm/CodegenDriver.c
+++ b/vm/compiler/codegen/arm/CodegenDriver.c
@@ -1214,6 +1214,8 @@
     opReg(cUnit, kOpBlx, r2);
 }
 
+#if defined(WITH_DEADLOCK_PREDICTION) || defined(WITH_MONITOR_TRACKING) || \
+    defined(_ARMV5TE) || defined(_ARMV5TE_VFP)
 /*
  * To prevent a thread in a monitor wait from blocking the Jit from
  * resetting the code cache, heavyweight monitor lock will not
@@ -1259,6 +1261,7 @@
         dvmCompilerClobberCallRegs(cUnit);
     }
 }
+#endif
 
 /*
  * The following are the first-level codegen routines that analyze the format
@@ -1277,8 +1280,7 @@
 static bool handleFmt10x(CompilationUnit *cUnit, MIR *mir)
 {
     OpCode dalvikOpCode = mir->dalvikInsn.opCode;
-    if (((dalvikOpCode >= OP_UNUSED_3E) && (dalvikOpCode <= OP_UNUSED_43)) ||
-        ((dalvikOpCode >= OP_UNUSED_E3) && (dalvikOpCode <= OP_UNUSED_E7))) {
+    if ((dalvikOpCode >= OP_UNUSED_3E) && (dalvikOpCode <= OP_UNUSED_43)) {
         LOGE("Codegen: got unused opcode 0x%x\n",dalvikOpCode);
         return true;
     }
@@ -1289,6 +1291,8 @@
         case OP_UNUSED_73:
         case OP_UNUSED_79:
         case OP_UNUSED_7A:
+        case OP_UNUSED_F1:
+        case OP_UNUSED_FF:
             LOGE("Codegen: got unused opcode 0x%x\n",dalvikOpCode);
             return true;
         case OP_NOP:
@@ -3643,6 +3647,16 @@
         labelList[i].operands[0] = blockList[i]->startOffset;
 
         if (blockList[i]->blockType >= kChainingCellGap) {
+            if (blockList[i]->firstMIRInsn != NULL &&
+                ((blockList[i]->firstMIRInsn->dalvikInsn.opCode ==
+                  OP_MOVE_RESULT) ||
+                 (blockList[i]->firstMIRInsn->dalvikInsn.opCode ==
+                  OP_MOVE_RESULT_WIDE) ||
+                 (blockList[i]->firstMIRInsn->dalvikInsn.opCode ==
+                  OP_MOVE_RESULT_OBJECT))) {
+                /* Align this block first since it is a return chaining cell */
+                newLIR0(cUnit, kArmPseudoPseudoAlign4);
+            }
             /*
              * Append the label pseudo LIR first. Chaining cells will be handled
              * separately afterwards.
@@ -3878,7 +3892,7 @@
             if (notHandled) {
                 LOGE("%#06x: Opcode 0x%x (%s) / Fmt %d not handled\n",
                      mir->offset,
-                     dalvikOpCode, getOpcodeName(dalvikOpCode),
+                     dalvikOpCode, dexGetOpcodeName(dalvikOpCode),
                      dalvikFormat);
                 dvmCompilerAbort(cUnit);
                 break;
diff --git a/vm/compiler/codegen/arm/LocalOptimizations.c b/vm/compiler/codegen/arm/LocalOptimizations.c
index 729486c..724fdb7 100644
--- a/vm/compiler/codegen/arm/LocalOptimizations.c
+++ b/vm/compiler/codegen/arm/LocalOptimizations.c
@@ -50,6 +50,8 @@
   return (reg1Lo == reg2Lo) || (reg1Lo == reg2Hi) || (reg1Hi == reg2Lo);
 }
 
+#if 0
+/* Debugging utility routine */
 static void dumpDependentInsnPair(ArmLIR *thisLIR, ArmLIR *checkLIR,
                                   const char *optimization)
 {
@@ -57,6 +59,7 @@
     dvmDumpLIRInsn((LIR *) thisLIR, 0);
     dvmDumpLIRInsn((LIR *) checkLIR, 0);
 }
+#endif
 
 /*
  * Perform a pass of top-down walk to
diff --git a/vm/compiler/codegen/arm/README.txt b/vm/compiler/codegen/arm/README.txt
index 6698ac3..a49eef8 100644
--- a/vm/compiler/codegen/arm/README.txt
+++ b/vm/compiler/codegen/arm/README.txt
@@ -46,4 +46,3 @@
 
 In this way the dependency between generic and specific code tied to
 particular architectures can be explicitly represented.
-
diff --git a/vm/compiler/codegen/arm/RallocUtil.c b/vm/compiler/codegen/arm/RallocUtil.c
index 80ce968..e917995 100644
--- a/vm/compiler/codegen/arm/RallocUtil.c
+++ b/vm/compiler/codegen/arm/RallocUtil.c
@@ -482,6 +482,8 @@
     //TUNING: reduce the set of regs used by handlers.  Only a few need lots.
     dvmCompilerClobberCallRegs(cUnit);
     dvmCompilerClobber(cUnit, r4PC);
+    dvmCompilerClobber(cUnit, r7);
+    dvmCompilerClobber(cUnit, r8);
     dvmCompilerClobber(cUnit, r9);
     dvmCompilerClobber(cUnit, r10);
 }
diff --git a/vm/compiler/codegen/arm/Thumb/Factory.c b/vm/compiler/codegen/arm/Thumb/Factory.c
index 4c010c6..85f612e 100644
--- a/vm/compiler/codegen/arm/Thumb/Factory.c
+++ b/vm/compiler/codegen/arm/Thumb/Factory.c
@@ -23,7 +23,6 @@
  */
 
 static int coreTemps[] = {r0, r1, r2, r3, r4PC, r7};
-static int corePreserved[] = {};
 
 static void storePair(CompilationUnit *cUnit, int base, int lowReg,
                       int highReg);
@@ -569,7 +568,6 @@
     ArmLIR *load2 = NULL;
     ArmOpCode opCode = kThumbBkpt;
     bool shortForm = false;
-    int shortMax = 128;
     int encodedDisp = displacement;
     bool pair = false;
 
@@ -700,7 +698,6 @@
     ArmLIR *store2 = NULL;
     ArmOpCode opCode = kThumbBkpt;
     bool shortForm = false;
-    int shortMax = 128;
     int encodedDisp = displacement;
     bool pair = false;
 
diff --git a/vm/compiler/codegen/arm/Thumb/Gen.c b/vm/compiler/codegen/arm/Thumb/Gen.c
index e014795..37cc18d 100644
--- a/vm/compiler/codegen/arm/Thumb/Gen.c
+++ b/vm/compiler/codegen/arm/Thumb/Gen.c
@@ -112,7 +112,6 @@
 
 void dvmCompilerInitializeRegAlloc(CompilationUnit *cUnit)
 {
-    int i;
     int numTemps = sizeof(coreTemps)/sizeof(int);
     RegisterPool *pool = dvmCompilerNew(sizeof(*pool), true);
     cUnit->regPool = pool;
diff --git a/vm/compiler/codegen/arm/armv5te-vfp/Codegen.c b/vm/compiler/codegen/arm/armv5te-vfp/Codegen.c
index 04bb3a2..eda243f 100644
--- a/vm/compiler/codegen/arm/armv5te-vfp/Codegen.c
+++ b/vm/compiler/codegen/arm/armv5te-vfp/Codegen.c
@@ -13,11 +13,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#define _CODEGEN_C
+#define _ARMV5TE_VFP
 
 #include "Dalvik.h"
 #include "interp/InterpDefs.h"
 #include "libdex/OpCode.h"
-#include "dexdump/OpCodeNames.h"
+#include "libdex/OpCodeNames.h"
 #include "compiler/CompilerInternals.h"
 #include "compiler/codegen/arm/ArmLIR.h"
 #include "mterp/common/FindInterface.h"
diff --git a/vm/compiler/codegen/arm/armv5te/Codegen.c b/vm/compiler/codegen/arm/armv5te/Codegen.c
index 5e53ae4..f953390 100644
--- a/vm/compiler/codegen/arm/armv5te/Codegen.c
+++ b/vm/compiler/codegen/arm/armv5te/Codegen.c
@@ -13,11 +13,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#define _CODEGEN_C
+#define _ARMV5TE
 
 #include "Dalvik.h"
 #include "interp/InterpDefs.h"
 #include "libdex/OpCode.h"
-#include "dexdump/OpCodeNames.h"
+#include "libdex/OpCodeNames.h"
 #include "compiler/CompilerInternals.h"
 #include "compiler/codegen/arm/ArmLIR.h"
 #include "mterp/common/FindInterface.h"
diff --git a/vm/compiler/codegen/arm/armv7-a-neon/Codegen.c b/vm/compiler/codegen/arm/armv7-a-neon/Codegen.c
index baa9632..1edc25b 100644
--- a/vm/compiler/codegen/arm/armv7-a-neon/Codegen.c
+++ b/vm/compiler/codegen/arm/armv7-a-neon/Codegen.c
@@ -13,11 +13,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#define _CODEGEN_C
+#define _ARMV7_A_NEON
 
 #include "Dalvik.h"
 #include "interp/InterpDefs.h"
 #include "libdex/OpCode.h"
-#include "dexdump/OpCodeNames.h"
+#include "libdex/OpCodeNames.h"
 #include "compiler/CompilerInternals.h"
 #include "compiler/codegen/arm/ArmLIR.h"
 #include "mterp/common/FindInterface.h"
diff --git a/vm/compiler/codegen/arm/armv7-a/Codegen.c b/vm/compiler/codegen/arm/armv7-a/Codegen.c
index baa9632..1514d55 100644
--- a/vm/compiler/codegen/arm/armv7-a/Codegen.c
+++ b/vm/compiler/codegen/arm/armv7-a/Codegen.c
@@ -13,11 +13,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#define _CODEGEN_C
+#define _ARMV7_A
 
 #include "Dalvik.h"
 #include "interp/InterpDefs.h"
 #include "libdex/OpCode.h"
-#include "dexdump/OpCodeNames.h"
+#include "libdex/OpCodeNames.h"
 #include "compiler/CompilerInternals.h"
 #include "compiler/codegen/arm/ArmLIR.h"
 #include "mterp/common/FindInterface.h"
diff --git a/vm/compiler/template/armv5te-vfp/TEMPLATE_CMPG_DOUBLE_VFP.S b/vm/compiler/template/armv5te-vfp/TEMPLATE_CMPG_DOUBLE_VFP.S
index 1b143a9..992c894 100644
--- a/vm/compiler/template/armv5te-vfp/TEMPLATE_CMPG_DOUBLE_VFP.S
+++ b/vm/compiler/template/armv5te-vfp/TEMPLATE_CMPG_DOUBLE_VFP.S
@@ -31,4 +31,3 @@
     mvnmi   r0, #0                      @ (less than) r0<- -1
     moveq   r0, #0                      @ (equal) r0<- 0
     bx      lr
-
diff --git a/vm/compiler/template/armv5te/TEMPLATE_CMPL_DOUBLE.S b/vm/compiler/template/armv5te/TEMPLATE_CMPL_DOUBLE.S
index 01772b4..15988f6 100644
--- a/vm/compiler/template/armv5te/TEMPLATE_CMPL_DOUBLE.S
+++ b/vm/compiler/template/armv5te/TEMPLATE_CMPL_DOUBLE.S
@@ -34,4 +34,3 @@
     bxcc    r11
     $naninst                            @ r1<- 1 or -1 for NaN
     bx      r11
-
diff --git a/vm/compiler/template/armv5te/TEMPLATE_CMPL_FLOAT.S b/vm/compiler/template/armv5te/TEMPLATE_CMPL_FLOAT.S
index b63780f..eb1c7e1 100644
--- a/vm/compiler/template/armv5te/TEMPLATE_CMPL_FLOAT.S
+++ b/vm/compiler/template/armv5te/TEMPLATE_CMPL_FLOAT.S
@@ -52,5 +52,3 @@
     bxcc    r11
     $naninst                            @ r1<- 1 or -1 for NaN
     bx      r11
-
-
diff --git a/vm/compiler/template/armv5te/TEMPLATE_CMP_LONG.S b/vm/compiler/template/armv5te/TEMPLATE_CMP_LONG.S
index 5f1e16b..e5e8196 100644
--- a/vm/compiler/template/armv5te/TEMPLATE_CMP_LONG.S
+++ b/vm/compiler/template/armv5te/TEMPLATE_CMP_LONG.S
@@ -31,4 +31,3 @@
 .L${opcode}_greater:
     mov     r0, #1                      @ r0<- 1
     bx      lr
-
diff --git a/vm/compiler/template/armv5te/TEMPLATE_INVOKE_METHOD_CHAIN.S b/vm/compiler/template/armv5te/TEMPLATE_INVOKE_METHOD_CHAIN.S
index 61cdf45..a137d22 100644
--- a/vm/compiler/template/armv5te/TEMPLATE_INVOKE_METHOD_CHAIN.S
+++ b/vm/compiler/template/armv5te/TEMPLATE_INVOKE_METHOD_CHAIN.S
@@ -43,5 +43,3 @@
     str     rFP, [r2, #offThread_curFrame]  @ self->curFrame = newFp
 
     bx      lr                              @ return to the callee-chaining cell
-
-
diff --git a/vm/compiler/template/armv5te/TEMPLATE_INVOKE_METHOD_NATIVE.S b/vm/compiler/template/armv5te/TEMPLATE_INVOKE_METHOD_NATIVE.S
index d452a7f..2557863 100644
--- a/vm/compiler/template/armv5te/TEMPLATE_INVOKE_METHOD_NATIVE.S
+++ b/vm/compiler/template/armv5te/TEMPLATE_INVOKE_METHOD_NATIVE.S
@@ -68,6 +68,3 @@
     mov     r0, #kCallsiteInterpreted
 #endif
     mov     pc, r1
-
-
-
diff --git a/vm/compiler/template/armv5te/TEMPLATE_MONITOR_ENTER.S b/vm/compiler/template/armv5te/TEMPLATE_MONITOR_ENTER.S
index 8d01131..8e7f728 100644
--- a/vm/compiler/template/armv5te/TEMPLATE_MONITOR_ENTER.S
+++ b/vm/compiler/template/armv5te/TEMPLATE_MONITOR_ENTER.S
@@ -23,4 +23,3 @@
     mov     r0, #kHeavyweightMonitor
 #endif
     bx      r2
-
diff --git a/vm/compiler/template/armv5te/TEMPLATE_SHR_LONG.S b/vm/compiler/template/armv5te/TEMPLATE_SHR_LONG.S
index ca7545a..c737840 100644
--- a/vm/compiler/template/armv5te/TEMPLATE_SHR_LONG.S
+++ b/vm/compiler/template/armv5te/TEMPLATE_SHR_LONG.S
@@ -13,4 +13,3 @@
     movpl   r0, r1, asr ip              @  if r2 >= 32, r0<-r1 >> (r2-32)
     mov     r1, r1, asr r2              @  r1<- r1 >> r2
     bx      lr
-
diff --git a/vm/compiler/template/armv5te/TEMPLATE_STRING_COMPARETO.S b/vm/compiler/template/armv5te/TEMPLATE_STRING_COMPARETO.S
index 75b6a90..54bde47 100644
--- a/vm/compiler/template/armv5te/TEMPLATE_STRING_COMPARETO.S
+++ b/vm/compiler/template/armv5te/TEMPLATE_STRING_COMPARETO.S
@@ -131,4 +131,3 @@
 
 .Lmemcmp16:
     .word __memcmp16
-
diff --git a/vm/compiler/template/armv5te/TEMPLATE_STRING_INDEXOF.S b/vm/compiler/template/armv5te/TEMPLATE_STRING_INDEXOF.S
index 84c4880..bdfdf28 100644
--- a/vm/compiler/template/armv5te/TEMPLATE_STRING_INDEXOF.S
+++ b/vm/compiler/template/armv5te/TEMPLATE_STRING_INDEXOF.S
@@ -110,4 +110,3 @@
     sub   r0, r7
     asr   r0, r0, #1
     bx    lr
-
diff --git a/vm/compiler/template/armv5te/TEMPLATE_USHR_LONG.S b/vm/compiler/template/armv5te/TEMPLATE_USHR_LONG.S
index d7c71d9..8a48df2 100644
--- a/vm/compiler/template/armv5te/TEMPLATE_USHR_LONG.S
+++ b/vm/compiler/template/armv5te/TEMPLATE_USHR_LONG.S
@@ -13,4 +13,3 @@
     movpl   r0, r1, lsr ip              @  if r2 >= 32, r0<-r1 >>> (r2-32)
     mov     r1, r1, lsr r2              @  r1<- r1 >>> r2
     bx      lr
-
diff --git a/vm/compiler/template/armv5te/header.S b/vm/compiler/template/armv5te/header.S
index c257105..e6b3362 100644
--- a/vm/compiler/template/armv5te/header.S
+++ b/vm/compiler/template/armv5te/header.S
@@ -93,4 +93,3 @@
  * to expand the macros into assembler assignment statements.
  */
 #include "../../../mterp/common/asm-constants.h"
-
diff --git a/vm/compiler/template/out/CompilerTemplateAsm-armv5te-vfp.S b/vm/compiler/template/out/CompilerTemplateAsm-armv5te-vfp.S
index dc9a324..0823324 100644
--- a/vm/compiler/template/out/CompilerTemplateAsm-armv5te-vfp.S
+++ b/vm/compiler/template/out/CompilerTemplateAsm-armv5te-vfp.S
@@ -1552,4 +1552,3 @@
 dmvCompilerTemplateEnd:
 
 #endif /* WITH_JIT */
-
diff --git a/vm/compiler/template/out/CompilerTemplateAsm-armv5te.S b/vm/compiler/template/out/CompilerTemplateAsm-armv5te.S
index d632d6a..b9a3075 100644
--- a/vm/compiler/template/out/CompilerTemplateAsm-armv5te.S
+++ b/vm/compiler/template/out/CompilerTemplateAsm-armv5te.S
@@ -1280,4 +1280,3 @@
 dmvCompilerTemplateEnd:
 
 #endif /* WITH_JIT */
-
diff --git a/vm/compiler/template/out/CompilerTemplateAsm-armv7-a-neon.S b/vm/compiler/template/out/CompilerTemplateAsm-armv7-a-neon.S
index 0719f07..008c324 100644
--- a/vm/compiler/template/out/CompilerTemplateAsm-armv7-a-neon.S
+++ b/vm/compiler/template/out/CompilerTemplateAsm-armv7-a-neon.S
@@ -1552,4 +1552,3 @@
 dmvCompilerTemplateEnd:
 
 #endif /* WITH_JIT */
-
diff --git a/vm/compiler/template/out/CompilerTemplateAsm-armv7-a.S b/vm/compiler/template/out/CompilerTemplateAsm-armv7-a.S
index 5c26ca2..5441057 100644
--- a/vm/compiler/template/out/CompilerTemplateAsm-armv7-a.S
+++ b/vm/compiler/template/out/CompilerTemplateAsm-armv7-a.S
@@ -1552,4 +1552,3 @@
 dmvCompilerTemplateEnd:
 
 #endif /* WITH_JIT */
-
diff --git a/vm/compiler/template/rebuild.sh b/vm/compiler/template/rebuild.sh
index 78ff84f..8c47dd7 100755
--- a/vm/compiler/template/rebuild.sh
+++ b/vm/compiler/template/rebuild.sh
@@ -20,4 +20,3 @@
 #
 set -e
 for arch in armv5te armv5te-vfp armv7-a armv7-a-neon; do TARGET_ARCH_EXT=$arch make -f Makefile-template; done
-
diff --git a/vm/hprof/Hprof.c b/vm/hprof/Hprof.c
index 8380fd8..0b95aad 100644
--- a/vm/hprof/Hprof.c
+++ b/vm/hprof/Hprof.c
@@ -224,4 +224,3 @@
     free(ctx->fileDataPtr);
     free(ctx);
 }
-
diff --git a/vm/hprof/HprofClass.c b/vm/hprof/HprofClass.c
index 5043beb..f76f159 100644
--- a/vm/hprof/HprofClass.c
+++ b/vm/hprof/HprofClass.c
@@ -74,7 +74,7 @@
 {
     hprof_string_id classNameId;
     char *dotName = dvmDescriptorToDot(descriptor);
-    
+
     /* Hprof suggests that array class names be converted from, e.g.,
      * "[[[I" to "int[][][]" and "[Lorg.blort.Spaz;" to
      * "org.blort.Spaz[]".
@@ -205,7 +205,7 @@
              * ID:     class object ID
              * u4:     stack trace serial number
              * ID:     class name string ID
-             * 
+             *
              * We use the address of the class object structure as its ID.
              */
             hprofAddU4ToRecord(rec, clazz->serialNumber);
diff --git a/vm/hprof/HprofHeap.c b/vm/hprof/HprofHeap.c
index 5a35e77..75a1d2b 100644
--- a/vm/hprof/HprofHeap.c
+++ b/vm/hprof/HprofHeap.c
@@ -231,10 +231,10 @@
     hprof_record_t *rec = &ctx->curRec;
     HprofHeapId desiredHeap;
 
-    desiredHeap = 
+    desiredHeap =
             dvmHeapSourceGetPtrFlag(obj, HS_ALLOCATED_IN_ZYGOTE) ?
             HPROF_HEAP_ZYGOTE : HPROF_HEAP_APP;
-    
+
     if (ctx->objectsInSegment >= OBJECTS_PER_SEGMENT ||
         rec->length >= BYTES_PER_SEGMENT)
     {
@@ -281,24 +281,6 @@
          * gDvm.unlinkedJavaLangClass or it could be an object just
          * allocated which hasn't been initialized yet.
          */
-    } else if (clazz == gDvm.unlinkedJavaLangClass) {
-        /* obj is a ClassObject that hasn't been linked yet.
-         */
-        hprofAddU1ToRecord(rec, HPROF_CLASS_DUMP);
-
-    //TODO: use hprofLookupClassId() for this:
-        hprofAddIdToRecord(rec, (hprof_class_object_id)obj);
-        hprofAddU4ToRecord(rec, stackTraceSerialNumber(obj));
-        hprofAddIdToRecord(rec, (hprof_class_object_id)0); // no super class
-        hprofAddIdToRecord(rec, (hprof_object_id)0);       // no class loader
-        hprofAddIdToRecord(rec, (hprof_object_id)0);       // no signer
-        hprofAddIdToRecord(rec, (hprof_object_id)0);       // no prot domain
-        hprofAddIdToRecord(rec, (hprof_id)0);              // reserved
-        hprofAddIdToRecord(rec, (hprof_id)0);              // reserved
-        hprofAddU4ToRecord(rec, 0);                        // zero instance size
-        hprofAddU2ToRecord(rec, 0);                        // empty const pool
-        hprofAddU2ToRecord(rec, 0);                        // no statics
-        hprofAddU2ToRecord(rec, 0);                        // no instance fields
     } else {
         hprof_class_object_id clazzId;
 
diff --git a/vm/hprof/HprofStack.c b/vm/hprof/HprofStack.c
index 241e01e..04641ef 100644
--- a/vm/hprof/HprofStack.c
+++ b/vm/hprof/HprofStack.c
@@ -171,7 +171,7 @@
         int i;
 
         hprofStartNewRecord(ctx, HPROF_TAG_STACK_TRACE, HPROF_TIME);
-        
+
         stackTraceEntry = (const StackTraceEntry *) dvmHashIterData(&iter);
         assert(stackTraceEntry != NULL);
 
@@ -184,7 +184,7 @@
          */
         hprofAddU4ToRecord(rec, stackTraceEntry->trace.serialNumber);
         hprofAddU4ToRecord(rec, stackTraceEntry->trace.threadSerialNumber);
-        
+
         count = 0;
         while ((count < STACK_DEPTH) &&
                (stackTraceEntry->trace.frameIds[count] != 0)) {
@@ -210,7 +210,7 @@
     Thread* self;
     void* fp;
     int i;
-    
+
     if (objectPtr == NULL) {
         return;
     }
diff --git a/vm/hprof/HprofStackFrame.c b/vm/hprof/HprofStackFrame.c
index b1ade43..f9c789e 100644
--- a/vm/hprof/HprofStackFrame.c
+++ b/vm/hprof/HprofStackFrame.c
@@ -66,7 +66,7 @@
         descriptor = dexProtoGetMethodDescriptor(&method->prototype, &cache);
         hprofLookupStringId(descriptor);
         dexStringCacheRelease(&cache);
-        
+
         const char* sourceFile = dvmGetMethodSourceFile(method);
         if (sourceFile) {
             hprofLookupStringId(sourceFile);
@@ -76,7 +76,7 @@
             hprofLookupClassId(method->clazz);
         }
     }
-    
+
     return 0;
 }
 
@@ -114,7 +114,7 @@
     u4 hash = 0;
     const char *cp = (char *) &stackFrameEntry->frame;
     int i;
-    
+
     for (i = 0; i < (int) sizeof(StackFrame); i++) {
         hash = 31 * hash + cp[i];
     }
@@ -192,12 +192,12 @@
         const char *sourceFile;
         ClassObject *clazz;
         int lineNum;
-        
+
         hprofStartNewRecord(ctx, HPROF_TAG_STACK_FRAME, HPROF_TIME);
-        
+
         stackFrameEntry = (const StackFrameEntry *) dvmHashIterData(&iter);
         assert(stackFrameEntry != NULL);
-        
+
         method = stackFrameEntry->frame.method;
         pc = stackFrameEntry->frame.pc;
         sourceFile = dvmGetMethodSourceFile(method);
diff --git a/vm/hprof/HprofString.c b/vm/hprof/HprofString.c
index 4e14efb..3f697f5 100644
--- a/vm/hprof/HprofString.c
+++ b/vm/hprof/HprofString.c
@@ -102,7 +102,7 @@
              * ID:     ID for this string
              * [u1]*:  UTF8 characters for string (NOT NULL terminated)
              *         (the record format encodes the length)
-             * 
+             *
              * We use the address of the string data as its ID.
              */
             err = hprofAddU4ToRecord(rec, (u4)str);
diff --git a/vm/interp/Interp.c b/vm/interp/Interp.c
index d6c3bc1..da8fa79 100644
--- a/vm/interp/Interp.c
+++ b/vm/interp/Interp.c
@@ -273,7 +273,7 @@
                     *addr, method->clazz->descriptor, method->name,
                     instrOffset);
             } else {
-                MEM_BARRIER();
+                ANDROID_MEMBAR_FULL();
                 dvmDexChangeDex1(method->clazz->pDvmDex, (u1*)addr,
                     OP_BREAKPOINT);
             }
@@ -328,7 +328,7 @@
              */
             dvmDexChangeDex1(method->clazz->pDvmDex, (u1*)addr,
                 pBreak->originalOpCode);
-            MEM_BARRIER();
+            ANDROID_MEMBAR_FULL();
 
             if (idx != pSet->count-1) {
                 /* shift down */
@@ -1377,6 +1377,8 @@
         }
     }
 
+    /* Never on the heap, so no write barrier needed. */
+    assert(!dvmIsValidObjectAddress(pResult));
     *pResult = interpState.retval;
 #if defined(WITH_JIT)
     dvmJitCalleeRestore(interpState.calleeSave);
diff --git a/vm/interp/InterpDefs.h b/vm/interp/InterpDefs.h
index 1afa203..c794db2 100644
--- a/vm/interp/InterpDefs.h
+++ b/vm/interp/InterpDefs.h
@@ -91,8 +91,8 @@
 
 /* Number of entries in the 2nd level JIT profiler filter cache */
 #define JIT_TRACE_THRESH_FILTER_SIZE 32
-/* Granularity of coverage (power of 2) by each cached entry */
-#define JIT_TRACE_THRESH_FILTER_GRAN_LOG2 6
+/* Number of low dalvik pc address bits to include in 2nd level filter key */
+#define JIT_TRACE_THRESH_FILTER_PC_BITS 4
 #endif
 
 /*
diff --git a/vm/interp/Jit.c b/vm/interp/Jit.c
index b9f7410..e920cfc 100644
--- a/vm/interp/Jit.c
+++ b/vm/interp/Jit.c
@@ -23,7 +23,7 @@
 #include "Jit.h"
 
 
-#include "dexdump/OpCodeNames.h"
+#include "libdex/OpCodeNames.h"
 #include <unistd.h>
 #include <pthread.h>
 #include <sys/time.h>
@@ -235,7 +235,8 @@
         offset =  (int)((u2*)addr - stackSave->method->insns);
         decInsn = &(shadowSpace->trace[i].decInsn);
         /* Not properly decoding instruction, some registers may be garbage */
-        LOGD("0x%x: (0x%04x) %s", addr, offset, getOpcodeName(decInsn->opCode));
+        LOGD("0x%x: (0x%04x) %s",
+            addr, offset, dexGetOpcodeName(decInsn->opCode));
     }
 }
 
@@ -267,7 +268,7 @@
 
     //LOGD("### DbgIntp(%d): PC: 0x%x endPC: 0x%x state: %d len: %d %s",
     //    self->threadId, (int)pc, (int)shadowSpace->endPC, state,
-    //    shadowSpace->traceLength, getOpcodeName(decInsn.opCode));
+    //    shadowSpace->traceLength, dexGetOpcodeName(decInsn.opCode));
 
     if (state == kSVSIdle || state == kSVSStart) {
         LOGD("~~~ DbgIntrp: INCORRECT PREVIOUS STATE(%d): %d",
@@ -499,8 +500,8 @@
         oldValue = slot->u;
         newValue = oldValue;
         newValue.info.traceConstruction = value;
-    } while (!ATOMIC_CMP_SWAP( &slot->u.infoWord,
-             oldValue.infoWord, newValue.infoWord));
+    } while (android_atomic_release_cas(oldValue.infoWord, newValue.infoWord,
+            &slot->u.infoWord) != 0);
 }
 
 void resetTracehead(InterpState* interpState, JitEntry *slot)
@@ -546,7 +547,7 @@
          * (the simple, and common case).  Otherwise we're going
          * to have to find a free slot and chain it.
          */
-        MEM_BARRIER(); /* Make sure we reload [].dPC after lock */
+        ANDROID_MEMBAR_FULL(); /* Make sure we reload [].dPC after lock */
         if (gDvmJit.pJitEntryTable[idx].dPC != NULL) {
             u4 prev;
             while (gDvmJit.pJitEntryTable[idx].u.info.chain != chainEndMarker) {
@@ -583,9 +584,9 @@
                     oldValue = gDvmJit.pJitEntryTable[prev].u;
                     newValue = oldValue;
                     newValue.info.chain = idx;
-                } while (!ATOMIC_CMP_SWAP(
-                         &gDvmJit.pJitEntryTable[prev].u.infoWord,
-                         oldValue.infoWord, newValue.infoWord));
+                } while (android_atomic_release_cas(oldValue.infoWord,
+                        newValue.infoWord,
+                        &gDvmJit.pJitEntryTable[prev].u.infoWord) != 0);
             }
         }
         if (gDvmJit.pJitEntryTable[idx].dPC == NULL) {
@@ -606,6 +607,37 @@
 }
 
 /*
+ * Check if the next instruction following the invoke is a move-result and if
+ * so add it to the trace.
+ *
+ * lastPC, len, offset are all from the preceding invoke instruction
+ */
+static void insertMoveResult(const u2 *lastPC, int len, int offset,
+                             InterpState *interpState)
+{
+    DecodedInstruction nextDecInsn;
+    const u2 *moveResultPC = lastPC + len;
+
+    dexDecodeInstruction(gDvm.instrFormat, moveResultPC, &nextDecInsn);
+    if ((nextDecInsn.opCode != OP_MOVE_RESULT) &&
+        (nextDecInsn.opCode != OP_MOVE_RESULT_WIDE) &&
+        (nextDecInsn.opCode != OP_MOVE_RESULT_OBJECT))
+        return;
+
+    /* We need to start a new trace run */
+    int currTraceRun = ++interpState->currTraceRun;
+    interpState->currRunHead = moveResultPC;
+    interpState->trace[currTraceRun].frag.startOffset = offset + len;
+    interpState->trace[currTraceRun].frag.numInsts = 1;
+    interpState->trace[currTraceRun].frag.runEnd = false;
+    interpState->trace[currTraceRun].frag.hint = kJitHintNone;
+    interpState->totalTraceLen++;
+
+    interpState->currRunLen = dexGetInstrOrTableWidthAbs(gDvm.instrWidth,
+                                                         moveResultPC);
+}
+
+/*
  * Adds to the current trace request one instruction at a time, just
  * before that instruction is interpreted.  This is the primary trace
  * selection function.  NOTE: return instruction are handled a little
@@ -654,7 +686,7 @@
 
 
 #if defined(SHOW_TRACE)
-            LOGD("TraceGen: adding %s",getOpcodeName(decInsn.opCode));
+            LOGD("TraceGen: adding %s", dexGetOpcodeName(decInsn.opCode));
 #endif
             flags = dexGetInstrFlags(gDvm.instrFlags, decInsn.opCode);
             len = dexGetInstrOrTableWidthAbs(gDvm.instrWidth, lastPC);
@@ -676,8 +708,15 @@
             interpState->totalTraceLen++;
             interpState->currRunLen += len;
 
+            /*
+             * If the last instruction is an invoke, we will try to sneak in
+             * the move-result* (if existent) into a separate trace run.
+             */
+            int needReservedRun = (flags & kInstrInvoke) ? 1 : 0;
+
             /* Will probably never hit this with the current trace buildier */
-            if (interpState->currTraceRun == (MAX_JIT_RUN_LEN - 1)) {
+            if (interpState->currTraceRun ==
+                (MAX_JIT_RUN_LEN - 1 - needReservedRun)) {
                 interpState->jitState = kJitTSelectEnd;
             }
 
@@ -690,9 +729,17 @@
                              kInstrInvoke)) != 0)) {
                     interpState->jitState = kJitTSelectEnd;
 #if defined(SHOW_TRACE)
-            LOGD("TraceGen: ending on %s, basic block end",
-                 getOpcodeName(decInsn.opCode));
+                LOGD("TraceGen: ending on %s, basic block end",
+                     dexGetOpcodeName(decInsn.opCode));
 #endif
+
+                /*
+                 * If the next instruction is a variant of move-result, insert
+                 * it to the trace as well.
+                 */
+                if (flags & kInstrInvoke) {
+                    insertMoveResult(lastPC, len, offset, interpState);
+                }
             }
             /* Break on throw or self-loop */
             if ((decInsn.opCode == OP_THROW) || (lastPC == pc)){
@@ -889,9 +936,9 @@
         oldValue = jitEntry->u;
         newValue = oldValue;
         newValue.info.instructionSet = set;
-    } while (!ATOMIC_CMP_SWAP(
-             &jitEntry->u.infoWord,
-             oldValue.infoWord, newValue.infoWord));
+    } while (android_atomic_release_cas(
+             oldValue.infoWord, newValue.infoWord,
+             &jitEntry->u.infoWord) != 0);
     jitEntry->codeAddress = nPC;
 }
 
@@ -904,8 +951,59 @@
 {
     bool switchInterp = false;         /* Assume success */
     int i;
-    intptr_t filterKey = ((intptr_t) interpState->pc) >>
-                         JIT_TRACE_THRESH_FILTER_GRAN_LOG2;
+    /*
+     * A note on trace "hotness" filtering:
+     *
+     * Our first level trigger is intentionally loose - we need it to
+     * fire easily not just to identify potential traces to compile, but
+     * also to allow re-entry into the code cache.
+     *
+     * The 2nd level filter (done here) exists to be selective about
+     * what we actually compile.  It works by requiring the same
+     * trace head "key" (defined as filterKey below) to appear twice in
+     * a relatively short period of time.   The difficulty is defining the
+     * shape of the filterKey.  Unfortunately, there is no "one size fits
+     * all" approach.
+     *
+     * For spiky execution profiles dominated by a smallish
+     * number of very hot loops, we would want the second-level filter
+     * to be very selective.  A good selective filter is requiring an
+     * exact match of the Dalvik PC.  In other words, defining filterKey as:
+     *     intptr_t filterKey = (intptr_t)interpState->pc
+     *
+     * However, for flat execution profiles we do best when aggressively
+     * translating.  A heuristically decent proxy for this is to use
+     * the value of the method pointer containing the trace as the filterKey.
+     * Intuitively, this is saying that once any trace in a method appears hot,
+     * immediately translate any other trace from that same method that
+     * survives the first-level filter.  Here, filterKey would be defined as:
+     *     intptr_t filterKey = (intptr_t)interpState->method
+     *
+     * The problem is that we can't easily detect whether we're dealing
+     * with a spiky or flat profile.  If we go with the "pc" match approach,
+     * flat profiles perform poorly.  If we go with the loose "method" match,
+     * we end up generating a lot of useless translations.  Probably the
+     * best approach in the future will be to retain profile information
+     * across runs of each application in order to determine it's profile,
+     * and then choose once we have enough history.
+     *
+     * However, for now we've decided to chose a compromise filter scheme that
+     * includes elements of both.  The high order bits of the filter key
+     * are drawn from the enclosing method, and are combined with a slice
+     * of the low-order bits of the Dalvik pc of the trace head.  The
+     * looseness of the filter can be adjusted by changing with width of
+     * the Dalvik pc slice (JIT_TRACE_THRESH_FILTER_PC_BITS).  The wider
+     * the slice, the tighter the filter.
+     *
+     * Note: the fixed shifts in the function below reflect assumed word
+     * alignment for method pointers, and half-word alignment of the Dalvik pc.
+     * for method pointers and half-word alignment for dalvik pc.
+     */
+    u4 methodKey = (u4)interpState->method <<
+                   (JIT_TRACE_THRESH_FILTER_PC_BITS - 2);
+    u4 pcKey = ((u4)interpState->pc >> 1) &
+               ((1 << JIT_TRACE_THRESH_FILTER_PC_BITS) - 1);
+    intptr_t filterKey = (intptr_t)(methodKey | pcKey);
     bool debugOrProfile = dvmDebuggerOrProfilerActive();
 
     /* Check if the JIT request can be handled now */
@@ -916,6 +1014,7 @@
             /* Two-level filtering scheme */
             for (i=0; i< JIT_TRACE_THRESH_FILTER_SIZE; i++) {
                 if (filterKey == interpState->threshFilter[i]) {
+                    interpState->threshFilter[i] = 0; // Reset filter entry
                     break;
                 }
             }
diff --git a/vm/interp/README.txt b/vm/interp/README.txt
index 76d47a7..170d2b1 100644
--- a/vm/interp/README.txt
+++ b/vm/interp/README.txt
@@ -1,4 +1,3 @@
 Dalvik interpreter entry point.
 
 The "mterp" directory now holds the interpreter implementation.
-
diff --git a/vm/interp/Stack.c b/vm/interp/Stack.c
index 11a9a32..673dc14 100644
--- a/vm/interp/Stack.c
+++ b/vm/interp/Stack.c
@@ -790,7 +790,7 @@
 {
     LineNumFromPcContext *pContext = (LineNumFromPcContext *)cnxt;
 
-    // We know that this callback will be called in 
+    // We know that this callback will be called in
     // ascending address order, so keep going until we find
     // a match or we've just gone past it.
 
@@ -834,7 +834,7 @@
             method->prototype.protoIdx,
             method->accessFlags,
             lineNumForPcCb, NULL, &context);
-    
+
     return context.lineNum;
 }
 
@@ -966,7 +966,7 @@
         if (caller == NULL)
             return NULL;
     }
-    
+
     return SAVEAREA_FROM_FP(caller)->method->clazz;
 }
 
@@ -1380,4 +1380,3 @@
     dumpFrames(target, stackCopy + fpOffset, thread);
     free(stackCopy);
 }
-
diff --git a/vm/jdwp/ExpandBuf.c b/vm/jdwp/ExpandBuf.c
index 50c3035..ade239c 100644
--- a/vm/jdwp/ExpandBuf.c
+++ b/vm/jdwp/ExpandBuf.c
@@ -173,4 +173,3 @@
     setUtf8String(pBuf->storage + pBuf->curLen, str);
     pBuf->curLen += sizeof(u4) + strLen;
 }
-
diff --git a/vm/jdwp/JdwpAdb.c b/vm/jdwp/JdwpAdb.c
index dfc7bd7..c3a1a72 100644
--- a/vm/jdwp/JdwpAdb.c
+++ b/vm/jdwp/JdwpAdb.c
@@ -101,13 +101,13 @@
     netState->controlAddrLen =
             sizeof(netState->controlAddr.controlAddrUn.sun_family) +
             kJdwpControlNameLen;
-                               
-    memcpy(netState->controlAddr.controlAddrUn.sun_path, 
+
+    memcpy(netState->controlAddr.controlAddrUn.sun_path,
            kJdwpControlName, kJdwpControlNameLen);
- 
+
     netState->wakeFds[0] = -1;
     netState->wakeFds[1] = -1;
-    
+
     return netState;
 }
 
@@ -122,7 +122,7 @@
     JdwpNetState*  netState;
 
     LOGV("ADB transport startup\n");
-    
+
     state->netState = netState = adbStateAlloc();
     if (netState == NULL)
         return false;
@@ -158,13 +158,13 @@
     msg.msg_flags      = 0;
     msg.msg_control    = cm_un.buffer;
     msg.msg_controllen = sizeof(cm_un.buffer);
-    
+
     cmsg = CMSG_FIRSTHDR(&msg);
     cmsg->cmsg_len   = msg.msg_controllen;
     cmsg->cmsg_level = SOL_SOCKET;
     cmsg->cmsg_type  = SCM_RIGHTS;
     ((int*)CMSG_DATA(cmsg))[0] = -1;
-    
+
     do {
         ret = recvmsg(netState->controlSock, &msg, 0);
     } while (ret < 0 && errno == EINTR);
@@ -197,7 +197,7 @@
     int retryCount = 0;
 
     /* first, ensure that we get a connection to the ADB daemon */
-    
+
 retry:
     if (netState->shuttingDown)
         return false;
@@ -340,7 +340,7 @@
         shutdown(controlSock, SHUT_RDWR);
         netState->controlSock = -1;
     }
-    
+
     if (netState->wakeFds[1] >= 0) {
         LOGV("+++ writing to wakePipe\n");
         (void) write(netState->wakeFds[1], "", 1);
@@ -759,4 +759,3 @@
 {
     return &socketTransport;
 }
-
diff --git a/vm/jdwp/JdwpConstants.c b/vm/jdwp/JdwpConstants.c
index e089afa..898fe2c 100644
--- a/vm/jdwp/JdwpConstants.c
+++ b/vm/jdwp/JdwpConstants.c
@@ -237,4 +237,3 @@
     default:                    return "?UNKNOWN?";
     }
 };
-
diff --git a/vm/jdwp/JdwpEvent.c b/vm/jdwp/JdwpEvent.c
index 9037599..69d2237 100644
--- a/vm/jdwp/JdwpEvent.c
+++ b/vm/jdwp/JdwpEvent.c
@@ -745,7 +745,7 @@
 {
     enum JdwpSuspendPolicy suspendPolicy;
     ObjectId threadId = dvmDbgGetThreadSelfId();
-    
+
     if (suspend)
         suspendPolicy = SP_ALL;
     else
@@ -1290,4 +1290,3 @@
 
     dvmJdwpSendBufferedRequest(state, wrapiov, iovcnt+1);
 }
-
diff --git a/vm/jdwp/JdwpHandler.c b/vm/jdwp/JdwpHandler.c
index 06d76ed..69fe510 100644
--- a/vm/jdwp/JdwpHandler.c
+++ b/vm/jdwp/JdwpHandler.c
@@ -2106,15 +2106,14 @@
     JdwpError result = ERR_NONE;
     int i, respLen;
 
-    /*
-     * Activity from a debugger, not merely ddms.  Mark us as having an
-     * active debugger session, and zero out the last-activity timestamp.
-     */
     if (pHeader->cmdSet != kJDWPDdmCmdSet) {
+        /*
+         * Activity from a debugger, not merely ddms.  Mark us as having an
+         * active debugger session, and zero out the last-activity timestamp
+         * so waitForDebugger() doesn't return if we stall for a bit here.
+         */
         dvmDbgActive();
-
-        state->lastActivitySec = 0;
-        MEM_BARRIER();
+        dvmQuasiAtomicSwap64(0, &state->lastActivityWhen);
     }
 
     /*
@@ -2192,15 +2191,9 @@
      * the initial setup.  Only update if this is a non-DDMS packet.
      */
     if (pHeader->cmdSet != kJDWPDdmCmdSet) {
-        long lastSec, lastMsec;
-
-        dvmJdwpGetNowMsec(&lastSec, &lastMsec);
-        state->lastActivityMsec = lastMsec;
-        MEM_BARRIER();      // updating a 64-bit value
-        state->lastActivitySec = lastSec;
+        dvmQuasiAtomicSwap64(dvmJdwpGetNowMsec(), &state->lastActivityWhen);
     }
 
     /* tell the VM that GC is okay again */
     dvmDbgThreadWaiting();
 }
-
diff --git a/vm/jdwp/JdwpMain.c b/vm/jdwp/JdwpMain.c
index 015f1c6..1688e5e 100644
--- a/vm/jdwp/JdwpMain.c
+++ b/vm/jdwp/JdwpMain.c
@@ -209,7 +209,7 @@
 
 /*
  * Are we talking to a debugger?
- */ 
+ */
 bool dvmJdwpIsActive(JdwpState* state)
 {
     return dvmJdwpIsConnected(state);
@@ -231,7 +231,7 @@
      */
     state->debugThreadHandle = dvmThreadSelf()->handle;
     state->run = true;
-    MEM_BARRIER();
+    ANDROID_MEMBAR_FULL();
     state->debugThreadStarted = true;       // touch this last
 
     dvmDbgLockMutex(&state->threadStartLock);
@@ -349,59 +349,40 @@
     return state->debugThreadHandle;
 }
 
-#if 0
+
 /*
- * Wait until the debugger attaches.  Returns immediately if the debugger
- * is already attached.
+ * Support routines for waitForDebugger().
  *
- * If we return the instant the debugger connects, we run the risk of
- * executing code before the debugger has had a chance to configure
- * breakpoints or issue suspend calls.  It would be nice to just sit in
- * the suspended state, but most debuggers don't expect any threads to be
- * suspended when they attach.
+ * We can't have a trivial "waitForDebugger" function that returns the
+ * instant the debugger connects, because we run the risk of executing code
+ * before the debugger has had a chance to configure breakpoints or issue
+ * suspend calls.  It would be nice to just sit in the suspended state, but
+ * most debuggers don't expect any threads to be suspended when they attach.
  *
- * There's no event we can post to tell the debugger "we've stopped, and
- * we like it that way".  We could send a fake breakpoint, which should
+ * There's no JDWP event we can post to tell the debugger, "we've stopped,
+ * and we like it that way".  We could send a fake breakpoint, which should
  * cause the debugger to immediately send a resume, but the debugger might
  * send the resume immediately or might throw an exception of its own upon
  * receiving a breakpoint event that it didn't ask for.
  *
  * What we really want is a "wait until the debugger is done configuring
- * stuff" event.  We can get close with a "wait until the debugger has
- * been idle for a brief period", and we can do a mild approximation with
- * "just sleep for a second after it connects".
- *
- * We should be in THREAD_VMWAIT here, so we're not allowed to do anything
- * with objects because a GC could be in progress.
- *
- * NOTE: this trips as soon as something connects to the socket.  This
- * is no longer appropriate -- we don't want to return when DDMS connects.
- * We could fix this by polling for the first debugger packet, but we have
- * to watch out for disconnects.  If we're going to do polling, it's
- * probably best to do it at a higher level.
+ * stuff" event.  We can approximate this with a "wait until the debugger
+ * has been idle for a brief period".
  */
-void dvmJdwpWaitForDebugger(JdwpState* state)
-{
-    // no more
-}
-#endif
 
 /*
- * Get a notion of the current time, in milliseconds.  We leave it in
- * two 32-bit pieces.
+ * Get a notion of the current time, in milliseconds.
  */
-void dvmJdwpGetNowMsec(long* pSec, long* pMsec)
+s8 dvmJdwpGetNowMsec(void)
 {
 #ifdef HAVE_POSIX_CLOCKS
     struct timespec now;
     clock_gettime(CLOCK_MONOTONIC, &now);
-    *pSec = now.tv_sec;
-    *pMsec = now.tv_nsec / 1000000;
+    return now.tv_sec * 1000LL + now.tv_nsec / 1000000LL;
 #else
     struct timeval now;
     gettimeofday(&now, NULL);
-    *pSec = now.tv_sec;
-    *pMsec = now.tv_usec / 1000;
+    return now.tv_sec * 1000LL + now.tv_usec / 1000LL;
 #endif
 }
 
@@ -413,30 +394,23 @@
  */
 s8 dvmJdwpLastDebuggerActivity(JdwpState* state)
 {
-    long lastSec, lastMsec;
-    long nowSec, nowMsec;
+    if (!gDvm.debuggerActive) {
+        LOGD("dvmJdwpLastDebuggerActivity: no active debugger\n");
+        return -1;
+    }
 
-    /* these are volatile; lastSec becomes 0 during update */
-    lastSec = state->lastActivitySec;
-    lastMsec = state->lastActivityMsec;
+    s8 last = dvmQuasiAtomicRead64(&state->lastActivityWhen);
 
     /* initializing or in the middle of something? */
-    if (lastSec == 0 || state->lastActivitySec != lastSec) {
-        //LOGI("+++ last=busy\n");
+    if (last == 0) {
+        LOGV("+++ last=busy\n");
         return 0;
     }
 
-    /* get the current time *after* latching the "last" time */
-    dvmJdwpGetNowMsec(&nowSec, &nowMsec);
+    /* now get the current time */
+    s8 now = dvmJdwpGetNowMsec();
+    assert(now > last);
 
-    s8 last = (s8)lastSec * 1000 + lastMsec;
-    s8 now = (s8)nowSec * 1000 + nowMsec;
-
-    //LOGI("last is %ld.%ld --> %lld\n", lastSec, lastMsec, last);
-    //LOGI("now is  %ld.%ld --> %lld\n", nowSec, nowMsec, now);
-
-
-    //LOGI("+++ interval=%lld\n", now - last);
+    LOGV("+++ debugger interval=%lld\n", now - last);
     return now - last;
 }
-
diff --git a/vm/jdwp/JdwpPriv.h b/vm/jdwp/JdwpPriv.h
index 87c3fc7..85f9ec2 100644
--- a/vm/jdwp/JdwpPriv.h
+++ b/vm/jdwp/JdwpPriv.h
@@ -91,9 +91,8 @@
     pthread_mutex_t attachLock;
     pthread_cond_t  attachCond;
 
-    /* time of last debugger activity; "sec" zeroed while processing */
-    volatile long   lastActivitySec;
-    volatile long   lastActivityMsec;
+    /* time of last debugger activity, in milliseconds */
+    s8              lastActivityWhen;
 
     /* global counters and a mutex to protect them */
     u4              requestSerial;
@@ -130,7 +129,7 @@
 u4 dvmJdwpNextEventSerial(JdwpState* state);
 
 /* get current time, in msec */
-void dvmJdwpGetNowMsec(long* pSec, long* pMsec);
+s8 dvmJdwpGetNowMsec(void);
 
 
 /*
diff --git a/vm/jdwp/JdwpSocket.c b/vm/jdwp/JdwpSocket.c
index f5eebca..0c39202 100644
--- a/vm/jdwp/JdwpSocket.c
+++ b/vm/jdwp/JdwpSocket.c
@@ -922,4 +922,3 @@
 {
     return &socketTransport;
 }
-
diff --git a/vm/jdwp/README.txt b/vm/jdwp/README.txt
index b511cc8..c97a069 100644
--- a/vm/jdwp/README.txt
+++ b/vm/jdwp/README.txt
@@ -10,4 +10,3 @@
 might be useful in other projects.  Once you get multiple simultaneous
 events and debugger requests with thread suspension bouncing around,
 though, it's difficult to keep things "generic".
-
diff --git a/vm/mterp/Makefile-mterp b/vm/mterp/Makefile-mterp
index d30dff2..2f96d59 100644
--- a/vm/mterp/Makefile-mterp
+++ b/vm/mterp/Makefile-mterp
@@ -49,4 +49,3 @@
 $(GEN_SOURCES): $(SOURCE_DEPS)
 	@mkdir -p out
 	./gen-mterp.py $(TARGET_ARCH_EXT) $(OUTPUT_DIR)
-
diff --git a/vm/mterp/NOTES.txt b/vm/mterp/NOTES.txt
index e348934..5dc7caa 100644
--- a/vm/mterp/NOTES.txt
+++ b/vm/mterp/NOTES.txt
@@ -69,4 +69,3 @@
 code.  JNI handles returns from interp->native by adding the value to the
 local references table, but returns from native->interp are simply stored
 in the usual "retval".
-
diff --git a/vm/mterp/README.txt b/vm/mterp/README.txt
index e6141d2..80596ea 100644
--- a/vm/mterp/README.txt
+++ b/vm/mterp/README.txt
@@ -213,4 +213,3 @@
 The ultimate goal is to have the build system generate the necessary
 output files without requiring this separate step, but we're not yet
 ready to require Python in the build.
-
diff --git a/vm/mterp/arm-vfp/OP_CMPG_DOUBLE.S b/vm/mterp/arm-vfp/OP_CMPG_DOUBLE.S
index a8c3ea4..b75216e 100644
--- a/vm/mterp/arm-vfp/OP_CMPG_DOUBLE.S
+++ b/vm/mterp/arm-vfp/OP_CMPG_DOUBLE.S
@@ -40,4 +40,3 @@
 .L${opcode}_finish:
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/arm-vfp/OP_CMPG_FLOAT.S b/vm/mterp/arm-vfp/OP_CMPG_FLOAT.S
index 4c14fbb..eade97d 100644
--- a/vm/mterp/arm-vfp/OP_CMPG_FLOAT.S
+++ b/vm/mterp/arm-vfp/OP_CMPG_FLOAT.S
@@ -40,4 +40,3 @@
 .L${opcode}_finish:
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/arm-vfp/OP_CMPL_DOUBLE.S b/vm/mterp/arm-vfp/OP_CMPL_DOUBLE.S
index 999faee..6e85fe7 100644
--- a/vm/mterp/arm-vfp/OP_CMPL_DOUBLE.S
+++ b/vm/mterp/arm-vfp/OP_CMPL_DOUBLE.S
@@ -40,4 +40,3 @@
 .L${opcode}_finish:
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/arm-vfp/OP_CMPL_FLOAT.S b/vm/mterp/arm-vfp/OP_CMPL_FLOAT.S
index 9b2133c..bdeb0be 100644
--- a/vm/mterp/arm-vfp/OP_CMPL_FLOAT.S
+++ b/vm/mterp/arm-vfp/OP_CMPL_FLOAT.S
@@ -40,4 +40,3 @@
 .L${opcode}_finish:
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv4t/OP_AGET_WIDE.S b/vm/mterp/armv4t/OP_AGET_WIDE.S
index f06cb8b..dc5eee8 100644
--- a/vm/mterp/armv4t/OP_AGET_WIDE.S
+++ b/vm/mterp/armv4t/OP_AGET_WIDE.S
@@ -31,4 +31,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r9, {r2-r3}                 @ vAA/vAA+1<- r2/r3
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv4t/OP_APUT_WIDE.S b/vm/mterp/armv4t/OP_APUT_WIDE.S
index e8db664..9a718f2 100644
--- a/vm/mterp/armv4t/OP_APUT_WIDE.S
+++ b/vm/mterp/armv4t/OP_APUT_WIDE.S
@@ -29,4 +29,3 @@
     add     r0, #offArrayObject_contents
     stmia   r0, {r2-r3}                 @ vBB[vCC] <- r2/r3
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv4t/OP_IGET_WIDE.S b/vm/mterp/armv4t/OP_IGET_WIDE.S
index dabaeba..5940f56 100644
--- a/vm/mterp/armv4t/OP_IGET_WIDE.S
+++ b/vm/mterp/armv4t/OP_IGET_WIDE.S
@@ -36,7 +36,7 @@
     beq     common_errNullObject        @ object was null
     .if $volatile
     add     r0, r9, r3                  @ r0<- address of field
-    bl      android_quasiatomic_read_64 @ r0/r1<- contents of field
+    bl      dvmQuasiAtomicRead64        @ r0/r1<- contents of field
     .else
     add     r9, r9, r3                  @ r9<- obj + field offset
     ldmia   r9, {r0-r1}                 @ r0/r1<- obj.field (64-bit align ok)
@@ -48,4 +48,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r3, {r0-r1}                 @ fp[A]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv4t/OP_IGET_WIDE_QUICK.S b/vm/mterp/armv4t/OP_IGET_WIDE_QUICK.S
index 36a6e1d..b0022f5 100644
--- a/vm/mterp/armv4t/OP_IGET_WIDE_QUICK.S
+++ b/vm/mterp/armv4t/OP_IGET_WIDE_QUICK.S
@@ -15,4 +15,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r3, {r0-r1}                 @ fp[A]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv4t/OP_IPUT_WIDE.S b/vm/mterp/armv4t/OP_IPUT_WIDE.S
index d824d9d..d0f7315 100644
--- a/vm/mterp/armv4t/OP_IPUT_WIDE.S
+++ b/vm/mterp/armv4t/OP_IPUT_WIDE.S
@@ -39,9 +39,8 @@
     GET_INST_OPCODE(r10)                @ extract opcode from rINST
     add     r2, r9, r3                  @ r2<- object + byte offset
     .if $volatile
-    bl      android_quasiatomic_swap_64 @ stores r0/r1 into addr r2
+    bl      dvmQuasiAtomicSwap64        @ stores r0/r1 into addr r2
     .else
     stmia   r2, {r0-r1}                 @ obj.field (64 bits, aligned)<- r0/r1
     .endif
     GOTO_OPCODE(r10)                    @ jump to next instruction
-
diff --git a/vm/mterp/armv4t/OP_IPUT_WIDE_QUICK.S b/vm/mterp/armv4t/OP_IPUT_WIDE_QUICK.S
index a483060..b062127 100644
--- a/vm/mterp/armv4t/OP_IPUT_WIDE_QUICK.S
+++ b/vm/mterp/armv4t/OP_IPUT_WIDE_QUICK.S
@@ -15,4 +15,3 @@
     stmia   r2, {r0-r1}                 @ obj.field (64 bits, aligned)<- r0/r1
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv4t/OP_SGET_WIDE.S b/vm/mterp/armv4t/OP_SGET_WIDE.S
index 2556a7c..91e195d 100644
--- a/vm/mterp/armv4t/OP_SGET_WIDE.S
+++ b/vm/mterp/armv4t/OP_SGET_WIDE.S
@@ -17,7 +17,7 @@
     mov     r9, rINST, lsr #8           @ r9<- AA
     add     r0, r0, #offStaticField_value @ r0<- pointer to data
     .if $volatile
-    bl      android_quasiatomic_read_64 @ r0/r1<- contents of field
+    bl      dvmQuasiAtomicRead64        @ r0/r1<- contents of field
     .else
     ldmia   r0, {r0-r1}                 @ r0/r1<- field value (aligned)
     .endif
@@ -42,4 +42,3 @@
     cmp     r0, #0                      @ success?
     bne     .L${opcode}_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
-
diff --git a/vm/mterp/armv4t/OP_SPUT_WIDE.S b/vm/mterp/armv4t/OP_SPUT_WIDE.S
index 237233c..a67e2d8 100644
--- a/vm/mterp/armv4t/OP_SPUT_WIDE.S
+++ b/vm/mterp/armv4t/OP_SPUT_WIDE.S
@@ -21,7 +21,7 @@
     GET_INST_OPCODE(r10)                @ extract opcode from rINST
     add     r2, r2, #offStaticField_value @ r2<- pointer to data
     .if $volatile
-    bl      android_quasiatomic_swap_64 @ stores r0/r1 into addr r2
+    bl      dvmQuasiAtomicSwap64        @ stores r0/r1 into addr r2
     .else
     stmia   r2, {r0-r1}                 @ field<- vAA/vAA+1
     .endif
@@ -44,4 +44,3 @@
     mov     r2, r0                      @ copy to r2
     bne     .L${opcode}_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
-
diff --git a/vm/mterp/armv4t/platform.S b/vm/mterp/armv4t/platform.S
index d7a6d71..eca940a 100644
--- a/vm/mterp/armv4t/platform.S
+++ b/vm/mterp/armv4t/platform.S
@@ -37,3 +37,8 @@
     bx      lr
 .endm
 
+/*
+ * Macro for data memory barrier; not meaningful pre-ARMv6K.
+ */
+.macro  SMP_DMB
+.endm
diff --git a/vm/mterp/armv5te/OP_AGET.S b/vm/mterp/armv5te/OP_AGET.S
index 7a0950b..8d8ed58 100644
--- a/vm/mterp/armv5te/OP_AGET.S
+++ b/vm/mterp/armv5te/OP_AGET.S
@@ -25,4 +25,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     SET_VREG(r2, r9)                    @ vAA<- r2
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_AGET_WIDE.S b/vm/mterp/armv5te/OP_AGET_WIDE.S
index ec346ca..6f641dc 100644
--- a/vm/mterp/armv5te/OP_AGET_WIDE.S
+++ b/vm/mterp/armv5te/OP_AGET_WIDE.S
@@ -30,4 +30,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r9, {r2-r3}                 @ vAA/vAA+1<- r2/r3
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_APUT.S b/vm/mterp/armv5te/OP_APUT.S
index f8ee4a8..741aadd 100644
--- a/vm/mterp/armv5te/OP_APUT.S
+++ b/vm/mterp/armv5te/OP_APUT.S
@@ -25,4 +25,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     $store  r2, [r0, #offArrayObject_contents]  @ vBB[vCC]<- r2
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_APUT_OBJECT.S b/vm/mterp/armv5te/OP_APUT_OBJECT.S
index c99ac2e..03477f5 100644
--- a/vm/mterp/armv5te/OP_APUT_OBJECT.S
+++ b/vm/mterp/armv5te/OP_APUT_OBJECT.S
@@ -41,4 +41,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     str     r9, [r10, #offArrayObject_contents] @ vBB[vCC]<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_APUT_WIDE.S b/vm/mterp/armv5te/OP_APUT_WIDE.S
index 48738cc..cc9f332 100644
--- a/vm/mterp/armv5te/OP_APUT_WIDE.S
+++ b/vm/mterp/armv5te/OP_APUT_WIDE.S
@@ -30,4 +30,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     strd    r2, [r0, #offArrayObject_contents]  @ r2/r3<- vBB[vCC]
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_ARRAY_LENGTH.S b/vm/mterp/armv5te/OP_ARRAY_LENGTH.S
index 5dc0f93..3a6faf3 100644
--- a/vm/mterp/armv5te/OP_ARRAY_LENGTH.S
+++ b/vm/mterp/armv5te/OP_ARRAY_LENGTH.S
@@ -13,4 +13,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     SET_VREG(r3, r2)                    @ vB<- length
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_CHECK_CAST.S b/vm/mterp/armv5te/OP_CHECK_CAST.S
index 74f458b..c711276 100644
--- a/vm/mterp/armv5te/OP_CHECK_CAST.S
+++ b/vm/mterp/armv5te/OP_CHECK_CAST.S
@@ -70,4 +70,3 @@
 
 .LstrClassCastExceptionPtr:
     .word   .LstrClassCastException
-
diff --git a/vm/mterp/armv5te/OP_CMPL_DOUBLE.S b/vm/mterp/armv5te/OP_CMPL_DOUBLE.S
index 50ff3f7..01a63f7 100644
--- a/vm/mterp/armv5te/OP_CMPL_DOUBLE.S
+++ b/vm/mterp/armv5te/OP_CMPL_DOUBLE.S
@@ -46,4 +46,3 @@
     bcc     .L${opcode}_finish
     $naninst                            @ r1<- 1 or -1 for NaN
     b       .L${opcode}_finish
-
diff --git a/vm/mterp/armv5te/OP_CMPL_FLOAT.S b/vm/mterp/armv5te/OP_CMPL_FLOAT.S
index c53d419..657f0dc 100644
--- a/vm/mterp/armv5te/OP_CMPL_FLOAT.S
+++ b/vm/mterp/armv5te/OP_CMPL_FLOAT.S
@@ -113,4 +113,3 @@
     b       ${opcode}_finish
 
 #endif
-
diff --git a/vm/mterp/armv5te/OP_CMP_LONG.S b/vm/mterp/armv5te/OP_CMP_LONG.S
index d456137..084a3f2 100644
--- a/vm/mterp/armv5te/OP_CMP_LONG.S
+++ b/vm/mterp/armv5te/OP_CMP_LONG.S
@@ -58,4 +58,3 @@
     SET_VREG(r1, r9)                    @ vAA<- r1
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_CONST.S b/vm/mterp/armv5te/OP_CONST.S
index 4394647..a813c52 100644
--- a/vm/mterp/armv5te/OP_CONST.S
+++ b/vm/mterp/armv5te/OP_CONST.S
@@ -8,4 +8,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     SET_VREG(r0, r3)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_CONST_16.S b/vm/mterp/armv5te/OP_CONST_16.S
index 0b44c99..b5654a3 100644
--- a/vm/mterp/armv5te/OP_CONST_16.S
+++ b/vm/mterp/armv5te/OP_CONST_16.S
@@ -6,4 +6,3 @@
     SET_VREG(r0, r3)                    @ vAA<- r0
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_CONST_4.S b/vm/mterp/armv5te/OP_CONST_4.S
index 9ac53c2..6dd53af 100644
--- a/vm/mterp/armv5te/OP_CONST_4.S
+++ b/vm/mterp/armv5te/OP_CONST_4.S
@@ -8,4 +8,3 @@
     GET_INST_OPCODE(ip)                 @ ip<- opcode from rINST
     SET_VREG(r1, r0)                    @ fp[A]<- r1
     GOTO_OPCODE(ip)                     @ execute next instruction
-
diff --git a/vm/mterp/armv5te/OP_CONST_CLASS.S b/vm/mterp/armv5te/OP_CONST_CLASS.S
index b834553..665e582 100644
--- a/vm/mterp/armv5te/OP_CONST_CLASS.S
+++ b/vm/mterp/armv5te/OP_CONST_CLASS.S
@@ -33,4 +33,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_CONST_HIGH16.S b/vm/mterp/armv5te/OP_CONST_HIGH16.S
index 07b5061..4536d3a 100644
--- a/vm/mterp/armv5te/OP_CONST_HIGH16.S
+++ b/vm/mterp/armv5te/OP_CONST_HIGH16.S
@@ -7,4 +7,3 @@
     SET_VREG(r0, r3)                    @ vAA<- r0
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_CONST_STRING.S b/vm/mterp/armv5te/OP_CONST_STRING.S
index 5e2e389..2df3fda 100644
--- a/vm/mterp/armv5te/OP_CONST_STRING.S
+++ b/vm/mterp/armv5te/OP_CONST_STRING.S
@@ -32,4 +32,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_CONST_STRING_JUMBO.S b/vm/mterp/armv5te/OP_CONST_STRING_JUMBO.S
index b98e0e1..cf9b009 100644
--- a/vm/mterp/armv5te/OP_CONST_STRING_JUMBO.S
+++ b/vm/mterp/armv5te/OP_CONST_STRING_JUMBO.S
@@ -34,4 +34,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_CONST_WIDE.S b/vm/mterp/armv5te/OP_CONST_WIDE.S
index 428d423..b724264 100644
--- a/vm/mterp/armv5te/OP_CONST_WIDE.S
+++ b/vm/mterp/armv5te/OP_CONST_WIDE.S
@@ -12,4 +12,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r9, {r0-r1}                 @ vAA<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_CONST_WIDE_16.S b/vm/mterp/armv5te/OP_CONST_WIDE_16.S
index 2d37d58..e3e4149 100644
--- a/vm/mterp/armv5te/OP_CONST_WIDE_16.S
+++ b/vm/mterp/armv5te/OP_CONST_WIDE_16.S
@@ -8,4 +8,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r3, {r0-r1}                 @ vAA<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_CONST_WIDE_32.S b/vm/mterp/armv5te/OP_CONST_WIDE_32.S
index 5991eb4..a86e042 100644
--- a/vm/mterp/armv5te/OP_CONST_WIDE_32.S
+++ b/vm/mterp/armv5te/OP_CONST_WIDE_32.S
@@ -10,4 +10,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r3, {r0-r1}                 @ vAA<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_CONST_WIDE_HIGH16.S b/vm/mterp/armv5te/OP_CONST_WIDE_HIGH16.S
index 2e23f79..11bf518 100644
--- a/vm/mterp/armv5te/OP_CONST_WIDE_HIGH16.S
+++ b/vm/mterp/armv5te/OP_CONST_WIDE_HIGH16.S
@@ -9,4 +9,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r3, {r0-r1}                 @ vAA<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_DOUBLE_TO_INT.S b/vm/mterp/armv5te/OP_DOUBLE_TO_INT.S
index 2cf88f0..3e0a26b 100644
--- a/vm/mterp/armv5te/OP_DOUBLE_TO_INT.S
+++ b/vm/mterp/armv5te/OP_DOUBLE_TO_INT.S
@@ -52,4 +52,3 @@
     add     sp, sp, #4
     ldmfd   sp!, {r4, r5, pc}
 #endif
-
diff --git a/vm/mterp/armv5te/OP_DOUBLE_TO_LONG.S b/vm/mterp/armv5te/OP_DOUBLE_TO_LONG.S
index 563027d..ff0fd2e 100644
--- a/vm/mterp/armv5te/OP_DOUBLE_TO_LONG.S
+++ b/vm/mterp/armv5te/OP_DOUBLE_TO_LONG.S
@@ -51,4 +51,3 @@
 1:
     add     sp, sp, #4
     ldmfd   sp!, {r4, r5, pc}
-
diff --git a/vm/mterp/armv5te/OP_EXECUTE_INLINE.S b/vm/mterp/armv5te/OP_EXECUTE_INLINE.S
index 550bb83..f7ca704 100644
--- a/vm/mterp/armv5te/OP_EXECUTE_INLINE.S
+++ b/vm/mterp/armv5te/OP_EXECUTE_INLINE.S
@@ -58,4 +58,3 @@
 
 .L${opcode}_table:
     .word   gDvmInlineOpsTable
-
diff --git a/vm/mterp/armv5te/OP_EXECUTE_INLINE_RANGE.S b/vm/mterp/armv5te/OP_EXECUTE_INLINE_RANGE.S
index 4d62019..cf8b151 100644
--- a/vm/mterp/armv5te/OP_EXECUTE_INLINE_RANGE.S
+++ b/vm/mterp/armv5te/OP_EXECUTE_INLINE_RANGE.S
@@ -53,4 +53,3 @@
 
 .L${opcode}_table:
     .word   gDvmInlineOpsTable
-
diff --git a/vm/mterp/armv5te/OP_FILLED_NEW_ARRAY.S b/vm/mterp/armv5te/OP_FILLED_NEW_ARRAY.S
index a9c2d3e..1241c13 100644
--- a/vm/mterp/armv5te/OP_FILLED_NEW_ARRAY.S
+++ b/vm/mterp/armv5te/OP_FILLED_NEW_ARRAY.S
@@ -100,4 +100,3 @@
 .L_strInternalError:
     .word   .LstrInternalError
     .endif
-
diff --git a/vm/mterp/armv5te/OP_FLOAT_TO_INT.S b/vm/mterp/armv5te/OP_FLOAT_TO_INT.S
index e5f0ef5..c9cb957 100644
--- a/vm/mterp/armv5te/OP_FLOAT_TO_INT.S
+++ b/vm/mterp/armv5te/OP_FLOAT_TO_INT.S
@@ -38,4 +38,3 @@
     bl      __aeabi_f2iz                @ convert float to int
     ldmfd   sp!, {r4, pc}
 #endif
-
diff --git a/vm/mterp/armv5te/OP_FLOAT_TO_LONG.S b/vm/mterp/armv5te/OP_FLOAT_TO_LONG.S
index 19f7b96..e42e1a4 100644
--- a/vm/mterp/armv5te/OP_FLOAT_TO_LONG.S
+++ b/vm/mterp/armv5te/OP_FLOAT_TO_LONG.S
@@ -38,4 +38,3 @@
     mov     r0, r4                      @ recover arg
     bl      __aeabi_f2lz                @ convert float to long
     ldmfd   sp!, {r4, pc}
-
diff --git a/vm/mterp/armv5te/OP_GOTO_16.S b/vm/mterp/armv5te/OP_GOTO_16.S
index f738a98..5a8edee 100644
--- a/vm/mterp/armv5te/OP_GOTO_16.S
+++ b/vm/mterp/armv5te/OP_GOTO_16.S
@@ -22,4 +22,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 #endif
-
diff --git a/vm/mterp/armv5te/OP_IGET.S b/vm/mterp/armv5te/OP_IGET.S
index a347e5c..b9cdee4 100644
--- a/vm/mterp/armv5te/OP_IGET.S
+++ b/vm/mterp/armv5te/OP_IGET.S
@@ -1,4 +1,4 @@
-%default { "load":"ldr", "sqnum":"0" }
+%default { "load":"ldr", "barrier":"@ no-op ", "sqnum":"0" }
 %verify "executed"
 %verify "null object"
 %verify "field already resolved"
@@ -38,10 +38,10 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     $load   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    $barrier                            @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_IGET_OBJECT_VOLATILE.S b/vm/mterp/armv5te/OP_IGET_OBJECT_VOLATILE.S
new file mode 100644
index 0000000..acf9ac0
--- /dev/null
+++ b/vm/mterp/armv5te/OP_IGET_OBJECT_VOLATILE.S
@@ -0,0 +1,2 @@
+%verify "executed"
+%include "armv5te/OP_IGET.S" {"barrier":"SMP_DMB"}
diff --git a/vm/mterp/armv5te/OP_IGET_QUICK.S b/vm/mterp/armv5te/OP_IGET_QUICK.S
index f248bc2..c19f870 100644
--- a/vm/mterp/armv5te/OP_IGET_QUICK.S
+++ b/vm/mterp/armv5te/OP_IGET_QUICK.S
@@ -14,4 +14,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_IGET_VOLATILE.S b/vm/mterp/armv5te/OP_IGET_VOLATILE.S
new file mode 100644
index 0000000..acf9ac0
--- /dev/null
+++ b/vm/mterp/armv5te/OP_IGET_VOLATILE.S
@@ -0,0 +1,2 @@
+%verify "executed"
+%include "armv5te/OP_IGET.S" {"barrier":"SMP_DMB"}
diff --git a/vm/mterp/armv5te/OP_IGET_WIDE.S b/vm/mterp/armv5te/OP_IGET_WIDE.S
index 6d3eb45..95944de 100644
--- a/vm/mterp/armv5te/OP_IGET_WIDE.S
+++ b/vm/mterp/armv5te/OP_IGET_WIDE.S
@@ -34,9 +34,9 @@
     cmp     r9, #0                      @ check object for null
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
-    .if $volatile
+    .if     $volatile
     add     r0, r9, r3                  @ r0<- address of field
-    bl      android_quasiatomic_read_64 @ r0/r1<- contents of field
+    bl      dvmQuasiAtomicRead64        @ r0/r1<- contents of field
     .else
     ldrd    r0, [r9, r3]                @ r0/r1<- obj.field (64-bit align ok)
     .endif
@@ -47,4 +47,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r3, {r0-r1}                 @ fp[A]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_IGET_WIDE_QUICK.S b/vm/mterp/armv5te/OP_IGET_WIDE_QUICK.S
index 189b683..b32e429 100644
--- a/vm/mterp/armv5te/OP_IGET_WIDE_QUICK.S
+++ b/vm/mterp/armv5te/OP_IGET_WIDE_QUICK.S
@@ -14,4 +14,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r3, {r0-r1}                 @ fp[A]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_INSTANCE_OF.S b/vm/mterp/armv5te/OP_INSTANCE_OF.S
index da9f450..66f0df3 100644
--- a/vm/mterp/armv5te/OP_INSTANCE_OF.S
+++ b/vm/mterp/armv5te/OP_INSTANCE_OF.S
@@ -83,4 +83,3 @@
     GET_VREG(r0, r3)                    @ r0<- vB (object)
     ldr     r0, [r0, #offObject_clazz]  @ r0<- obj->clazz
     b       .L${opcode}_resolved        @ pick up where we left off
-
diff --git a/vm/mterp/armv5te/OP_INVOKE_DIRECT.S b/vm/mterp/armv5te/OP_INVOKE_DIRECT.S
index c8d551c..14ba8f7 100644
--- a/vm/mterp/armv5te/OP_INVOKE_DIRECT.S
+++ b/vm/mterp/armv5te/OP_INVOKE_DIRECT.S
@@ -45,4 +45,3 @@
     GET_VREG(r2, r10)                   @ r2<- "this" ptr (reload)
     bne     .L${opcode}_finish          @ no, continue
     b       common_exceptionThrown      @ yes, handle exception
-
diff --git a/vm/mterp/armv5te/OP_INVOKE_INTERFACE.S b/vm/mterp/armv5te/OP_INVOKE_INTERFACE.S
index 5463d5c..7d52454 100644
--- a/vm/mterp/armv5te/OP_INVOKE_INTERFACE.S
+++ b/vm/mterp/armv5te/OP_INVOKE_INTERFACE.S
@@ -24,5 +24,4 @@
     bl      dvmFindInterfaceMethodInCache @ r0<- call(class, ref, method, dex)
     cmp     r0, #0                      @ failed?
     beq     common_exceptionThrown      @ yes, handle exception
-    b       common_invokeMethod${routine} @ jump to common handler 
-
+    b       common_invokeMethod${routine} @ jump to common handler
diff --git a/vm/mterp/armv5te/OP_INVOKE_STATIC.S b/vm/mterp/armv5te/OP_INVOKE_STATIC.S
index 57d337b..cb359e6 100644
--- a/vm/mterp/armv5te/OP_INVOKE_STATIC.S
+++ b/vm/mterp/armv5te/OP_INVOKE_STATIC.S
@@ -22,4 +22,3 @@
     cmp     r0, #0                      @ got null?
     bne     common_invokeMethod${routine} @ no, continue
     b       common_exceptionThrown      @ yes, handle exception
-
diff --git a/vm/mterp/armv5te/OP_INVOKE_SUPER.S b/vm/mterp/armv5te/OP_INVOKE_SUPER.S
index f24f690..6117947 100644
--- a/vm/mterp/armv5te/OP_INVOKE_SUPER.S
+++ b/vm/mterp/armv5te/OP_INVOKE_SUPER.S
@@ -58,4 +58,3 @@
 .L${opcode}_nsm:
     ldr     r1, [r0, #offMethod_name]   @ r1<- method name
     b       common_errNoSuchMethod
-
diff --git a/vm/mterp/armv5te/OP_INVOKE_SUPER_QUICK.S b/vm/mterp/armv5te/OP_INVOKE_SUPER_QUICK.S
index 90b2a91..bd07d06 100644
--- a/vm/mterp/armv5te/OP_INVOKE_SUPER_QUICK.S
+++ b/vm/mterp/armv5te/OP_INVOKE_SUPER_QUICK.S
@@ -23,4 +23,3 @@
     ldr     r0, [r2, r1, lsl #2]        @ r0<- super->vtable[BBBB]
     beq     common_errNullObject        @ "this" is null, throw exception
     bl      common_invokeMethod${routine} @ continue on
-
diff --git a/vm/mterp/armv5te/OP_INVOKE_VIRTUAL.S b/vm/mterp/armv5te/OP_INVOKE_VIRTUAL.S
index 33dc108..d92c6a9 100644
--- a/vm/mterp/armv5te/OP_INVOKE_VIRTUAL.S
+++ b/vm/mterp/armv5te/OP_INVOKE_VIRTUAL.S
@@ -43,4 +43,3 @@
     ldr     r3, [r3, #offClassObject_vtable]    @ r3<- thisPtr->clazz->vtable
     ldr     r0, [r3, r2, lsl #2]        @ r3<- vtable[methodIndex]
     bl      common_invokeMethod${routine} @ continue on
-
diff --git a/vm/mterp/armv5te/OP_IPUT.S b/vm/mterp/armv5te/OP_IPUT.S
index 35c139f..78d333d 100644
--- a/vm/mterp/armv5te/OP_IPUT.S
+++ b/vm/mterp/armv5te/OP_IPUT.S
@@ -1,4 +1,4 @@
-%default { "store":"str", "sqnum":"0" }
+%default { "store":"str", "barrier":"@ no-op ", "sqnum":"0" }
 %verify "executed"
 %verify "null object"
 %verify "field already resolved"
@@ -42,6 +42,6 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    $barrier                            @ releasing store
     $store  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_IPUT_OBJECT_VOLATILE.S b/vm/mterp/armv5te/OP_IPUT_OBJECT_VOLATILE.S
new file mode 100644
index 0000000..ba3f615
--- /dev/null
+++ b/vm/mterp/armv5te/OP_IPUT_OBJECT_VOLATILE.S
@@ -0,0 +1,2 @@
+%verify "executed"
+%include "armv5te/OP_IPUT.S" {"barrier":"SMP_DMB"}
diff --git a/vm/mterp/armv5te/OP_IPUT_QUICK.S b/vm/mterp/armv5te/OP_IPUT_QUICK.S
index c33a738..c15da2b 100644
--- a/vm/mterp/armv5te/OP_IPUT_QUICK.S
+++ b/vm/mterp/armv5te/OP_IPUT_QUICK.S
@@ -14,4 +14,3 @@
     str     r0, [r3, r1]                @ obj.field (always 32 bits)<- r0
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_IPUT_VOLATILE.S b/vm/mterp/armv5te/OP_IPUT_VOLATILE.S
new file mode 100644
index 0000000..ba3f615
--- /dev/null
+++ b/vm/mterp/armv5te/OP_IPUT_VOLATILE.S
@@ -0,0 +1,2 @@
+%verify "executed"
+%include "armv5te/OP_IPUT.S" {"barrier":"SMP_DMB"}
diff --git a/vm/mterp/armv5te/OP_IPUT_WIDE.S b/vm/mterp/armv5te/OP_IPUT_WIDE.S
index 763c6a8..8796cbb 100644
--- a/vm/mterp/armv5te/OP_IPUT_WIDE.S
+++ b/vm/mterp/armv5te/OP_IPUT_WIDE.S
@@ -37,11 +37,10 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     ldmia   r2, {r0-r1}                 @ r0/r1<- fp[A]
     GET_INST_OPCODE(r10)                @ extract opcode from rINST
-    .if $volatile
+    .if     $volatile
     add     r2, r9, r3                  @ r2<- target address
-    bl      android_quasiatomic_swap_64 @ stores r0/r1 into addr r2
+    bl      dvmQuasiAtomicSwap64        @ stores r0/r1 into addr r2
     .else
     strd    r0, [r9, r3]                @ obj.field (64 bits, aligned)<- r0/r1
     .endif
     GOTO_OPCODE(r10)                    @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_IPUT_WIDE_QUICK.S b/vm/mterp/armv5te/OP_IPUT_WIDE_QUICK.S
index 290591c..b7dd703 100644
--- a/vm/mterp/armv5te/OP_IPUT_WIDE_QUICK.S
+++ b/vm/mterp/armv5te/OP_IPUT_WIDE_QUICK.S
@@ -14,4 +14,3 @@
     strd    r0, [r2, r3]                @ obj.field (64 bits, aligned)<- r0/r1
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_MONITOR_ENTER.S b/vm/mterp/armv5te/OP_MONITOR_ENTER.S
index 524621a..36faabc 100644
--- a/vm/mterp/armv5te/OP_MONITOR_ENTER.S
+++ b/vm/mterp/armv5te/OP_MONITOR_ENTER.S
@@ -20,4 +20,3 @@
 #endif
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_MONITOR_EXIT.S b/vm/mterp/armv5te/OP_MONITOR_EXIT.S
index c9aedf0..5c1b3c7 100644
--- a/vm/mterp/armv5te/OP_MONITOR_EXIT.S
+++ b/vm/mterp/armv5te/OP_MONITOR_EXIT.S
@@ -24,4 +24,3 @@
 1:
     FETCH_ADVANCE_INST(1)               @ advance before throw
     b      common_errNullObject
-
diff --git a/vm/mterp/armv5te/OP_MOVE.S b/vm/mterp/armv5te/OP_MOVE.S
index 48db45f..efeddf4 100644
--- a/vm/mterp/armv5te/OP_MOVE.S
+++ b/vm/mterp/armv5te/OP_MOVE.S
@@ -9,4 +9,3 @@
     GET_INST_OPCODE(ip)                 @ ip<- opcode from rINST
     SET_VREG(r2, r0)                    @ fp[A]<- r2
     GOTO_OPCODE(ip)                     @ execute next instruction
-
diff --git a/vm/mterp/armv5te/OP_MOVE_16.S b/vm/mterp/armv5te/OP_MOVE_16.S
index f20f57b..3c08759 100644
--- a/vm/mterp/armv5te/OP_MOVE_16.S
+++ b/vm/mterp/armv5te/OP_MOVE_16.S
@@ -8,4 +8,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     SET_VREG(r2, r0)                    @ fp[AAAA]<- r2
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_MOVE_EXCEPTION.S b/vm/mterp/armv5te/OP_MOVE_EXCEPTION.S
index 45e66fa..f9e4cff 100644
--- a/vm/mterp/armv5te/OP_MOVE_EXCEPTION.S
+++ b/vm/mterp/armv5te/OP_MOVE_EXCEPTION.S
@@ -9,4 +9,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     str     r1, [r0, #offThread_exception]  @ dvmClearException bypass
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_MOVE_FROM16.S b/vm/mterp/armv5te/OP_MOVE_FROM16.S
index fe54374..fdcc64e 100644
--- a/vm/mterp/armv5te/OP_MOVE_FROM16.S
+++ b/vm/mterp/armv5te/OP_MOVE_FROM16.S
@@ -8,4 +8,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     SET_VREG(r2, r0)                    @ fp[AA]<- r2
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_MOVE_RESULT.S b/vm/mterp/armv5te/OP_MOVE_RESULT.S
index d19de23..9de8401 100644
--- a/vm/mterp/armv5te/OP_MOVE_RESULT.S
+++ b/vm/mterp/armv5te/OP_MOVE_RESULT.S
@@ -7,4 +7,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     SET_VREG(r0, r2)                    @ fp[AA]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_MOVE_RESULT_WIDE.S b/vm/mterp/armv5te/OP_MOVE_RESULT_WIDE.S
index 7bb8254..92f7443 100644
--- a/vm/mterp/armv5te/OP_MOVE_RESULT_WIDE.S
+++ b/vm/mterp/armv5te/OP_MOVE_RESULT_WIDE.S
@@ -8,4 +8,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r2, {r0-r1}                 @ fp[AA]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_MOVE_WIDE.S b/vm/mterp/armv5te/OP_MOVE_WIDE.S
index 6bcc89a..05151e1 100644
--- a/vm/mterp/armv5te/OP_MOVE_WIDE.S
+++ b/vm/mterp/armv5te/OP_MOVE_WIDE.S
@@ -11,4 +11,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r2, {r0-r1}                 @ fp[A]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_MOVE_WIDE_16.S b/vm/mterp/armv5te/OP_MOVE_WIDE_16.S
index 88d996f..172ef03 100644
--- a/vm/mterp/armv5te/OP_MOVE_WIDE_16.S
+++ b/vm/mterp/armv5te/OP_MOVE_WIDE_16.S
@@ -10,4 +10,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r2, {r0-r1}                 @ fp[AAAA]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_MOVE_WIDE_FROM16.S b/vm/mterp/armv5te/OP_MOVE_WIDE_FROM16.S
index 0771dbc..81ae7dc 100644
--- a/vm/mterp/armv5te/OP_MOVE_WIDE_FROM16.S
+++ b/vm/mterp/armv5te/OP_MOVE_WIDE_FROM16.S
@@ -10,4 +10,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r2, {r0-r1}                 @ fp[AA]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_MUL_LONG.S b/vm/mterp/armv5te/OP_MUL_LONG.S
index b812ca1..3a7aac1 100644
--- a/vm/mterp/armv5te/OP_MUL_LONG.S
+++ b/vm/mterp/armv5te/OP_MUL_LONG.S
@@ -39,4 +39,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r0, {r9-r10}                @ vAA/vAA+1<- r9/r10
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_MUL_LONG_2ADDR.S b/vm/mterp/armv5te/OP_MUL_LONG_2ADDR.S
index 4c1bcb8..a561dc9 100644
--- a/vm/mterp/armv5te/OP_MUL_LONG_2ADDR.S
+++ b/vm/mterp/armv5te/OP_MUL_LONG_2ADDR.S
@@ -24,4 +24,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r0, {r9-r10}                @ vAA/vAA+1<- r9/r10
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_NEW_ARRAY.S b/vm/mterp/armv5te/OP_NEW_ARRAY.S
index 55fc4f3..da93c45 100644
--- a/vm/mterp/armv5te/OP_NEW_ARRAY.S
+++ b/vm/mterp/armv5te/OP_NEW_ARRAY.S
@@ -59,4 +59,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     SET_VREG(r0, r2)                    @ vA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_NEW_INSTANCE.S b/vm/mterp/armv5te/OP_NEW_INSTANCE.S
index 639d9c6..2687e55 100644
--- a/vm/mterp/armv5te/OP_NEW_INSTANCE.S
+++ b/vm/mterp/armv5te/OP_NEW_INSTANCE.S
@@ -66,4 +66,3 @@
 
 .LstrInstantiationErrorPtr:
     .word   .LstrInstantiationError
-
diff --git a/vm/mterp/armv5te/OP_NOP.S b/vm/mterp/armv5te/OP_NOP.S
index 1b72d3c..ff4cf5a 100644
--- a/vm/mterp/armv5te/OP_NOP.S
+++ b/vm/mterp/armv5te/OP_NOP.S
@@ -12,4 +12,3 @@
     MTERP_ENTRY2
     .fnend
 #endif
-
diff --git a/vm/mterp/armv5te/OP_PACKED_SWITCH.S b/vm/mterp/armv5te/OP_PACKED_SWITCH.S
index 72e742a..941b232 100644
--- a/vm/mterp/armv5te/OP_PACKED_SWITCH.S
+++ b/vm/mterp/armv5te/OP_PACKED_SWITCH.S
@@ -32,4 +32,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 #endif
-
diff --git a/vm/mterp/armv5te/OP_RETURN.S b/vm/mterp/armv5te/OP_RETURN.S
index f76a223..8838182 100644
--- a/vm/mterp/armv5te/OP_RETURN.S
+++ b/vm/mterp/armv5te/OP_RETURN.S
@@ -10,4 +10,3 @@
     GET_VREG(r0, r2)                    @ r0<- vAA
     str     r0, [rGLUE, #offGlue_retval] @ retval.i <- vAA
     b       common_returnFromMethod
-
diff --git a/vm/mterp/armv5te/OP_RETURN_VOID.S b/vm/mterp/armv5te/OP_RETURN_VOID.S
index 647002d..e09ebb0 100644
--- a/vm/mterp/armv5te/OP_RETURN_VOID.S
+++ b/vm/mterp/armv5te/OP_RETURN_VOID.S
@@ -1,3 +1,2 @@
 %verify "executed"
     b       common_returnFromMethod
-
diff --git a/vm/mterp/armv5te/OP_RETURN_WIDE.S b/vm/mterp/armv5te/OP_RETURN_WIDE.S
index 2d30792..33880de 100644
--- a/vm/mterp/armv5te/OP_RETURN_WIDE.S
+++ b/vm/mterp/armv5te/OP_RETURN_WIDE.S
@@ -10,4 +10,3 @@
     ldmia   r2, {r0-r1}                 @ r0/r1 <- vAA/vAA+1
     stmia   r3, {r0-r1}                 @ retval<- r0/r1
     b       common_returnFromMethod
-
diff --git a/vm/mterp/armv5te/OP_SGET.S b/vm/mterp/armv5te/OP_SGET.S
index 17ab26a..c803d27 100644
--- a/vm/mterp/armv5te/OP_SGET.S
+++ b/vm/mterp/armv5te/OP_SGET.S
@@ -1,3 +1,4 @@
+%default { "barrier":"@ no-op " }
 %verify "executed"
 %verify "field already resolved"
 %verify "field not yet resolved"
@@ -16,6 +17,7 @@
     beq     .L${opcode}_resolve         @ yes, do resolve
 .L${opcode}_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    $barrier                            @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -35,4 +37,3 @@
     cmp     r0, #0                      @ success?
     bne     .L${opcode}_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
-
diff --git a/vm/mterp/armv5te/OP_SGET_OBJECT_VOLATILE.S b/vm/mterp/armv5te/OP_SGET_OBJECT_VOLATILE.S
new file mode 100644
index 0000000..8b9c103
--- /dev/null
+++ b/vm/mterp/armv5te/OP_SGET_OBJECT_VOLATILE.S
@@ -0,0 +1,2 @@
+%verify "executed"
+%include "armv5te/OP_SGET.S" {"barrier":"SMP_DMB"}
diff --git a/vm/mterp/armv5te/OP_SGET_VOLATILE.S b/vm/mterp/armv5te/OP_SGET_VOLATILE.S
new file mode 100644
index 0000000..8b9c103
--- /dev/null
+++ b/vm/mterp/armv5te/OP_SGET_VOLATILE.S
@@ -0,0 +1,2 @@
+%verify "executed"
+%include "armv5te/OP_SGET.S" {"barrier":"SMP_DMB"}
diff --git a/vm/mterp/armv5te/OP_SGET_WIDE.S b/vm/mterp/armv5te/OP_SGET_WIDE.S
index ff0238c..768b9da 100644
--- a/vm/mterp/armv5te/OP_SGET_WIDE.S
+++ b/vm/mterp/armv5te/OP_SGET_WIDE.S
@@ -17,7 +17,7 @@
     mov     r9, rINST, lsr #8           @ r9<- AA
     .if $volatile
     add     r0, r0, #offStaticField_value @ r0<- pointer to data
-    bl      android_quasiatomic_read_64 @ r0/r1<- contents of field
+    bl      dvmQuasiAtomicRead64        @ r0/r1<- contents of field
     .else
     ldrd    r0, [r0, #offStaticField_value] @ r0/r1<- field value (aligned)
     .endif
@@ -42,4 +42,3 @@
     cmp     r0, #0                      @ success?
     bne     .L${opcode}_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
-
diff --git a/vm/mterp/armv5te/OP_SHL_LONG.S b/vm/mterp/armv5te/OP_SHL_LONG.S
index 3510565..b48ca5e 100644
--- a/vm/mterp/armv5te/OP_SHL_LONG.S
+++ b/vm/mterp/armv5te/OP_SHL_LONG.S
@@ -30,4 +30,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_SHL_LONG_2ADDR.S b/vm/mterp/armv5te/OP_SHL_LONG_2ADDR.S
index 93f8260..42a0904 100644
--- a/vm/mterp/armv5te/OP_SHL_LONG_2ADDR.S
+++ b/vm/mterp/armv5te/OP_SHL_LONG_2ADDR.S
@@ -26,4 +26,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_SHR_LONG.S b/vm/mterp/armv5te/OP_SHR_LONG.S
index c7f10aa..e6489a0 100644
--- a/vm/mterp/armv5te/OP_SHR_LONG.S
+++ b/vm/mterp/armv5te/OP_SHR_LONG.S
@@ -30,4 +30,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_SHR_LONG_2ADDR.S b/vm/mterp/armv5te/OP_SHR_LONG_2ADDR.S
index 188017f..9414ffb 100644
--- a/vm/mterp/armv5te/OP_SHR_LONG_2ADDR.S
+++ b/vm/mterp/armv5te/OP_SHR_LONG_2ADDR.S
@@ -26,4 +26,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_SPUT.S b/vm/mterp/armv5te/OP_SPUT.S
index 5236614..c9919ba 100644
--- a/vm/mterp/armv5te/OP_SPUT.S
+++ b/vm/mterp/armv5te/OP_SPUT.S
@@ -1,3 +1,4 @@
+%default { "barrier":"@ no-op " }
 %verify "executed"
 %verify "field already resolved"
 %verify "field not yet resolved"
@@ -19,6 +20,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    $barrier                            @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 %break
@@ -35,4 +37,3 @@
     cmp     r0, #0                      @ success?
     bne     .L${opcode}_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
-
diff --git a/vm/mterp/armv5te/OP_SPUT_OBJECT_VOLATILE.S b/vm/mterp/armv5te/OP_SPUT_OBJECT_VOLATILE.S
new file mode 100644
index 0000000..cfb2b27
--- /dev/null
+++ b/vm/mterp/armv5te/OP_SPUT_OBJECT_VOLATILE.S
@@ -0,0 +1,2 @@
+%verify "executed"
+%include "armv5te/OP_SPUT.S" {"barrier":"SMP_DMB"}
diff --git a/vm/mterp/armv5te/OP_SPUT_VOLATILE.S b/vm/mterp/armv5te/OP_SPUT_VOLATILE.S
new file mode 100644
index 0000000..cfb2b27
--- /dev/null
+++ b/vm/mterp/armv5te/OP_SPUT_VOLATILE.S
@@ -0,0 +1,2 @@
+%verify "executed"
+%include "armv5te/OP_SPUT.S" {"barrier":"SMP_DMB"}
diff --git a/vm/mterp/armv5te/OP_SPUT_WIDE.S b/vm/mterp/armv5te/OP_SPUT_WIDE.S
index 69b106c..330c72b 100644
--- a/vm/mterp/armv5te/OP_SPUT_WIDE.S
+++ b/vm/mterp/armv5te/OP_SPUT_WIDE.S
@@ -21,7 +21,7 @@
     GET_INST_OPCODE(r10)                @ extract opcode from rINST
     .if $volatile
     add     r2, r2, #offStaticField_value @ r2<- pointer to data
-    bl      android_quasiatomic_swap_64 @ stores r0/r1 into addr r2
+    bl      dvmQuasiAtomicSwap64        @ stores r0/r1 into addr r2
     .else
     strd    r0, [r2, #offStaticField_value] @ field<- vAA/vAA+1
     .endif
@@ -44,4 +44,3 @@
     mov     r2, r0                      @ copy to r2
     bne     .L${opcode}_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
-
diff --git a/vm/mterp/armv5te/OP_THROW.S b/vm/mterp/armv5te/OP_THROW.S
index c8c5c36..dd0a0b8 100644
--- a/vm/mterp/armv5te/OP_THROW.S
+++ b/vm/mterp/armv5te/OP_THROW.S
@@ -7,9 +7,9 @@
     mov     r2, rINST, lsr #8           @ r2<- AA
     GET_VREG(r1, r2)                    @ r1<- vAA (exception object)
     ldr     r0, [rGLUE, #offGlue_self]  @ r0<- glue->self
+    EXPORT_PC()                         @ exception handler can throw
     cmp     r1, #0                      @ null object?
     beq     common_errNullObject        @ yes, throw an NPE instead
     @ bypass dvmSetException, just store it
     str     r1, [r0, #offThread_exception]  @ thread->exception<- obj
     b       common_exceptionThrown
-
diff --git a/vm/mterp/armv5te/OP_THROW_VERIFICATION_ERROR.S b/vm/mterp/armv5te/OP_THROW_VERIFICATION_ERROR.S
index 0ed928b..8bd4f35 100644
--- a/vm/mterp/armv5te/OP_THROW_VERIFICATION_ERROR.S
+++ b/vm/mterp/armv5te/OP_THROW_VERIFICATION_ERROR.S
@@ -11,4 +11,3 @@
     mov     r1, rINST, lsr #8           @ r1<- AA
     bl      dvmThrowVerificationError   @ always throws
     b       common_exceptionThrown      @ handle exception
-
diff --git a/vm/mterp/armv5te/OP_UNUSED_E3.S b/vm/mterp/armv5te/OP_UNUSED_E3.S
deleted file mode 100644
index faa7246..0000000
--- a/vm/mterp/armv5te/OP_UNUSED_E3.S
+++ /dev/null
@@ -1 +0,0 @@
-%include "armv5te/unused.S"
diff --git a/vm/mterp/armv5te/OP_UNUSED_E4.S b/vm/mterp/armv5te/OP_UNUSED_E4.S
deleted file mode 100644
index faa7246..0000000
--- a/vm/mterp/armv5te/OP_UNUSED_E4.S
+++ /dev/null
@@ -1 +0,0 @@
-%include "armv5te/unused.S"
diff --git a/vm/mterp/armv5te/OP_UNUSED_E5.S b/vm/mterp/armv5te/OP_UNUSED_E5.S
deleted file mode 100644
index faa7246..0000000
--- a/vm/mterp/armv5te/OP_UNUSED_E5.S
+++ /dev/null
@@ -1 +0,0 @@
-%include "armv5te/unused.S"
diff --git a/vm/mterp/armv5te/OP_UNUSED_E6.S b/vm/mterp/armv5te/OP_UNUSED_E6.S
deleted file mode 100644
index faa7246..0000000
--- a/vm/mterp/armv5te/OP_UNUSED_E6.S
+++ /dev/null
@@ -1 +0,0 @@
-%include "armv5te/unused.S"
diff --git a/vm/mterp/armv5te/OP_UNUSED_E7.S b/vm/mterp/armv5te/OP_UNUSED_E7.S
deleted file mode 100644
index faa7246..0000000
--- a/vm/mterp/armv5te/OP_UNUSED_E7.S
+++ /dev/null
@@ -1 +0,0 @@
-%include "armv5te/unused.S"
diff --git a/vm/mterp/armv5te/OP_UNUSED_FC.S b/vm/mterp/armv5te/OP_UNUSED_FC.S
deleted file mode 100644
index faa7246..0000000
--- a/vm/mterp/armv5te/OP_UNUSED_FC.S
+++ /dev/null
@@ -1 +0,0 @@
-%include "armv5te/unused.S"
diff --git a/vm/mterp/armv5te/OP_UNUSED_FD.S b/vm/mterp/armv5te/OP_UNUSED_FD.S
deleted file mode 100644
index faa7246..0000000
--- a/vm/mterp/armv5te/OP_UNUSED_FD.S
+++ /dev/null
@@ -1 +0,0 @@
-%include "armv5te/unused.S"
diff --git a/vm/mterp/armv5te/OP_UNUSED_FE.S b/vm/mterp/armv5te/OP_UNUSED_FE.S
deleted file mode 100644
index faa7246..0000000
--- a/vm/mterp/armv5te/OP_UNUSED_FE.S
+++ /dev/null
@@ -1 +0,0 @@
-%include "armv5te/unused.S"
diff --git a/vm/mterp/armv5te/OP_USHR_LONG.S b/vm/mterp/armv5te/OP_USHR_LONG.S
index fc14b57..d9ae338 100644
--- a/vm/mterp/armv5te/OP_USHR_LONG.S
+++ b/vm/mterp/armv5te/OP_USHR_LONG.S
@@ -30,4 +30,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/OP_USHR_LONG_2ADDR.S b/vm/mterp/armv5te/OP_USHR_LONG_2ADDR.S
index 18167e3..27592a4 100644
--- a/vm/mterp/armv5te/OP_USHR_LONG_2ADDR.S
+++ b/vm/mterp/armv5te/OP_USHR_LONG_2ADDR.S
@@ -26,4 +26,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv5te/bincmp.S b/vm/mterp/armv5te/bincmp.S
index 1f43918..58f9079 100644
--- a/vm/mterp/armv5te/bincmp.S
+++ b/vm/mterp/armv5te/bincmp.S
@@ -29,4 +29,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 #endif
-
diff --git a/vm/mterp/armv5te/binop.S b/vm/mterp/armv5te/binop.S
index 0f085dc..d169ed6 100644
--- a/vm/mterp/armv5te/binop.S
+++ b/vm/mterp/armv5te/binop.S
@@ -33,4 +33,3 @@
     SET_VREG($result, r9)               @ vAA<- $result
     GOTO_OPCODE(ip)                     @ jump to next instruction
     /* 11-14 instructions */
-
diff --git a/vm/mterp/armv5te/binop2addr.S b/vm/mterp/armv5te/binop2addr.S
index 27afdda..061242a 100644
--- a/vm/mterp/armv5te/binop2addr.S
+++ b/vm/mterp/armv5te/binop2addr.S
@@ -31,4 +31,3 @@
     SET_VREG($result, r9)               @ vAA<- $result
     GOTO_OPCODE(ip)                     @ jump to next instruction
     /* 10-13 instructions */
-
diff --git a/vm/mterp/armv5te/binopLit16.S b/vm/mterp/armv5te/binopLit16.S
index 3cb1875..df49929 100644
--- a/vm/mterp/armv5te/binopLit16.S
+++ b/vm/mterp/armv5te/binopLit16.S
@@ -28,4 +28,3 @@
     SET_VREG($result, r9)               @ vAA<- $result
     GOTO_OPCODE(ip)                     @ jump to next instruction
     /* 10-13 instructions */
-
diff --git a/vm/mterp/armv5te/binopLit8.S b/vm/mterp/armv5te/binopLit8.S
index 4406259..2addd26 100644
--- a/vm/mterp/armv5te/binopLit8.S
+++ b/vm/mterp/armv5te/binopLit8.S
@@ -30,4 +30,3 @@
     SET_VREG($result, r9)               @ vAA<- $result
     GOTO_OPCODE(ip)                     @ jump to next instruction
     /* 10-12 instructions */
-
diff --git a/vm/mterp/armv5te/binopWide.S b/vm/mterp/armv5te/binopWide.S
index 87c5f07..71fd3fe 100644
--- a/vm/mterp/armv5te/binopWide.S
+++ b/vm/mterp/armv5te/binopWide.S
@@ -36,4 +36,3 @@
     stmia   r9, {$result0,$result1}     @ vAA/vAA+1<- $result0/$result1
     GOTO_OPCODE(ip)                     @ jump to next instruction
     /* 14-17 instructions */
-
diff --git a/vm/mterp/armv5te/binopWide2addr.S b/vm/mterp/armv5te/binopWide2addr.S
index 98c6c98..3fd5747 100644
--- a/vm/mterp/armv5te/binopWide2addr.S
+++ b/vm/mterp/armv5te/binopWide2addr.S
@@ -33,4 +33,3 @@
     stmia   r9, {$result0,$result1}     @ vAA/vAA+1<- $result0/$result1
     GOTO_OPCODE(ip)                     @ jump to next instruction
     /* 12-15 instructions */
-
diff --git a/vm/mterp/armv5te/entry.S b/vm/mterp/armv5te/entry.S
index 99e2366..881c0e0 100644
--- a/vm/mterp/armv5te/entry.S
+++ b/vm/mterp/armv5te/entry.S
@@ -148,4 +148,3 @@
  */
 strBadEntryPoint:
     .word   .LstrBadEntryPoint
-
diff --git a/vm/mterp/armv5te/footer.S b/vm/mterp/armv5te/footer.S
index 6ef115b..72eb5ce 100644
--- a/vm/mterp/armv5te/footer.S
+++ b/vm/mterp/armv5te/footer.S
@@ -1223,4 +1223,3 @@
     .asciz  "<0x%x>"
 .LstrPrintLong:
     .asciz  "<%lld>"
-
diff --git a/vm/mterp/armv5te/header.S b/vm/mterp/armv5te/header.S
index b6e9891..bd6b7ee 100644
--- a/vm/mterp/armv5te/header.S
+++ b/vm/mterp/armv5te/header.S
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 /*
  * ARMv5 definitions and declarations.
  */
diff --git a/vm/mterp/armv5te/platform.S b/vm/mterp/armv5te/platform.S
index 4e7c03e..9f59c8b 100644
--- a/vm/mterp/armv5te/platform.S
+++ b/vm/mterp/armv5te/platform.S
@@ -34,3 +34,8 @@
     ldmfd   sp!, {\regs,pc}
 .endm
 
+/*
+ * Macro for data memory barrier; not meaningful pre-ARMv6K.
+ */
+.macro  SMP_DMB
+.endm
diff --git a/vm/mterp/armv5te/stub.S b/vm/mterp/armv5te/stub.S
index 7607f09..54f0778 100644
--- a/vm/mterp/armv5te/stub.S
+++ b/vm/mterp/armv5te/stub.S
@@ -6,4 +6,3 @@
     FETCH_INST()                    @ load next instruction from rPC
     GET_INST_OPCODE(ip)             @ ...trim down to just the opcode
     GOTO_OPCODE(ip)                 @ ...and jump to the handler
-
diff --git a/vm/mterp/armv5te/unopWide.S b/vm/mterp/armv5te/unopWide.S
index e097317..0805fdf 100644
--- a/vm/mterp/armv5te/unopWide.S
+++ b/vm/mterp/armv5te/unopWide.S
@@ -20,4 +20,3 @@
     stmia   r9, {r0-r1}                 @ vAA<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
     /* 12-13 instructions */
-
diff --git a/vm/mterp/armv5te/unused.S b/vm/mterp/armv5te/unused.S
index 1c82919..0194f58 100644
--- a/vm/mterp/armv5te/unused.S
+++ b/vm/mterp/armv5te/unused.S
@@ -1,2 +1 @@
     bl      common_abort
-
diff --git a/vm/mterp/armv5te/zcmp.S b/vm/mterp/armv5te/zcmp.S
index 861ca5b..d79e7c4 100644
--- a/vm/mterp/armv5te/zcmp.S
+++ b/vm/mterp/armv5te/zcmp.S
@@ -29,4 +29,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 #endif
-
diff --git a/vm/mterp/armv6t2/OP_ARRAY_LENGTH.S b/vm/mterp/armv6t2/OP_ARRAY_LENGTH.S
index bb995e2..05991be 100644
--- a/vm/mterp/armv6t2/OP_ARRAY_LENGTH.S
+++ b/vm/mterp/armv6t2/OP_ARRAY_LENGTH.S
@@ -12,4 +12,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     SET_VREG(r3, r2)                    @ vB<- length
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv6t2/OP_CONST_4.S b/vm/mterp/armv6t2/OP_CONST_4.S
index 0d6092c..8ec67d7 100644
--- a/vm/mterp/armv6t2/OP_CONST_4.S
+++ b/vm/mterp/armv6t2/OP_CONST_4.S
@@ -7,4 +7,3 @@
     GET_INST_OPCODE(ip)                 @ ip<- opcode from rINST
     SET_VREG(r1, r0)                    @ fp[A]<- r1
     GOTO_OPCODE(ip)                     @ execute next instruction
-
diff --git a/vm/mterp/armv6t2/OP_DOUBLE_TO_INT.S b/vm/mterp/armv6t2/OP_DOUBLE_TO_INT.S
index d3882f3..f66dc5f 100644
--- a/vm/mterp/armv6t2/OP_DOUBLE_TO_INT.S
+++ b/vm/mterp/armv6t2/OP_DOUBLE_TO_INT.S
@@ -52,4 +52,3 @@
     add     sp, sp, #4
     ldmfd   sp!, {r4, r5, pc}
 #endif
-
diff --git a/vm/mterp/armv6t2/OP_DOUBLE_TO_LONG.S b/vm/mterp/armv6t2/OP_DOUBLE_TO_LONG.S
index a9ecab7..ac751de 100644
--- a/vm/mterp/armv6t2/OP_DOUBLE_TO_LONG.S
+++ b/vm/mterp/armv6t2/OP_DOUBLE_TO_LONG.S
@@ -51,4 +51,3 @@
 1:
     add     sp, sp, #4
     ldmfd   sp!, {r4, r5, pc}
-
diff --git a/vm/mterp/armv6t2/OP_FLOAT_TO_INT.S b/vm/mterp/armv6t2/OP_FLOAT_TO_INT.S
index 444ebae..4ba28e7 100644
--- a/vm/mterp/armv6t2/OP_FLOAT_TO_INT.S
+++ b/vm/mterp/armv6t2/OP_FLOAT_TO_INT.S
@@ -38,4 +38,3 @@
     bl      __aeabi_f2iz                @ convert float to int
     ldmfd   sp!, {r4, pc}
 #endif
-
diff --git a/vm/mterp/armv6t2/OP_FLOAT_TO_LONG.S b/vm/mterp/armv6t2/OP_FLOAT_TO_LONG.S
index 5efd04b..168e338 100644
--- a/vm/mterp/armv6t2/OP_FLOAT_TO_LONG.S
+++ b/vm/mterp/armv6t2/OP_FLOAT_TO_LONG.S
@@ -38,4 +38,3 @@
     mov     r0, r4                      @ recover arg
     bl      __aeabi_f2lz                @ convert float to long
     ldmfd   sp!, {r4, pc}
-
diff --git a/vm/mterp/armv6t2/OP_IGET.S b/vm/mterp/armv6t2/OP_IGET.S
index 537c534..f5a21eb 100644
--- a/vm/mterp/armv6t2/OP_IGET.S
+++ b/vm/mterp/armv6t2/OP_IGET.S
@@ -43,4 +43,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv6t2/OP_IGET_QUICK.S b/vm/mterp/armv6t2/OP_IGET_QUICK.S
index 83714d5..0ce2ebc 100644
--- a/vm/mterp/armv6t2/OP_IGET_QUICK.S
+++ b/vm/mterp/armv6t2/OP_IGET_QUICK.S
@@ -13,4 +13,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv6t2/OP_IGET_WIDE.S b/vm/mterp/armv6t2/OP_IGET_WIDE.S
index 948d53d..92cd1a6 100644
--- a/vm/mterp/armv6t2/OP_IGET_WIDE.S
+++ b/vm/mterp/armv6t2/OP_IGET_WIDE.S
@@ -40,4 +40,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r3, {r0-r1}                 @ fp[A]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv6t2/OP_IGET_WIDE_QUICK.S b/vm/mterp/armv6t2/OP_IGET_WIDE_QUICK.S
index 98abf72..067d40d 100644
--- a/vm/mterp/armv6t2/OP_IGET_WIDE_QUICK.S
+++ b/vm/mterp/armv6t2/OP_IGET_WIDE_QUICK.S
@@ -13,4 +13,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r3, {r0-r1}                 @ fp[A]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv6t2/OP_IPUT.S b/vm/mterp/armv6t2/OP_IPUT.S
index 10eea24..b69443b 100644
--- a/vm/mterp/armv6t2/OP_IPUT.S
+++ b/vm/mterp/armv6t2/OP_IPUT.S
@@ -43,4 +43,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     $store  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv6t2/OP_IPUT_QUICK.S b/vm/mterp/armv6t2/OP_IPUT_QUICK.S
index 0b6d61c..ad87b55 100644
--- a/vm/mterp/armv6t2/OP_IPUT_QUICK.S
+++ b/vm/mterp/armv6t2/OP_IPUT_QUICK.S
@@ -13,4 +13,3 @@
     str     r0, [r3, r1]                @ obj.field (always 32 bits)<- r0
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv6t2/OP_IPUT_WIDE.S b/vm/mterp/armv6t2/OP_IPUT_WIDE.S
index 5c1ab97..334e352 100644
--- a/vm/mterp/armv6t2/OP_IPUT_WIDE.S
+++ b/vm/mterp/armv6t2/OP_IPUT_WIDE.S
@@ -37,4 +37,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     strd    r0, [r9, r3]                @ obj.field (64 bits, aligned)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv6t2/OP_IPUT_WIDE_QUICK.S b/vm/mterp/armv6t2/OP_IPUT_WIDE_QUICK.S
index 5cf4798..09f7a8e 100644
--- a/vm/mterp/armv6t2/OP_IPUT_WIDE_QUICK.S
+++ b/vm/mterp/armv6t2/OP_IPUT_WIDE_QUICK.S
@@ -13,4 +13,3 @@
     strd    r0, [r2, r3]                @ obj.field (64 bits, aligned)<- r0/r1
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv6t2/OP_MOVE.S b/vm/mterp/armv6t2/OP_MOVE.S
index 0c11d1a..3047158 100644
--- a/vm/mterp/armv6t2/OP_MOVE.S
+++ b/vm/mterp/armv6t2/OP_MOVE.S
@@ -8,4 +8,3 @@
     GET_INST_OPCODE(ip)                 @ ip<- opcode from rINST
     SET_VREG(r2, r0)                    @ fp[A]<- r2
     GOTO_OPCODE(ip)                     @ execute next instruction
-
diff --git a/vm/mterp/armv6t2/OP_MOVE_WIDE.S b/vm/mterp/armv6t2/OP_MOVE_WIDE.S
index c896e62..adc2c95 100644
--- a/vm/mterp/armv6t2/OP_MOVE_WIDE.S
+++ b/vm/mterp/armv6t2/OP_MOVE_WIDE.S
@@ -10,4 +10,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r2, {r0-r1}                 @ fp[A]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv6t2/OP_MUL_LONG_2ADDR.S b/vm/mterp/armv6t2/OP_MUL_LONG_2ADDR.S
index c050ecc..1526a1e 100644
--- a/vm/mterp/armv6t2/OP_MUL_LONG_2ADDR.S
+++ b/vm/mterp/armv6t2/OP_MUL_LONG_2ADDR.S
@@ -23,4 +23,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r0, {r9-r10}                @ vAA/vAA+1<- r9/r10
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv6t2/OP_SHL_LONG_2ADDR.S b/vm/mterp/armv6t2/OP_SHL_LONG_2ADDR.S
index bad569a..502481e 100644
--- a/vm/mterp/armv6t2/OP_SHL_LONG_2ADDR.S
+++ b/vm/mterp/armv6t2/OP_SHL_LONG_2ADDR.S
@@ -25,4 +25,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv6t2/OP_SHR_LONG_2ADDR.S b/vm/mterp/armv6t2/OP_SHR_LONG_2ADDR.S
index fa77b61..501b3f2 100644
--- a/vm/mterp/armv6t2/OP_SHR_LONG_2ADDR.S
+++ b/vm/mterp/armv6t2/OP_SHR_LONG_2ADDR.S
@@ -25,4 +25,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv6t2/OP_USHR_LONG_2ADDR.S b/vm/mterp/armv6t2/OP_USHR_LONG_2ADDR.S
index 1183d1f..a1fcef4 100644
--- a/vm/mterp/armv6t2/OP_USHR_LONG_2ADDR.S
+++ b/vm/mterp/armv6t2/OP_USHR_LONG_2ADDR.S
@@ -25,4 +25,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
-
diff --git a/vm/mterp/armv6t2/bincmp.S b/vm/mterp/armv6t2/bincmp.S
index f3b81b0..002eeed 100644
--- a/vm/mterp/armv6t2/bincmp.S
+++ b/vm/mterp/armv6t2/bincmp.S
@@ -28,4 +28,3 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 #endif
-
diff --git a/vm/mterp/armv6t2/binop2addr.S b/vm/mterp/armv6t2/binop2addr.S
index 9b421bc..b402156 100644
--- a/vm/mterp/armv6t2/binop2addr.S
+++ b/vm/mterp/armv6t2/binop2addr.S
@@ -30,4 +30,3 @@
     SET_VREG($result, r9)               @ vAA<- $result
     GOTO_OPCODE(ip)                     @ jump to next instruction
     /* 10-13 instructions */
-
diff --git a/vm/mterp/armv6t2/binopLit16.S b/vm/mterp/armv6t2/binopLit16.S
index 7bc9902..1f67524 100644
--- a/vm/mterp/armv6t2/binopLit16.S
+++ b/vm/mterp/armv6t2/binopLit16.S
@@ -27,4 +27,3 @@
     SET_VREG($result, r9)               @ vAA<- $result
     GOTO_OPCODE(ip)                     @ jump to next instruction
     /* 10-13 instructions */
-
diff --git a/vm/mterp/armv6t2/binopWide2addr.S b/vm/mterp/armv6t2/binopWide2addr.S
index af83c7b..0b4691f 100644
--- a/vm/mterp/armv6t2/binopWide2addr.S
+++ b/vm/mterp/armv6t2/binopWide2addr.S
@@ -32,4 +32,3 @@
     stmia   r9, {$result0,$result1}     @ vAA/vAA+1<- $result0/$result1
     GOTO_OPCODE(ip)                     @ jump to next instruction
     /* 12-15 instructions */
-
diff --git a/vm/mterp/armv6t2/unopWide.S b/vm/mterp/armv6t2/unopWide.S
index 62d8645..e0a303e 100644
--- a/vm/mterp/armv6t2/unopWide.S
+++ b/vm/mterp/armv6t2/unopWide.S
@@ -19,4 +19,3 @@
     stmia   r9, {r0-r1}                 @ vAA<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
     /* 10-11 instructions */
-
diff --git a/vm/mterp/armv7-a/platform.S b/vm/mterp/armv7-a/platform.S
new file mode 100644
index 0000000..6419da1
--- /dev/null
+++ b/vm/mterp/armv7-a/platform.S
@@ -0,0 +1,51 @@
+/*
+ * ===========================================================================
+ *  CPU-version-specific defines
+ * ===========================================================================
+ */
+
+/*
+ * Macro for "LDR PC,xxx", which is not allowed pre-ARMv5.  Essentially a
+ * one-way branch.
+ *
+ * May modify IP.  Does not modify LR.
+ */
+.macro  LDR_PC source
+    ldr     pc, \source
+.endm
+
+/*
+ * Macro for "MOV LR,PC / LDR PC,xxx", which is not allowed pre-ARMv5.
+ * Jump to subroutine.
+ *
+ * May modify IP and LR.
+ */
+.macro  LDR_PC_LR source
+    mov     lr, pc
+    ldr     pc, \source
+.endm
+
+/*
+ * Macro for "LDMFD SP!, {...regs...,PC}".
+ *
+ * May modify IP and LR.
+ */
+.macro  LDMFD_PC regs
+    ldmfd   sp!, {\regs,pc}
+.endm
+
+#if !defined(ANDROID_SMP)
+# error "Must define ANDROID_SMP"
+#endif
+
+/*
+ * Macro for data memory barrier; not meaningful pre-ARMv6K.
+ * If the argument is nonzero, emit barrier; otherwise, emit nothing.
+ */
+.macro  SMP_DMB
+#if ANDROID_SMP != 0
+    dmb
+#else
+    /* not SMP */
+#endif
+.endm
diff --git a/vm/mterp/c/OP_APUT_OBJECT.c b/vm/mterp/c/OP_APUT_OBJECT.c
index cc87f5d..07e48c6 100644
--- a/vm/mterp/c/OP_APUT_OBJECT.c
+++ b/vm/mterp/c/OP_APUT_OBJECT.c
@@ -32,8 +32,9 @@
             }
         }
         ILOGV("+ APUT[%d]=0x%08x", GET_REGISTER(vsrc2), GET_REGISTER(vdst));
-        ((u4*) arrayObj->contents)[GET_REGISTER(vsrc2)] =
-            GET_REGISTER(vdst);
+        dvmSetObjectArrayElement(arrayObj,
+                                 GET_REGISTER(vsrc2),
+                                 (Object *)GET_REGISTER(vdst));
     }
     FINISH(2);
 OP_END
diff --git a/vm/mterp/c/OP_FILL_ARRAY_DATA.c b/vm/mterp/c/OP_FILL_ARRAY_DATA.c
index 157d3fc..095b465 100644
--- a/vm/mterp/c/OP_FILL_ARRAY_DATA.c
+++ b/vm/mterp/c/OP_FILL_ARRAY_DATA.c
@@ -14,7 +14,7 @@
             arrayData >= curMethod->insns + dvmGetMethodInsnsSize(curMethod))
         {
             /* should have been caught in verifier */
-            dvmThrowException("Ljava/lang/InternalError;", 
+            dvmThrowException("Ljava/lang/InternalError;",
                               "bad fill array data");
             GOTO_exceptionThrown();
         }
diff --git a/vm/mterp/c/OP_IGET_OBJECT_VOLATILE.c b/vm/mterp/c/OP_IGET_OBJECT_VOLATILE.c
new file mode 100644
index 0000000..3577552
--- /dev/null
+++ b/vm/mterp/c/OP_IGET_OBJECT_VOLATILE.c
@@ -0,0 +1,2 @@
+HANDLE_IGET_X(OP_IGET_OBJECT_VOLATILE,  "-object-volatile", ObjectVolatile, _AS_OBJECT)
+OP_END
diff --git a/vm/mterp/c/OP_IGET_VOLATILE.c b/vm/mterp/c/OP_IGET_VOLATILE.c
new file mode 100644
index 0000000..7a3be56
--- /dev/null
+++ b/vm/mterp/c/OP_IGET_VOLATILE.c
@@ -0,0 +1,2 @@
+HANDLE_IGET_X(OP_IGET_VOLATILE,         "-volatile", IntVolatile, )
+OP_END
diff --git a/vm/mterp/c/OP_IPUT_OBJECT_VOLATILE.c b/vm/mterp/c/OP_IPUT_OBJECT_VOLATILE.c
new file mode 100644
index 0000000..cce63c1
--- /dev/null
+++ b/vm/mterp/c/OP_IPUT_OBJECT_VOLATILE.c
@@ -0,0 +1,2 @@
+HANDLE_IPUT_X(OP_IPUT_OBJECT_VOLATILE,  "-object-volatile", ObjectVolatile, _AS_OBJECT)
+OP_END
diff --git a/vm/mterp/c/OP_IPUT_VOLATILE.c b/vm/mterp/c/OP_IPUT_VOLATILE.c
new file mode 100644
index 0000000..814379e
--- /dev/null
+++ b/vm/mterp/c/OP_IPUT_VOLATILE.c
@@ -0,0 +1,2 @@
+HANDLE_IPUT_X(OP_IPUT_VOLATILE,         "-volatile", IntVolatile, )
+OP_END
diff --git a/vm/mterp/c/OP_NEW_ARRAY.c b/vm/mterp/c/OP_NEW_ARRAY.c
index 22af516..525c43b 100644
--- a/vm/mterp/c/OP_NEW_ARRAY.c
+++ b/vm/mterp/c/OP_NEW_ARRAY.c
@@ -33,4 +33,3 @@
     }
     FINISH(2);
 OP_END
-
diff --git a/vm/mterp/c/OP_SGET_OBJECT_VOLATILE.c b/vm/mterp/c/OP_SGET_OBJECT_VOLATILE.c
new file mode 100644
index 0000000..0a9049f
--- /dev/null
+++ b/vm/mterp/c/OP_SGET_OBJECT_VOLATILE.c
@@ -0,0 +1,2 @@
+HANDLE_SGET_X(OP_SGET_OBJECT_VOLATILE,  "-object-volatile", ObjectVolatile, _AS_OBJECT)
+OP_END
diff --git a/vm/mterp/c/OP_SGET_VOLATILE.c b/vm/mterp/c/OP_SGET_VOLATILE.c
new file mode 100644
index 0000000..6713a54
--- /dev/null
+++ b/vm/mterp/c/OP_SGET_VOLATILE.c
@@ -0,0 +1,2 @@
+HANDLE_SGET_X(OP_SGET_VOLATILE,         "-volatile", IntVolatile, )
+OP_END
diff --git a/vm/mterp/c/OP_SPUT_OBJECT_VOLATILE.c b/vm/mterp/c/OP_SPUT_OBJECT_VOLATILE.c
new file mode 100644
index 0000000..38d6c0d
--- /dev/null
+++ b/vm/mterp/c/OP_SPUT_OBJECT_VOLATILE.c
@@ -0,0 +1,2 @@
+HANDLE_SPUT_X(OP_SPUT_OBJECT_VOLATILE,  "-object-volatile", ObjectVolatile, _AS_OBJECT)
+OP_END
diff --git a/vm/mterp/c/OP_SPUT_VOLATILE.c b/vm/mterp/c/OP_SPUT_VOLATILE.c
new file mode 100644
index 0000000..7899d05
--- /dev/null
+++ b/vm/mterp/c/OP_SPUT_VOLATILE.c
@@ -0,0 +1,2 @@
+HANDLE_SPUT_X(OP_SPUT_VOLATILE,         "-volatile", IntVolatile, )
+OP_END
diff --git a/vm/mterp/c/OP_THROW.c b/vm/mterp/c/OP_THROW.c
index 9a56040..0dcaced 100644
--- a/vm/mterp/c/OP_THROW.c
+++ b/vm/mterp/c/OP_THROW.c
@@ -2,10 +2,17 @@
     {
         Object* obj;
 
+        /*
+         * We don't create an exception here, but the process of searching
+         * for a catch block can do class lookups and throw exceptions.
+         * We need to update the saved PC.
+         */
+        EXPORT_PC();
+
         vsrc1 = INST_AA(inst);
         ILOGV("|throw v%d  (%p)", vsrc1, (void*)GET_REGISTER(vsrc1));
         obj = (Object*) GET_REGISTER(vsrc1);
-        if (!checkForNullExportPC(obj, fp, pc)) {
+        if (!checkForNull(obj)) {
             /* will throw a null pointer exception */
             LOGVV("Bad exception\n");
         } else {
diff --git a/vm/mterp/c/OP_UNUSED_E3.c b/vm/mterp/c/OP_UNUSED_E3.c
deleted file mode 100644
index d52836b..0000000
--- a/vm/mterp/c/OP_UNUSED_E3.c
+++ /dev/null
@@ -1,2 +0,0 @@
-HANDLE_OPCODE(OP_UNUSED_E3)
-OP_END
diff --git a/vm/mterp/c/OP_UNUSED_E4.c b/vm/mterp/c/OP_UNUSED_E4.c
deleted file mode 100644
index 30a714f..0000000
--- a/vm/mterp/c/OP_UNUSED_E4.c
+++ /dev/null
@@ -1,2 +0,0 @@
-HANDLE_OPCODE(OP_UNUSED_E4)
-OP_END
diff --git a/vm/mterp/c/OP_UNUSED_E5.c b/vm/mterp/c/OP_UNUSED_E5.c
deleted file mode 100644
index 0cc6ff9..0000000
--- a/vm/mterp/c/OP_UNUSED_E5.c
+++ /dev/null
@@ -1,2 +0,0 @@
-HANDLE_OPCODE(OP_UNUSED_E5)
-OP_END
diff --git a/vm/mterp/c/OP_UNUSED_E6.c b/vm/mterp/c/OP_UNUSED_E6.c
deleted file mode 100644
index 255dcd1..0000000
--- a/vm/mterp/c/OP_UNUSED_E6.c
+++ /dev/null
@@ -1,2 +0,0 @@
-HANDLE_OPCODE(OP_UNUSED_E6)
-OP_END
diff --git a/vm/mterp/c/OP_UNUSED_E7.c b/vm/mterp/c/OP_UNUSED_E7.c
deleted file mode 100644
index b910f71..0000000
--- a/vm/mterp/c/OP_UNUSED_E7.c
+++ /dev/null
@@ -1,2 +0,0 @@
-HANDLE_OPCODE(OP_UNUSED_E7)
-OP_END
diff --git a/vm/mterp/c/OP_UNUSED_FC.c b/vm/mterp/c/OP_UNUSED_FC.c
deleted file mode 100644
index 4b49684..0000000
--- a/vm/mterp/c/OP_UNUSED_FC.c
+++ /dev/null
@@ -1,2 +0,0 @@
-HANDLE_OPCODE(OP_UNUSED_FC)
-OP_END
diff --git a/vm/mterp/c/OP_UNUSED_FD.c b/vm/mterp/c/OP_UNUSED_FD.c
deleted file mode 100644
index c10efaf..0000000
--- a/vm/mterp/c/OP_UNUSED_FD.c
+++ /dev/null
@@ -1,2 +0,0 @@
-HANDLE_OPCODE(OP_UNUSED_FD)
-OP_END
diff --git a/vm/mterp/c/OP_UNUSED_FE.c b/vm/mterp/c/OP_UNUSED_FE.c
deleted file mode 100644
index 7b097d9..0000000
--- a/vm/mterp/c/OP_UNUSED_FE.c
+++ /dev/null
@@ -1,2 +0,0 @@
-HANDLE_OPCODE(OP_UNUSED_FE)
-OP_END
diff --git a/vm/mterp/c/gotoTargets.c b/vm/mterp/c/gotoTargets.c
index 9d7212f..c6c118b 100644
--- a/vm/mterp/c/gotoTargets.c
+++ b/vm/mterp/c/gotoTargets.c
@@ -94,6 +94,9 @@
                 vdst >>= 4;
             }
         }
+        if (typeCh == 'L' || typeCh == '[') {
+            dvmWriteBarrierArray(newArray, 0, newArray->length);
+        }
 
         retval.l = newArray;
     }
@@ -544,7 +547,7 @@
             LOGVV("+++ returned into break frame\n");
 #if defined(WITH_JIT)
             /* Let the Jit know the return is terminating normally */
-            CHECK_JIT();
+            CHECK_JIT_VOID();
 #endif
             GOTO_bail();
         }
@@ -919,7 +922,7 @@
 
 #if defined(WITH_JIT)
             /* Allow the Jit to end any pending trace building */
-            CHECK_JIT();
+            CHECK_JIT_VOID();
 #endif
 
             /*
diff --git a/vm/mterp/common/asm-constants.h b/vm/mterp/common/asm-constants.h
index 5e142af..dde675e 100644
--- a/vm/mterp/common/asm-constants.h
+++ b/vm/mterp/common/asm-constants.h
@@ -340,7 +340,7 @@
 MTERP_CONSTANT(ACC_ABSTRACT,        0x0400)
 
 /* flags for dvmMalloc */
-MTERP_CONSTANT(ALLOC_DONT_TRACK,    0x02)
+MTERP_CONSTANT(ALLOC_DONT_TRACK,    0x01)
 
 /* opcode number */
 MTERP_CONSTANT(OP_MOVE_EXCEPTION,   0x0d)
diff --git a/vm/mterp/config-allstubs b/vm/mterp/config-allstubs
index 72166aa..23796d8 100644
--- a/vm/mterp/config-allstubs
+++ b/vm/mterp/config-allstubs
@@ -42,4 +42,3 @@
 
 # finish
 import cstubs/enddefs.c
-
diff --git a/vm/mterp/config-armv4t b/vm/mterp/config-armv4t
index 9746376..ed39b42 100644
--- a/vm/mterp/config-armv4t
+++ b/vm/mterp/config-armv4t
@@ -66,4 +66,3 @@
 # common subroutines for asm
 import armv5te/footer.S
 import armv5te/debug.c
-
diff --git a/vm/mterp/config-armv5te b/vm/mterp/config-armv5te
index 8b4838e..2dceb04 100644
--- a/vm/mterp/config-armv5te
+++ b/vm/mterp/config-armv5te
@@ -52,4 +52,3 @@
 # common subroutines for asm
 import armv5te/footer.S
 import armv5te/debug.c
-
diff --git a/vm/mterp/config-armv5te-vfp b/vm/mterp/config-armv5te-vfp
index cc77002..ce0c521 100644
--- a/vm/mterp/config-armv5te-vfp
+++ b/vm/mterp/config-armv5te-vfp
@@ -102,4 +102,3 @@
 # common subroutines for asm
 import armv5te/footer.S
 import armv5te/debug.c
-
diff --git a/vm/mterp/config-armv7-a b/vm/mterp/config-armv7-a
index 9193632..e66640c 100644
--- a/vm/mterp/config-armv7-a
+++ b/vm/mterp/config-armv7-a
@@ -34,7 +34,7 @@
 import cstubs/stubdefs.c
 
 # highly-platform-specific defs
-import armv5te/platform.S
+import armv7-a/platform.S
 
 # common defs for the C helpers; include this before the instruction handlers
 import c/opcommon.c
@@ -164,4 +164,3 @@
 # common subroutines for asm
 import armv5te/footer.S
 import armv5te/debug.c
-
diff --git a/vm/mterp/config-armv7-a-neon b/vm/mterp/config-armv7-a-neon
index 9193632..e66640c 100644
--- a/vm/mterp/config-armv7-a-neon
+++ b/vm/mterp/config-armv7-a-neon
@@ -34,7 +34,7 @@
 import cstubs/stubdefs.c
 
 # highly-platform-specific defs
-import armv5te/platform.S
+import armv7-a/platform.S
 
 # common defs for the C helpers; include this before the instruction handlers
 import c/opcommon.c
@@ -164,4 +164,3 @@
 # common subroutines for asm
 import armv5te/footer.S
 import armv5te/debug.c
-
diff --git a/vm/mterp/config-portdbg b/vm/mterp/config-portdbg
index 7e1de14..c6982d7 100644
--- a/vm/mterp/config-portdbg
+++ b/vm/mterp/config-portdbg
@@ -47,4 +47,3 @@
 
 # finish
 import portable/enddefs.c
-
diff --git a/vm/mterp/config-portstd b/vm/mterp/config-portstd
index fad4e68..41ecb4f 100644
--- a/vm/mterp/config-portstd
+++ b/vm/mterp/config-portstd
@@ -46,4 +46,3 @@
 
 # finish
 import portable/enddefs.c
-
diff --git a/vm/mterp/config-x86 b/vm/mterp/config-x86
index 6ff472c..78ae1a0 100644
--- a/vm/mterp/config-x86
+++ b/vm/mterp/config-x86
@@ -35,6 +35,14 @@
 op-start x86
     # stub -- need native impl
     op OP_EXECUTE_INLINE_RANGE c
+    op OP_IGET_VOLATILE c
+    op OP_IPUT_VOLATILE c
+    op OP_SGET_VOLATILE c
+    op OP_SPUT_VOLATILE c
+    op OP_IGET_OBJECT_VOLATILE c
+    op OP_IPUT_OBJECT_VOLATILE c
+    op OP_SGET_OBJECT_VOLATILE c
+    op OP_SPUT_OBJECT_VOLATILE c
     op OP_IGET_WIDE_VOLATILE c
     op OP_IPUT_WIDE_VOLATILE c
     op OP_SGET_WIDE_VOLATILE c
@@ -54,4 +62,3 @@
 
 # common subroutines for asm
 import x86/footer.S
-
diff --git a/vm/mterp/config-x86-atom b/vm/mterp/config-x86-atom
index 53f89ae..970253c 100644
--- a/vm/mterp/config-x86-atom
+++ b/vm/mterp/config-x86-atom
@@ -286,6 +286,14 @@
 # TODO: provide native implementations
 op OP_BREAKPOINT c
 op OP_EXECUTE_INLINE_RANGE c
+op OP_IGET_VOLATILE c
+op OP_IPUT_VOLATILE c
+op OP_SGET_VOLATILE c
+op OP_SPUT_VOLATILE c
+op OP_IGET_OBJECT_VOLATILE c
+op OP_IPUT_OBJECT_VOLATILE c
+op OP_SGET_OBJECT_VOLATILE c
+op OP_SPUT_OBJECT_VOLATILE c
 op OP_IGET_WIDE_VOLATILE c
 op OP_IPUT_WIDE_VOLATILE c
 op OP_SGET_WIDE_VOLATILE c
@@ -302,5 +310,3 @@
 
 # common subroutines for asm
 import x86-atom/footer.S
-
-
diff --git a/vm/mterp/cstubs/entry.c b/vm/mterp/cstubs/entry.c
index 0597d19..af31a3d 100644
--- a/vm/mterp/cstubs/entry.c
+++ b/vm/mterp/cstubs/entry.c
@@ -78,4 +78,3 @@
     jmp_buf* pJmpBuf = glue->bailPtr;
     longjmp(*pJmpBuf, ((int)changeInterp)+1);
 }
-
diff --git a/vm/mterp/cstubs/stubdefs.c b/vm/mterp/cstubs/stubdefs.c
index 5a8d585..bf870c6 100644
--- a/vm/mterp/cstubs/stubdefs.c
+++ b/vm/mterp/cstubs/stubdefs.c
@@ -2,7 +2,8 @@
 #define INTERP_TYPE INTERP_STD
 #define CHECK_DEBUG_AND_PROF() ((void)0)
 # define CHECK_TRACKED_REFS() ((void)0)
-#define CHECK_JIT() (0)
+#define CHECK_JIT_BOOL() (false)
+#define CHECK_JIT_VOID()
 #define ABORT_JIT_TSELECT() ((void)0)
 
 /*
diff --git a/vm/mterp/out/InterpAsm-armv4t.S b/vm/mterp/out/InterpAsm-armv4t.S
index fa992d9..2e7dcc6 100644
--- a/vm/mterp/out/InterpAsm-armv4t.S
+++ b/vm/mterp/out/InterpAsm-armv4t.S
@@ -20,6 +20,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 /*
  * ARMv5 definitions and declarations.
  */
@@ -242,6 +243,11 @@
     ldmfd   sp!, {\regs,pc}
 .endm
 
+/*
+ * Macro for data memory barrier; not meaningful pre-ARMv6K.
+ */
+.macro  SMP_DMB
+.endm
 
 /* File: armv5te/entry.S */
 /*
@@ -396,7 +402,6 @@
     .word   .LstrBadEntryPoint
 
 
-
     .global dvmAsmInstructionStart
     .type   dvmAsmInstructionStart, %function
 dvmAsmInstructionStart = .L_OP_NOP
@@ -420,7 +425,6 @@
     .fnend
 #endif
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE: /* 0x01 */
@@ -436,7 +440,6 @@
     SET_VREG(r2, r0)                    @ fp[A]<- r2
     GOTO_OPCODE(ip)                     @ execute next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_FROM16: /* 0x02 */
@@ -451,7 +454,6 @@
     SET_VREG(r2, r0)                    @ fp[AA]<- r2
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_16: /* 0x03 */
@@ -466,7 +468,6 @@
     SET_VREG(r2, r0)                    @ fp[AAAA]<- r2
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_WIDE: /* 0x04 */
@@ -484,7 +485,6 @@
     stmia   r2, {r0-r1}                 @ fp[A]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_WIDE_FROM16: /* 0x05 */
@@ -501,7 +501,6 @@
     stmia   r2, {r0-r1}                 @ fp[AA]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_WIDE_16: /* 0x06 */
@@ -518,7 +517,6 @@
     stmia   r2, {r0-r1}                 @ fp[AAAA]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_OBJECT: /* 0x07 */
@@ -536,7 +534,6 @@
     GOTO_OPCODE(ip)                     @ execute next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_OBJECT_FROM16: /* 0x08 */
@@ -553,7 +550,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_OBJECT_16: /* 0x09 */
@@ -570,7 +566,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_RESULT: /* 0x0a */
@@ -584,7 +579,6 @@
     SET_VREG(r0, r2)                    @ fp[AA]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_RESULT_WIDE: /* 0x0b */
@@ -599,7 +593,6 @@
     stmia   r2, {r0-r1}                 @ fp[AA]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_RESULT_OBJECT: /* 0x0c */
@@ -615,7 +608,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_EXCEPTION: /* 0x0d */
@@ -631,14 +623,12 @@
     str     r1, [r0, #offThread_exception]  @ dvmClearException bypass
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RETURN_VOID: /* 0x0e */
 /* File: armv5te/OP_RETURN_VOID.S */
     b       common_returnFromMethod
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RETURN: /* 0x0f */
@@ -655,7 +645,6 @@
     str     r0, [rGLUE, #offGlue_retval] @ retval.i <- vAA
     b       common_returnFromMethod
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RETURN_WIDE: /* 0x10 */
@@ -672,7 +661,6 @@
     stmia   r3, {r0-r1}                 @ retval<- r0/r1
     b       common_returnFromMethod
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RETURN_OBJECT: /* 0x11 */
@@ -691,7 +679,6 @@
     b       common_returnFromMethod
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_4: /* 0x12 */
@@ -706,7 +693,6 @@
     SET_VREG(r1, r0)                    @ fp[A]<- r1
     GOTO_OPCODE(ip)                     @ execute next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_16: /* 0x13 */
@@ -719,7 +705,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST: /* 0x14 */
@@ -734,7 +719,6 @@
     SET_VREG(r0, r3)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_HIGH16: /* 0x15 */
@@ -748,7 +732,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_WIDE_16: /* 0x16 */
@@ -763,7 +746,6 @@
     stmia   r3, {r0-r1}                 @ vAA<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_WIDE_32: /* 0x17 */
@@ -780,7 +762,6 @@
     stmia   r3, {r0-r1}                 @ vAA<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_WIDE: /* 0x18 */
@@ -799,7 +780,6 @@
     stmia   r9, {r0-r1}                 @ vAA<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_WIDE_HIGH16: /* 0x19 */
@@ -815,7 +795,6 @@
     stmia   r3, {r0-r1}                 @ vAA<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_STRING: /* 0x1a */
@@ -894,7 +873,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MONITOR_EXIT: /* 0x1e */
@@ -923,7 +901,6 @@
     FETCH_ADVANCE_INST(1)               @ advance before throw
     b      common_errNullObject
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CHECK_CAST: /* 0x1f */
@@ -999,7 +976,6 @@
     SET_VREG(r3, r2)                    @ vB<- length
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_NEW_INSTANCE: /* 0x22 */
@@ -1135,13 +1111,13 @@
     mov     r2, rINST, lsr #8           @ r2<- AA
     GET_VREG(r1, r2)                    @ r1<- vAA (exception object)
     ldr     r0, [rGLUE, #offGlue_self]  @ r0<- glue->self
+    EXPORT_PC()                         @ exception handler can throw
     cmp     r1, #0                      @ null object?
     beq     common_errNullObject        @ yes, throw an NPE instead
     @ bypass dvmSetException, just store it
     str     r1, [r0, #offThread_exception]  @ thread->exception<- obj
     b       common_exceptionThrown
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_GOTO: /* 0x28 */
@@ -1197,7 +1173,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 #endif
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_GOTO_32: /* 0x2a */
@@ -1270,7 +1245,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 #endif
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SPARSE_SWITCH: /* 0x2c */
@@ -1310,7 +1284,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CMPL_FLOAT: /* 0x2d */
@@ -1566,7 +1539,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_NE: /* 0x33 */
@@ -1603,7 +1575,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_LT: /* 0x34 */
@@ -1640,7 +1611,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_GE: /* 0x35 */
@@ -1677,7 +1647,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_GT: /* 0x36 */
@@ -1714,7 +1683,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_LE: /* 0x37 */
@@ -1751,7 +1719,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_EQZ: /* 0x38 */
@@ -1788,7 +1755,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_NEZ: /* 0x39 */
@@ -1825,7 +1791,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_LTZ: /* 0x3a */
@@ -1862,7 +1827,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_GEZ: /* 0x3b */
@@ -1899,7 +1863,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_GTZ: /* 0x3c */
@@ -1936,7 +1899,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_LEZ: /* 0x3d */
@@ -1973,7 +1935,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_3E: /* 0x3e */
@@ -1982,7 +1943,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_3F: /* 0x3f */
@@ -1991,7 +1951,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_40: /* 0x40 */
@@ -2000,7 +1959,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_41: /* 0x41 */
@@ -2009,7 +1967,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_42: /* 0x42 */
@@ -2018,7 +1975,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_43: /* 0x43 */
@@ -2027,7 +1983,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET: /* 0x44 */
@@ -2058,7 +2013,6 @@
     SET_VREG(r2, r9)                    @ vAA<- r2
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_WIDE: /* 0x45 */
@@ -2118,7 +2072,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_BOOLEAN: /* 0x47 */
@@ -2151,7 +2104,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_BYTE: /* 0x48 */
@@ -2184,7 +2136,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_CHAR: /* 0x49 */
@@ -2217,7 +2168,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_SHORT: /* 0x4a */
@@ -2250,7 +2200,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT: /* 0x4b */
@@ -2281,7 +2230,6 @@
     str  r2, [r0, #offArrayObject_contents]  @ vBB[vCC]<- r2
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT_WIDE: /* 0x4c */
@@ -2367,7 +2315,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT_BYTE: /* 0x4f */
@@ -2400,7 +2347,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT_CHAR: /* 0x50 */
@@ -2433,7 +2379,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT_SHORT: /* 0x51 */
@@ -2466,7 +2411,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IGET: /* 0x52 */
@@ -2870,6 +2814,7 @@
     beq     .LOP_SGET_resolve         @ yes, do resolve
 .LOP_SGET_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -2894,7 +2839,7 @@
     mov     r9, rINST, lsr #8           @ r9<- AA
     add     r0, r0, #offStaticField_value @ r0<- pointer to data
     .if 0
-    bl      android_quasiatomic_read_64 @ r0/r1<- contents of field
+    bl      dvmQuasiAtomicRead64        @ r0/r1<- contents of field
     .else
     ldmia   r0, {r0-r1}                 @ r0/r1<- field value (aligned)
     .endif
@@ -2923,6 +2868,7 @@
     beq     .LOP_SGET_OBJECT_resolve         @ yes, do resolve
 .LOP_SGET_OBJECT_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -2949,6 +2895,7 @@
     beq     .LOP_SGET_BOOLEAN_resolve         @ yes, do resolve
 .LOP_SGET_BOOLEAN_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -2975,6 +2922,7 @@
     beq     .LOP_SGET_BYTE_resolve         @ yes, do resolve
 .LOP_SGET_BYTE_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -3001,6 +2949,7 @@
     beq     .LOP_SGET_CHAR_resolve         @ yes, do resolve
 .LOP_SGET_CHAR_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -3027,6 +2976,7 @@
     beq     .LOP_SGET_SHORT_resolve         @ yes, do resolve
 .LOP_SGET_SHORT_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -3055,6 +3005,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3080,7 +3031,7 @@
     GET_INST_OPCODE(r10)                @ extract opcode from rINST
     add     r2, r2, #offStaticField_value @ r2<- pointer to data
     .if 0
-    bl      android_quasiatomic_swap_64 @ stores r0/r1 into addr r2
+    bl      dvmQuasiAtomicSwap64        @ stores r0/r1 into addr r2
     .else
     stmia   r2, {r0-r1}                 @ field<- vAA/vAA+1
     .endif
@@ -3108,6 +3059,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3134,6 +3086,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3160,6 +3113,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3186,6 +3140,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3212,6 +3167,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3334,7 +3290,6 @@
     bne     common_invokeMethodNoRange @ no, continue
     b       common_exceptionThrown      @ yes, handle exception
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_INTERFACE: /* 0x72 */
@@ -3361,8 +3316,7 @@
     bl      dvmFindInterfaceMethodInCache @ r0<- call(class, ref, method, dex)
     cmp     r0, #0                      @ failed?
     beq     common_exceptionThrown      @ yes, handle exception
-    b       common_invokeMethodNoRange @ jump to common handler 
-
+    b       common_invokeMethodNoRange @ jump to common handler
 
 /* ------------------------------ */
     .balign 64
@@ -3372,7 +3326,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_VIRTUAL_RANGE: /* 0x74 */
@@ -3499,7 +3452,6 @@
     b       common_exceptionThrown      @ yes, handle exception
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_INTERFACE_RANGE: /* 0x78 */
@@ -3527,8 +3479,7 @@
     bl      dvmFindInterfaceMethodInCache @ r0<- call(class, ref, method, dex)
     cmp     r0, #0                      @ failed?
     beq     common_exceptionThrown      @ yes, handle exception
-    b       common_invokeMethodRange @ jump to common handler 
-
+    b       common_invokeMethodRange @ jump to common handler
 
 
 /* ------------------------------ */
@@ -3539,7 +3490,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_7A: /* 0x7a */
@@ -3548,7 +3498,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_NEG_INT: /* 0x7b */
@@ -3631,7 +3580,6 @@
     /* 12-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_NOT_LONG: /* 0x7e */
@@ -3660,7 +3608,6 @@
     /* 12-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_NEG_FLOAT: /* 0x7f */
@@ -3716,7 +3663,6 @@
     /* 12-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INT_TO_LONG: /* 0x81 */
@@ -3816,7 +3762,6 @@
     GOTO_OPCODE(ip)                     @ execute next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_LONG_TO_FLOAT: /* 0x85 */
@@ -3875,7 +3820,6 @@
     /* 12-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_FLOAT_TO_INT: /* 0x87 */
@@ -3941,7 +3885,6 @@
     ldmfd   sp!, {r4, pc}
 #endif
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_FLOAT_TO_LONG: /* 0x88 */
@@ -4080,7 +4023,6 @@
     ldmfd   sp!, {r4, r5, pc}
 #endif
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DOUBLE_TO_LONG: /* 0x8b */
@@ -4111,7 +4053,6 @@
 
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DOUBLE_TO_FLOAT: /* 0x8c */
@@ -4264,7 +4205,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_INT: /* 0x91 */
@@ -4306,7 +4246,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_INT: /* 0x92 */
@@ -4349,7 +4288,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_INT: /* 0x93 */
@@ -4391,7 +4329,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_INT: /* 0x94 */
@@ -4434,7 +4371,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_INT: /* 0x95 */
@@ -4476,7 +4412,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_INT: /* 0x96 */
@@ -4518,7 +4453,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_INT: /* 0x97 */
@@ -4560,7 +4494,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHL_INT: /* 0x98 */
@@ -4602,7 +4535,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHR_INT: /* 0x99 */
@@ -4644,7 +4576,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_USHR_INT: /* 0x9a */
@@ -4686,7 +4617,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_LONG: /* 0x9b */
@@ -4731,7 +4661,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_LONG: /* 0x9c */
@@ -4776,7 +4705,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_LONG: /* 0x9d */
@@ -4860,7 +4788,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_LONG: /* 0x9f */
@@ -4906,7 +4833,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_LONG: /* 0xa0 */
@@ -4951,7 +4877,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_LONG: /* 0xa1 */
@@ -4996,7 +4921,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_LONG: /* 0xa2 */
@@ -5041,7 +4965,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHL_LONG: /* 0xa3 */
@@ -5170,7 +5093,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_FLOAT: /* 0xa7 */
@@ -5212,7 +5134,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_FLOAT: /* 0xa8 */
@@ -5254,7 +5175,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_FLOAT: /* 0xa9 */
@@ -5296,7 +5216,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_FLOAT: /* 0xaa */
@@ -5339,7 +5258,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_DOUBLE: /* 0xab */
@@ -5384,7 +5302,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_DOUBLE: /* 0xac */
@@ -5429,7 +5346,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_DOUBLE: /* 0xad */
@@ -5474,7 +5390,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_DOUBLE: /* 0xae */
@@ -5519,7 +5434,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_DOUBLE: /* 0xaf */
@@ -5565,7 +5479,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_INT_2ADDR: /* 0xb0 */
@@ -5605,7 +5518,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_INT_2ADDR: /* 0xb1 */
@@ -5645,7 +5557,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_INT_2ADDR: /* 0xb2 */
@@ -5686,7 +5597,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_INT_2ADDR: /* 0xb3 */
@@ -5726,7 +5636,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_INT_2ADDR: /* 0xb4 */
@@ -5767,7 +5676,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_INT_2ADDR: /* 0xb5 */
@@ -5807,7 +5715,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_INT_2ADDR: /* 0xb6 */
@@ -5847,7 +5754,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_INT_2ADDR: /* 0xb7 */
@@ -5887,7 +5793,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHL_INT_2ADDR: /* 0xb8 */
@@ -5927,7 +5832,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHR_INT_2ADDR: /* 0xb9 */
@@ -5967,7 +5871,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_USHR_INT_2ADDR: /* 0xba */
@@ -6007,7 +5910,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_LONG_2ADDR: /* 0xbb */
@@ -6049,7 +5951,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_LONG_2ADDR: /* 0xbc */
@@ -6091,7 +5992,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_LONG_2ADDR: /* 0xbd */
@@ -6122,7 +6022,6 @@
     stmia   r0, {r9-r10}                @ vAA/vAA+1<- r9/r10
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_LONG_2ADDR: /* 0xbe */
@@ -6164,7 +6063,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_LONG_2ADDR: /* 0xbf */
@@ -6207,7 +6105,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_LONG_2ADDR: /* 0xc0 */
@@ -6249,7 +6146,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_LONG_2ADDR: /* 0xc1 */
@@ -6291,7 +6187,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_LONG_2ADDR: /* 0xc2 */
@@ -6333,7 +6228,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHL_LONG_2ADDR: /* 0xc3 */
@@ -6451,7 +6345,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_FLOAT_2ADDR: /* 0xc7 */
@@ -6491,7 +6384,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_FLOAT_2ADDR: /* 0xc8 */
@@ -6531,7 +6423,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_FLOAT_2ADDR: /* 0xc9 */
@@ -6571,7 +6462,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_FLOAT_2ADDR: /* 0xca */
@@ -6612,7 +6502,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_DOUBLE_2ADDR: /* 0xcb */
@@ -6654,7 +6543,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_DOUBLE_2ADDR: /* 0xcc */
@@ -6696,7 +6584,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_DOUBLE_2ADDR: /* 0xcd */
@@ -6738,7 +6625,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_DOUBLE_2ADDR: /* 0xce */
@@ -6780,7 +6666,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_DOUBLE_2ADDR: /* 0xcf */
@@ -6823,7 +6708,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_INT_LIT16: /* 0xd0 */
@@ -6860,7 +6744,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RSUB_INT: /* 0xd1 */
@@ -6898,7 +6781,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_INT_LIT16: /* 0xd2 */
@@ -6936,7 +6818,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_INT_LIT16: /* 0xd3 */
@@ -6973,7 +6854,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_INT_LIT16: /* 0xd4 */
@@ -7011,7 +6891,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_INT_LIT16: /* 0xd5 */
@@ -7048,7 +6927,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_INT_LIT16: /* 0xd6 */
@@ -7085,7 +6963,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_INT_LIT16: /* 0xd7 */
@@ -7122,7 +6999,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_INT_LIT8: /* 0xd8 */
@@ -7161,7 +7037,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RSUB_INT_LIT8: /* 0xd9 */
@@ -7200,7 +7075,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_INT_LIT8: /* 0xda */
@@ -7240,7 +7114,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_INT_LIT8: /* 0xdb */
@@ -7279,7 +7152,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_INT_LIT8: /* 0xdc */
@@ -7319,7 +7191,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_INT_LIT8: /* 0xdd */
@@ -7358,7 +7229,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_INT_LIT8: /* 0xde */
@@ -7397,7 +7267,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_INT_LIT8: /* 0xdf */
@@ -7436,7 +7305,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHL_INT_LIT8: /* 0xe0 */
@@ -7475,7 +7343,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHR_INT_LIT8: /* 0xe1 */
@@ -7514,7 +7381,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_USHR_INT_LIT8: /* 0xe2 */
@@ -7553,50 +7419,142 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E3: /* 0xe3 */
-/* File: armv5te/OP_UNUSED_E3.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_IGET_VOLATILE: /* 0xe3 */
+/* File: armv5te/OP_IGET_VOLATILE.S */
+/* File: armv5te/OP_IGET.S */
+    /*
+     * General 32-bit instance field get.
+     *
+     * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
+     */
+    /* op vA, vB, field@CCCC */
+    mov     r0, rINST, lsr #12          @ r0<- B
+    ldr     r3, [rGLUE, #offGlue_methodClassDex]    @ r3<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref CCCC
+    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
+    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    bne     .LOP_IGET_VOLATILE_finish          @ no, already resolved
+8:  ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
+    cmp     r0, #0
+    bne     .LOP_IGET_VOLATILE_finish
+    b       common_exceptionThrown
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E4: /* 0xe4 */
-/* File: armv5te/OP_UNUSED_E4.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_IPUT_VOLATILE: /* 0xe4 */
+/* File: armv5te/OP_IPUT_VOLATILE.S */
+/* File: armv5te/OP_IPUT.S */
+    /*
+     * General 32-bit instance field put.
+     *
+     * for: iput, iput-object, iput-boolean, iput-byte, iput-char, iput-short
+     */
+    /* op vA, vB, field@CCCC */
+    mov     r0, rINST, lsr #12          @ r0<- B
+    ldr     r3, [rGLUE, #offGlue_methodClassDex]    @ r3<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref CCCC
+    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
+    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    bne     .LOP_IPUT_VOLATILE_finish          @ no, already resolved
+8:  ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_IPUT_VOLATILE_finish          @ yes, finish up
+    b       common_exceptionThrown
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E5: /* 0xe5 */
-/* File: armv5te/OP_UNUSED_E5.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_SGET_VOLATILE: /* 0xe5 */
+/* File: armv5te/OP_SGET_VOLATILE.S */
+/* File: armv5te/OP_SGET.S */
+    /*
+     * General 32-bit SGET handler.
+     *
+     * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
+     */
+    /* op vAA, field@BBBB */
+    ldr     r2, [rGLUE, #offGlue_methodClassDex]    @ r2<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref BBBB
+    ldr     r2, [r2, #offDvmDex_pResFields] @ r2<- dvmDex->pResFields
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    beq     .LOP_SGET_VOLATILE_resolve         @ yes, do resolve
+.LOP_SGET_VOLATILE_finish: @ field ptr in r0
+    ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    SMP_DMB                            @ acquiring load
+    mov     r2, rINST, lsr #8           @ r2<- AA
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    SET_VREG(r1, r2)                    @ fp[AA]<- r1
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E6: /* 0xe6 */
-/* File: armv5te/OP_UNUSED_E6.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_SPUT_VOLATILE: /* 0xe6 */
+/* File: armv5te/OP_SPUT_VOLATILE.S */
+/* File: armv5te/OP_SPUT.S */
+    /*
+     * General 32-bit SPUT handler.
+     *
+     * for: sput, sput-object, sput-boolean, sput-byte, sput-char, sput-short
+     */
+    /* op vAA, field@BBBB */
+    ldr     r2, [rGLUE, #offGlue_methodClassDex]    @ r2<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref BBBB
+    ldr     r2, [r2, #offDvmDex_pResFields] @ r2<- dvmDex->pResFields
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    beq     .LOP_SPUT_VOLATILE_resolve         @ yes, do resolve
+.LOP_SPUT_VOLATILE_finish:   @ field ptr in r0
+    mov     r2, rINST, lsr #8           @ r2<- AA
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    GET_VREG(r1, r2)                    @ r1<- fp[AA]
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SMP_DMB                            @ releasing store
+    str     r1, [r0, #offStaticField_value] @ field<- vAA
+    GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E7: /* 0xe7 */
-/* File: armv5te/OP_UNUSED_E7.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_IGET_OBJECT_VOLATILE: /* 0xe7 */
+/* File: armv5te/OP_IGET_OBJECT_VOLATILE.S */
+/* File: armv5te/OP_IGET.S */
+    /*
+     * General 32-bit instance field get.
+     *
+     * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
+     */
+    /* op vA, vB, field@CCCC */
+    mov     r0, rINST, lsr #12          @ r0<- B
+    ldr     r3, [rGLUE, #offGlue_methodClassDex]    @ r3<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref CCCC
+    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
+    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    bne     .LOP_IGET_OBJECT_VOLATILE_finish          @ no, already resolved
+8:  ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
+    cmp     r0, #0
+    bne     .LOP_IGET_OBJECT_VOLATILE_finish
+    b       common_exceptionThrown
 
 
 /* ------------------------------ */
@@ -7667,7 +7625,7 @@
     mov     r9, rINST, lsr #8           @ r9<- AA
     add     r0, r0, #offStaticField_value @ r0<- pointer to data
     .if 1
-    bl      android_quasiatomic_read_64 @ r0/r1<- contents of field
+    bl      dvmQuasiAtomicRead64        @ r0/r1<- contents of field
     .else
     ldmia   r0, {r0-r1}                 @ r0/r1<- field value (aligned)
     .endif
@@ -7701,7 +7659,7 @@
     GET_INST_OPCODE(r10)                @ extract opcode from rINST
     add     r2, r2, #offStaticField_value @ r2<- pointer to data
     .if 1
-    bl      android_quasiatomic_swap_64 @ stores r0/r1 into addr r2
+    bl      dvmQuasiAtomicSwap64        @ stores r0/r1 into addr r2
     .else
     stmia   r2, {r0-r1}                 @ field<- vAA/vAA+1
     .endif
@@ -7716,7 +7674,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_THROW_VERIFICATION_ERROR: /* 0xed */
@@ -7734,7 +7691,6 @@
     bl      dvmThrowVerificationError   @ always throws
     b       common_exceptionThrown      @ handle exception
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_EXECUTE_INLINE: /* 0xee */
@@ -7813,7 +7769,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IGET_QUICK: /* 0xf2 */
@@ -7833,7 +7788,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IGET_WIDE_QUICK: /* 0xf3 */
@@ -7854,7 +7808,6 @@
     stmia   r3, {r0-r1}                 @ fp[A]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IGET_OBJECT_QUICK: /* 0xf4 */
@@ -7876,7 +7829,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IPUT_QUICK: /* 0xf5 */
@@ -7896,7 +7848,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IPUT_WIDE_QUICK: /* 0xf6 */
@@ -7917,7 +7868,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IPUT_OBJECT_QUICK: /* 0xf7 */
@@ -7939,7 +7889,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_VIRTUAL_QUICK: /* 0xf8 */
@@ -8019,7 +7968,6 @@
     beq     common_errNullObject        @ "this" is null, throw exception
     bl      common_invokeMethodNoRange @ continue on
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_SUPER_QUICK_RANGE: /* 0xfb */
@@ -8049,32 +7997,86 @@
     bl      common_invokeMethodRange @ continue on
 
 
-
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_FC: /* 0xfc */
-/* File: armv5te/OP_UNUSED_FC.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_IPUT_OBJECT_VOLATILE: /* 0xfc */
+/* File: armv5te/OP_IPUT_OBJECT_VOLATILE.S */
+/* File: armv5te/OP_IPUT.S */
+    /*
+     * General 32-bit instance field put.
+     *
+     * for: iput, iput-object, iput-boolean, iput-byte, iput-char, iput-short
+     */
+    /* op vA, vB, field@CCCC */
+    mov     r0, rINST, lsr #12          @ r0<- B
+    ldr     r3, [rGLUE, #offGlue_methodClassDex]    @ r3<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref CCCC
+    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
+    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    bne     .LOP_IPUT_OBJECT_VOLATILE_finish          @ no, already resolved
+8:  ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_IPUT_OBJECT_VOLATILE_finish          @ yes, finish up
+    b       common_exceptionThrown
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_FD: /* 0xfd */
-/* File: armv5te/OP_UNUSED_FD.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_SGET_OBJECT_VOLATILE: /* 0xfd */
+/* File: armv5te/OP_SGET_OBJECT_VOLATILE.S */
+/* File: armv5te/OP_SGET.S */
+    /*
+     * General 32-bit SGET handler.
+     *
+     * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
+     */
+    /* op vAA, field@BBBB */
+    ldr     r2, [rGLUE, #offGlue_methodClassDex]    @ r2<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref BBBB
+    ldr     r2, [r2, #offDvmDex_pResFields] @ r2<- dvmDex->pResFields
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    beq     .LOP_SGET_OBJECT_VOLATILE_resolve         @ yes, do resolve
+.LOP_SGET_OBJECT_VOLATILE_finish: @ field ptr in r0
+    ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    SMP_DMB                            @ acquiring load
+    mov     r2, rINST, lsr #8           @ r2<- AA
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    SET_VREG(r1, r2)                    @ fp[AA]<- r1
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_FE: /* 0xfe */
-/* File: armv5te/OP_UNUSED_FE.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_SPUT_OBJECT_VOLATILE: /* 0xfe */
+/* File: armv5te/OP_SPUT_OBJECT_VOLATILE.S */
+/* File: armv5te/OP_SPUT.S */
+    /*
+     * General 32-bit SPUT handler.
+     *
+     * for: sput, sput-object, sput-boolean, sput-byte, sput-char, sput-short
+     */
+    /* op vAA, field@BBBB */
+    ldr     r2, [rGLUE, #offGlue_methodClassDex]    @ r2<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref BBBB
+    ldr     r2, [r2, #offDvmDex_pResFields] @ r2<- dvmDex->pResFields
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    beq     .LOP_SPUT_OBJECT_VOLATILE_resolve         @ yes, do resolve
+.LOP_SPUT_OBJECT_VOLATILE_finish:   @ field ptr in r0
+    mov     r2, rINST, lsr #8           @ r2<- AA
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    GET_VREG(r1, r2)                    @ r1<- fp[AA]
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SMP_DMB                            @ releasing store
+    str     r1, [r0, #offStaticField_value] @ field<- vAA
+    GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
 /* ------------------------------ */
@@ -8086,7 +8088,6 @@
 
 
 
-
     .balign 64
     .size   dvmAsmInstructionStart, .-dvmAsmInstructionStart
     .global dvmAsmInstructionEnd
@@ -8122,7 +8123,6 @@
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_CONST_STRING_JUMBO */
 
     /*
@@ -8142,7 +8142,6 @@
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_CONST_CLASS */
 
     /*
@@ -8163,7 +8162,6 @@
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_CHECK_CAST */
 
     /*
@@ -8208,7 +8206,6 @@
 .LstrClassCastExceptionPtr:
     .word   .LstrClassCastException
 
-
 /* continuation for OP_INSTANCE_OF */
 
     /*
@@ -8264,7 +8261,6 @@
     ldr     r0, [r0, #offObject_clazz]  @ r0<- obj->clazz
     b       .LOP_INSTANCE_OF_resolved        @ pick up where we left off
 
-
 /* continuation for OP_NEW_INSTANCE */
 
     .balign 32                          @ minimize cache lines
@@ -8307,7 +8303,6 @@
 .LstrInstantiationErrorPtr:
     .word   .LstrInstantiationError
 
-
 /* continuation for OP_NEW_ARRAY */
 
 
@@ -8347,7 +8342,6 @@
     SET_VREG(r0, r2)                    @ vA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_FILLED_NEW_ARRAY */
 
     /*
@@ -8426,7 +8420,6 @@
     .word   .LstrInternalError
     .endif
 
-
 /* continuation for OP_FILLED_NEW_ARRAY_RANGE */
 
     /*
@@ -8505,7 +8498,6 @@
     .word   .LstrInternalError
     .endif
 
-
 /* continuation for OP_CMPL_FLOAT */
 
     @ Test for NaN with a second comparison.  EABI forbids testing bit
@@ -8569,7 +8561,6 @@
 
 #endif
 
-
 /* continuation for OP_CMPG_FLOAT */
 
     @ Test for NaN with a second comparison.  EABI forbids testing bit
@@ -8633,7 +8624,6 @@
 
 #endif
 
-
 /* continuation for OP_CMPL_DOUBLE */
 
     @ Test for NaN with a second comparison.  EABI forbids testing bit
@@ -8649,7 +8639,6 @@
     mvn     r1, #0                            @ r1<- 1 or -1 for NaN
     b       .LOP_CMPL_DOUBLE_finish
 
-
 /* continuation for OP_CMPG_DOUBLE */
 
     @ Test for NaN with a second comparison.  EABI forbids testing bit
@@ -8665,7 +8654,6 @@
     mov     r1, #1                            @ r1<- 1 or -1 for NaN
     b       .LOP_CMPG_DOUBLE_finish
 
-
 /* continuation for OP_CMP_LONG */
 
 .LOP_CMP_LONG_less:
@@ -8687,7 +8675,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_AGET_WIDE */
 
 .LOP_AGET_WIDE_finish:
@@ -8699,7 +8686,6 @@
     stmia   r9, {r2-r3}                 @ vAA/vAA+1<- r2/r3
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_APUT_WIDE */
 
 .LOP_APUT_WIDE_finish:
@@ -8710,7 +8696,6 @@
     stmia   r0, {r2-r3}                 @ vBB[vCC] <- r2/r3
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_APUT_OBJECT */
     /*
      * On entry:
@@ -8732,7 +8717,6 @@
     str     r9, [r10, #offArrayObject_contents] @ vBB[vCC]<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET */
 
     /*
@@ -8746,6 +8730,7 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
@@ -8753,7 +8738,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_WIDE */
 
     /*
@@ -8767,7 +8751,7 @@
     beq     common_errNullObject        @ object was null
     .if 0
     add     r0, r9, r3                  @ r0<- address of field
-    bl      android_quasiatomic_read_64 @ r0/r1<- contents of field
+    bl      dvmQuasiAtomicRead64        @ r0/r1<- contents of field
     .else
     add     r9, r9, r3                  @ r9<- obj + field offset
     ldmia   r9, {r0-r1}                 @ r0/r1<- obj.field (64-bit align ok)
@@ -8780,7 +8764,6 @@
     stmia   r3, {r0-r1}                 @ fp[A]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_OBJECT */
 
     /*
@@ -8794,6 +8777,7 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
@@ -8801,7 +8785,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_BOOLEAN */
 
     /*
@@ -8815,6 +8798,7 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
@@ -8822,7 +8806,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_BYTE */
 
     /*
@@ -8836,6 +8819,7 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
@@ -8843,7 +8827,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_CHAR */
 
     /*
@@ -8857,6 +8840,7 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
@@ -8864,7 +8848,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_SHORT */
 
     /*
@@ -8878,6 +8861,7 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
@@ -8885,7 +8869,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT */
 
     /*
@@ -8903,10 +8886,10 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_WIDE */
 
     /*
@@ -8926,13 +8909,12 @@
     GET_INST_OPCODE(r10)                @ extract opcode from rINST
     add     r2, r9, r3                  @ r2<- object + byte offset
     .if 0
-    bl      android_quasiatomic_swap_64 @ stores r0/r1 into addr r2
+    bl      dvmQuasiAtomicSwap64        @ stores r0/r1 into addr r2
     .else
     stmia   r2, {r0-r1}                 @ obj.field (64 bits, aligned)<- r0/r1
     .endif
     GOTO_OPCODE(r10)                    @ jump to next instruction
 
-
 /* continuation for OP_IPUT_OBJECT */
 
     /*
@@ -8950,10 +8932,10 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_BOOLEAN */
 
     /*
@@ -8971,10 +8953,10 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_BYTE */
 
     /*
@@ -8992,10 +8974,10 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_CHAR */
 
     /*
@@ -9013,10 +8995,10 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_SHORT */
 
     /*
@@ -9034,10 +9016,10 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_SGET */
 
     /*
@@ -9053,7 +9035,6 @@
     bne     .LOP_SGET_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_WIDE */
 
     /*
@@ -9071,7 +9052,6 @@
     bne     .LOP_SGET_WIDE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_OBJECT */
 
     /*
@@ -9087,7 +9067,6 @@
     bne     .LOP_SGET_OBJECT_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_BOOLEAN */
 
     /*
@@ -9103,7 +9082,6 @@
     bne     .LOP_SGET_BOOLEAN_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_BYTE */
 
     /*
@@ -9119,7 +9097,6 @@
     bne     .LOP_SGET_BYTE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_CHAR */
 
     /*
@@ -9135,7 +9112,6 @@
     bne     .LOP_SGET_CHAR_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_SHORT */
 
     /*
@@ -9151,7 +9127,6 @@
     bne     .LOP_SGET_SHORT_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT */
 
     /*
@@ -9167,7 +9142,6 @@
     bne     .LOP_SPUT_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_WIDE */
 
     /*
@@ -9187,7 +9161,6 @@
     bne     .LOP_SPUT_WIDE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_OBJECT */
 
     /*
@@ -9203,7 +9176,6 @@
     bne     .LOP_SPUT_OBJECT_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_BOOLEAN */
 
     /*
@@ -9219,7 +9191,6 @@
     bne     .LOP_SPUT_BOOLEAN_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_BYTE */
 
     /*
@@ -9235,7 +9206,6 @@
     bne     .LOP_SPUT_BYTE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_CHAR */
 
     /*
@@ -9251,7 +9221,6 @@
     bne     .LOP_SPUT_CHAR_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_SHORT */
 
     /*
@@ -9267,7 +9236,6 @@
     bne     .LOP_SPUT_SHORT_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_INVOKE_VIRTUAL */
 
     /*
@@ -9285,7 +9253,6 @@
     ldr     r0, [r3, r2, lsl #2]        @ r3<- vtable[methodIndex]
     bl      common_invokeMethodNoRange @ continue on
 
-
 /* continuation for OP_INVOKE_SUPER */
 
     /*
@@ -9320,7 +9287,6 @@
     ldr     r1, [r0, #offMethod_name]   @ r1<- method name
     b       common_errNoSuchMethod
 
-
 /* continuation for OP_INVOKE_DIRECT */
 
     /*
@@ -9338,7 +9304,6 @@
     bne     .LOP_INVOKE_DIRECT_finish          @ no, continue
     b       common_exceptionThrown      @ yes, handle exception
 
-
 /* continuation for OP_INVOKE_VIRTUAL_RANGE */
 
     /*
@@ -9356,7 +9321,6 @@
     ldr     r0, [r3, r2, lsl #2]        @ r3<- vtable[methodIndex]
     bl      common_invokeMethodRange @ continue on
 
-
 /* continuation for OP_INVOKE_SUPER_RANGE */
 
     /*
@@ -9391,7 +9355,6 @@
     ldr     r1, [r0, #offMethod_name]   @ r1<- method name
     b       common_errNoSuchMethod
 
-
 /* continuation for OP_INVOKE_DIRECT_RANGE */
 
     /*
@@ -9409,7 +9372,6 @@
     bne     .LOP_INVOKE_DIRECT_RANGE_finish          @ no, continue
     b       common_exceptionThrown      @ yes, handle exception
 
-
 /* continuation for OP_FLOAT_TO_LONG */
 /*
  * Convert the float in r0 to a long in r0/r1.
@@ -9447,7 +9409,6 @@
     bl      __aeabi_f2lz                @ convert float to long
     ldmfd   sp!, {r4, pc}
 
-
 /* continuation for OP_DOUBLE_TO_LONG */
 /*
  * Convert the double in r0/r1 to a long in r0/r1.
@@ -9498,7 +9459,6 @@
     add     sp, sp, #4
     ldmfd   sp!, {r4, r5, pc}
 
-
 /* continuation for OP_MUL_LONG */
 
 .LOP_MUL_LONG_finish:
@@ -9506,7 +9466,6 @@
     stmia   r0, {r9-r10}                @ vAA/vAA+1<- r9/r10
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_SHL_LONG */
 
 .LOP_SHL_LONG_finish:
@@ -9515,7 +9474,6 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_SHR_LONG */
 
 .LOP_SHR_LONG_finish:
@@ -9524,7 +9482,6 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_USHR_LONG */
 
 .LOP_USHR_LONG_finish:
@@ -9533,7 +9490,6 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_SHL_LONG_2ADDR */
 
 .LOP_SHL_LONG_2ADDR_finish:
@@ -9541,7 +9497,6 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_SHR_LONG_2ADDR */
 
 .LOP_SHR_LONG_2ADDR_finish:
@@ -9549,7 +9504,6 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_USHR_LONG_2ADDR */
 
 .LOP_USHR_LONG_2ADDR_finish:
@@ -9557,6 +9511,98 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
+/* continuation for OP_IGET_VOLATILE */
+
+    /*
+     * Currently:
+     *  r0 holds resolved field
+     *  r9 holds object
+     */
+.LOP_IGET_VOLATILE_finish:
+    @bl      common_squeak0
+    cmp     r9, #0                      @ check object for null
+    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
+    beq     common_errNullObject        @ object was null
+    ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    SMP_DMB                            @ acquiring load
+    mov     r2, rINST, lsr #8           @ r2<- A+
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    and     r2, r2, #15                 @ r2<- A
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SET_VREG(r0, r2)                    @ fp[A]<- r0
+    GOTO_OPCODE(ip)                     @ jump to next instruction
+
+/* continuation for OP_IPUT_VOLATILE */
+
+    /*
+     * Currently:
+     *  r0 holds resolved field
+     *  r9 holds object
+     */
+.LOP_IPUT_VOLATILE_finish:
+    @bl      common_squeak0
+    mov     r1, rINST, lsr #8           @ r1<- A+
+    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
+    and     r1, r1, #15                 @ r1<- A
+    cmp     r9, #0                      @ check object for null
+    GET_VREG(r0, r1)                    @ r0<- fp[A]
+    beq     common_errNullObject        @ object was null
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SMP_DMB                            @ releasing store
+    str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
+    GOTO_OPCODE(ip)                     @ jump to next instruction
+
+/* continuation for OP_SGET_VOLATILE */
+
+    /*
+     * Continuation if the field has not yet been resolved.
+     *  r1: BBBB field ref
+     */
+.LOP_SGET_VOLATILE_resolve:
+    ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw, so export now
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_SGET_VOLATILE_finish          @ yes, finish
+    b       common_exceptionThrown      @ no, handle exception
+
+/* continuation for OP_SPUT_VOLATILE */
+
+    /*
+     * Continuation if the field has not yet been resolved.
+     *  r1: BBBB field ref
+     */
+.LOP_SPUT_VOLATILE_resolve:
+    ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw, so export now
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_SPUT_VOLATILE_finish          @ yes, finish
+    b       common_exceptionThrown      @ no, handle exception
+
+/* continuation for OP_IGET_OBJECT_VOLATILE */
+
+    /*
+     * Currently:
+     *  r0 holds resolved field
+     *  r9 holds object
+     */
+.LOP_IGET_OBJECT_VOLATILE_finish:
+    @bl      common_squeak0
+    cmp     r9, #0                      @ check object for null
+    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
+    beq     common_errNullObject        @ object was null
+    ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    SMP_DMB                            @ acquiring load
+    mov     r2, rINST, lsr #8           @ r2<- A+
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    and     r2, r2, #15                 @ r2<- A
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SET_VREG(r0, r2)                    @ fp[A]<- r0
+    GOTO_OPCODE(ip)                     @ jump to next instruction
 
 /* continuation for OP_IGET_WIDE_VOLATILE */
 
@@ -9571,7 +9617,7 @@
     beq     common_errNullObject        @ object was null
     .if 1
     add     r0, r9, r3                  @ r0<- address of field
-    bl      android_quasiatomic_read_64 @ r0/r1<- contents of field
+    bl      dvmQuasiAtomicRead64        @ r0/r1<- contents of field
     .else
     add     r9, r9, r3                  @ r9<- obj + field offset
     ldmia   r9, {r0-r1}                 @ r0/r1<- obj.field (64-bit align ok)
@@ -9584,7 +9630,6 @@
     stmia   r3, {r0-r1}                 @ fp[A]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_WIDE_VOLATILE */
 
     /*
@@ -9604,13 +9649,12 @@
     GET_INST_OPCODE(r10)                @ extract opcode from rINST
     add     r2, r9, r3                  @ r2<- object + byte offset
     .if 1
-    bl      android_quasiatomic_swap_64 @ stores r0/r1 into addr r2
+    bl      dvmQuasiAtomicSwap64        @ stores r0/r1 into addr r2
     .else
     stmia   r2, {r0-r1}                 @ obj.field (64 bits, aligned)<- r0/r1
     .endif
     GOTO_OPCODE(r10)                    @ jump to next instruction
 
-
 /* continuation for OP_SGET_WIDE_VOLATILE */
 
     /*
@@ -9628,7 +9672,6 @@
     bne     .LOP_SGET_WIDE_VOLATILE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_WIDE_VOLATILE */
 
     /*
@@ -9648,7 +9691,6 @@
     bne     .LOP_SPUT_WIDE_VOLATILE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_EXECUTE_INLINE */
 
     /*
@@ -9684,7 +9726,6 @@
 .LOP_EXECUTE_INLINE_table:
     .word   gDvmInlineOpsTable
 
-
 /* continuation for OP_EXECUTE_INLINE_RANGE */
 
     /*
@@ -9714,6 +9755,56 @@
 .LOP_EXECUTE_INLINE_RANGE_table:
     .word   gDvmInlineOpsTable
 
+/* continuation for OP_IPUT_OBJECT_VOLATILE */
+
+    /*
+     * Currently:
+     *  r0 holds resolved field
+     *  r9 holds object
+     */
+.LOP_IPUT_OBJECT_VOLATILE_finish:
+    @bl      common_squeak0
+    mov     r1, rINST, lsr #8           @ r1<- A+
+    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
+    and     r1, r1, #15                 @ r1<- A
+    cmp     r9, #0                      @ check object for null
+    GET_VREG(r0, r1)                    @ r0<- fp[A]
+    beq     common_errNullObject        @ object was null
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SMP_DMB                            @ releasing store
+    str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
+    GOTO_OPCODE(ip)                     @ jump to next instruction
+
+/* continuation for OP_SGET_OBJECT_VOLATILE */
+
+    /*
+     * Continuation if the field has not yet been resolved.
+     *  r1: BBBB field ref
+     */
+.LOP_SGET_OBJECT_VOLATILE_resolve:
+    ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw, so export now
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_SGET_OBJECT_VOLATILE_finish          @ yes, finish
+    b       common_exceptionThrown      @ no, handle exception
+
+/* continuation for OP_SPUT_OBJECT_VOLATILE */
+
+    /*
+     * Continuation if the field has not yet been resolved.
+     *  r1: BBBB field ref
+     */
+.LOP_SPUT_OBJECT_VOLATILE_resolve:
+    ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw, so export now
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_SPUT_OBJECT_VOLATILE_finish          @ yes, finish
+    b       common_exceptionThrown      @ no, handle exception
 
     .size   dvmAsmSisterStart, .-dvmAsmSisterStart
     .global dvmAsmSisterEnd
@@ -10946,4 +11037,3 @@
 .LstrPrintLong:
     .asciz  "<%lld>"
 
-
diff --git a/vm/mterp/out/InterpAsm-armv5te-vfp.S b/vm/mterp/out/InterpAsm-armv5te-vfp.S
index 226dc44..2e86a7f 100644
--- a/vm/mterp/out/InterpAsm-armv5te-vfp.S
+++ b/vm/mterp/out/InterpAsm-armv5te-vfp.S
@@ -20,6 +20,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 /*
  * ARMv5 definitions and declarations.
  */
@@ -242,6 +243,11 @@
     ldmfd   sp!, {\regs,pc}
 .endm
 
+/*
+ * Macro for data memory barrier; not meaningful pre-ARMv6K.
+ */
+.macro  SMP_DMB
+.endm
 
 /* File: armv5te/entry.S */
 /*
@@ -396,7 +402,6 @@
     .word   .LstrBadEntryPoint
 
 
-
     .global dvmAsmInstructionStart
     .type   dvmAsmInstructionStart, %function
 dvmAsmInstructionStart = .L_OP_NOP
@@ -420,7 +425,6 @@
     .fnend
 #endif
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE: /* 0x01 */
@@ -436,7 +440,6 @@
     SET_VREG(r2, r0)                    @ fp[A]<- r2
     GOTO_OPCODE(ip)                     @ execute next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_FROM16: /* 0x02 */
@@ -451,7 +454,6 @@
     SET_VREG(r2, r0)                    @ fp[AA]<- r2
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_16: /* 0x03 */
@@ -466,7 +468,6 @@
     SET_VREG(r2, r0)                    @ fp[AAAA]<- r2
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_WIDE: /* 0x04 */
@@ -484,7 +485,6 @@
     stmia   r2, {r0-r1}                 @ fp[A]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_WIDE_FROM16: /* 0x05 */
@@ -501,7 +501,6 @@
     stmia   r2, {r0-r1}                 @ fp[AA]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_WIDE_16: /* 0x06 */
@@ -518,7 +517,6 @@
     stmia   r2, {r0-r1}                 @ fp[AAAA]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_OBJECT: /* 0x07 */
@@ -536,7 +534,6 @@
     GOTO_OPCODE(ip)                     @ execute next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_OBJECT_FROM16: /* 0x08 */
@@ -553,7 +550,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_OBJECT_16: /* 0x09 */
@@ -570,7 +566,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_RESULT: /* 0x0a */
@@ -584,7 +579,6 @@
     SET_VREG(r0, r2)                    @ fp[AA]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_RESULT_WIDE: /* 0x0b */
@@ -599,7 +593,6 @@
     stmia   r2, {r0-r1}                 @ fp[AA]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_RESULT_OBJECT: /* 0x0c */
@@ -615,7 +608,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_EXCEPTION: /* 0x0d */
@@ -631,14 +623,12 @@
     str     r1, [r0, #offThread_exception]  @ dvmClearException bypass
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RETURN_VOID: /* 0x0e */
 /* File: armv5te/OP_RETURN_VOID.S */
     b       common_returnFromMethod
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RETURN: /* 0x0f */
@@ -655,7 +645,6 @@
     str     r0, [rGLUE, #offGlue_retval] @ retval.i <- vAA
     b       common_returnFromMethod
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RETURN_WIDE: /* 0x10 */
@@ -672,7 +661,6 @@
     stmia   r3, {r0-r1}                 @ retval<- r0/r1
     b       common_returnFromMethod
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RETURN_OBJECT: /* 0x11 */
@@ -691,7 +679,6 @@
     b       common_returnFromMethod
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_4: /* 0x12 */
@@ -706,7 +693,6 @@
     SET_VREG(r1, r0)                    @ fp[A]<- r1
     GOTO_OPCODE(ip)                     @ execute next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_16: /* 0x13 */
@@ -719,7 +705,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST: /* 0x14 */
@@ -734,7 +719,6 @@
     SET_VREG(r0, r3)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_HIGH16: /* 0x15 */
@@ -748,7 +732,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_WIDE_16: /* 0x16 */
@@ -763,7 +746,6 @@
     stmia   r3, {r0-r1}                 @ vAA<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_WIDE_32: /* 0x17 */
@@ -780,7 +762,6 @@
     stmia   r3, {r0-r1}                 @ vAA<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_WIDE: /* 0x18 */
@@ -799,7 +780,6 @@
     stmia   r9, {r0-r1}                 @ vAA<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_WIDE_HIGH16: /* 0x19 */
@@ -815,7 +795,6 @@
     stmia   r3, {r0-r1}                 @ vAA<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_STRING: /* 0x1a */
@@ -894,7 +873,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MONITOR_EXIT: /* 0x1e */
@@ -923,7 +901,6 @@
     FETCH_ADVANCE_INST(1)               @ advance before throw
     b      common_errNullObject
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CHECK_CAST: /* 0x1f */
@@ -999,7 +976,6 @@
     SET_VREG(r3, r2)                    @ vB<- length
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_NEW_INSTANCE: /* 0x22 */
@@ -1135,13 +1111,13 @@
     mov     r2, rINST, lsr #8           @ r2<- AA
     GET_VREG(r1, r2)                    @ r1<- vAA (exception object)
     ldr     r0, [rGLUE, #offGlue_self]  @ r0<- glue->self
+    EXPORT_PC()                         @ exception handler can throw
     cmp     r1, #0                      @ null object?
     beq     common_errNullObject        @ yes, throw an NPE instead
     @ bypass dvmSetException, just store it
     str     r1, [r0, #offThread_exception]  @ thread->exception<- obj
     b       common_exceptionThrown
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_GOTO: /* 0x28 */
@@ -1197,7 +1173,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 #endif
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_GOTO_32: /* 0x2a */
@@ -1270,7 +1245,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 #endif
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SPARSE_SWITCH: /* 0x2c */
@@ -1310,7 +1284,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CMPL_FLOAT: /* 0x2d */
@@ -1544,7 +1517,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_NE: /* 0x33 */
@@ -1581,7 +1553,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_LT: /* 0x34 */
@@ -1618,7 +1589,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_GE: /* 0x35 */
@@ -1655,7 +1625,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_GT: /* 0x36 */
@@ -1692,7 +1661,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_LE: /* 0x37 */
@@ -1729,7 +1697,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_EQZ: /* 0x38 */
@@ -1766,7 +1733,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_NEZ: /* 0x39 */
@@ -1803,7 +1769,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_LTZ: /* 0x3a */
@@ -1840,7 +1805,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_GEZ: /* 0x3b */
@@ -1877,7 +1841,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_GTZ: /* 0x3c */
@@ -1914,7 +1877,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_LEZ: /* 0x3d */
@@ -1951,7 +1913,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_3E: /* 0x3e */
@@ -1960,7 +1921,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_3F: /* 0x3f */
@@ -1969,7 +1929,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_40: /* 0x40 */
@@ -1978,7 +1937,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_41: /* 0x41 */
@@ -1987,7 +1945,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_42: /* 0x42 */
@@ -1996,7 +1953,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_43: /* 0x43 */
@@ -2005,7 +1961,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET: /* 0x44 */
@@ -2036,7 +1991,6 @@
     SET_VREG(r2, r9)                    @ vAA<- r2
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_WIDE: /* 0x45 */
@@ -2096,7 +2050,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_BOOLEAN: /* 0x47 */
@@ -2129,7 +2082,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_BYTE: /* 0x48 */
@@ -2162,7 +2114,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_CHAR: /* 0x49 */
@@ -2195,7 +2146,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_SHORT: /* 0x4a */
@@ -2228,7 +2178,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT: /* 0x4b */
@@ -2259,7 +2208,6 @@
     str  r2, [r0, #offArrayObject_contents]  @ vBB[vCC]<- r2
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT_WIDE: /* 0x4c */
@@ -2347,7 +2295,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT_BYTE: /* 0x4f */
@@ -2380,7 +2327,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT_CHAR: /* 0x50 */
@@ -2413,7 +2359,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT_SHORT: /* 0x51 */
@@ -2446,7 +2391,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IGET: /* 0x52 */
@@ -2850,6 +2794,7 @@
     beq     .LOP_SGET_resolve         @ yes, do resolve
 .LOP_SGET_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -2874,7 +2819,7 @@
     mov     r9, rINST, lsr #8           @ r9<- AA
     .if 0
     add     r0, r0, #offStaticField_value @ r0<- pointer to data
-    bl      android_quasiatomic_read_64 @ r0/r1<- contents of field
+    bl      dvmQuasiAtomicRead64        @ r0/r1<- contents of field
     .else
     ldrd    r0, [r0, #offStaticField_value] @ r0/r1<- field value (aligned)
     .endif
@@ -2903,6 +2848,7 @@
     beq     .LOP_SGET_OBJECT_resolve         @ yes, do resolve
 .LOP_SGET_OBJECT_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -2929,6 +2875,7 @@
     beq     .LOP_SGET_BOOLEAN_resolve         @ yes, do resolve
 .LOP_SGET_BOOLEAN_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -2955,6 +2902,7 @@
     beq     .LOP_SGET_BYTE_resolve         @ yes, do resolve
 .LOP_SGET_BYTE_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -2981,6 +2929,7 @@
     beq     .LOP_SGET_CHAR_resolve         @ yes, do resolve
 .LOP_SGET_CHAR_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -3007,6 +2956,7 @@
     beq     .LOP_SGET_SHORT_resolve         @ yes, do resolve
 .LOP_SGET_SHORT_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -3035,6 +2985,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3060,7 +3011,7 @@
     GET_INST_OPCODE(r10)                @ extract opcode from rINST
     .if 0
     add     r2, r2, #offStaticField_value @ r2<- pointer to data
-    bl      android_quasiatomic_swap_64 @ stores r0/r1 into addr r2
+    bl      dvmQuasiAtomicSwap64        @ stores r0/r1 into addr r2
     .else
     strd    r0, [r2, #offStaticField_value] @ field<- vAA/vAA+1
     .endif
@@ -3088,6 +3039,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3114,6 +3066,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3140,6 +3093,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3166,6 +3120,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3192,6 +3147,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3314,7 +3270,6 @@
     bne     common_invokeMethodNoRange @ no, continue
     b       common_exceptionThrown      @ yes, handle exception
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_INTERFACE: /* 0x72 */
@@ -3341,8 +3296,7 @@
     bl      dvmFindInterfaceMethodInCache @ r0<- call(class, ref, method, dex)
     cmp     r0, #0                      @ failed?
     beq     common_exceptionThrown      @ yes, handle exception
-    b       common_invokeMethodNoRange @ jump to common handler 
-
+    b       common_invokeMethodNoRange @ jump to common handler
 
 /* ------------------------------ */
     .balign 64
@@ -3352,7 +3306,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_VIRTUAL_RANGE: /* 0x74 */
@@ -3479,7 +3432,6 @@
     b       common_exceptionThrown      @ yes, handle exception
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_INTERFACE_RANGE: /* 0x78 */
@@ -3507,8 +3459,7 @@
     bl      dvmFindInterfaceMethodInCache @ r0<- call(class, ref, method, dex)
     cmp     r0, #0                      @ failed?
     beq     common_exceptionThrown      @ yes, handle exception
-    b       common_invokeMethodRange @ jump to common handler 
-
+    b       common_invokeMethodRange @ jump to common handler
 
 
 /* ------------------------------ */
@@ -3519,7 +3470,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_7A: /* 0x7a */
@@ -3528,7 +3478,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_NEG_INT: /* 0x7b */
@@ -3611,7 +3560,6 @@
     /* 12-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_NOT_LONG: /* 0x7e */
@@ -3640,7 +3588,6 @@
     /* 12-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_NEG_FLOAT: /* 0x7f */
@@ -3696,7 +3643,6 @@
     /* 12-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INT_TO_LONG: /* 0x81 */
@@ -3792,7 +3738,6 @@
     GOTO_OPCODE(ip)                     @ execute next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_LONG_TO_FLOAT: /* 0x85 */
@@ -3851,7 +3796,6 @@
     /* 12-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_FLOAT_TO_INT: /* 0x87 */
@@ -3986,7 +3930,6 @@
 
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DOUBLE_TO_FLOAT: /* 0x8c */
@@ -4134,7 +4077,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_INT: /* 0x91 */
@@ -4176,7 +4118,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_INT: /* 0x92 */
@@ -4219,7 +4160,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_INT: /* 0x93 */
@@ -4261,7 +4201,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_INT: /* 0x94 */
@@ -4304,7 +4243,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_INT: /* 0x95 */
@@ -4346,7 +4284,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_INT: /* 0x96 */
@@ -4388,7 +4325,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_INT: /* 0x97 */
@@ -4430,7 +4366,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHL_INT: /* 0x98 */
@@ -4472,7 +4407,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHR_INT: /* 0x99 */
@@ -4514,7 +4448,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_USHR_INT: /* 0x9a */
@@ -4556,7 +4489,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_LONG: /* 0x9b */
@@ -4601,7 +4533,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_LONG: /* 0x9c */
@@ -4646,7 +4577,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_LONG: /* 0x9d */
@@ -4730,7 +4660,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_LONG: /* 0x9f */
@@ -4776,7 +4705,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_LONG: /* 0xa0 */
@@ -4821,7 +4749,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_LONG: /* 0xa1 */
@@ -4866,7 +4793,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_LONG: /* 0xa2 */
@@ -4911,7 +4837,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHL_LONG: /* 0xa3 */
@@ -5161,7 +5086,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_DOUBLE: /* 0xab */
@@ -5327,7 +5251,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_INT_2ADDR: /* 0xb0 */
@@ -5367,7 +5290,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_INT_2ADDR: /* 0xb1 */
@@ -5407,7 +5329,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_INT_2ADDR: /* 0xb2 */
@@ -5448,7 +5369,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_INT_2ADDR: /* 0xb3 */
@@ -5488,7 +5408,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_INT_2ADDR: /* 0xb4 */
@@ -5529,7 +5448,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_INT_2ADDR: /* 0xb5 */
@@ -5569,7 +5487,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_INT_2ADDR: /* 0xb6 */
@@ -5609,7 +5526,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_INT_2ADDR: /* 0xb7 */
@@ -5649,7 +5565,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHL_INT_2ADDR: /* 0xb8 */
@@ -5689,7 +5604,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHR_INT_2ADDR: /* 0xb9 */
@@ -5729,7 +5643,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_USHR_INT_2ADDR: /* 0xba */
@@ -5769,7 +5682,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_LONG_2ADDR: /* 0xbb */
@@ -5811,7 +5723,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_LONG_2ADDR: /* 0xbc */
@@ -5853,7 +5764,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_LONG_2ADDR: /* 0xbd */
@@ -5884,7 +5794,6 @@
     stmia   r0, {r9-r10}                @ vAA/vAA+1<- r9/r10
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_LONG_2ADDR: /* 0xbe */
@@ -5926,7 +5835,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_LONG_2ADDR: /* 0xbf */
@@ -5969,7 +5877,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_LONG_2ADDR: /* 0xc0 */
@@ -6011,7 +5918,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_LONG_2ADDR: /* 0xc1 */
@@ -6053,7 +5959,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_LONG_2ADDR: /* 0xc2 */
@@ -6095,7 +6000,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHL_LONG_2ADDR: /* 0xc3 */
@@ -6326,7 +6230,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_DOUBLE_2ADDR: /* 0xcb */
@@ -6485,7 +6388,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_INT_LIT16: /* 0xd0 */
@@ -6522,7 +6424,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RSUB_INT: /* 0xd1 */
@@ -6560,7 +6461,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_INT_LIT16: /* 0xd2 */
@@ -6598,7 +6498,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_INT_LIT16: /* 0xd3 */
@@ -6635,7 +6534,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_INT_LIT16: /* 0xd4 */
@@ -6673,7 +6571,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_INT_LIT16: /* 0xd5 */
@@ -6710,7 +6607,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_INT_LIT16: /* 0xd6 */
@@ -6747,7 +6643,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_INT_LIT16: /* 0xd7 */
@@ -6784,7 +6679,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_INT_LIT8: /* 0xd8 */
@@ -6823,7 +6717,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RSUB_INT_LIT8: /* 0xd9 */
@@ -6862,7 +6755,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_INT_LIT8: /* 0xda */
@@ -6902,7 +6794,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_INT_LIT8: /* 0xdb */
@@ -6941,7 +6832,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_INT_LIT8: /* 0xdc */
@@ -6981,7 +6871,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_INT_LIT8: /* 0xdd */
@@ -7020,7 +6909,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_INT_LIT8: /* 0xde */
@@ -7059,7 +6947,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_INT_LIT8: /* 0xdf */
@@ -7098,7 +6985,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHL_INT_LIT8: /* 0xe0 */
@@ -7137,7 +7023,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHR_INT_LIT8: /* 0xe1 */
@@ -7176,7 +7061,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_USHR_INT_LIT8: /* 0xe2 */
@@ -7215,50 +7099,142 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E3: /* 0xe3 */
-/* File: armv5te/OP_UNUSED_E3.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_IGET_VOLATILE: /* 0xe3 */
+/* File: armv5te/OP_IGET_VOLATILE.S */
+/* File: armv5te/OP_IGET.S */
+    /*
+     * General 32-bit instance field get.
+     *
+     * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
+     */
+    /* op vA, vB, field@CCCC */
+    mov     r0, rINST, lsr #12          @ r0<- B
+    ldr     r3, [rGLUE, #offGlue_methodClassDex]    @ r3<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref CCCC
+    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
+    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    bne     .LOP_IGET_VOLATILE_finish          @ no, already resolved
+8:  ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
+    cmp     r0, #0
+    bne     .LOP_IGET_VOLATILE_finish
+    b       common_exceptionThrown
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E4: /* 0xe4 */
-/* File: armv5te/OP_UNUSED_E4.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_IPUT_VOLATILE: /* 0xe4 */
+/* File: armv5te/OP_IPUT_VOLATILE.S */
+/* File: armv5te/OP_IPUT.S */
+    /*
+     * General 32-bit instance field put.
+     *
+     * for: iput, iput-object, iput-boolean, iput-byte, iput-char, iput-short
+     */
+    /* op vA, vB, field@CCCC */
+    mov     r0, rINST, lsr #12          @ r0<- B
+    ldr     r3, [rGLUE, #offGlue_methodClassDex]    @ r3<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref CCCC
+    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
+    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    bne     .LOP_IPUT_VOLATILE_finish          @ no, already resolved
+8:  ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_IPUT_VOLATILE_finish          @ yes, finish up
+    b       common_exceptionThrown
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E5: /* 0xe5 */
-/* File: armv5te/OP_UNUSED_E5.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_SGET_VOLATILE: /* 0xe5 */
+/* File: armv5te/OP_SGET_VOLATILE.S */
+/* File: armv5te/OP_SGET.S */
+    /*
+     * General 32-bit SGET handler.
+     *
+     * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
+     */
+    /* op vAA, field@BBBB */
+    ldr     r2, [rGLUE, #offGlue_methodClassDex]    @ r2<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref BBBB
+    ldr     r2, [r2, #offDvmDex_pResFields] @ r2<- dvmDex->pResFields
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    beq     .LOP_SGET_VOLATILE_resolve         @ yes, do resolve
+.LOP_SGET_VOLATILE_finish: @ field ptr in r0
+    ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    SMP_DMB                            @ acquiring load
+    mov     r2, rINST, lsr #8           @ r2<- AA
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    SET_VREG(r1, r2)                    @ fp[AA]<- r1
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E6: /* 0xe6 */
-/* File: armv5te/OP_UNUSED_E6.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_SPUT_VOLATILE: /* 0xe6 */
+/* File: armv5te/OP_SPUT_VOLATILE.S */
+/* File: armv5te/OP_SPUT.S */
+    /*
+     * General 32-bit SPUT handler.
+     *
+     * for: sput, sput-object, sput-boolean, sput-byte, sput-char, sput-short
+     */
+    /* op vAA, field@BBBB */
+    ldr     r2, [rGLUE, #offGlue_methodClassDex]    @ r2<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref BBBB
+    ldr     r2, [r2, #offDvmDex_pResFields] @ r2<- dvmDex->pResFields
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    beq     .LOP_SPUT_VOLATILE_resolve         @ yes, do resolve
+.LOP_SPUT_VOLATILE_finish:   @ field ptr in r0
+    mov     r2, rINST, lsr #8           @ r2<- AA
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    GET_VREG(r1, r2)                    @ r1<- fp[AA]
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SMP_DMB                            @ releasing store
+    str     r1, [r0, #offStaticField_value] @ field<- vAA
+    GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E7: /* 0xe7 */
-/* File: armv5te/OP_UNUSED_E7.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_IGET_OBJECT_VOLATILE: /* 0xe7 */
+/* File: armv5te/OP_IGET_OBJECT_VOLATILE.S */
+/* File: armv5te/OP_IGET.S */
+    /*
+     * General 32-bit instance field get.
+     *
+     * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
+     */
+    /* op vA, vB, field@CCCC */
+    mov     r0, rINST, lsr #12          @ r0<- B
+    ldr     r3, [rGLUE, #offGlue_methodClassDex]    @ r3<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref CCCC
+    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
+    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    bne     .LOP_IGET_OBJECT_VOLATILE_finish          @ no, already resolved
+8:  ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
+    cmp     r0, #0
+    bne     .LOP_IGET_OBJECT_VOLATILE_finish
+    b       common_exceptionThrown
 
 
 /* ------------------------------ */
@@ -7329,7 +7305,7 @@
     mov     r9, rINST, lsr #8           @ r9<- AA
     .if 1
     add     r0, r0, #offStaticField_value @ r0<- pointer to data
-    bl      android_quasiatomic_read_64 @ r0/r1<- contents of field
+    bl      dvmQuasiAtomicRead64        @ r0/r1<- contents of field
     .else
     ldrd    r0, [r0, #offStaticField_value] @ r0/r1<- field value (aligned)
     .endif
@@ -7363,7 +7339,7 @@
     GET_INST_OPCODE(r10)                @ extract opcode from rINST
     .if 1
     add     r2, r2, #offStaticField_value @ r2<- pointer to data
-    bl      android_quasiatomic_swap_64 @ stores r0/r1 into addr r2
+    bl      dvmQuasiAtomicSwap64        @ stores r0/r1 into addr r2
     .else
     strd    r0, [r2, #offStaticField_value] @ field<- vAA/vAA+1
     .endif
@@ -7378,7 +7354,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_THROW_VERIFICATION_ERROR: /* 0xed */
@@ -7396,7 +7371,6 @@
     bl      dvmThrowVerificationError   @ always throws
     b       common_exceptionThrown      @ handle exception
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_EXECUTE_INLINE: /* 0xee */
@@ -7475,7 +7449,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IGET_QUICK: /* 0xf2 */
@@ -7495,7 +7468,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IGET_WIDE_QUICK: /* 0xf3 */
@@ -7515,7 +7487,6 @@
     stmia   r3, {r0-r1}                 @ fp[A]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IGET_OBJECT_QUICK: /* 0xf4 */
@@ -7537,7 +7508,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IPUT_QUICK: /* 0xf5 */
@@ -7557,7 +7527,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IPUT_WIDE_QUICK: /* 0xf6 */
@@ -7577,7 +7546,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IPUT_OBJECT_QUICK: /* 0xf7 */
@@ -7599,7 +7567,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_VIRTUAL_QUICK: /* 0xf8 */
@@ -7679,7 +7646,6 @@
     beq     common_errNullObject        @ "this" is null, throw exception
     bl      common_invokeMethodNoRange @ continue on
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_SUPER_QUICK_RANGE: /* 0xfb */
@@ -7709,32 +7675,86 @@
     bl      common_invokeMethodRange @ continue on
 
 
-
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_FC: /* 0xfc */
-/* File: armv5te/OP_UNUSED_FC.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_IPUT_OBJECT_VOLATILE: /* 0xfc */
+/* File: armv5te/OP_IPUT_OBJECT_VOLATILE.S */
+/* File: armv5te/OP_IPUT.S */
+    /*
+     * General 32-bit instance field put.
+     *
+     * for: iput, iput-object, iput-boolean, iput-byte, iput-char, iput-short
+     */
+    /* op vA, vB, field@CCCC */
+    mov     r0, rINST, lsr #12          @ r0<- B
+    ldr     r3, [rGLUE, #offGlue_methodClassDex]    @ r3<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref CCCC
+    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
+    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    bne     .LOP_IPUT_OBJECT_VOLATILE_finish          @ no, already resolved
+8:  ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_IPUT_OBJECT_VOLATILE_finish          @ yes, finish up
+    b       common_exceptionThrown
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_FD: /* 0xfd */
-/* File: armv5te/OP_UNUSED_FD.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_SGET_OBJECT_VOLATILE: /* 0xfd */
+/* File: armv5te/OP_SGET_OBJECT_VOLATILE.S */
+/* File: armv5te/OP_SGET.S */
+    /*
+     * General 32-bit SGET handler.
+     *
+     * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
+     */
+    /* op vAA, field@BBBB */
+    ldr     r2, [rGLUE, #offGlue_methodClassDex]    @ r2<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref BBBB
+    ldr     r2, [r2, #offDvmDex_pResFields] @ r2<- dvmDex->pResFields
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    beq     .LOP_SGET_OBJECT_VOLATILE_resolve         @ yes, do resolve
+.LOP_SGET_OBJECT_VOLATILE_finish: @ field ptr in r0
+    ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    SMP_DMB                            @ acquiring load
+    mov     r2, rINST, lsr #8           @ r2<- AA
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    SET_VREG(r1, r2)                    @ fp[AA]<- r1
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_FE: /* 0xfe */
-/* File: armv5te/OP_UNUSED_FE.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_SPUT_OBJECT_VOLATILE: /* 0xfe */
+/* File: armv5te/OP_SPUT_OBJECT_VOLATILE.S */
+/* File: armv5te/OP_SPUT.S */
+    /*
+     * General 32-bit SPUT handler.
+     *
+     * for: sput, sput-object, sput-boolean, sput-byte, sput-char, sput-short
+     */
+    /* op vAA, field@BBBB */
+    ldr     r2, [rGLUE, #offGlue_methodClassDex]    @ r2<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref BBBB
+    ldr     r2, [r2, #offDvmDex_pResFields] @ r2<- dvmDex->pResFields
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    beq     .LOP_SPUT_OBJECT_VOLATILE_resolve         @ yes, do resolve
+.LOP_SPUT_OBJECT_VOLATILE_finish:   @ field ptr in r0
+    mov     r2, rINST, lsr #8           @ r2<- AA
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    GET_VREG(r1, r2)                    @ r1<- fp[AA]
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SMP_DMB                            @ releasing store
+    str     r1, [r0, #offStaticField_value] @ field<- vAA
+    GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
 /* ------------------------------ */
@@ -7746,7 +7766,6 @@
 
 
 
-
     .balign 64
     .size   dvmAsmInstructionStart, .-dvmAsmInstructionStart
     .global dvmAsmInstructionEnd
@@ -7782,7 +7801,6 @@
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_CONST_STRING_JUMBO */
 
     /*
@@ -7802,7 +7820,6 @@
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_CONST_CLASS */
 
     /*
@@ -7823,7 +7840,6 @@
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_CHECK_CAST */
 
     /*
@@ -7868,7 +7884,6 @@
 .LstrClassCastExceptionPtr:
     .word   .LstrClassCastException
 
-
 /* continuation for OP_INSTANCE_OF */
 
     /*
@@ -7924,7 +7939,6 @@
     ldr     r0, [r0, #offObject_clazz]  @ r0<- obj->clazz
     b       .LOP_INSTANCE_OF_resolved        @ pick up where we left off
 
-
 /* continuation for OP_NEW_INSTANCE */
 
     .balign 32                          @ minimize cache lines
@@ -7967,7 +7981,6 @@
 .LstrInstantiationErrorPtr:
     .word   .LstrInstantiationError
 
-
 /* continuation for OP_NEW_ARRAY */
 
 
@@ -8007,7 +8020,6 @@
     SET_VREG(r0, r2)                    @ vA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_FILLED_NEW_ARRAY */
 
     /*
@@ -8086,7 +8098,6 @@
     .word   .LstrInternalError
     .endif
 
-
 /* continuation for OP_FILLED_NEW_ARRAY_RANGE */
 
     /*
@@ -8165,31 +8176,26 @@
     .word   .LstrInternalError
     .endif
 
-
 /* continuation for OP_CMPL_FLOAT */
 .LOP_CMPL_FLOAT_finish:
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_CMPG_FLOAT */
 .LOP_CMPG_FLOAT_finish:
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_CMPL_DOUBLE */
 .LOP_CMPL_DOUBLE_finish:
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_CMPG_DOUBLE */
 .LOP_CMPG_DOUBLE_finish:
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_CMP_LONG */
 
 .LOP_CMP_LONG_less:
@@ -8211,7 +8217,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_AGET_WIDE */
 
 .LOP_AGET_WIDE_finish:
@@ -8222,7 +8227,6 @@
     stmia   r9, {r2-r3}                 @ vAA/vAA+1<- r2/r3
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_APUT_WIDE */
 
 .LOP_APUT_WIDE_finish:
@@ -8232,7 +8236,6 @@
     strd    r2, [r0, #offArrayObject_contents]  @ r2/r3<- vBB[vCC]
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_APUT_OBJECT */
     /*
      * On entry:
@@ -8254,7 +8257,6 @@
     str     r9, [r10, #offArrayObject_contents] @ vBB[vCC]<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET */
 
     /*
@@ -8268,6 +8270,7 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
@@ -8275,7 +8278,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_WIDE */
 
     /*
@@ -8287,9 +8289,9 @@
     cmp     r9, #0                      @ check object for null
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
-    .if 0
+    .if     0
     add     r0, r9, r3                  @ r0<- address of field
-    bl      android_quasiatomic_read_64 @ r0/r1<- contents of field
+    bl      dvmQuasiAtomicRead64        @ r0/r1<- contents of field
     .else
     ldrd    r0, [r9, r3]                @ r0/r1<- obj.field (64-bit align ok)
     .endif
@@ -8301,7 +8303,6 @@
     stmia   r3, {r0-r1}                 @ fp[A]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_OBJECT */
 
     /*
@@ -8315,6 +8316,7 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
@@ -8322,7 +8324,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_BOOLEAN */
 
     /*
@@ -8336,6 +8337,7 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
@@ -8343,7 +8345,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_BYTE */
 
     /*
@@ -8357,6 +8358,7 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
@@ -8364,7 +8366,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_CHAR */
 
     /*
@@ -8378,6 +8379,7 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
@@ -8385,7 +8387,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_SHORT */
 
     /*
@@ -8399,6 +8400,7 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
@@ -8406,7 +8408,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT */
 
     /*
@@ -8424,10 +8425,10 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_WIDE */
 
     /*
@@ -8445,15 +8446,14 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     ldmia   r2, {r0-r1}                 @ r0/r1<- fp[A]
     GET_INST_OPCODE(r10)                @ extract opcode from rINST
-    .if 0
+    .if     0
     add     r2, r9, r3                  @ r2<- target address
-    bl      android_quasiatomic_swap_64 @ stores r0/r1 into addr r2
+    bl      dvmQuasiAtomicSwap64        @ stores r0/r1 into addr r2
     .else
     strd    r0, [r9, r3]                @ obj.field (64 bits, aligned)<- r0/r1
     .endif
     GOTO_OPCODE(r10)                    @ jump to next instruction
 
-
 /* continuation for OP_IPUT_OBJECT */
 
     /*
@@ -8471,10 +8471,10 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_BOOLEAN */
 
     /*
@@ -8492,10 +8492,10 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_BYTE */
 
     /*
@@ -8513,10 +8513,10 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_CHAR */
 
     /*
@@ -8534,10 +8534,10 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_SHORT */
 
     /*
@@ -8555,10 +8555,10 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_SGET */
 
     /*
@@ -8574,7 +8574,6 @@
     bne     .LOP_SGET_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_WIDE */
 
     /*
@@ -8592,7 +8591,6 @@
     bne     .LOP_SGET_WIDE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_OBJECT */
 
     /*
@@ -8608,7 +8606,6 @@
     bne     .LOP_SGET_OBJECT_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_BOOLEAN */
 
     /*
@@ -8624,7 +8621,6 @@
     bne     .LOP_SGET_BOOLEAN_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_BYTE */
 
     /*
@@ -8640,7 +8636,6 @@
     bne     .LOP_SGET_BYTE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_CHAR */
 
     /*
@@ -8656,7 +8651,6 @@
     bne     .LOP_SGET_CHAR_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_SHORT */
 
     /*
@@ -8672,7 +8666,6 @@
     bne     .LOP_SGET_SHORT_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT */
 
     /*
@@ -8688,7 +8681,6 @@
     bne     .LOP_SPUT_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_WIDE */
 
     /*
@@ -8708,7 +8700,6 @@
     bne     .LOP_SPUT_WIDE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_OBJECT */
 
     /*
@@ -8724,7 +8715,6 @@
     bne     .LOP_SPUT_OBJECT_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_BOOLEAN */
 
     /*
@@ -8740,7 +8730,6 @@
     bne     .LOP_SPUT_BOOLEAN_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_BYTE */
 
     /*
@@ -8756,7 +8745,6 @@
     bne     .LOP_SPUT_BYTE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_CHAR */
 
     /*
@@ -8772,7 +8760,6 @@
     bne     .LOP_SPUT_CHAR_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_SHORT */
 
     /*
@@ -8788,7 +8775,6 @@
     bne     .LOP_SPUT_SHORT_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_INVOKE_VIRTUAL */
 
     /*
@@ -8806,7 +8792,6 @@
     ldr     r0, [r3, r2, lsl #2]        @ r3<- vtable[methodIndex]
     bl      common_invokeMethodNoRange @ continue on
 
-
 /* continuation for OP_INVOKE_SUPER */
 
     /*
@@ -8841,7 +8826,6 @@
     ldr     r1, [r0, #offMethod_name]   @ r1<- method name
     b       common_errNoSuchMethod
 
-
 /* continuation for OP_INVOKE_DIRECT */
 
     /*
@@ -8859,7 +8843,6 @@
     bne     .LOP_INVOKE_DIRECT_finish          @ no, continue
     b       common_exceptionThrown      @ yes, handle exception
 
-
 /* continuation for OP_INVOKE_VIRTUAL_RANGE */
 
     /*
@@ -8877,7 +8860,6 @@
     ldr     r0, [r3, r2, lsl #2]        @ r3<- vtable[methodIndex]
     bl      common_invokeMethodRange @ continue on
 
-
 /* continuation for OP_INVOKE_SUPER_RANGE */
 
     /*
@@ -8912,7 +8894,6 @@
     ldr     r1, [r0, #offMethod_name]   @ r1<- method name
     b       common_errNoSuchMethod
 
-
 /* continuation for OP_INVOKE_DIRECT_RANGE */
 
     /*
@@ -8930,7 +8911,6 @@
     bne     .LOP_INVOKE_DIRECT_RANGE_finish          @ no, continue
     b       common_exceptionThrown      @ yes, handle exception
 
-
 /* continuation for OP_FLOAT_TO_LONG */
 /*
  * Convert the float in r0 to a long in r0/r1.
@@ -8968,7 +8948,6 @@
     bl      __aeabi_f2lz                @ convert float to long
     ldmfd   sp!, {r4, pc}
 
-
 /* continuation for OP_DOUBLE_TO_LONG */
 /*
  * Convert the double in r0/r1 to a long in r0/r1.
@@ -9019,7 +8998,6 @@
     add     sp, sp, #4
     ldmfd   sp!, {r4, r5, pc}
 
-
 /* continuation for OP_MUL_LONG */
 
 .LOP_MUL_LONG_finish:
@@ -9027,7 +9005,6 @@
     stmia   r0, {r9-r10}                @ vAA/vAA+1<- r9/r10
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_SHL_LONG */
 
 .LOP_SHL_LONG_finish:
@@ -9036,7 +9013,6 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_SHR_LONG */
 
 .LOP_SHR_LONG_finish:
@@ -9045,7 +9021,6 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_USHR_LONG */
 
 .LOP_USHR_LONG_finish:
@@ -9054,7 +9029,6 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_SHL_LONG_2ADDR */
 
 .LOP_SHL_LONG_2ADDR_finish:
@@ -9062,7 +9036,6 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_SHR_LONG_2ADDR */
 
 .LOP_SHR_LONG_2ADDR_finish:
@@ -9070,7 +9043,6 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_USHR_LONG_2ADDR */
 
 .LOP_USHR_LONG_2ADDR_finish:
@@ -9078,6 +9050,98 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
+/* continuation for OP_IGET_VOLATILE */
+
+    /*
+     * Currently:
+     *  r0 holds resolved field
+     *  r9 holds object
+     */
+.LOP_IGET_VOLATILE_finish:
+    @bl      common_squeak0
+    cmp     r9, #0                      @ check object for null
+    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
+    beq     common_errNullObject        @ object was null
+    ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    SMP_DMB                            @ acquiring load
+    mov     r2, rINST, lsr #8           @ r2<- A+
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    and     r2, r2, #15                 @ r2<- A
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SET_VREG(r0, r2)                    @ fp[A]<- r0
+    GOTO_OPCODE(ip)                     @ jump to next instruction
+
+/* continuation for OP_IPUT_VOLATILE */
+
+    /*
+     * Currently:
+     *  r0 holds resolved field
+     *  r9 holds object
+     */
+.LOP_IPUT_VOLATILE_finish:
+    @bl      common_squeak0
+    mov     r1, rINST, lsr #8           @ r1<- A+
+    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
+    and     r1, r1, #15                 @ r1<- A
+    cmp     r9, #0                      @ check object for null
+    GET_VREG(r0, r1)                    @ r0<- fp[A]
+    beq     common_errNullObject        @ object was null
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SMP_DMB                            @ releasing store
+    str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
+    GOTO_OPCODE(ip)                     @ jump to next instruction
+
+/* continuation for OP_SGET_VOLATILE */
+
+    /*
+     * Continuation if the field has not yet been resolved.
+     *  r1: BBBB field ref
+     */
+.LOP_SGET_VOLATILE_resolve:
+    ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw, so export now
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_SGET_VOLATILE_finish          @ yes, finish
+    b       common_exceptionThrown      @ no, handle exception
+
+/* continuation for OP_SPUT_VOLATILE */
+
+    /*
+     * Continuation if the field has not yet been resolved.
+     *  r1: BBBB field ref
+     */
+.LOP_SPUT_VOLATILE_resolve:
+    ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw, so export now
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_SPUT_VOLATILE_finish          @ yes, finish
+    b       common_exceptionThrown      @ no, handle exception
+
+/* continuation for OP_IGET_OBJECT_VOLATILE */
+
+    /*
+     * Currently:
+     *  r0 holds resolved field
+     *  r9 holds object
+     */
+.LOP_IGET_OBJECT_VOLATILE_finish:
+    @bl      common_squeak0
+    cmp     r9, #0                      @ check object for null
+    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
+    beq     common_errNullObject        @ object was null
+    ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    SMP_DMB                            @ acquiring load
+    mov     r2, rINST, lsr #8           @ r2<- A+
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    and     r2, r2, #15                 @ r2<- A
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SET_VREG(r0, r2)                    @ fp[A]<- r0
+    GOTO_OPCODE(ip)                     @ jump to next instruction
 
 /* continuation for OP_IGET_WIDE_VOLATILE */
 
@@ -9090,9 +9154,9 @@
     cmp     r9, #0                      @ check object for null
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
-    .if 1
+    .if     1
     add     r0, r9, r3                  @ r0<- address of field
-    bl      android_quasiatomic_read_64 @ r0/r1<- contents of field
+    bl      dvmQuasiAtomicRead64        @ r0/r1<- contents of field
     .else
     ldrd    r0, [r9, r3]                @ r0/r1<- obj.field (64-bit align ok)
     .endif
@@ -9104,7 +9168,6 @@
     stmia   r3, {r0-r1}                 @ fp[A]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_WIDE_VOLATILE */
 
     /*
@@ -9122,15 +9185,14 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     ldmia   r2, {r0-r1}                 @ r0/r1<- fp[A]
     GET_INST_OPCODE(r10)                @ extract opcode from rINST
-    .if 1
+    .if     1
     add     r2, r9, r3                  @ r2<- target address
-    bl      android_quasiatomic_swap_64 @ stores r0/r1 into addr r2
+    bl      dvmQuasiAtomicSwap64        @ stores r0/r1 into addr r2
     .else
     strd    r0, [r9, r3]                @ obj.field (64 bits, aligned)<- r0/r1
     .endif
     GOTO_OPCODE(r10)                    @ jump to next instruction
 
-
 /* continuation for OP_SGET_WIDE_VOLATILE */
 
     /*
@@ -9148,7 +9210,6 @@
     bne     .LOP_SGET_WIDE_VOLATILE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_WIDE_VOLATILE */
 
     /*
@@ -9168,7 +9229,6 @@
     bne     .LOP_SPUT_WIDE_VOLATILE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_EXECUTE_INLINE */
 
     /*
@@ -9204,7 +9264,6 @@
 .LOP_EXECUTE_INLINE_table:
     .word   gDvmInlineOpsTable
 
-
 /* continuation for OP_EXECUTE_INLINE_RANGE */
 
     /*
@@ -9234,6 +9293,56 @@
 .LOP_EXECUTE_INLINE_RANGE_table:
     .word   gDvmInlineOpsTable
 
+/* continuation for OP_IPUT_OBJECT_VOLATILE */
+
+    /*
+     * Currently:
+     *  r0 holds resolved field
+     *  r9 holds object
+     */
+.LOP_IPUT_OBJECT_VOLATILE_finish:
+    @bl      common_squeak0
+    mov     r1, rINST, lsr #8           @ r1<- A+
+    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
+    and     r1, r1, #15                 @ r1<- A
+    cmp     r9, #0                      @ check object for null
+    GET_VREG(r0, r1)                    @ r0<- fp[A]
+    beq     common_errNullObject        @ object was null
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SMP_DMB                            @ releasing store
+    str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
+    GOTO_OPCODE(ip)                     @ jump to next instruction
+
+/* continuation for OP_SGET_OBJECT_VOLATILE */
+
+    /*
+     * Continuation if the field has not yet been resolved.
+     *  r1: BBBB field ref
+     */
+.LOP_SGET_OBJECT_VOLATILE_resolve:
+    ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw, so export now
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_SGET_OBJECT_VOLATILE_finish          @ yes, finish
+    b       common_exceptionThrown      @ no, handle exception
+
+/* continuation for OP_SPUT_OBJECT_VOLATILE */
+
+    /*
+     * Continuation if the field has not yet been resolved.
+     *  r1: BBBB field ref
+     */
+.LOP_SPUT_OBJECT_VOLATILE_resolve:
+    ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw, so export now
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_SPUT_OBJECT_VOLATILE_finish          @ yes, finish
+    b       common_exceptionThrown      @ no, handle exception
 
     .size   dvmAsmSisterStart, .-dvmAsmSisterStart
     .global dvmAsmSisterEnd
@@ -10466,4 +10575,3 @@
 .LstrPrintLong:
     .asciz  "<%lld>"
 
-
diff --git a/vm/mterp/out/InterpAsm-armv5te.S b/vm/mterp/out/InterpAsm-armv5te.S
index a44b1e5..feb908c 100644
--- a/vm/mterp/out/InterpAsm-armv5te.S
+++ b/vm/mterp/out/InterpAsm-armv5te.S
@@ -20,6 +20,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 /*
  * ARMv5 definitions and declarations.
  */
@@ -242,6 +243,11 @@
     ldmfd   sp!, {\regs,pc}
 .endm
 
+/*
+ * Macro for data memory barrier; not meaningful pre-ARMv6K.
+ */
+.macro  SMP_DMB
+.endm
 
 /* File: armv5te/entry.S */
 /*
@@ -396,7 +402,6 @@
     .word   .LstrBadEntryPoint
 
 
-
     .global dvmAsmInstructionStart
     .type   dvmAsmInstructionStart, %function
 dvmAsmInstructionStart = .L_OP_NOP
@@ -420,7 +425,6 @@
     .fnend
 #endif
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE: /* 0x01 */
@@ -436,7 +440,6 @@
     SET_VREG(r2, r0)                    @ fp[A]<- r2
     GOTO_OPCODE(ip)                     @ execute next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_FROM16: /* 0x02 */
@@ -451,7 +454,6 @@
     SET_VREG(r2, r0)                    @ fp[AA]<- r2
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_16: /* 0x03 */
@@ -466,7 +468,6 @@
     SET_VREG(r2, r0)                    @ fp[AAAA]<- r2
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_WIDE: /* 0x04 */
@@ -484,7 +485,6 @@
     stmia   r2, {r0-r1}                 @ fp[A]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_WIDE_FROM16: /* 0x05 */
@@ -501,7 +501,6 @@
     stmia   r2, {r0-r1}                 @ fp[AA]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_WIDE_16: /* 0x06 */
@@ -518,7 +517,6 @@
     stmia   r2, {r0-r1}                 @ fp[AAAA]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_OBJECT: /* 0x07 */
@@ -536,7 +534,6 @@
     GOTO_OPCODE(ip)                     @ execute next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_OBJECT_FROM16: /* 0x08 */
@@ -553,7 +550,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_OBJECT_16: /* 0x09 */
@@ -570,7 +566,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_RESULT: /* 0x0a */
@@ -584,7 +579,6 @@
     SET_VREG(r0, r2)                    @ fp[AA]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_RESULT_WIDE: /* 0x0b */
@@ -599,7 +593,6 @@
     stmia   r2, {r0-r1}                 @ fp[AA]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_RESULT_OBJECT: /* 0x0c */
@@ -615,7 +608,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_EXCEPTION: /* 0x0d */
@@ -631,14 +623,12 @@
     str     r1, [r0, #offThread_exception]  @ dvmClearException bypass
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RETURN_VOID: /* 0x0e */
 /* File: armv5te/OP_RETURN_VOID.S */
     b       common_returnFromMethod
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RETURN: /* 0x0f */
@@ -655,7 +645,6 @@
     str     r0, [rGLUE, #offGlue_retval] @ retval.i <- vAA
     b       common_returnFromMethod
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RETURN_WIDE: /* 0x10 */
@@ -672,7 +661,6 @@
     stmia   r3, {r0-r1}                 @ retval<- r0/r1
     b       common_returnFromMethod
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RETURN_OBJECT: /* 0x11 */
@@ -691,7 +679,6 @@
     b       common_returnFromMethod
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_4: /* 0x12 */
@@ -706,7 +693,6 @@
     SET_VREG(r1, r0)                    @ fp[A]<- r1
     GOTO_OPCODE(ip)                     @ execute next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_16: /* 0x13 */
@@ -719,7 +705,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST: /* 0x14 */
@@ -734,7 +719,6 @@
     SET_VREG(r0, r3)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_HIGH16: /* 0x15 */
@@ -748,7 +732,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_WIDE_16: /* 0x16 */
@@ -763,7 +746,6 @@
     stmia   r3, {r0-r1}                 @ vAA<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_WIDE_32: /* 0x17 */
@@ -780,7 +762,6 @@
     stmia   r3, {r0-r1}                 @ vAA<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_WIDE: /* 0x18 */
@@ -799,7 +780,6 @@
     stmia   r9, {r0-r1}                 @ vAA<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_WIDE_HIGH16: /* 0x19 */
@@ -815,7 +795,6 @@
     stmia   r3, {r0-r1}                 @ vAA<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_STRING: /* 0x1a */
@@ -894,7 +873,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MONITOR_EXIT: /* 0x1e */
@@ -923,7 +901,6 @@
     FETCH_ADVANCE_INST(1)               @ advance before throw
     b      common_errNullObject
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CHECK_CAST: /* 0x1f */
@@ -999,7 +976,6 @@
     SET_VREG(r3, r2)                    @ vB<- length
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_NEW_INSTANCE: /* 0x22 */
@@ -1135,13 +1111,13 @@
     mov     r2, rINST, lsr #8           @ r2<- AA
     GET_VREG(r1, r2)                    @ r1<- vAA (exception object)
     ldr     r0, [rGLUE, #offGlue_self]  @ r0<- glue->self
+    EXPORT_PC()                         @ exception handler can throw
     cmp     r1, #0                      @ null object?
     beq     common_errNullObject        @ yes, throw an NPE instead
     @ bypass dvmSetException, just store it
     str     r1, [r0, #offThread_exception]  @ thread->exception<- obj
     b       common_exceptionThrown
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_GOTO: /* 0x28 */
@@ -1197,7 +1173,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 #endif
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_GOTO_32: /* 0x2a */
@@ -1270,7 +1245,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 #endif
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SPARSE_SWITCH: /* 0x2c */
@@ -1310,7 +1284,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CMPL_FLOAT: /* 0x2d */
@@ -1566,7 +1539,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_NE: /* 0x33 */
@@ -1603,7 +1575,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_LT: /* 0x34 */
@@ -1640,7 +1611,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_GE: /* 0x35 */
@@ -1677,7 +1647,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_GT: /* 0x36 */
@@ -1714,7 +1683,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_LE: /* 0x37 */
@@ -1751,7 +1719,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_EQZ: /* 0x38 */
@@ -1788,7 +1755,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_NEZ: /* 0x39 */
@@ -1825,7 +1791,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_LTZ: /* 0x3a */
@@ -1862,7 +1827,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_GEZ: /* 0x3b */
@@ -1899,7 +1863,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_GTZ: /* 0x3c */
@@ -1936,7 +1899,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_LEZ: /* 0x3d */
@@ -1973,7 +1935,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_3E: /* 0x3e */
@@ -1982,7 +1943,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_3F: /* 0x3f */
@@ -1991,7 +1951,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_40: /* 0x40 */
@@ -2000,7 +1959,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_41: /* 0x41 */
@@ -2009,7 +1967,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_42: /* 0x42 */
@@ -2018,7 +1975,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_43: /* 0x43 */
@@ -2027,7 +1983,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET: /* 0x44 */
@@ -2058,7 +2013,6 @@
     SET_VREG(r2, r9)                    @ vAA<- r2
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_WIDE: /* 0x45 */
@@ -2118,7 +2072,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_BOOLEAN: /* 0x47 */
@@ -2151,7 +2104,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_BYTE: /* 0x48 */
@@ -2184,7 +2136,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_CHAR: /* 0x49 */
@@ -2217,7 +2168,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_SHORT: /* 0x4a */
@@ -2250,7 +2200,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT: /* 0x4b */
@@ -2281,7 +2230,6 @@
     str  r2, [r0, #offArrayObject_contents]  @ vBB[vCC]<- r2
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT_WIDE: /* 0x4c */
@@ -2369,7 +2317,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT_BYTE: /* 0x4f */
@@ -2402,7 +2349,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT_CHAR: /* 0x50 */
@@ -2435,7 +2381,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT_SHORT: /* 0x51 */
@@ -2468,7 +2413,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IGET: /* 0x52 */
@@ -2872,6 +2816,7 @@
     beq     .LOP_SGET_resolve         @ yes, do resolve
 .LOP_SGET_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -2896,7 +2841,7 @@
     mov     r9, rINST, lsr #8           @ r9<- AA
     .if 0
     add     r0, r0, #offStaticField_value @ r0<- pointer to data
-    bl      android_quasiatomic_read_64 @ r0/r1<- contents of field
+    bl      dvmQuasiAtomicRead64        @ r0/r1<- contents of field
     .else
     ldrd    r0, [r0, #offStaticField_value] @ r0/r1<- field value (aligned)
     .endif
@@ -2925,6 +2870,7 @@
     beq     .LOP_SGET_OBJECT_resolve         @ yes, do resolve
 .LOP_SGET_OBJECT_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -2951,6 +2897,7 @@
     beq     .LOP_SGET_BOOLEAN_resolve         @ yes, do resolve
 .LOP_SGET_BOOLEAN_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -2977,6 +2924,7 @@
     beq     .LOP_SGET_BYTE_resolve         @ yes, do resolve
 .LOP_SGET_BYTE_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -3003,6 +2951,7 @@
     beq     .LOP_SGET_CHAR_resolve         @ yes, do resolve
 .LOP_SGET_CHAR_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -3029,6 +2978,7 @@
     beq     .LOP_SGET_SHORT_resolve         @ yes, do resolve
 .LOP_SGET_SHORT_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -3057,6 +3007,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3082,7 +3033,7 @@
     GET_INST_OPCODE(r10)                @ extract opcode from rINST
     .if 0
     add     r2, r2, #offStaticField_value @ r2<- pointer to data
-    bl      android_quasiatomic_swap_64 @ stores r0/r1 into addr r2
+    bl      dvmQuasiAtomicSwap64        @ stores r0/r1 into addr r2
     .else
     strd    r0, [r2, #offStaticField_value] @ field<- vAA/vAA+1
     .endif
@@ -3110,6 +3061,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3136,6 +3088,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3162,6 +3115,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3188,6 +3142,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3214,6 +3169,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3336,7 +3292,6 @@
     bne     common_invokeMethodNoRange @ no, continue
     b       common_exceptionThrown      @ yes, handle exception
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_INTERFACE: /* 0x72 */
@@ -3363,8 +3318,7 @@
     bl      dvmFindInterfaceMethodInCache @ r0<- call(class, ref, method, dex)
     cmp     r0, #0                      @ failed?
     beq     common_exceptionThrown      @ yes, handle exception
-    b       common_invokeMethodNoRange @ jump to common handler 
-
+    b       common_invokeMethodNoRange @ jump to common handler
 
 /* ------------------------------ */
     .balign 64
@@ -3374,7 +3328,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_VIRTUAL_RANGE: /* 0x74 */
@@ -3501,7 +3454,6 @@
     b       common_exceptionThrown      @ yes, handle exception
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_INTERFACE_RANGE: /* 0x78 */
@@ -3529,8 +3481,7 @@
     bl      dvmFindInterfaceMethodInCache @ r0<- call(class, ref, method, dex)
     cmp     r0, #0                      @ failed?
     beq     common_exceptionThrown      @ yes, handle exception
-    b       common_invokeMethodRange @ jump to common handler 
-
+    b       common_invokeMethodRange @ jump to common handler
 
 
 /* ------------------------------ */
@@ -3541,7 +3492,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_7A: /* 0x7a */
@@ -3550,7 +3500,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_NEG_INT: /* 0x7b */
@@ -3633,7 +3582,6 @@
     /* 12-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_NOT_LONG: /* 0x7e */
@@ -3662,7 +3610,6 @@
     /* 12-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_NEG_FLOAT: /* 0x7f */
@@ -3718,7 +3665,6 @@
     /* 12-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INT_TO_LONG: /* 0x81 */
@@ -3818,7 +3764,6 @@
     GOTO_OPCODE(ip)                     @ execute next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_LONG_TO_FLOAT: /* 0x85 */
@@ -3877,7 +3822,6 @@
     /* 12-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_FLOAT_TO_INT: /* 0x87 */
@@ -3943,7 +3887,6 @@
     ldmfd   sp!, {r4, pc}
 #endif
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_FLOAT_TO_LONG: /* 0x88 */
@@ -4082,7 +4025,6 @@
     ldmfd   sp!, {r4, r5, pc}
 #endif
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DOUBLE_TO_LONG: /* 0x8b */
@@ -4113,7 +4055,6 @@
 
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DOUBLE_TO_FLOAT: /* 0x8c */
@@ -4266,7 +4207,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_INT: /* 0x91 */
@@ -4308,7 +4248,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_INT: /* 0x92 */
@@ -4351,7 +4290,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_INT: /* 0x93 */
@@ -4393,7 +4331,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_INT: /* 0x94 */
@@ -4436,7 +4373,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_INT: /* 0x95 */
@@ -4478,7 +4414,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_INT: /* 0x96 */
@@ -4520,7 +4455,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_INT: /* 0x97 */
@@ -4562,7 +4496,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHL_INT: /* 0x98 */
@@ -4604,7 +4537,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHR_INT: /* 0x99 */
@@ -4646,7 +4578,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_USHR_INT: /* 0x9a */
@@ -4688,7 +4619,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_LONG: /* 0x9b */
@@ -4733,7 +4663,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_LONG: /* 0x9c */
@@ -4778,7 +4707,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_LONG: /* 0x9d */
@@ -4862,7 +4790,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_LONG: /* 0x9f */
@@ -4908,7 +4835,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_LONG: /* 0xa0 */
@@ -4953,7 +4879,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_LONG: /* 0xa1 */
@@ -4998,7 +4923,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_LONG: /* 0xa2 */
@@ -5043,7 +4967,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHL_LONG: /* 0xa3 */
@@ -5172,7 +5095,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_FLOAT: /* 0xa7 */
@@ -5214,7 +5136,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_FLOAT: /* 0xa8 */
@@ -5256,7 +5177,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_FLOAT: /* 0xa9 */
@@ -5298,7 +5218,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_FLOAT: /* 0xaa */
@@ -5341,7 +5260,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_DOUBLE: /* 0xab */
@@ -5386,7 +5304,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_DOUBLE: /* 0xac */
@@ -5431,7 +5348,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_DOUBLE: /* 0xad */
@@ -5476,7 +5392,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_DOUBLE: /* 0xae */
@@ -5521,7 +5436,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_DOUBLE: /* 0xaf */
@@ -5567,7 +5481,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_INT_2ADDR: /* 0xb0 */
@@ -5607,7 +5520,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_INT_2ADDR: /* 0xb1 */
@@ -5647,7 +5559,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_INT_2ADDR: /* 0xb2 */
@@ -5688,7 +5599,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_INT_2ADDR: /* 0xb3 */
@@ -5728,7 +5638,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_INT_2ADDR: /* 0xb4 */
@@ -5769,7 +5678,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_INT_2ADDR: /* 0xb5 */
@@ -5809,7 +5717,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_INT_2ADDR: /* 0xb6 */
@@ -5849,7 +5756,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_INT_2ADDR: /* 0xb7 */
@@ -5889,7 +5795,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHL_INT_2ADDR: /* 0xb8 */
@@ -5929,7 +5834,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHR_INT_2ADDR: /* 0xb9 */
@@ -5969,7 +5873,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_USHR_INT_2ADDR: /* 0xba */
@@ -6009,7 +5912,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_LONG_2ADDR: /* 0xbb */
@@ -6051,7 +5953,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_LONG_2ADDR: /* 0xbc */
@@ -6093,7 +5994,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_LONG_2ADDR: /* 0xbd */
@@ -6124,7 +6024,6 @@
     stmia   r0, {r9-r10}                @ vAA/vAA+1<- r9/r10
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_LONG_2ADDR: /* 0xbe */
@@ -6166,7 +6065,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_LONG_2ADDR: /* 0xbf */
@@ -6209,7 +6107,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_LONG_2ADDR: /* 0xc0 */
@@ -6251,7 +6148,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_LONG_2ADDR: /* 0xc1 */
@@ -6293,7 +6189,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_LONG_2ADDR: /* 0xc2 */
@@ -6335,7 +6230,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHL_LONG_2ADDR: /* 0xc3 */
@@ -6453,7 +6347,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_FLOAT_2ADDR: /* 0xc7 */
@@ -6493,7 +6386,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_FLOAT_2ADDR: /* 0xc8 */
@@ -6533,7 +6425,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_FLOAT_2ADDR: /* 0xc9 */
@@ -6573,7 +6464,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_FLOAT_2ADDR: /* 0xca */
@@ -6614,7 +6504,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_DOUBLE_2ADDR: /* 0xcb */
@@ -6656,7 +6545,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_DOUBLE_2ADDR: /* 0xcc */
@@ -6698,7 +6586,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_DOUBLE_2ADDR: /* 0xcd */
@@ -6740,7 +6627,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_DOUBLE_2ADDR: /* 0xce */
@@ -6782,7 +6668,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_DOUBLE_2ADDR: /* 0xcf */
@@ -6825,7 +6710,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_INT_LIT16: /* 0xd0 */
@@ -6862,7 +6746,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RSUB_INT: /* 0xd1 */
@@ -6900,7 +6783,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_INT_LIT16: /* 0xd2 */
@@ -6938,7 +6820,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_INT_LIT16: /* 0xd3 */
@@ -6975,7 +6856,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_INT_LIT16: /* 0xd4 */
@@ -7013,7 +6893,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_INT_LIT16: /* 0xd5 */
@@ -7050,7 +6929,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_INT_LIT16: /* 0xd6 */
@@ -7087,7 +6965,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_INT_LIT16: /* 0xd7 */
@@ -7124,7 +7001,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_INT_LIT8: /* 0xd8 */
@@ -7163,7 +7039,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RSUB_INT_LIT8: /* 0xd9 */
@@ -7202,7 +7077,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_INT_LIT8: /* 0xda */
@@ -7242,7 +7116,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_INT_LIT8: /* 0xdb */
@@ -7281,7 +7154,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_INT_LIT8: /* 0xdc */
@@ -7321,7 +7193,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_INT_LIT8: /* 0xdd */
@@ -7360,7 +7231,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_INT_LIT8: /* 0xde */
@@ -7399,7 +7269,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_INT_LIT8: /* 0xdf */
@@ -7438,7 +7307,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHL_INT_LIT8: /* 0xe0 */
@@ -7477,7 +7345,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHR_INT_LIT8: /* 0xe1 */
@@ -7516,7 +7383,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_USHR_INT_LIT8: /* 0xe2 */
@@ -7555,50 +7421,142 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E3: /* 0xe3 */
-/* File: armv5te/OP_UNUSED_E3.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_IGET_VOLATILE: /* 0xe3 */
+/* File: armv5te/OP_IGET_VOLATILE.S */
+/* File: armv5te/OP_IGET.S */
+    /*
+     * General 32-bit instance field get.
+     *
+     * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
+     */
+    /* op vA, vB, field@CCCC */
+    mov     r0, rINST, lsr #12          @ r0<- B
+    ldr     r3, [rGLUE, #offGlue_methodClassDex]    @ r3<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref CCCC
+    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
+    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    bne     .LOP_IGET_VOLATILE_finish          @ no, already resolved
+8:  ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
+    cmp     r0, #0
+    bne     .LOP_IGET_VOLATILE_finish
+    b       common_exceptionThrown
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E4: /* 0xe4 */
-/* File: armv5te/OP_UNUSED_E4.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_IPUT_VOLATILE: /* 0xe4 */
+/* File: armv5te/OP_IPUT_VOLATILE.S */
+/* File: armv5te/OP_IPUT.S */
+    /*
+     * General 32-bit instance field put.
+     *
+     * for: iput, iput-object, iput-boolean, iput-byte, iput-char, iput-short
+     */
+    /* op vA, vB, field@CCCC */
+    mov     r0, rINST, lsr #12          @ r0<- B
+    ldr     r3, [rGLUE, #offGlue_methodClassDex]    @ r3<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref CCCC
+    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
+    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    bne     .LOP_IPUT_VOLATILE_finish          @ no, already resolved
+8:  ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_IPUT_VOLATILE_finish          @ yes, finish up
+    b       common_exceptionThrown
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E5: /* 0xe5 */
-/* File: armv5te/OP_UNUSED_E5.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_SGET_VOLATILE: /* 0xe5 */
+/* File: armv5te/OP_SGET_VOLATILE.S */
+/* File: armv5te/OP_SGET.S */
+    /*
+     * General 32-bit SGET handler.
+     *
+     * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
+     */
+    /* op vAA, field@BBBB */
+    ldr     r2, [rGLUE, #offGlue_methodClassDex]    @ r2<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref BBBB
+    ldr     r2, [r2, #offDvmDex_pResFields] @ r2<- dvmDex->pResFields
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    beq     .LOP_SGET_VOLATILE_resolve         @ yes, do resolve
+.LOP_SGET_VOLATILE_finish: @ field ptr in r0
+    ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    SMP_DMB                            @ acquiring load
+    mov     r2, rINST, lsr #8           @ r2<- AA
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    SET_VREG(r1, r2)                    @ fp[AA]<- r1
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E6: /* 0xe6 */
-/* File: armv5te/OP_UNUSED_E6.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_SPUT_VOLATILE: /* 0xe6 */
+/* File: armv5te/OP_SPUT_VOLATILE.S */
+/* File: armv5te/OP_SPUT.S */
+    /*
+     * General 32-bit SPUT handler.
+     *
+     * for: sput, sput-object, sput-boolean, sput-byte, sput-char, sput-short
+     */
+    /* op vAA, field@BBBB */
+    ldr     r2, [rGLUE, #offGlue_methodClassDex]    @ r2<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref BBBB
+    ldr     r2, [r2, #offDvmDex_pResFields] @ r2<- dvmDex->pResFields
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    beq     .LOP_SPUT_VOLATILE_resolve         @ yes, do resolve
+.LOP_SPUT_VOLATILE_finish:   @ field ptr in r0
+    mov     r2, rINST, lsr #8           @ r2<- AA
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    GET_VREG(r1, r2)                    @ r1<- fp[AA]
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SMP_DMB                            @ releasing store
+    str     r1, [r0, #offStaticField_value] @ field<- vAA
+    GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E7: /* 0xe7 */
-/* File: armv5te/OP_UNUSED_E7.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_IGET_OBJECT_VOLATILE: /* 0xe7 */
+/* File: armv5te/OP_IGET_OBJECT_VOLATILE.S */
+/* File: armv5te/OP_IGET.S */
+    /*
+     * General 32-bit instance field get.
+     *
+     * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
+     */
+    /* op vA, vB, field@CCCC */
+    mov     r0, rINST, lsr #12          @ r0<- B
+    ldr     r3, [rGLUE, #offGlue_methodClassDex]    @ r3<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref CCCC
+    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
+    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    bne     .LOP_IGET_OBJECT_VOLATILE_finish          @ no, already resolved
+8:  ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
+    cmp     r0, #0
+    bne     .LOP_IGET_OBJECT_VOLATILE_finish
+    b       common_exceptionThrown
 
 
 /* ------------------------------ */
@@ -7669,7 +7627,7 @@
     mov     r9, rINST, lsr #8           @ r9<- AA
     .if 1
     add     r0, r0, #offStaticField_value @ r0<- pointer to data
-    bl      android_quasiatomic_read_64 @ r0/r1<- contents of field
+    bl      dvmQuasiAtomicRead64        @ r0/r1<- contents of field
     .else
     ldrd    r0, [r0, #offStaticField_value] @ r0/r1<- field value (aligned)
     .endif
@@ -7703,7 +7661,7 @@
     GET_INST_OPCODE(r10)                @ extract opcode from rINST
     .if 1
     add     r2, r2, #offStaticField_value @ r2<- pointer to data
-    bl      android_quasiatomic_swap_64 @ stores r0/r1 into addr r2
+    bl      dvmQuasiAtomicSwap64        @ stores r0/r1 into addr r2
     .else
     strd    r0, [r2, #offStaticField_value] @ field<- vAA/vAA+1
     .endif
@@ -7718,7 +7676,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_THROW_VERIFICATION_ERROR: /* 0xed */
@@ -7736,7 +7693,6 @@
     bl      dvmThrowVerificationError   @ always throws
     b       common_exceptionThrown      @ handle exception
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_EXECUTE_INLINE: /* 0xee */
@@ -7815,7 +7771,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IGET_QUICK: /* 0xf2 */
@@ -7835,7 +7790,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IGET_WIDE_QUICK: /* 0xf3 */
@@ -7855,7 +7809,6 @@
     stmia   r3, {r0-r1}                 @ fp[A]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IGET_OBJECT_QUICK: /* 0xf4 */
@@ -7877,7 +7830,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IPUT_QUICK: /* 0xf5 */
@@ -7897,7 +7849,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IPUT_WIDE_QUICK: /* 0xf6 */
@@ -7917,7 +7868,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IPUT_OBJECT_QUICK: /* 0xf7 */
@@ -7939,7 +7889,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_VIRTUAL_QUICK: /* 0xf8 */
@@ -8019,7 +7968,6 @@
     beq     common_errNullObject        @ "this" is null, throw exception
     bl      common_invokeMethodNoRange @ continue on
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_SUPER_QUICK_RANGE: /* 0xfb */
@@ -8049,32 +7997,86 @@
     bl      common_invokeMethodRange @ continue on
 
 
-
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_FC: /* 0xfc */
-/* File: armv5te/OP_UNUSED_FC.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_IPUT_OBJECT_VOLATILE: /* 0xfc */
+/* File: armv5te/OP_IPUT_OBJECT_VOLATILE.S */
+/* File: armv5te/OP_IPUT.S */
+    /*
+     * General 32-bit instance field put.
+     *
+     * for: iput, iput-object, iput-boolean, iput-byte, iput-char, iput-short
+     */
+    /* op vA, vB, field@CCCC */
+    mov     r0, rINST, lsr #12          @ r0<- B
+    ldr     r3, [rGLUE, #offGlue_methodClassDex]    @ r3<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref CCCC
+    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
+    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    bne     .LOP_IPUT_OBJECT_VOLATILE_finish          @ no, already resolved
+8:  ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_IPUT_OBJECT_VOLATILE_finish          @ yes, finish up
+    b       common_exceptionThrown
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_FD: /* 0xfd */
-/* File: armv5te/OP_UNUSED_FD.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_SGET_OBJECT_VOLATILE: /* 0xfd */
+/* File: armv5te/OP_SGET_OBJECT_VOLATILE.S */
+/* File: armv5te/OP_SGET.S */
+    /*
+     * General 32-bit SGET handler.
+     *
+     * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
+     */
+    /* op vAA, field@BBBB */
+    ldr     r2, [rGLUE, #offGlue_methodClassDex]    @ r2<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref BBBB
+    ldr     r2, [r2, #offDvmDex_pResFields] @ r2<- dvmDex->pResFields
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    beq     .LOP_SGET_OBJECT_VOLATILE_resolve         @ yes, do resolve
+.LOP_SGET_OBJECT_VOLATILE_finish: @ field ptr in r0
+    ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    SMP_DMB                            @ acquiring load
+    mov     r2, rINST, lsr #8           @ r2<- AA
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    SET_VREG(r1, r2)                    @ fp[AA]<- r1
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_FE: /* 0xfe */
-/* File: armv5te/OP_UNUSED_FE.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_SPUT_OBJECT_VOLATILE: /* 0xfe */
+/* File: armv5te/OP_SPUT_OBJECT_VOLATILE.S */
+/* File: armv5te/OP_SPUT.S */
+    /*
+     * General 32-bit SPUT handler.
+     *
+     * for: sput, sput-object, sput-boolean, sput-byte, sput-char, sput-short
+     */
+    /* op vAA, field@BBBB */
+    ldr     r2, [rGLUE, #offGlue_methodClassDex]    @ r2<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref BBBB
+    ldr     r2, [r2, #offDvmDex_pResFields] @ r2<- dvmDex->pResFields
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    beq     .LOP_SPUT_OBJECT_VOLATILE_resolve         @ yes, do resolve
+.LOP_SPUT_OBJECT_VOLATILE_finish:   @ field ptr in r0
+    mov     r2, rINST, lsr #8           @ r2<- AA
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    GET_VREG(r1, r2)                    @ r1<- fp[AA]
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SMP_DMB                            @ releasing store
+    str     r1, [r0, #offStaticField_value] @ field<- vAA
+    GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
 /* ------------------------------ */
@@ -8086,7 +8088,6 @@
 
 
 
-
     .balign 64
     .size   dvmAsmInstructionStart, .-dvmAsmInstructionStart
     .global dvmAsmInstructionEnd
@@ -8122,7 +8123,6 @@
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_CONST_STRING_JUMBO */
 
     /*
@@ -8142,7 +8142,6 @@
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_CONST_CLASS */
 
     /*
@@ -8163,7 +8162,6 @@
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_CHECK_CAST */
 
     /*
@@ -8208,7 +8206,6 @@
 .LstrClassCastExceptionPtr:
     .word   .LstrClassCastException
 
-
 /* continuation for OP_INSTANCE_OF */
 
     /*
@@ -8264,7 +8261,6 @@
     ldr     r0, [r0, #offObject_clazz]  @ r0<- obj->clazz
     b       .LOP_INSTANCE_OF_resolved        @ pick up where we left off
 
-
 /* continuation for OP_NEW_INSTANCE */
 
     .balign 32                          @ minimize cache lines
@@ -8307,7 +8303,6 @@
 .LstrInstantiationErrorPtr:
     .word   .LstrInstantiationError
 
-
 /* continuation for OP_NEW_ARRAY */
 
 
@@ -8347,7 +8342,6 @@
     SET_VREG(r0, r2)                    @ vA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_FILLED_NEW_ARRAY */
 
     /*
@@ -8426,7 +8420,6 @@
     .word   .LstrInternalError
     .endif
 
-
 /* continuation for OP_FILLED_NEW_ARRAY_RANGE */
 
     /*
@@ -8505,7 +8498,6 @@
     .word   .LstrInternalError
     .endif
 
-
 /* continuation for OP_CMPL_FLOAT */
 
     @ Test for NaN with a second comparison.  EABI forbids testing bit
@@ -8569,7 +8561,6 @@
 
 #endif
 
-
 /* continuation for OP_CMPG_FLOAT */
 
     @ Test for NaN with a second comparison.  EABI forbids testing bit
@@ -8633,7 +8624,6 @@
 
 #endif
 
-
 /* continuation for OP_CMPL_DOUBLE */
 
     @ Test for NaN with a second comparison.  EABI forbids testing bit
@@ -8649,7 +8639,6 @@
     mvn     r1, #0                            @ r1<- 1 or -1 for NaN
     b       .LOP_CMPL_DOUBLE_finish
 
-
 /* continuation for OP_CMPG_DOUBLE */
 
     @ Test for NaN with a second comparison.  EABI forbids testing bit
@@ -8665,7 +8654,6 @@
     mov     r1, #1                            @ r1<- 1 or -1 for NaN
     b       .LOP_CMPG_DOUBLE_finish
 
-
 /* continuation for OP_CMP_LONG */
 
 .LOP_CMP_LONG_less:
@@ -8687,7 +8675,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_AGET_WIDE */
 
 .LOP_AGET_WIDE_finish:
@@ -8698,7 +8685,6 @@
     stmia   r9, {r2-r3}                 @ vAA/vAA+1<- r2/r3
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_APUT_WIDE */
 
 .LOP_APUT_WIDE_finish:
@@ -8708,7 +8694,6 @@
     strd    r2, [r0, #offArrayObject_contents]  @ r2/r3<- vBB[vCC]
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_APUT_OBJECT */
     /*
      * On entry:
@@ -8730,7 +8715,6 @@
     str     r9, [r10, #offArrayObject_contents] @ vBB[vCC]<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET */
 
     /*
@@ -8744,6 +8728,7 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
@@ -8751,7 +8736,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_WIDE */
 
     /*
@@ -8763,9 +8747,9 @@
     cmp     r9, #0                      @ check object for null
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
-    .if 0
+    .if     0
     add     r0, r9, r3                  @ r0<- address of field
-    bl      android_quasiatomic_read_64 @ r0/r1<- contents of field
+    bl      dvmQuasiAtomicRead64        @ r0/r1<- contents of field
     .else
     ldrd    r0, [r9, r3]                @ r0/r1<- obj.field (64-bit align ok)
     .endif
@@ -8777,7 +8761,6 @@
     stmia   r3, {r0-r1}                 @ fp[A]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_OBJECT */
 
     /*
@@ -8791,6 +8774,7 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
@@ -8798,7 +8782,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_BOOLEAN */
 
     /*
@@ -8812,6 +8795,7 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
@@ -8819,7 +8803,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_BYTE */
 
     /*
@@ -8833,6 +8816,7 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
@@ -8840,7 +8824,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_CHAR */
 
     /*
@@ -8854,6 +8837,7 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
@@ -8861,7 +8845,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_SHORT */
 
     /*
@@ -8875,6 +8858,7 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
@@ -8882,7 +8866,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT */
 
     /*
@@ -8900,10 +8883,10 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_WIDE */
 
     /*
@@ -8921,15 +8904,14 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     ldmia   r2, {r0-r1}                 @ r0/r1<- fp[A]
     GET_INST_OPCODE(r10)                @ extract opcode from rINST
-    .if 0
+    .if     0
     add     r2, r9, r3                  @ r2<- target address
-    bl      android_quasiatomic_swap_64 @ stores r0/r1 into addr r2
+    bl      dvmQuasiAtomicSwap64        @ stores r0/r1 into addr r2
     .else
     strd    r0, [r9, r3]                @ obj.field (64 bits, aligned)<- r0/r1
     .endif
     GOTO_OPCODE(r10)                    @ jump to next instruction
 
-
 /* continuation for OP_IPUT_OBJECT */
 
     /*
@@ -8947,10 +8929,10 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_BOOLEAN */
 
     /*
@@ -8968,10 +8950,10 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_BYTE */
 
     /*
@@ -8989,10 +8971,10 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_CHAR */
 
     /*
@@ -9010,10 +8992,10 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_SHORT */
 
     /*
@@ -9031,10 +9013,10 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_SGET */
 
     /*
@@ -9050,7 +9032,6 @@
     bne     .LOP_SGET_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_WIDE */
 
     /*
@@ -9068,7 +9049,6 @@
     bne     .LOP_SGET_WIDE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_OBJECT */
 
     /*
@@ -9084,7 +9064,6 @@
     bne     .LOP_SGET_OBJECT_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_BOOLEAN */
 
     /*
@@ -9100,7 +9079,6 @@
     bne     .LOP_SGET_BOOLEAN_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_BYTE */
 
     /*
@@ -9116,7 +9094,6 @@
     bne     .LOP_SGET_BYTE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_CHAR */
 
     /*
@@ -9132,7 +9109,6 @@
     bne     .LOP_SGET_CHAR_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_SHORT */
 
     /*
@@ -9148,7 +9124,6 @@
     bne     .LOP_SGET_SHORT_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT */
 
     /*
@@ -9164,7 +9139,6 @@
     bne     .LOP_SPUT_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_WIDE */
 
     /*
@@ -9184,7 +9158,6 @@
     bne     .LOP_SPUT_WIDE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_OBJECT */
 
     /*
@@ -9200,7 +9173,6 @@
     bne     .LOP_SPUT_OBJECT_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_BOOLEAN */
 
     /*
@@ -9216,7 +9188,6 @@
     bne     .LOP_SPUT_BOOLEAN_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_BYTE */
 
     /*
@@ -9232,7 +9203,6 @@
     bne     .LOP_SPUT_BYTE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_CHAR */
 
     /*
@@ -9248,7 +9218,6 @@
     bne     .LOP_SPUT_CHAR_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_SHORT */
 
     /*
@@ -9264,7 +9233,6 @@
     bne     .LOP_SPUT_SHORT_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_INVOKE_VIRTUAL */
 
     /*
@@ -9282,7 +9250,6 @@
     ldr     r0, [r3, r2, lsl #2]        @ r3<- vtable[methodIndex]
     bl      common_invokeMethodNoRange @ continue on
 
-
 /* continuation for OP_INVOKE_SUPER */
 
     /*
@@ -9317,7 +9284,6 @@
     ldr     r1, [r0, #offMethod_name]   @ r1<- method name
     b       common_errNoSuchMethod
 
-
 /* continuation for OP_INVOKE_DIRECT */
 
     /*
@@ -9335,7 +9301,6 @@
     bne     .LOP_INVOKE_DIRECT_finish          @ no, continue
     b       common_exceptionThrown      @ yes, handle exception
 
-
 /* continuation for OP_INVOKE_VIRTUAL_RANGE */
 
     /*
@@ -9353,7 +9318,6 @@
     ldr     r0, [r3, r2, lsl #2]        @ r3<- vtable[methodIndex]
     bl      common_invokeMethodRange @ continue on
 
-
 /* continuation for OP_INVOKE_SUPER_RANGE */
 
     /*
@@ -9388,7 +9352,6 @@
     ldr     r1, [r0, #offMethod_name]   @ r1<- method name
     b       common_errNoSuchMethod
 
-
 /* continuation for OP_INVOKE_DIRECT_RANGE */
 
     /*
@@ -9406,7 +9369,6 @@
     bne     .LOP_INVOKE_DIRECT_RANGE_finish          @ no, continue
     b       common_exceptionThrown      @ yes, handle exception
 
-
 /* continuation for OP_FLOAT_TO_LONG */
 /*
  * Convert the float in r0 to a long in r0/r1.
@@ -9444,7 +9406,6 @@
     bl      __aeabi_f2lz                @ convert float to long
     ldmfd   sp!, {r4, pc}
 
-
 /* continuation for OP_DOUBLE_TO_LONG */
 /*
  * Convert the double in r0/r1 to a long in r0/r1.
@@ -9495,7 +9456,6 @@
     add     sp, sp, #4
     ldmfd   sp!, {r4, r5, pc}
 
-
 /* continuation for OP_MUL_LONG */
 
 .LOP_MUL_LONG_finish:
@@ -9503,7 +9463,6 @@
     stmia   r0, {r9-r10}                @ vAA/vAA+1<- r9/r10
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_SHL_LONG */
 
 .LOP_SHL_LONG_finish:
@@ -9512,7 +9471,6 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_SHR_LONG */
 
 .LOP_SHR_LONG_finish:
@@ -9521,7 +9479,6 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_USHR_LONG */
 
 .LOP_USHR_LONG_finish:
@@ -9530,7 +9487,6 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_SHL_LONG_2ADDR */
 
 .LOP_SHL_LONG_2ADDR_finish:
@@ -9538,7 +9494,6 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_SHR_LONG_2ADDR */
 
 .LOP_SHR_LONG_2ADDR_finish:
@@ -9546,7 +9501,6 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_USHR_LONG_2ADDR */
 
 .LOP_USHR_LONG_2ADDR_finish:
@@ -9554,6 +9508,98 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
+/* continuation for OP_IGET_VOLATILE */
+
+    /*
+     * Currently:
+     *  r0 holds resolved field
+     *  r9 holds object
+     */
+.LOP_IGET_VOLATILE_finish:
+    @bl      common_squeak0
+    cmp     r9, #0                      @ check object for null
+    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
+    beq     common_errNullObject        @ object was null
+    ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    SMP_DMB                            @ acquiring load
+    mov     r2, rINST, lsr #8           @ r2<- A+
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    and     r2, r2, #15                 @ r2<- A
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SET_VREG(r0, r2)                    @ fp[A]<- r0
+    GOTO_OPCODE(ip)                     @ jump to next instruction
+
+/* continuation for OP_IPUT_VOLATILE */
+
+    /*
+     * Currently:
+     *  r0 holds resolved field
+     *  r9 holds object
+     */
+.LOP_IPUT_VOLATILE_finish:
+    @bl      common_squeak0
+    mov     r1, rINST, lsr #8           @ r1<- A+
+    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
+    and     r1, r1, #15                 @ r1<- A
+    cmp     r9, #0                      @ check object for null
+    GET_VREG(r0, r1)                    @ r0<- fp[A]
+    beq     common_errNullObject        @ object was null
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SMP_DMB                            @ releasing store
+    str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
+    GOTO_OPCODE(ip)                     @ jump to next instruction
+
+/* continuation for OP_SGET_VOLATILE */
+
+    /*
+     * Continuation if the field has not yet been resolved.
+     *  r1: BBBB field ref
+     */
+.LOP_SGET_VOLATILE_resolve:
+    ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw, so export now
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_SGET_VOLATILE_finish          @ yes, finish
+    b       common_exceptionThrown      @ no, handle exception
+
+/* continuation for OP_SPUT_VOLATILE */
+
+    /*
+     * Continuation if the field has not yet been resolved.
+     *  r1: BBBB field ref
+     */
+.LOP_SPUT_VOLATILE_resolve:
+    ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw, so export now
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_SPUT_VOLATILE_finish          @ yes, finish
+    b       common_exceptionThrown      @ no, handle exception
+
+/* continuation for OP_IGET_OBJECT_VOLATILE */
+
+    /*
+     * Currently:
+     *  r0 holds resolved field
+     *  r9 holds object
+     */
+.LOP_IGET_OBJECT_VOLATILE_finish:
+    @bl      common_squeak0
+    cmp     r9, #0                      @ check object for null
+    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
+    beq     common_errNullObject        @ object was null
+    ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    SMP_DMB                            @ acquiring load
+    mov     r2, rINST, lsr #8           @ r2<- A+
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    and     r2, r2, #15                 @ r2<- A
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SET_VREG(r0, r2)                    @ fp[A]<- r0
+    GOTO_OPCODE(ip)                     @ jump to next instruction
 
 /* continuation for OP_IGET_WIDE_VOLATILE */
 
@@ -9566,9 +9612,9 @@
     cmp     r9, #0                      @ check object for null
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
-    .if 1
+    .if     1
     add     r0, r9, r3                  @ r0<- address of field
-    bl      android_quasiatomic_read_64 @ r0/r1<- contents of field
+    bl      dvmQuasiAtomicRead64        @ r0/r1<- contents of field
     .else
     ldrd    r0, [r9, r3]                @ r0/r1<- obj.field (64-bit align ok)
     .endif
@@ -9580,7 +9626,6 @@
     stmia   r3, {r0-r1}                 @ fp[A]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_WIDE_VOLATILE */
 
     /*
@@ -9598,15 +9643,14 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     ldmia   r2, {r0-r1}                 @ r0/r1<- fp[A]
     GET_INST_OPCODE(r10)                @ extract opcode from rINST
-    .if 1
+    .if     1
     add     r2, r9, r3                  @ r2<- target address
-    bl      android_quasiatomic_swap_64 @ stores r0/r1 into addr r2
+    bl      dvmQuasiAtomicSwap64        @ stores r0/r1 into addr r2
     .else
     strd    r0, [r9, r3]                @ obj.field (64 bits, aligned)<- r0/r1
     .endif
     GOTO_OPCODE(r10)                    @ jump to next instruction
 
-
 /* continuation for OP_SGET_WIDE_VOLATILE */
 
     /*
@@ -9624,7 +9668,6 @@
     bne     .LOP_SGET_WIDE_VOLATILE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_WIDE_VOLATILE */
 
     /*
@@ -9644,7 +9687,6 @@
     bne     .LOP_SPUT_WIDE_VOLATILE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_EXECUTE_INLINE */
 
     /*
@@ -9680,7 +9722,6 @@
 .LOP_EXECUTE_INLINE_table:
     .word   gDvmInlineOpsTable
 
-
 /* continuation for OP_EXECUTE_INLINE_RANGE */
 
     /*
@@ -9710,6 +9751,56 @@
 .LOP_EXECUTE_INLINE_RANGE_table:
     .word   gDvmInlineOpsTable
 
+/* continuation for OP_IPUT_OBJECT_VOLATILE */
+
+    /*
+     * Currently:
+     *  r0 holds resolved field
+     *  r9 holds object
+     */
+.LOP_IPUT_OBJECT_VOLATILE_finish:
+    @bl      common_squeak0
+    mov     r1, rINST, lsr #8           @ r1<- A+
+    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
+    and     r1, r1, #15                 @ r1<- A
+    cmp     r9, #0                      @ check object for null
+    GET_VREG(r0, r1)                    @ r0<- fp[A]
+    beq     common_errNullObject        @ object was null
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SMP_DMB                            @ releasing store
+    str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
+    GOTO_OPCODE(ip)                     @ jump to next instruction
+
+/* continuation for OP_SGET_OBJECT_VOLATILE */
+
+    /*
+     * Continuation if the field has not yet been resolved.
+     *  r1: BBBB field ref
+     */
+.LOP_SGET_OBJECT_VOLATILE_resolve:
+    ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw, so export now
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_SGET_OBJECT_VOLATILE_finish          @ yes, finish
+    b       common_exceptionThrown      @ no, handle exception
+
+/* continuation for OP_SPUT_OBJECT_VOLATILE */
+
+    /*
+     * Continuation if the field has not yet been resolved.
+     *  r1: BBBB field ref
+     */
+.LOP_SPUT_OBJECT_VOLATILE_resolve:
+    ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw, so export now
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_SPUT_OBJECT_VOLATILE_finish          @ yes, finish
+    b       common_exceptionThrown      @ no, handle exception
 
     .size   dvmAsmSisterStart, .-dvmAsmSisterStart
     .global dvmAsmSisterEnd
@@ -10942,4 +11033,3 @@
 .LstrPrintLong:
     .asciz  "<%lld>"
 
-
diff --git a/vm/mterp/out/InterpAsm-armv7-a-neon.S b/vm/mterp/out/InterpAsm-armv7-a-neon.S
index 59c3073..f573a40 100644
--- a/vm/mterp/out/InterpAsm-armv7-a-neon.S
+++ b/vm/mterp/out/InterpAsm-armv7-a-neon.S
@@ -20,6 +20,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 /*
  * ARMv5 definitions and declarations.
  */
@@ -205,7 +206,7 @@
 #include "../common/jit-config.h"
 #endif
 
-/* File: armv5te/platform.S */
+/* File: armv7-a/platform.S */
 /*
  * ===========================================================================
  *  CPU-version-specific defines
@@ -242,6 +243,21 @@
     ldmfd   sp!, {\regs,pc}
 .endm
 
+#if !defined(ANDROID_SMP)
+# error "Must define ANDROID_SMP"
+#endif
+
+/*
+ * Macro for data memory barrier; not meaningful pre-ARMv6K.
+ * If the argument is nonzero, emit barrier; otherwise, emit nothing.
+ */
+.macro  SMP_DMB
+#if ANDROID_SMP != 0
+    dmb
+#else
+    /* not SMP */
+#endif
+.endm
 
 /* File: armv5te/entry.S */
 /*
@@ -396,7 +412,6 @@
     .word   .LstrBadEntryPoint
 
 
-
     .global dvmAsmInstructionStart
     .type   dvmAsmInstructionStart, %function
 dvmAsmInstructionStart = .L_OP_NOP
@@ -420,7 +435,6 @@
     .fnend
 #endif
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE: /* 0x01 */
@@ -435,7 +449,6 @@
     SET_VREG(r2, r0)                    @ fp[A]<- r2
     GOTO_OPCODE(ip)                     @ execute next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_FROM16: /* 0x02 */
@@ -450,7 +463,6 @@
     SET_VREG(r2, r0)                    @ fp[AA]<- r2
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_16: /* 0x03 */
@@ -465,7 +477,6 @@
     SET_VREG(r2, r0)                    @ fp[AAAA]<- r2
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_WIDE: /* 0x04 */
@@ -482,7 +493,6 @@
     stmia   r2, {r0-r1}                 @ fp[A]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_WIDE_FROM16: /* 0x05 */
@@ -499,7 +509,6 @@
     stmia   r2, {r0-r1}                 @ fp[AA]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_WIDE_16: /* 0x06 */
@@ -516,7 +525,6 @@
     stmia   r2, {r0-r1}                 @ fp[AAAA]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_OBJECT: /* 0x07 */
@@ -534,7 +542,6 @@
     GOTO_OPCODE(ip)                     @ execute next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_OBJECT_FROM16: /* 0x08 */
@@ -551,7 +558,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_OBJECT_16: /* 0x09 */
@@ -568,7 +574,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_RESULT: /* 0x0a */
@@ -582,7 +587,6 @@
     SET_VREG(r0, r2)                    @ fp[AA]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_RESULT_WIDE: /* 0x0b */
@@ -597,7 +601,6 @@
     stmia   r2, {r0-r1}                 @ fp[AA]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_RESULT_OBJECT: /* 0x0c */
@@ -613,7 +616,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_EXCEPTION: /* 0x0d */
@@ -629,14 +631,12 @@
     str     r1, [r0, #offThread_exception]  @ dvmClearException bypass
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RETURN_VOID: /* 0x0e */
 /* File: armv5te/OP_RETURN_VOID.S */
     b       common_returnFromMethod
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RETURN: /* 0x0f */
@@ -653,7 +653,6 @@
     str     r0, [rGLUE, #offGlue_retval] @ retval.i <- vAA
     b       common_returnFromMethod
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RETURN_WIDE: /* 0x10 */
@@ -670,7 +669,6 @@
     stmia   r3, {r0-r1}                 @ retval<- r0/r1
     b       common_returnFromMethod
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RETURN_OBJECT: /* 0x11 */
@@ -689,7 +687,6 @@
     b       common_returnFromMethod
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_4: /* 0x12 */
@@ -703,7 +700,6 @@
     SET_VREG(r1, r0)                    @ fp[A]<- r1
     GOTO_OPCODE(ip)                     @ execute next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_16: /* 0x13 */
@@ -716,7 +712,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST: /* 0x14 */
@@ -731,7 +726,6 @@
     SET_VREG(r0, r3)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_HIGH16: /* 0x15 */
@@ -745,7 +739,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_WIDE_16: /* 0x16 */
@@ -760,7 +753,6 @@
     stmia   r3, {r0-r1}                 @ vAA<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_WIDE_32: /* 0x17 */
@@ -777,7 +769,6 @@
     stmia   r3, {r0-r1}                 @ vAA<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_WIDE: /* 0x18 */
@@ -796,7 +787,6 @@
     stmia   r9, {r0-r1}                 @ vAA<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_WIDE_HIGH16: /* 0x19 */
@@ -812,7 +802,6 @@
     stmia   r3, {r0-r1}                 @ vAA<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_STRING: /* 0x1a */
@@ -891,7 +880,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MONITOR_EXIT: /* 0x1e */
@@ -920,7 +908,6 @@
     FETCH_ADVANCE_INST(1)               @ advance before throw
     b      common_errNullObject
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CHECK_CAST: /* 0x1f */
@@ -995,7 +982,6 @@
     SET_VREG(r3, r2)                    @ vB<- length
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_NEW_INSTANCE: /* 0x22 */
@@ -1131,13 +1117,13 @@
     mov     r2, rINST, lsr #8           @ r2<- AA
     GET_VREG(r1, r2)                    @ r1<- vAA (exception object)
     ldr     r0, [rGLUE, #offGlue_self]  @ r0<- glue->self
+    EXPORT_PC()                         @ exception handler can throw
     cmp     r1, #0                      @ null object?
     beq     common_errNullObject        @ yes, throw an NPE instead
     @ bypass dvmSetException, just store it
     str     r1, [r0, #offThread_exception]  @ thread->exception<- obj
     b       common_exceptionThrown
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_GOTO: /* 0x28 */
@@ -1193,7 +1179,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 #endif
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_GOTO_32: /* 0x2a */
@@ -1266,7 +1251,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 #endif
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SPARSE_SWITCH: /* 0x2c */
@@ -1306,7 +1290,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CMPL_FLOAT: /* 0x2d */
@@ -1539,7 +1522,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_NE: /* 0x33 */
@@ -1575,7 +1557,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_LT: /* 0x34 */
@@ -1611,7 +1592,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_GE: /* 0x35 */
@@ -1647,7 +1627,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_GT: /* 0x36 */
@@ -1683,7 +1662,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_LE: /* 0x37 */
@@ -1719,7 +1697,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_EQZ: /* 0x38 */
@@ -1756,7 +1733,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_NEZ: /* 0x39 */
@@ -1793,7 +1769,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_LTZ: /* 0x3a */
@@ -1830,7 +1805,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_GEZ: /* 0x3b */
@@ -1867,7 +1841,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_GTZ: /* 0x3c */
@@ -1904,7 +1877,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_LEZ: /* 0x3d */
@@ -1941,7 +1913,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_3E: /* 0x3e */
@@ -1950,7 +1921,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_3F: /* 0x3f */
@@ -1959,7 +1929,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_40: /* 0x40 */
@@ -1968,7 +1937,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_41: /* 0x41 */
@@ -1977,7 +1945,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_42: /* 0x42 */
@@ -1986,7 +1953,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_43: /* 0x43 */
@@ -1995,7 +1961,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET: /* 0x44 */
@@ -2026,7 +1991,6 @@
     SET_VREG(r2, r9)                    @ vAA<- r2
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_WIDE: /* 0x45 */
@@ -2086,7 +2050,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_BOOLEAN: /* 0x47 */
@@ -2119,7 +2082,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_BYTE: /* 0x48 */
@@ -2152,7 +2114,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_CHAR: /* 0x49 */
@@ -2185,7 +2146,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_SHORT: /* 0x4a */
@@ -2218,7 +2178,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT: /* 0x4b */
@@ -2249,7 +2208,6 @@
     str  r2, [r0, #offArrayObject_contents]  @ vBB[vCC]<- r2
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT_WIDE: /* 0x4c */
@@ -2337,7 +2295,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT_BYTE: /* 0x4f */
@@ -2370,7 +2327,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT_CHAR: /* 0x50 */
@@ -2403,7 +2359,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT_SHORT: /* 0x51 */
@@ -2436,7 +2391,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IGET: /* 0x52 */
@@ -2840,6 +2794,7 @@
     beq     .LOP_SGET_resolve         @ yes, do resolve
 .LOP_SGET_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -2864,7 +2819,7 @@
     mov     r9, rINST, lsr #8           @ r9<- AA
     .if 0
     add     r0, r0, #offStaticField_value @ r0<- pointer to data
-    bl      android_quasiatomic_read_64 @ r0/r1<- contents of field
+    bl      dvmQuasiAtomicRead64        @ r0/r1<- contents of field
     .else
     ldrd    r0, [r0, #offStaticField_value] @ r0/r1<- field value (aligned)
     .endif
@@ -2893,6 +2848,7 @@
     beq     .LOP_SGET_OBJECT_resolve         @ yes, do resolve
 .LOP_SGET_OBJECT_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -2919,6 +2875,7 @@
     beq     .LOP_SGET_BOOLEAN_resolve         @ yes, do resolve
 .LOP_SGET_BOOLEAN_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -2945,6 +2902,7 @@
     beq     .LOP_SGET_BYTE_resolve         @ yes, do resolve
 .LOP_SGET_BYTE_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -2971,6 +2929,7 @@
     beq     .LOP_SGET_CHAR_resolve         @ yes, do resolve
 .LOP_SGET_CHAR_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -2997,6 +2956,7 @@
     beq     .LOP_SGET_SHORT_resolve         @ yes, do resolve
 .LOP_SGET_SHORT_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -3025,6 +2985,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3050,7 +3011,7 @@
     GET_INST_OPCODE(r10)                @ extract opcode from rINST
     .if 0
     add     r2, r2, #offStaticField_value @ r2<- pointer to data
-    bl      android_quasiatomic_swap_64 @ stores r0/r1 into addr r2
+    bl      dvmQuasiAtomicSwap64        @ stores r0/r1 into addr r2
     .else
     strd    r0, [r2, #offStaticField_value] @ field<- vAA/vAA+1
     .endif
@@ -3078,6 +3039,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3104,6 +3066,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3130,6 +3093,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3156,6 +3120,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3182,6 +3147,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3304,7 +3270,6 @@
     bne     common_invokeMethodNoRange @ no, continue
     b       common_exceptionThrown      @ yes, handle exception
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_INTERFACE: /* 0x72 */
@@ -3331,8 +3296,7 @@
     bl      dvmFindInterfaceMethodInCache @ r0<- call(class, ref, method, dex)
     cmp     r0, #0                      @ failed?
     beq     common_exceptionThrown      @ yes, handle exception
-    b       common_invokeMethodNoRange @ jump to common handler 
-
+    b       common_invokeMethodNoRange @ jump to common handler
 
 /* ------------------------------ */
     .balign 64
@@ -3342,7 +3306,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_VIRTUAL_RANGE: /* 0x74 */
@@ -3469,7 +3432,6 @@
     b       common_exceptionThrown      @ yes, handle exception
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_INTERFACE_RANGE: /* 0x78 */
@@ -3497,8 +3459,7 @@
     bl      dvmFindInterfaceMethodInCache @ r0<- call(class, ref, method, dex)
     cmp     r0, #0                      @ failed?
     beq     common_exceptionThrown      @ yes, handle exception
-    b       common_invokeMethodRange @ jump to common handler 
-
+    b       common_invokeMethodRange @ jump to common handler
 
 
 /* ------------------------------ */
@@ -3509,7 +3470,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_7A: /* 0x7a */
@@ -3518,7 +3478,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_NEG_INT: /* 0x7b */
@@ -3598,7 +3557,6 @@
     /* 10-11 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_NOT_LONG: /* 0x7e */
@@ -3626,7 +3584,6 @@
     /* 10-11 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_NEG_FLOAT: /* 0x7f */
@@ -3680,7 +3637,6 @@
     /* 10-11 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INT_TO_LONG: /* 0x81 */
@@ -3775,7 +3731,6 @@
     GOTO_OPCODE(ip)                     @ execute next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_LONG_TO_FLOAT: /* 0x85 */
@@ -3832,7 +3787,6 @@
     /* 10-11 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_FLOAT_TO_INT: /* 0x87 */
@@ -3965,7 +3919,6 @@
 
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DOUBLE_TO_FLOAT: /* 0x8c */
@@ -4110,7 +4063,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_INT: /* 0x91 */
@@ -4152,7 +4104,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_INT: /* 0x92 */
@@ -4195,7 +4146,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_INT: /* 0x93 */
@@ -4237,7 +4187,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_INT: /* 0x94 */
@@ -4280,7 +4229,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_INT: /* 0x95 */
@@ -4322,7 +4270,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_INT: /* 0x96 */
@@ -4364,7 +4311,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_INT: /* 0x97 */
@@ -4406,7 +4352,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHL_INT: /* 0x98 */
@@ -4448,7 +4393,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHR_INT: /* 0x99 */
@@ -4490,7 +4434,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_USHR_INT: /* 0x9a */
@@ -4532,7 +4475,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_LONG: /* 0x9b */
@@ -4577,7 +4519,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_LONG: /* 0x9c */
@@ -4622,7 +4563,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_LONG: /* 0x9d */
@@ -4706,7 +4646,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_LONG: /* 0x9f */
@@ -4752,7 +4691,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_LONG: /* 0xa0 */
@@ -4797,7 +4735,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_LONG: /* 0xa1 */
@@ -4842,7 +4779,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_LONG: /* 0xa2 */
@@ -4887,7 +4823,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHL_LONG: /* 0xa3 */
@@ -5137,7 +5072,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_DOUBLE: /* 0xab */
@@ -5303,7 +5237,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_INT_2ADDR: /* 0xb0 */
@@ -5342,7 +5275,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_INT_2ADDR: /* 0xb1 */
@@ -5381,7 +5313,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_INT_2ADDR: /* 0xb2 */
@@ -5421,7 +5352,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_INT_2ADDR: /* 0xb3 */
@@ -5460,7 +5390,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_INT_2ADDR: /* 0xb4 */
@@ -5500,7 +5429,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_INT_2ADDR: /* 0xb5 */
@@ -5539,7 +5467,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_INT_2ADDR: /* 0xb6 */
@@ -5578,7 +5505,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_INT_2ADDR: /* 0xb7 */
@@ -5617,7 +5543,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHL_INT_2ADDR: /* 0xb8 */
@@ -5656,7 +5581,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHR_INT_2ADDR: /* 0xb9 */
@@ -5695,7 +5619,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_USHR_INT_2ADDR: /* 0xba */
@@ -5734,7 +5657,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_LONG_2ADDR: /* 0xbb */
@@ -5775,7 +5697,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_LONG_2ADDR: /* 0xbc */
@@ -5816,7 +5737,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_LONG_2ADDR: /* 0xbd */
@@ -5846,7 +5766,6 @@
     stmia   r0, {r9-r10}                @ vAA/vAA+1<- r9/r10
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_LONG_2ADDR: /* 0xbe */
@@ -5887,7 +5806,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_LONG_2ADDR: /* 0xbf */
@@ -5929,7 +5847,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_LONG_2ADDR: /* 0xc0 */
@@ -5970,7 +5887,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_LONG_2ADDR: /* 0xc1 */
@@ -6011,7 +5927,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_LONG_2ADDR: /* 0xc2 */
@@ -6052,7 +5967,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHL_LONG_2ADDR: /* 0xc3 */
@@ -6279,7 +6193,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_DOUBLE_2ADDR: /* 0xcb */
@@ -6437,7 +6350,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_INT_LIT16: /* 0xd0 */
@@ -6473,7 +6385,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RSUB_INT: /* 0xd1 */
@@ -6510,7 +6421,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_INT_LIT16: /* 0xd2 */
@@ -6547,7 +6457,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_INT_LIT16: /* 0xd3 */
@@ -6583,7 +6492,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_INT_LIT16: /* 0xd4 */
@@ -6620,7 +6528,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_INT_LIT16: /* 0xd5 */
@@ -6656,7 +6563,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_INT_LIT16: /* 0xd6 */
@@ -6692,7 +6598,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_INT_LIT16: /* 0xd7 */
@@ -6728,7 +6633,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_INT_LIT8: /* 0xd8 */
@@ -6767,7 +6671,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RSUB_INT_LIT8: /* 0xd9 */
@@ -6806,7 +6709,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_INT_LIT8: /* 0xda */
@@ -6846,7 +6748,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_INT_LIT8: /* 0xdb */
@@ -6885,7 +6786,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_INT_LIT8: /* 0xdc */
@@ -6925,7 +6825,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_INT_LIT8: /* 0xdd */
@@ -6964,7 +6863,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_INT_LIT8: /* 0xde */
@@ -7003,7 +6901,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_INT_LIT8: /* 0xdf */
@@ -7042,7 +6939,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHL_INT_LIT8: /* 0xe0 */
@@ -7081,7 +6977,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHR_INT_LIT8: /* 0xe1 */
@@ -7120,7 +7015,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_USHR_INT_LIT8: /* 0xe2 */
@@ -7159,50 +7053,142 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E3: /* 0xe3 */
-/* File: armv5te/OP_UNUSED_E3.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_IGET_VOLATILE: /* 0xe3 */
+/* File: armv5te/OP_IGET_VOLATILE.S */
+/* File: armv5te/OP_IGET.S */
+    /*
+     * General 32-bit instance field get.
+     *
+     * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
+     */
+    /* op vA, vB, field@CCCC */
+    mov     r0, rINST, lsr #12          @ r0<- B
+    ldr     r3, [rGLUE, #offGlue_methodClassDex]    @ r3<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref CCCC
+    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
+    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    bne     .LOP_IGET_VOLATILE_finish          @ no, already resolved
+8:  ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
+    cmp     r0, #0
+    bne     .LOP_IGET_VOLATILE_finish
+    b       common_exceptionThrown
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E4: /* 0xe4 */
-/* File: armv5te/OP_UNUSED_E4.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_IPUT_VOLATILE: /* 0xe4 */
+/* File: armv5te/OP_IPUT_VOLATILE.S */
+/* File: armv5te/OP_IPUT.S */
+    /*
+     * General 32-bit instance field put.
+     *
+     * for: iput, iput-object, iput-boolean, iput-byte, iput-char, iput-short
+     */
+    /* op vA, vB, field@CCCC */
+    mov     r0, rINST, lsr #12          @ r0<- B
+    ldr     r3, [rGLUE, #offGlue_methodClassDex]    @ r3<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref CCCC
+    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
+    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    bne     .LOP_IPUT_VOLATILE_finish          @ no, already resolved
+8:  ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_IPUT_VOLATILE_finish          @ yes, finish up
+    b       common_exceptionThrown
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E5: /* 0xe5 */
-/* File: armv5te/OP_UNUSED_E5.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_SGET_VOLATILE: /* 0xe5 */
+/* File: armv5te/OP_SGET_VOLATILE.S */
+/* File: armv5te/OP_SGET.S */
+    /*
+     * General 32-bit SGET handler.
+     *
+     * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
+     */
+    /* op vAA, field@BBBB */
+    ldr     r2, [rGLUE, #offGlue_methodClassDex]    @ r2<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref BBBB
+    ldr     r2, [r2, #offDvmDex_pResFields] @ r2<- dvmDex->pResFields
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    beq     .LOP_SGET_VOLATILE_resolve         @ yes, do resolve
+.LOP_SGET_VOLATILE_finish: @ field ptr in r0
+    ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    SMP_DMB                            @ acquiring load
+    mov     r2, rINST, lsr #8           @ r2<- AA
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    SET_VREG(r1, r2)                    @ fp[AA]<- r1
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E6: /* 0xe6 */
-/* File: armv5te/OP_UNUSED_E6.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_SPUT_VOLATILE: /* 0xe6 */
+/* File: armv5te/OP_SPUT_VOLATILE.S */
+/* File: armv5te/OP_SPUT.S */
+    /*
+     * General 32-bit SPUT handler.
+     *
+     * for: sput, sput-object, sput-boolean, sput-byte, sput-char, sput-short
+     */
+    /* op vAA, field@BBBB */
+    ldr     r2, [rGLUE, #offGlue_methodClassDex]    @ r2<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref BBBB
+    ldr     r2, [r2, #offDvmDex_pResFields] @ r2<- dvmDex->pResFields
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    beq     .LOP_SPUT_VOLATILE_resolve         @ yes, do resolve
+.LOP_SPUT_VOLATILE_finish:   @ field ptr in r0
+    mov     r2, rINST, lsr #8           @ r2<- AA
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    GET_VREG(r1, r2)                    @ r1<- fp[AA]
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SMP_DMB                            @ releasing store
+    str     r1, [r0, #offStaticField_value] @ field<- vAA
+    GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E7: /* 0xe7 */
-/* File: armv5te/OP_UNUSED_E7.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_IGET_OBJECT_VOLATILE: /* 0xe7 */
+/* File: armv5te/OP_IGET_OBJECT_VOLATILE.S */
+/* File: armv5te/OP_IGET.S */
+    /*
+     * General 32-bit instance field get.
+     *
+     * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
+     */
+    /* op vA, vB, field@CCCC */
+    mov     r0, rINST, lsr #12          @ r0<- B
+    ldr     r3, [rGLUE, #offGlue_methodClassDex]    @ r3<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref CCCC
+    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
+    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    bne     .LOP_IGET_OBJECT_VOLATILE_finish          @ no, already resolved
+8:  ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
+    cmp     r0, #0
+    bne     .LOP_IGET_OBJECT_VOLATILE_finish
+    b       common_exceptionThrown
 
 
 /* ------------------------------ */
@@ -7273,7 +7259,7 @@
     mov     r9, rINST, lsr #8           @ r9<- AA
     .if 1
     add     r0, r0, #offStaticField_value @ r0<- pointer to data
-    bl      android_quasiatomic_read_64 @ r0/r1<- contents of field
+    bl      dvmQuasiAtomicRead64        @ r0/r1<- contents of field
     .else
     ldrd    r0, [r0, #offStaticField_value] @ r0/r1<- field value (aligned)
     .endif
@@ -7307,7 +7293,7 @@
     GET_INST_OPCODE(r10)                @ extract opcode from rINST
     .if 1
     add     r2, r2, #offStaticField_value @ r2<- pointer to data
-    bl      android_quasiatomic_swap_64 @ stores r0/r1 into addr r2
+    bl      dvmQuasiAtomicSwap64        @ stores r0/r1 into addr r2
     .else
     strd    r0, [r2, #offStaticField_value] @ field<- vAA/vAA+1
     .endif
@@ -7322,7 +7308,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_THROW_VERIFICATION_ERROR: /* 0xed */
@@ -7340,7 +7325,6 @@
     bl      dvmThrowVerificationError   @ always throws
     b       common_exceptionThrown      @ handle exception
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_EXECUTE_INLINE: /* 0xee */
@@ -7419,7 +7403,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IGET_QUICK: /* 0xf2 */
@@ -7438,7 +7421,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IGET_WIDE_QUICK: /* 0xf3 */
@@ -7457,7 +7439,6 @@
     stmia   r3, {r0-r1}                 @ fp[A]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IGET_OBJECT_QUICK: /* 0xf4 */
@@ -7479,7 +7460,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IPUT_QUICK: /* 0xf5 */
@@ -7498,7 +7478,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IPUT_WIDE_QUICK: /* 0xf6 */
@@ -7517,7 +7496,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IPUT_OBJECT_QUICK: /* 0xf7 */
@@ -7539,7 +7517,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_VIRTUAL_QUICK: /* 0xf8 */
@@ -7619,7 +7596,6 @@
     beq     common_errNullObject        @ "this" is null, throw exception
     bl      common_invokeMethodNoRange @ continue on
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_SUPER_QUICK_RANGE: /* 0xfb */
@@ -7649,32 +7625,86 @@
     bl      common_invokeMethodRange @ continue on
 
 
-
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_FC: /* 0xfc */
-/* File: armv5te/OP_UNUSED_FC.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_IPUT_OBJECT_VOLATILE: /* 0xfc */
+/* File: armv5te/OP_IPUT_OBJECT_VOLATILE.S */
+/* File: armv5te/OP_IPUT.S */
+    /*
+     * General 32-bit instance field put.
+     *
+     * for: iput, iput-object, iput-boolean, iput-byte, iput-char, iput-short
+     */
+    /* op vA, vB, field@CCCC */
+    mov     r0, rINST, lsr #12          @ r0<- B
+    ldr     r3, [rGLUE, #offGlue_methodClassDex]    @ r3<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref CCCC
+    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
+    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    bne     .LOP_IPUT_OBJECT_VOLATILE_finish          @ no, already resolved
+8:  ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_IPUT_OBJECT_VOLATILE_finish          @ yes, finish up
+    b       common_exceptionThrown
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_FD: /* 0xfd */
-/* File: armv5te/OP_UNUSED_FD.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_SGET_OBJECT_VOLATILE: /* 0xfd */
+/* File: armv5te/OP_SGET_OBJECT_VOLATILE.S */
+/* File: armv5te/OP_SGET.S */
+    /*
+     * General 32-bit SGET handler.
+     *
+     * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
+     */
+    /* op vAA, field@BBBB */
+    ldr     r2, [rGLUE, #offGlue_methodClassDex]    @ r2<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref BBBB
+    ldr     r2, [r2, #offDvmDex_pResFields] @ r2<- dvmDex->pResFields
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    beq     .LOP_SGET_OBJECT_VOLATILE_resolve         @ yes, do resolve
+.LOP_SGET_OBJECT_VOLATILE_finish: @ field ptr in r0
+    ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    SMP_DMB                            @ acquiring load
+    mov     r2, rINST, lsr #8           @ r2<- AA
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    SET_VREG(r1, r2)                    @ fp[AA]<- r1
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_FE: /* 0xfe */
-/* File: armv5te/OP_UNUSED_FE.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_SPUT_OBJECT_VOLATILE: /* 0xfe */
+/* File: armv5te/OP_SPUT_OBJECT_VOLATILE.S */
+/* File: armv5te/OP_SPUT.S */
+    /*
+     * General 32-bit SPUT handler.
+     *
+     * for: sput, sput-object, sput-boolean, sput-byte, sput-char, sput-short
+     */
+    /* op vAA, field@BBBB */
+    ldr     r2, [rGLUE, #offGlue_methodClassDex]    @ r2<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref BBBB
+    ldr     r2, [r2, #offDvmDex_pResFields] @ r2<- dvmDex->pResFields
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    beq     .LOP_SPUT_OBJECT_VOLATILE_resolve         @ yes, do resolve
+.LOP_SPUT_OBJECT_VOLATILE_finish:   @ field ptr in r0
+    mov     r2, rINST, lsr #8           @ r2<- AA
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    GET_VREG(r1, r2)                    @ r1<- fp[AA]
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SMP_DMB                            @ releasing store
+    str     r1, [r0, #offStaticField_value] @ field<- vAA
+    GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
 /* ------------------------------ */
@@ -7686,7 +7716,6 @@
 
 
 
-
     .balign 64
     .size   dvmAsmInstructionStart, .-dvmAsmInstructionStart
     .global dvmAsmInstructionEnd
@@ -7722,7 +7751,6 @@
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_CONST_STRING_JUMBO */
 
     /*
@@ -7742,7 +7770,6 @@
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_CONST_CLASS */
 
     /*
@@ -7763,7 +7790,6 @@
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_CHECK_CAST */
 
     /*
@@ -7808,7 +7834,6 @@
 .LstrClassCastExceptionPtr:
     .word   .LstrClassCastException
 
-
 /* continuation for OP_INSTANCE_OF */
 
     /*
@@ -7864,7 +7889,6 @@
     ldr     r0, [r0, #offObject_clazz]  @ r0<- obj->clazz
     b       .LOP_INSTANCE_OF_resolved        @ pick up where we left off
 
-
 /* continuation for OP_NEW_INSTANCE */
 
     .balign 32                          @ minimize cache lines
@@ -7907,7 +7931,6 @@
 .LstrInstantiationErrorPtr:
     .word   .LstrInstantiationError
 
-
 /* continuation for OP_NEW_ARRAY */
 
 
@@ -7947,7 +7970,6 @@
     SET_VREG(r0, r2)                    @ vA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_FILLED_NEW_ARRAY */
 
     /*
@@ -8026,7 +8048,6 @@
     .word   .LstrInternalError
     .endif
 
-
 /* continuation for OP_FILLED_NEW_ARRAY_RANGE */
 
     /*
@@ -8105,31 +8126,26 @@
     .word   .LstrInternalError
     .endif
 
-
 /* continuation for OP_CMPL_FLOAT */
 .LOP_CMPL_FLOAT_finish:
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_CMPG_FLOAT */
 .LOP_CMPG_FLOAT_finish:
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_CMPL_DOUBLE */
 .LOP_CMPL_DOUBLE_finish:
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_CMPG_DOUBLE */
 .LOP_CMPG_DOUBLE_finish:
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_CMP_LONG */
 
 .LOP_CMP_LONG_less:
@@ -8151,7 +8167,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_AGET_WIDE */
 
 .LOP_AGET_WIDE_finish:
@@ -8162,7 +8177,6 @@
     stmia   r9, {r2-r3}                 @ vAA/vAA+1<- r2/r3
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_APUT_WIDE */
 
 .LOP_APUT_WIDE_finish:
@@ -8172,7 +8186,6 @@
     strd    r2, [r0, #offArrayObject_contents]  @ r2/r3<- vBB[vCC]
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_APUT_OBJECT */
     /*
      * On entry:
@@ -8194,7 +8207,6 @@
     str     r9, [r10, #offArrayObject_contents] @ vBB[vCC]<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET */
 
     /*
@@ -8214,7 +8226,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_WIDE */
 
     /*
@@ -8234,7 +8245,6 @@
     stmia   r3, {r0-r1}                 @ fp[A]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_OBJECT */
 
     /*
@@ -8248,6 +8258,7 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
@@ -8255,7 +8266,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_BOOLEAN */
 
     /*
@@ -8269,6 +8279,7 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
@@ -8276,7 +8287,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_BYTE */
 
     /*
@@ -8290,6 +8300,7 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
@@ -8297,7 +8308,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_CHAR */
 
     /*
@@ -8311,6 +8321,7 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
@@ -8318,7 +8329,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_SHORT */
 
     /*
@@ -8332,6 +8342,7 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
@@ -8339,7 +8350,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT */
 
     /*
@@ -8359,7 +8369,6 @@
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_WIDE */
 
     /*
@@ -8379,7 +8388,6 @@
     strd    r0, [r9, r3]                @ obj.field (64 bits, aligned)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_OBJECT */
 
     /*
@@ -8397,10 +8405,10 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_BOOLEAN */
 
     /*
@@ -8418,10 +8426,10 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_BYTE */
 
     /*
@@ -8439,10 +8447,10 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_CHAR */
 
     /*
@@ -8460,10 +8468,10 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_SHORT */
 
     /*
@@ -8481,10 +8489,10 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_SGET */
 
     /*
@@ -8500,7 +8508,6 @@
     bne     .LOP_SGET_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_WIDE */
 
     /*
@@ -8518,7 +8525,6 @@
     bne     .LOP_SGET_WIDE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_OBJECT */
 
     /*
@@ -8534,7 +8540,6 @@
     bne     .LOP_SGET_OBJECT_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_BOOLEAN */
 
     /*
@@ -8550,7 +8555,6 @@
     bne     .LOP_SGET_BOOLEAN_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_BYTE */
 
     /*
@@ -8566,7 +8570,6 @@
     bne     .LOP_SGET_BYTE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_CHAR */
 
     /*
@@ -8582,7 +8585,6 @@
     bne     .LOP_SGET_CHAR_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_SHORT */
 
     /*
@@ -8598,7 +8600,6 @@
     bne     .LOP_SGET_SHORT_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT */
 
     /*
@@ -8614,7 +8615,6 @@
     bne     .LOP_SPUT_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_WIDE */
 
     /*
@@ -8634,7 +8634,6 @@
     bne     .LOP_SPUT_WIDE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_OBJECT */
 
     /*
@@ -8650,7 +8649,6 @@
     bne     .LOP_SPUT_OBJECT_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_BOOLEAN */
 
     /*
@@ -8666,7 +8664,6 @@
     bne     .LOP_SPUT_BOOLEAN_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_BYTE */
 
     /*
@@ -8682,7 +8679,6 @@
     bne     .LOP_SPUT_BYTE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_CHAR */
 
     /*
@@ -8698,7 +8694,6 @@
     bne     .LOP_SPUT_CHAR_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_SHORT */
 
     /*
@@ -8714,7 +8709,6 @@
     bne     .LOP_SPUT_SHORT_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_INVOKE_VIRTUAL */
 
     /*
@@ -8732,7 +8726,6 @@
     ldr     r0, [r3, r2, lsl #2]        @ r3<- vtable[methodIndex]
     bl      common_invokeMethodNoRange @ continue on
 
-
 /* continuation for OP_INVOKE_SUPER */
 
     /*
@@ -8767,7 +8760,6 @@
     ldr     r1, [r0, #offMethod_name]   @ r1<- method name
     b       common_errNoSuchMethod
 
-
 /* continuation for OP_INVOKE_DIRECT */
 
     /*
@@ -8785,7 +8777,6 @@
     bne     .LOP_INVOKE_DIRECT_finish          @ no, continue
     b       common_exceptionThrown      @ yes, handle exception
 
-
 /* continuation for OP_INVOKE_VIRTUAL_RANGE */
 
     /*
@@ -8803,7 +8794,6 @@
     ldr     r0, [r3, r2, lsl #2]        @ r3<- vtable[methodIndex]
     bl      common_invokeMethodRange @ continue on
 
-
 /* continuation for OP_INVOKE_SUPER_RANGE */
 
     /*
@@ -8838,7 +8828,6 @@
     ldr     r1, [r0, #offMethod_name]   @ r1<- method name
     b       common_errNoSuchMethod
 
-
 /* continuation for OP_INVOKE_DIRECT_RANGE */
 
     /*
@@ -8856,7 +8845,6 @@
     bne     .LOP_INVOKE_DIRECT_RANGE_finish          @ no, continue
     b       common_exceptionThrown      @ yes, handle exception
 
-
 /* continuation for OP_FLOAT_TO_LONG */
 /*
  * Convert the float in r0 to a long in r0/r1.
@@ -8894,7 +8882,6 @@
     bl      __aeabi_f2lz                @ convert float to long
     ldmfd   sp!, {r4, pc}
 
-
 /* continuation for OP_DOUBLE_TO_LONG */
 /*
  * Convert the double in r0/r1 to a long in r0/r1.
@@ -8945,7 +8932,6 @@
     add     sp, sp, #4
     ldmfd   sp!, {r4, r5, pc}
 
-
 /* continuation for OP_MUL_LONG */
 
 .LOP_MUL_LONG_finish:
@@ -8953,7 +8939,6 @@
     stmia   r0, {r9-r10}                @ vAA/vAA+1<- r9/r10
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_SHL_LONG */
 
 .LOP_SHL_LONG_finish:
@@ -8962,7 +8947,6 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_SHR_LONG */
 
 .LOP_SHR_LONG_finish:
@@ -8971,7 +8955,6 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_USHR_LONG */
 
 .LOP_USHR_LONG_finish:
@@ -8980,7 +8963,6 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_SHL_LONG_2ADDR */
 
 .LOP_SHL_LONG_2ADDR_finish:
@@ -8988,7 +8970,6 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_SHR_LONG_2ADDR */
 
 .LOP_SHR_LONG_2ADDR_finish:
@@ -8996,7 +8977,6 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_USHR_LONG_2ADDR */
 
 .LOP_USHR_LONG_2ADDR_finish:
@@ -9004,6 +8984,98 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
+/* continuation for OP_IGET_VOLATILE */
+
+    /*
+     * Currently:
+     *  r0 holds resolved field
+     *  r9 holds object
+     */
+.LOP_IGET_VOLATILE_finish:
+    @bl      common_squeak0
+    cmp     r9, #0                      @ check object for null
+    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
+    beq     common_errNullObject        @ object was null
+    ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    SMP_DMB                            @ acquiring load
+    mov     r2, rINST, lsr #8           @ r2<- A+
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    and     r2, r2, #15                 @ r2<- A
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SET_VREG(r0, r2)                    @ fp[A]<- r0
+    GOTO_OPCODE(ip)                     @ jump to next instruction
+
+/* continuation for OP_IPUT_VOLATILE */
+
+    /*
+     * Currently:
+     *  r0 holds resolved field
+     *  r9 holds object
+     */
+.LOP_IPUT_VOLATILE_finish:
+    @bl      common_squeak0
+    mov     r1, rINST, lsr #8           @ r1<- A+
+    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
+    and     r1, r1, #15                 @ r1<- A
+    cmp     r9, #0                      @ check object for null
+    GET_VREG(r0, r1)                    @ r0<- fp[A]
+    beq     common_errNullObject        @ object was null
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SMP_DMB                            @ releasing store
+    str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
+    GOTO_OPCODE(ip)                     @ jump to next instruction
+
+/* continuation for OP_SGET_VOLATILE */
+
+    /*
+     * Continuation if the field has not yet been resolved.
+     *  r1: BBBB field ref
+     */
+.LOP_SGET_VOLATILE_resolve:
+    ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw, so export now
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_SGET_VOLATILE_finish          @ yes, finish
+    b       common_exceptionThrown      @ no, handle exception
+
+/* continuation for OP_SPUT_VOLATILE */
+
+    /*
+     * Continuation if the field has not yet been resolved.
+     *  r1: BBBB field ref
+     */
+.LOP_SPUT_VOLATILE_resolve:
+    ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw, so export now
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_SPUT_VOLATILE_finish          @ yes, finish
+    b       common_exceptionThrown      @ no, handle exception
+
+/* continuation for OP_IGET_OBJECT_VOLATILE */
+
+    /*
+     * Currently:
+     *  r0 holds resolved field
+     *  r9 holds object
+     */
+.LOP_IGET_OBJECT_VOLATILE_finish:
+    @bl      common_squeak0
+    cmp     r9, #0                      @ check object for null
+    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
+    beq     common_errNullObject        @ object was null
+    ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    SMP_DMB                            @ acquiring load
+    mov     r2, rINST, lsr #8           @ r2<- A+
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    and     r2, r2, #15                 @ r2<- A
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SET_VREG(r0, r2)                    @ fp[A]<- r0
+    GOTO_OPCODE(ip)                     @ jump to next instruction
 
 /* continuation for OP_IGET_WIDE_VOLATILE */
 
@@ -9016,9 +9088,9 @@
     cmp     r9, #0                      @ check object for null
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
-    .if 1
+    .if     1
     add     r0, r9, r3                  @ r0<- address of field
-    bl      android_quasiatomic_read_64 @ r0/r1<- contents of field
+    bl      dvmQuasiAtomicRead64        @ r0/r1<- contents of field
     .else
     ldrd    r0, [r9, r3]                @ r0/r1<- obj.field (64-bit align ok)
     .endif
@@ -9030,7 +9102,6 @@
     stmia   r3, {r0-r1}                 @ fp[A]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_WIDE_VOLATILE */
 
     /*
@@ -9048,15 +9119,14 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     ldmia   r2, {r0-r1}                 @ r0/r1<- fp[A]
     GET_INST_OPCODE(r10)                @ extract opcode from rINST
-    .if 1
+    .if     1
     add     r2, r9, r3                  @ r2<- target address
-    bl      android_quasiatomic_swap_64 @ stores r0/r1 into addr r2
+    bl      dvmQuasiAtomicSwap64        @ stores r0/r1 into addr r2
     .else
     strd    r0, [r9, r3]                @ obj.field (64 bits, aligned)<- r0/r1
     .endif
     GOTO_OPCODE(r10)                    @ jump to next instruction
 
-
 /* continuation for OP_SGET_WIDE_VOLATILE */
 
     /*
@@ -9074,7 +9144,6 @@
     bne     .LOP_SGET_WIDE_VOLATILE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_WIDE_VOLATILE */
 
     /*
@@ -9094,7 +9163,6 @@
     bne     .LOP_SPUT_WIDE_VOLATILE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_EXECUTE_INLINE */
 
     /*
@@ -9130,7 +9198,6 @@
 .LOP_EXECUTE_INLINE_table:
     .word   gDvmInlineOpsTable
 
-
 /* continuation for OP_EXECUTE_INLINE_RANGE */
 
     /*
@@ -9160,6 +9227,56 @@
 .LOP_EXECUTE_INLINE_RANGE_table:
     .word   gDvmInlineOpsTable
 
+/* continuation for OP_IPUT_OBJECT_VOLATILE */
+
+    /*
+     * Currently:
+     *  r0 holds resolved field
+     *  r9 holds object
+     */
+.LOP_IPUT_OBJECT_VOLATILE_finish:
+    @bl      common_squeak0
+    mov     r1, rINST, lsr #8           @ r1<- A+
+    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
+    and     r1, r1, #15                 @ r1<- A
+    cmp     r9, #0                      @ check object for null
+    GET_VREG(r0, r1)                    @ r0<- fp[A]
+    beq     common_errNullObject        @ object was null
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SMP_DMB                            @ releasing store
+    str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
+    GOTO_OPCODE(ip)                     @ jump to next instruction
+
+/* continuation for OP_SGET_OBJECT_VOLATILE */
+
+    /*
+     * Continuation if the field has not yet been resolved.
+     *  r1: BBBB field ref
+     */
+.LOP_SGET_OBJECT_VOLATILE_resolve:
+    ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw, so export now
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_SGET_OBJECT_VOLATILE_finish          @ yes, finish
+    b       common_exceptionThrown      @ no, handle exception
+
+/* continuation for OP_SPUT_OBJECT_VOLATILE */
+
+    /*
+     * Continuation if the field has not yet been resolved.
+     *  r1: BBBB field ref
+     */
+.LOP_SPUT_OBJECT_VOLATILE_resolve:
+    ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw, so export now
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_SPUT_OBJECT_VOLATILE_finish          @ yes, finish
+    b       common_exceptionThrown      @ no, handle exception
 
     .size   dvmAsmSisterStart, .-dvmAsmSisterStart
     .global dvmAsmSisterEnd
@@ -10392,4 +10509,3 @@
 .LstrPrintLong:
     .asciz  "<%lld>"
 
-
diff --git a/vm/mterp/out/InterpAsm-armv7-a.S b/vm/mterp/out/InterpAsm-armv7-a.S
index c1f8276..32484e2 100644
--- a/vm/mterp/out/InterpAsm-armv7-a.S
+++ b/vm/mterp/out/InterpAsm-armv7-a.S
@@ -20,6 +20,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 /*
  * ARMv5 definitions and declarations.
  */
@@ -205,7 +206,7 @@
 #include "../common/jit-config.h"
 #endif
 
-/* File: armv5te/platform.S */
+/* File: armv7-a/platform.S */
 /*
  * ===========================================================================
  *  CPU-version-specific defines
@@ -242,6 +243,21 @@
     ldmfd   sp!, {\regs,pc}
 .endm
 
+#if !defined(ANDROID_SMP)
+# error "Must define ANDROID_SMP"
+#endif
+
+/*
+ * Macro for data memory barrier; not meaningful pre-ARMv6K.
+ * If the argument is nonzero, emit barrier; otherwise, emit nothing.
+ */
+.macro  SMP_DMB
+#if ANDROID_SMP != 0
+    dmb
+#else
+    /* not SMP */
+#endif
+.endm
 
 /* File: armv5te/entry.S */
 /*
@@ -396,7 +412,6 @@
     .word   .LstrBadEntryPoint
 
 
-
     .global dvmAsmInstructionStart
     .type   dvmAsmInstructionStart, %function
 dvmAsmInstructionStart = .L_OP_NOP
@@ -420,7 +435,6 @@
     .fnend
 #endif
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE: /* 0x01 */
@@ -435,7 +449,6 @@
     SET_VREG(r2, r0)                    @ fp[A]<- r2
     GOTO_OPCODE(ip)                     @ execute next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_FROM16: /* 0x02 */
@@ -450,7 +463,6 @@
     SET_VREG(r2, r0)                    @ fp[AA]<- r2
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_16: /* 0x03 */
@@ -465,7 +477,6 @@
     SET_VREG(r2, r0)                    @ fp[AAAA]<- r2
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_WIDE: /* 0x04 */
@@ -482,7 +493,6 @@
     stmia   r2, {r0-r1}                 @ fp[A]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_WIDE_FROM16: /* 0x05 */
@@ -499,7 +509,6 @@
     stmia   r2, {r0-r1}                 @ fp[AA]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_WIDE_16: /* 0x06 */
@@ -516,7 +525,6 @@
     stmia   r2, {r0-r1}                 @ fp[AAAA]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_OBJECT: /* 0x07 */
@@ -534,7 +542,6 @@
     GOTO_OPCODE(ip)                     @ execute next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_OBJECT_FROM16: /* 0x08 */
@@ -551,7 +558,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_OBJECT_16: /* 0x09 */
@@ -568,7 +574,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_RESULT: /* 0x0a */
@@ -582,7 +587,6 @@
     SET_VREG(r0, r2)                    @ fp[AA]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_RESULT_WIDE: /* 0x0b */
@@ -597,7 +601,6 @@
     stmia   r2, {r0-r1}                 @ fp[AA]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_RESULT_OBJECT: /* 0x0c */
@@ -613,7 +616,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_EXCEPTION: /* 0x0d */
@@ -629,14 +631,12 @@
     str     r1, [r0, #offThread_exception]  @ dvmClearException bypass
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RETURN_VOID: /* 0x0e */
 /* File: armv5te/OP_RETURN_VOID.S */
     b       common_returnFromMethod
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RETURN: /* 0x0f */
@@ -653,7 +653,6 @@
     str     r0, [rGLUE, #offGlue_retval] @ retval.i <- vAA
     b       common_returnFromMethod
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RETURN_WIDE: /* 0x10 */
@@ -670,7 +669,6 @@
     stmia   r3, {r0-r1}                 @ retval<- r0/r1
     b       common_returnFromMethod
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RETURN_OBJECT: /* 0x11 */
@@ -689,7 +687,6 @@
     b       common_returnFromMethod
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_4: /* 0x12 */
@@ -703,7 +700,6 @@
     SET_VREG(r1, r0)                    @ fp[A]<- r1
     GOTO_OPCODE(ip)                     @ execute next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_16: /* 0x13 */
@@ -716,7 +712,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST: /* 0x14 */
@@ -731,7 +726,6 @@
     SET_VREG(r0, r3)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_HIGH16: /* 0x15 */
@@ -745,7 +739,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_WIDE_16: /* 0x16 */
@@ -760,7 +753,6 @@
     stmia   r3, {r0-r1}                 @ vAA<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_WIDE_32: /* 0x17 */
@@ -777,7 +769,6 @@
     stmia   r3, {r0-r1}                 @ vAA<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_WIDE: /* 0x18 */
@@ -796,7 +787,6 @@
     stmia   r9, {r0-r1}                 @ vAA<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_WIDE_HIGH16: /* 0x19 */
@@ -812,7 +802,6 @@
     stmia   r3, {r0-r1}                 @ vAA<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_STRING: /* 0x1a */
@@ -891,7 +880,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MONITOR_EXIT: /* 0x1e */
@@ -920,7 +908,6 @@
     FETCH_ADVANCE_INST(1)               @ advance before throw
     b      common_errNullObject
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CHECK_CAST: /* 0x1f */
@@ -995,7 +982,6 @@
     SET_VREG(r3, r2)                    @ vB<- length
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_NEW_INSTANCE: /* 0x22 */
@@ -1131,13 +1117,13 @@
     mov     r2, rINST, lsr #8           @ r2<- AA
     GET_VREG(r1, r2)                    @ r1<- vAA (exception object)
     ldr     r0, [rGLUE, #offGlue_self]  @ r0<- glue->self
+    EXPORT_PC()                         @ exception handler can throw
     cmp     r1, #0                      @ null object?
     beq     common_errNullObject        @ yes, throw an NPE instead
     @ bypass dvmSetException, just store it
     str     r1, [r0, #offThread_exception]  @ thread->exception<- obj
     b       common_exceptionThrown
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_GOTO: /* 0x28 */
@@ -1193,7 +1179,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 #endif
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_GOTO_32: /* 0x2a */
@@ -1266,7 +1251,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 #endif
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SPARSE_SWITCH: /* 0x2c */
@@ -1306,7 +1290,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CMPL_FLOAT: /* 0x2d */
@@ -1539,7 +1522,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_NE: /* 0x33 */
@@ -1575,7 +1557,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_LT: /* 0x34 */
@@ -1611,7 +1592,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_GE: /* 0x35 */
@@ -1647,7 +1627,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_GT: /* 0x36 */
@@ -1683,7 +1662,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_LE: /* 0x37 */
@@ -1719,7 +1697,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_EQZ: /* 0x38 */
@@ -1756,7 +1733,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_NEZ: /* 0x39 */
@@ -1793,7 +1769,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_LTZ: /* 0x3a */
@@ -1830,7 +1805,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_GEZ: /* 0x3b */
@@ -1867,7 +1841,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_GTZ: /* 0x3c */
@@ -1904,7 +1877,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_LEZ: /* 0x3d */
@@ -1941,7 +1913,6 @@
 #endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_3E: /* 0x3e */
@@ -1950,7 +1921,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_3F: /* 0x3f */
@@ -1959,7 +1929,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_40: /* 0x40 */
@@ -1968,7 +1937,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_41: /* 0x41 */
@@ -1977,7 +1945,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_42: /* 0x42 */
@@ -1986,7 +1953,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_43: /* 0x43 */
@@ -1995,7 +1961,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET: /* 0x44 */
@@ -2026,7 +1991,6 @@
     SET_VREG(r2, r9)                    @ vAA<- r2
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_WIDE: /* 0x45 */
@@ -2086,7 +2050,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_BOOLEAN: /* 0x47 */
@@ -2119,7 +2082,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_BYTE: /* 0x48 */
@@ -2152,7 +2114,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_CHAR: /* 0x49 */
@@ -2185,7 +2146,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_SHORT: /* 0x4a */
@@ -2218,7 +2178,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT: /* 0x4b */
@@ -2249,7 +2208,6 @@
     str  r2, [r0, #offArrayObject_contents]  @ vBB[vCC]<- r2
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT_WIDE: /* 0x4c */
@@ -2337,7 +2295,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT_BYTE: /* 0x4f */
@@ -2370,7 +2327,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT_CHAR: /* 0x50 */
@@ -2403,7 +2359,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT_SHORT: /* 0x51 */
@@ -2436,7 +2391,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IGET: /* 0x52 */
@@ -2840,6 +2794,7 @@
     beq     .LOP_SGET_resolve         @ yes, do resolve
 .LOP_SGET_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -2864,7 +2819,7 @@
     mov     r9, rINST, lsr #8           @ r9<- AA
     .if 0
     add     r0, r0, #offStaticField_value @ r0<- pointer to data
-    bl      android_quasiatomic_read_64 @ r0/r1<- contents of field
+    bl      dvmQuasiAtomicRead64        @ r0/r1<- contents of field
     .else
     ldrd    r0, [r0, #offStaticField_value] @ r0/r1<- field value (aligned)
     .endif
@@ -2893,6 +2848,7 @@
     beq     .LOP_SGET_OBJECT_resolve         @ yes, do resolve
 .LOP_SGET_OBJECT_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -2919,6 +2875,7 @@
     beq     .LOP_SGET_BOOLEAN_resolve         @ yes, do resolve
 .LOP_SGET_BOOLEAN_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -2945,6 +2902,7 @@
     beq     .LOP_SGET_BYTE_resolve         @ yes, do resolve
 .LOP_SGET_BYTE_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -2971,6 +2929,7 @@
     beq     .LOP_SGET_CHAR_resolve         @ yes, do resolve
 .LOP_SGET_CHAR_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -2997,6 +2956,7 @@
     beq     .LOP_SGET_SHORT_resolve         @ yes, do resolve
 .LOP_SGET_SHORT_finish: @ field ptr in r0
     ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- AA
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     SET_VREG(r1, r2)                    @ fp[AA]<- r1
@@ -3025,6 +2985,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3050,7 +3011,7 @@
     GET_INST_OPCODE(r10)                @ extract opcode from rINST
     .if 0
     add     r2, r2, #offStaticField_value @ r2<- pointer to data
-    bl      android_quasiatomic_swap_64 @ stores r0/r1 into addr r2
+    bl      dvmQuasiAtomicSwap64        @ stores r0/r1 into addr r2
     .else
     strd    r0, [r2, #offStaticField_value] @ field<- vAA/vAA+1
     .endif
@@ -3078,6 +3039,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3104,6 +3066,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3130,6 +3093,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3156,6 +3120,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3182,6 +3147,7 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_VREG(r1, r2)                    @ r1<- fp[AA]
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str     r1, [r0, #offStaticField_value] @ field<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
@@ -3304,7 +3270,6 @@
     bne     common_invokeMethodNoRange @ no, continue
     b       common_exceptionThrown      @ yes, handle exception
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_INTERFACE: /* 0x72 */
@@ -3331,8 +3296,7 @@
     bl      dvmFindInterfaceMethodInCache @ r0<- call(class, ref, method, dex)
     cmp     r0, #0                      @ failed?
     beq     common_exceptionThrown      @ yes, handle exception
-    b       common_invokeMethodNoRange @ jump to common handler 
-
+    b       common_invokeMethodNoRange @ jump to common handler
 
 /* ------------------------------ */
     .balign 64
@@ -3342,7 +3306,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_VIRTUAL_RANGE: /* 0x74 */
@@ -3469,7 +3432,6 @@
     b       common_exceptionThrown      @ yes, handle exception
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_INTERFACE_RANGE: /* 0x78 */
@@ -3497,8 +3459,7 @@
     bl      dvmFindInterfaceMethodInCache @ r0<- call(class, ref, method, dex)
     cmp     r0, #0                      @ failed?
     beq     common_exceptionThrown      @ yes, handle exception
-    b       common_invokeMethodRange @ jump to common handler 
-
+    b       common_invokeMethodRange @ jump to common handler
 
 
 /* ------------------------------ */
@@ -3509,7 +3470,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_7A: /* 0x7a */
@@ -3518,7 +3478,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_NEG_INT: /* 0x7b */
@@ -3598,7 +3557,6 @@
     /* 10-11 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_NOT_LONG: /* 0x7e */
@@ -3626,7 +3584,6 @@
     /* 10-11 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_NEG_FLOAT: /* 0x7f */
@@ -3680,7 +3637,6 @@
     /* 10-11 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INT_TO_LONG: /* 0x81 */
@@ -3775,7 +3731,6 @@
     GOTO_OPCODE(ip)                     @ execute next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_LONG_TO_FLOAT: /* 0x85 */
@@ -3832,7 +3787,6 @@
     /* 10-11 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_FLOAT_TO_INT: /* 0x87 */
@@ -3965,7 +3919,6 @@
 
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DOUBLE_TO_FLOAT: /* 0x8c */
@@ -4110,7 +4063,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_INT: /* 0x91 */
@@ -4152,7 +4104,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_INT: /* 0x92 */
@@ -4195,7 +4146,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_INT: /* 0x93 */
@@ -4237,7 +4187,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_INT: /* 0x94 */
@@ -4280,7 +4229,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_INT: /* 0x95 */
@@ -4322,7 +4270,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_INT: /* 0x96 */
@@ -4364,7 +4311,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_INT: /* 0x97 */
@@ -4406,7 +4352,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHL_INT: /* 0x98 */
@@ -4448,7 +4393,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHR_INT: /* 0x99 */
@@ -4490,7 +4434,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_USHR_INT: /* 0x9a */
@@ -4532,7 +4475,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_LONG: /* 0x9b */
@@ -4577,7 +4519,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_LONG: /* 0x9c */
@@ -4622,7 +4563,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_LONG: /* 0x9d */
@@ -4706,7 +4646,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_LONG: /* 0x9f */
@@ -4752,7 +4691,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_LONG: /* 0xa0 */
@@ -4797,7 +4735,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_LONG: /* 0xa1 */
@@ -4842,7 +4779,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_LONG: /* 0xa2 */
@@ -4887,7 +4823,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHL_LONG: /* 0xa3 */
@@ -5137,7 +5072,6 @@
     /* 11-14 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_DOUBLE: /* 0xab */
@@ -5303,7 +5237,6 @@
     /* 14-17 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_INT_2ADDR: /* 0xb0 */
@@ -5342,7 +5275,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_INT_2ADDR: /* 0xb1 */
@@ -5381,7 +5313,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_INT_2ADDR: /* 0xb2 */
@@ -5421,7 +5352,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_INT_2ADDR: /* 0xb3 */
@@ -5460,7 +5390,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_INT_2ADDR: /* 0xb4 */
@@ -5500,7 +5429,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_INT_2ADDR: /* 0xb5 */
@@ -5539,7 +5467,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_INT_2ADDR: /* 0xb6 */
@@ -5578,7 +5505,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_INT_2ADDR: /* 0xb7 */
@@ -5617,7 +5543,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHL_INT_2ADDR: /* 0xb8 */
@@ -5656,7 +5581,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHR_INT_2ADDR: /* 0xb9 */
@@ -5695,7 +5619,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_USHR_INT_2ADDR: /* 0xba */
@@ -5734,7 +5657,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_LONG_2ADDR: /* 0xbb */
@@ -5775,7 +5697,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_LONG_2ADDR: /* 0xbc */
@@ -5816,7 +5737,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_LONG_2ADDR: /* 0xbd */
@@ -5846,7 +5766,6 @@
     stmia   r0, {r9-r10}                @ vAA/vAA+1<- r9/r10
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_LONG_2ADDR: /* 0xbe */
@@ -5887,7 +5806,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_LONG_2ADDR: /* 0xbf */
@@ -5929,7 +5847,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_LONG_2ADDR: /* 0xc0 */
@@ -5970,7 +5887,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_LONG_2ADDR: /* 0xc1 */
@@ -6011,7 +5927,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_LONG_2ADDR: /* 0xc2 */
@@ -6052,7 +5967,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHL_LONG_2ADDR: /* 0xc3 */
@@ -6279,7 +6193,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_DOUBLE_2ADDR: /* 0xcb */
@@ -6437,7 +6350,6 @@
     /* 12-15 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_INT_LIT16: /* 0xd0 */
@@ -6473,7 +6385,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RSUB_INT: /* 0xd1 */
@@ -6510,7 +6421,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_INT_LIT16: /* 0xd2 */
@@ -6547,7 +6457,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_INT_LIT16: /* 0xd3 */
@@ -6583,7 +6492,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_INT_LIT16: /* 0xd4 */
@@ -6620,7 +6528,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_INT_LIT16: /* 0xd5 */
@@ -6656,7 +6563,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_INT_LIT16: /* 0xd6 */
@@ -6692,7 +6598,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_INT_LIT16: /* 0xd7 */
@@ -6728,7 +6633,6 @@
     /* 10-13 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_INT_LIT8: /* 0xd8 */
@@ -6767,7 +6671,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RSUB_INT_LIT8: /* 0xd9 */
@@ -6806,7 +6709,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_INT_LIT8: /* 0xda */
@@ -6846,7 +6748,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_INT_LIT8: /* 0xdb */
@@ -6885,7 +6786,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_INT_LIT8: /* 0xdc */
@@ -6925,7 +6825,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_INT_LIT8: /* 0xdd */
@@ -6964,7 +6863,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_INT_LIT8: /* 0xde */
@@ -7003,7 +6901,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_INT_LIT8: /* 0xdf */
@@ -7042,7 +6939,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHL_INT_LIT8: /* 0xe0 */
@@ -7081,7 +6977,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHR_INT_LIT8: /* 0xe1 */
@@ -7120,7 +7015,6 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_USHR_INT_LIT8: /* 0xe2 */
@@ -7159,50 +7053,142 @@
     /* 10-12 instructions */
 
 
-
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E3: /* 0xe3 */
-/* File: armv5te/OP_UNUSED_E3.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_IGET_VOLATILE: /* 0xe3 */
+/* File: armv5te/OP_IGET_VOLATILE.S */
+/* File: armv5te/OP_IGET.S */
+    /*
+     * General 32-bit instance field get.
+     *
+     * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
+     */
+    /* op vA, vB, field@CCCC */
+    mov     r0, rINST, lsr #12          @ r0<- B
+    ldr     r3, [rGLUE, #offGlue_methodClassDex]    @ r3<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref CCCC
+    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
+    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    bne     .LOP_IGET_VOLATILE_finish          @ no, already resolved
+8:  ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
+    cmp     r0, #0
+    bne     .LOP_IGET_VOLATILE_finish
+    b       common_exceptionThrown
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E4: /* 0xe4 */
-/* File: armv5te/OP_UNUSED_E4.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_IPUT_VOLATILE: /* 0xe4 */
+/* File: armv5te/OP_IPUT_VOLATILE.S */
+/* File: armv5te/OP_IPUT.S */
+    /*
+     * General 32-bit instance field put.
+     *
+     * for: iput, iput-object, iput-boolean, iput-byte, iput-char, iput-short
+     */
+    /* op vA, vB, field@CCCC */
+    mov     r0, rINST, lsr #12          @ r0<- B
+    ldr     r3, [rGLUE, #offGlue_methodClassDex]    @ r3<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref CCCC
+    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
+    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    bne     .LOP_IPUT_VOLATILE_finish          @ no, already resolved
+8:  ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_IPUT_VOLATILE_finish          @ yes, finish up
+    b       common_exceptionThrown
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E5: /* 0xe5 */
-/* File: armv5te/OP_UNUSED_E5.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_SGET_VOLATILE: /* 0xe5 */
+/* File: armv5te/OP_SGET_VOLATILE.S */
+/* File: armv5te/OP_SGET.S */
+    /*
+     * General 32-bit SGET handler.
+     *
+     * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
+     */
+    /* op vAA, field@BBBB */
+    ldr     r2, [rGLUE, #offGlue_methodClassDex]    @ r2<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref BBBB
+    ldr     r2, [r2, #offDvmDex_pResFields] @ r2<- dvmDex->pResFields
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    beq     .LOP_SGET_VOLATILE_resolve         @ yes, do resolve
+.LOP_SGET_VOLATILE_finish: @ field ptr in r0
+    ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    SMP_DMB                            @ acquiring load
+    mov     r2, rINST, lsr #8           @ r2<- AA
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    SET_VREG(r1, r2)                    @ fp[AA]<- r1
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E6: /* 0xe6 */
-/* File: armv5te/OP_UNUSED_E6.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_SPUT_VOLATILE: /* 0xe6 */
+/* File: armv5te/OP_SPUT_VOLATILE.S */
+/* File: armv5te/OP_SPUT.S */
+    /*
+     * General 32-bit SPUT handler.
+     *
+     * for: sput, sput-object, sput-boolean, sput-byte, sput-char, sput-short
+     */
+    /* op vAA, field@BBBB */
+    ldr     r2, [rGLUE, #offGlue_methodClassDex]    @ r2<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref BBBB
+    ldr     r2, [r2, #offDvmDex_pResFields] @ r2<- dvmDex->pResFields
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    beq     .LOP_SPUT_VOLATILE_resolve         @ yes, do resolve
+.LOP_SPUT_VOLATILE_finish:   @ field ptr in r0
+    mov     r2, rINST, lsr #8           @ r2<- AA
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    GET_VREG(r1, r2)                    @ r1<- fp[AA]
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SMP_DMB                            @ releasing store
+    str     r1, [r0, #offStaticField_value] @ field<- vAA
+    GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E7: /* 0xe7 */
-/* File: armv5te/OP_UNUSED_E7.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_IGET_OBJECT_VOLATILE: /* 0xe7 */
+/* File: armv5te/OP_IGET_OBJECT_VOLATILE.S */
+/* File: armv5te/OP_IGET.S */
+    /*
+     * General 32-bit instance field get.
+     *
+     * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
+     */
+    /* op vA, vB, field@CCCC */
+    mov     r0, rINST, lsr #12          @ r0<- B
+    ldr     r3, [rGLUE, #offGlue_methodClassDex]    @ r3<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref CCCC
+    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
+    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    bne     .LOP_IGET_OBJECT_VOLATILE_finish          @ no, already resolved
+8:  ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
+    cmp     r0, #0
+    bne     .LOP_IGET_OBJECT_VOLATILE_finish
+    b       common_exceptionThrown
 
 
 /* ------------------------------ */
@@ -7273,7 +7259,7 @@
     mov     r9, rINST, lsr #8           @ r9<- AA
     .if 1
     add     r0, r0, #offStaticField_value @ r0<- pointer to data
-    bl      android_quasiatomic_read_64 @ r0/r1<- contents of field
+    bl      dvmQuasiAtomicRead64        @ r0/r1<- contents of field
     .else
     ldrd    r0, [r0, #offStaticField_value] @ r0/r1<- field value (aligned)
     .endif
@@ -7307,7 +7293,7 @@
     GET_INST_OPCODE(r10)                @ extract opcode from rINST
     .if 1
     add     r2, r2, #offStaticField_value @ r2<- pointer to data
-    bl      android_quasiatomic_swap_64 @ stores r0/r1 into addr r2
+    bl      dvmQuasiAtomicSwap64        @ stores r0/r1 into addr r2
     .else
     strd    r0, [r2, #offStaticField_value] @ field<- vAA/vAA+1
     .endif
@@ -7322,7 +7308,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_THROW_VERIFICATION_ERROR: /* 0xed */
@@ -7340,7 +7325,6 @@
     bl      dvmThrowVerificationError   @ always throws
     b       common_exceptionThrown      @ handle exception
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_EXECUTE_INLINE: /* 0xee */
@@ -7419,7 +7403,6 @@
     bl      common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IGET_QUICK: /* 0xf2 */
@@ -7438,7 +7421,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IGET_WIDE_QUICK: /* 0xf3 */
@@ -7457,7 +7439,6 @@
     stmia   r3, {r0-r1}                 @ fp[A]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IGET_OBJECT_QUICK: /* 0xf4 */
@@ -7479,7 +7460,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IPUT_QUICK: /* 0xf5 */
@@ -7498,7 +7478,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IPUT_WIDE_QUICK: /* 0xf6 */
@@ -7517,7 +7496,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IPUT_OBJECT_QUICK: /* 0xf7 */
@@ -7539,7 +7517,6 @@
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_VIRTUAL_QUICK: /* 0xf8 */
@@ -7619,7 +7596,6 @@
     beq     common_errNullObject        @ "this" is null, throw exception
     bl      common_invokeMethodNoRange @ continue on
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_SUPER_QUICK_RANGE: /* 0xfb */
@@ -7649,32 +7625,86 @@
     bl      common_invokeMethodRange @ continue on
 
 
-
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_FC: /* 0xfc */
-/* File: armv5te/OP_UNUSED_FC.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_IPUT_OBJECT_VOLATILE: /* 0xfc */
+/* File: armv5te/OP_IPUT_OBJECT_VOLATILE.S */
+/* File: armv5te/OP_IPUT.S */
+    /*
+     * General 32-bit instance field put.
+     *
+     * for: iput, iput-object, iput-boolean, iput-byte, iput-char, iput-short
+     */
+    /* op vA, vB, field@CCCC */
+    mov     r0, rINST, lsr #12          @ r0<- B
+    ldr     r3, [rGLUE, #offGlue_methodClassDex]    @ r3<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref CCCC
+    ldr     r2, [r3, #offDvmDex_pResFields] @ r2<- pDvmDex->pResFields
+    GET_VREG(r9, r0)                    @ r9<- fp[B], the object pointer
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    bne     .LOP_IPUT_OBJECT_VOLATILE_finish          @ no, already resolved
+8:  ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveInstField         @ r0<- resolved InstField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_IPUT_OBJECT_VOLATILE_finish          @ yes, finish up
+    b       common_exceptionThrown
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_FD: /* 0xfd */
-/* File: armv5te/OP_UNUSED_FD.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_SGET_OBJECT_VOLATILE: /* 0xfd */
+/* File: armv5te/OP_SGET_OBJECT_VOLATILE.S */
+/* File: armv5te/OP_SGET.S */
+    /*
+     * General 32-bit SGET handler.
+     *
+     * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
+     */
+    /* op vAA, field@BBBB */
+    ldr     r2, [rGLUE, #offGlue_methodClassDex]    @ r2<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref BBBB
+    ldr     r2, [r2, #offDvmDex_pResFields] @ r2<- dvmDex->pResFields
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    beq     .LOP_SGET_OBJECT_VOLATILE_resolve         @ yes, do resolve
+.LOP_SGET_OBJECT_VOLATILE_finish: @ field ptr in r0
+    ldr     r1, [r0, #offStaticField_value] @ r1<- field value
+    SMP_DMB                            @ acquiring load
+    mov     r2, rINST, lsr #8           @ r2<- AA
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    SET_VREG(r1, r2)                    @ fp[AA]<- r1
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_FE: /* 0xfe */
-/* File: armv5te/OP_UNUSED_FE.S */
-/* File: armv5te/unused.S */
-    bl      common_abort
-
+.L_OP_SPUT_OBJECT_VOLATILE: /* 0xfe */
+/* File: armv5te/OP_SPUT_OBJECT_VOLATILE.S */
+/* File: armv5te/OP_SPUT.S */
+    /*
+     * General 32-bit SPUT handler.
+     *
+     * for: sput, sput-object, sput-boolean, sput-byte, sput-char, sput-short
+     */
+    /* op vAA, field@BBBB */
+    ldr     r2, [rGLUE, #offGlue_methodClassDex]    @ r2<- DvmDex
+    FETCH(r1, 1)                        @ r1<- field ref BBBB
+    ldr     r2, [r2, #offDvmDex_pResFields] @ r2<- dvmDex->pResFields
+    ldr     r0, [r2, r1, lsl #2]        @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ is resolved entry null?
+    beq     .LOP_SPUT_OBJECT_VOLATILE_resolve         @ yes, do resolve
+.LOP_SPUT_OBJECT_VOLATILE_finish:   @ field ptr in r0
+    mov     r2, rINST, lsr #8           @ r2<- AA
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    GET_VREG(r1, r2)                    @ r1<- fp[AA]
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SMP_DMB                            @ releasing store
+    str     r1, [r0, #offStaticField_value] @ field<- vAA
+    GOTO_OPCODE(ip)                     @ jump to next instruction
 
 
 /* ------------------------------ */
@@ -7686,7 +7716,6 @@
 
 
 
-
     .balign 64
     .size   dvmAsmInstructionStart, .-dvmAsmInstructionStart
     .global dvmAsmInstructionEnd
@@ -7722,7 +7751,6 @@
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_CONST_STRING_JUMBO */
 
     /*
@@ -7742,7 +7770,6 @@
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_CONST_CLASS */
 
     /*
@@ -7763,7 +7790,6 @@
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_CHECK_CAST */
 
     /*
@@ -7808,7 +7834,6 @@
 .LstrClassCastExceptionPtr:
     .word   .LstrClassCastException
 
-
 /* continuation for OP_INSTANCE_OF */
 
     /*
@@ -7864,7 +7889,6 @@
     ldr     r0, [r0, #offObject_clazz]  @ r0<- obj->clazz
     b       .LOP_INSTANCE_OF_resolved        @ pick up where we left off
 
-
 /* continuation for OP_NEW_INSTANCE */
 
     .balign 32                          @ minimize cache lines
@@ -7907,7 +7931,6 @@
 .LstrInstantiationErrorPtr:
     .word   .LstrInstantiationError
 
-
 /* continuation for OP_NEW_ARRAY */
 
 
@@ -7947,7 +7970,6 @@
     SET_VREG(r0, r2)                    @ vA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_FILLED_NEW_ARRAY */
 
     /*
@@ -8026,7 +8048,6 @@
     .word   .LstrInternalError
     .endif
 
-
 /* continuation for OP_FILLED_NEW_ARRAY_RANGE */
 
     /*
@@ -8105,31 +8126,26 @@
     .word   .LstrInternalError
     .endif
 
-
 /* continuation for OP_CMPL_FLOAT */
 .LOP_CMPL_FLOAT_finish:
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_CMPG_FLOAT */
 .LOP_CMPG_FLOAT_finish:
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_CMPL_DOUBLE */
 .LOP_CMPL_DOUBLE_finish:
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_CMPG_DOUBLE */
 .LOP_CMPG_DOUBLE_finish:
     SET_VREG(r0, r9)                    @ vAA<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_CMP_LONG */
 
 .LOP_CMP_LONG_less:
@@ -8151,7 +8167,6 @@
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_AGET_WIDE */
 
 .LOP_AGET_WIDE_finish:
@@ -8162,7 +8177,6 @@
     stmia   r9, {r2-r3}                 @ vAA/vAA+1<- r2/r3
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_APUT_WIDE */
 
 .LOP_APUT_WIDE_finish:
@@ -8172,7 +8186,6 @@
     strd    r2, [r0, #offArrayObject_contents]  @ r2/r3<- vBB[vCC]
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_APUT_OBJECT */
     /*
      * On entry:
@@ -8194,7 +8207,6 @@
     str     r9, [r10, #offArrayObject_contents] @ vBB[vCC]<- vAA
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET */
 
     /*
@@ -8214,7 +8226,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_WIDE */
 
     /*
@@ -8234,7 +8245,6 @@
     stmia   r3, {r0-r1}                 @ fp[A]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_OBJECT */
 
     /*
@@ -8248,6 +8258,7 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
@@ -8255,7 +8266,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_BOOLEAN */
 
     /*
@@ -8269,6 +8279,7 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
@@ -8276,7 +8287,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_BYTE */
 
     /*
@@ -8290,6 +8300,7 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
@@ -8297,7 +8308,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_CHAR */
 
     /*
@@ -8311,6 +8321,7 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
@@ -8318,7 +8329,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IGET_SHORT */
 
     /*
@@ -8332,6 +8342,7 @@
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
     ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    @ no-op                             @ acquiring load
     mov     r2, rINST, lsr #8           @ r2<- A+
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     and     r2, r2, #15                 @ r2<- A
@@ -8339,7 +8350,6 @@
     SET_VREG(r0, r2)                    @ fp[A]<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT */
 
     /*
@@ -8359,7 +8369,6 @@
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_WIDE */
 
     /*
@@ -8379,7 +8388,6 @@
     strd    r0, [r9, r3]                @ obj.field (64 bits, aligned)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_OBJECT */
 
     /*
@@ -8397,10 +8405,10 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_BOOLEAN */
 
     /*
@@ -8418,10 +8426,10 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_BYTE */
 
     /*
@@ -8439,10 +8447,10 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_CHAR */
 
     /*
@@ -8460,10 +8468,10 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_SHORT */
 
     /*
@@ -8481,10 +8489,10 @@
     beq     common_errNullObject        @ object was null
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    @ no-op                             @ releasing store
     str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_SGET */
 
     /*
@@ -8500,7 +8508,6 @@
     bne     .LOP_SGET_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_WIDE */
 
     /*
@@ -8518,7 +8525,6 @@
     bne     .LOP_SGET_WIDE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_OBJECT */
 
     /*
@@ -8534,7 +8540,6 @@
     bne     .LOP_SGET_OBJECT_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_BOOLEAN */
 
     /*
@@ -8550,7 +8555,6 @@
     bne     .LOP_SGET_BOOLEAN_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_BYTE */
 
     /*
@@ -8566,7 +8570,6 @@
     bne     .LOP_SGET_BYTE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_CHAR */
 
     /*
@@ -8582,7 +8585,6 @@
     bne     .LOP_SGET_CHAR_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SGET_SHORT */
 
     /*
@@ -8598,7 +8600,6 @@
     bne     .LOP_SGET_SHORT_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT */
 
     /*
@@ -8614,7 +8615,6 @@
     bne     .LOP_SPUT_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_WIDE */
 
     /*
@@ -8634,7 +8634,6 @@
     bne     .LOP_SPUT_WIDE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_OBJECT */
 
     /*
@@ -8650,7 +8649,6 @@
     bne     .LOP_SPUT_OBJECT_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_BOOLEAN */
 
     /*
@@ -8666,7 +8664,6 @@
     bne     .LOP_SPUT_BOOLEAN_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_BYTE */
 
     /*
@@ -8682,7 +8679,6 @@
     bne     .LOP_SPUT_BYTE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_CHAR */
 
     /*
@@ -8698,7 +8694,6 @@
     bne     .LOP_SPUT_CHAR_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_SHORT */
 
     /*
@@ -8714,7 +8709,6 @@
     bne     .LOP_SPUT_SHORT_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_INVOKE_VIRTUAL */
 
     /*
@@ -8732,7 +8726,6 @@
     ldr     r0, [r3, r2, lsl #2]        @ r3<- vtable[methodIndex]
     bl      common_invokeMethodNoRange @ continue on
 
-
 /* continuation for OP_INVOKE_SUPER */
 
     /*
@@ -8767,7 +8760,6 @@
     ldr     r1, [r0, #offMethod_name]   @ r1<- method name
     b       common_errNoSuchMethod
 
-
 /* continuation for OP_INVOKE_DIRECT */
 
     /*
@@ -8785,7 +8777,6 @@
     bne     .LOP_INVOKE_DIRECT_finish          @ no, continue
     b       common_exceptionThrown      @ yes, handle exception
 
-
 /* continuation for OP_INVOKE_VIRTUAL_RANGE */
 
     /*
@@ -8803,7 +8794,6 @@
     ldr     r0, [r3, r2, lsl #2]        @ r3<- vtable[methodIndex]
     bl      common_invokeMethodRange @ continue on
 
-
 /* continuation for OP_INVOKE_SUPER_RANGE */
 
     /*
@@ -8838,7 +8828,6 @@
     ldr     r1, [r0, #offMethod_name]   @ r1<- method name
     b       common_errNoSuchMethod
 
-
 /* continuation for OP_INVOKE_DIRECT_RANGE */
 
     /*
@@ -8856,7 +8845,6 @@
     bne     .LOP_INVOKE_DIRECT_RANGE_finish          @ no, continue
     b       common_exceptionThrown      @ yes, handle exception
 
-
 /* continuation for OP_FLOAT_TO_LONG */
 /*
  * Convert the float in r0 to a long in r0/r1.
@@ -8894,7 +8882,6 @@
     bl      __aeabi_f2lz                @ convert float to long
     ldmfd   sp!, {r4, pc}
 
-
 /* continuation for OP_DOUBLE_TO_LONG */
 /*
  * Convert the double in r0/r1 to a long in r0/r1.
@@ -8945,7 +8932,6 @@
     add     sp, sp, #4
     ldmfd   sp!, {r4, r5, pc}
 
-
 /* continuation for OP_MUL_LONG */
 
 .LOP_MUL_LONG_finish:
@@ -8953,7 +8939,6 @@
     stmia   r0, {r9-r10}                @ vAA/vAA+1<- r9/r10
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_SHL_LONG */
 
 .LOP_SHL_LONG_finish:
@@ -8962,7 +8947,6 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_SHR_LONG */
 
 .LOP_SHR_LONG_finish:
@@ -8971,7 +8955,6 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_USHR_LONG */
 
 .LOP_USHR_LONG_finish:
@@ -8980,7 +8963,6 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_SHL_LONG_2ADDR */
 
 .LOP_SHL_LONG_2ADDR_finish:
@@ -8988,7 +8970,6 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_SHR_LONG_2ADDR */
 
 .LOP_SHR_LONG_2ADDR_finish:
@@ -8996,7 +8977,6 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_USHR_LONG_2ADDR */
 
 .LOP_USHR_LONG_2ADDR_finish:
@@ -9004,6 +8984,98 @@
     stmia   r9, {r0-r1}                 @ vAA/vAA+1<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
+/* continuation for OP_IGET_VOLATILE */
+
+    /*
+     * Currently:
+     *  r0 holds resolved field
+     *  r9 holds object
+     */
+.LOP_IGET_VOLATILE_finish:
+    @bl      common_squeak0
+    cmp     r9, #0                      @ check object for null
+    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
+    beq     common_errNullObject        @ object was null
+    ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    SMP_DMB                            @ acquiring load
+    mov     r2, rINST, lsr #8           @ r2<- A+
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    and     r2, r2, #15                 @ r2<- A
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SET_VREG(r0, r2)                    @ fp[A]<- r0
+    GOTO_OPCODE(ip)                     @ jump to next instruction
+
+/* continuation for OP_IPUT_VOLATILE */
+
+    /*
+     * Currently:
+     *  r0 holds resolved field
+     *  r9 holds object
+     */
+.LOP_IPUT_VOLATILE_finish:
+    @bl      common_squeak0
+    mov     r1, rINST, lsr #8           @ r1<- A+
+    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
+    and     r1, r1, #15                 @ r1<- A
+    cmp     r9, #0                      @ check object for null
+    GET_VREG(r0, r1)                    @ r0<- fp[A]
+    beq     common_errNullObject        @ object was null
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SMP_DMB                            @ releasing store
+    str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
+    GOTO_OPCODE(ip)                     @ jump to next instruction
+
+/* continuation for OP_SGET_VOLATILE */
+
+    /*
+     * Continuation if the field has not yet been resolved.
+     *  r1: BBBB field ref
+     */
+.LOP_SGET_VOLATILE_resolve:
+    ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw, so export now
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_SGET_VOLATILE_finish          @ yes, finish
+    b       common_exceptionThrown      @ no, handle exception
+
+/* continuation for OP_SPUT_VOLATILE */
+
+    /*
+     * Continuation if the field has not yet been resolved.
+     *  r1: BBBB field ref
+     */
+.LOP_SPUT_VOLATILE_resolve:
+    ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw, so export now
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_SPUT_VOLATILE_finish          @ yes, finish
+    b       common_exceptionThrown      @ no, handle exception
+
+/* continuation for OP_IGET_OBJECT_VOLATILE */
+
+    /*
+     * Currently:
+     *  r0 holds resolved field
+     *  r9 holds object
+     */
+.LOP_IGET_OBJECT_VOLATILE_finish:
+    @bl      common_squeak0
+    cmp     r9, #0                      @ check object for null
+    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
+    beq     common_errNullObject        @ object was null
+    ldr   r0, [r9, r3]                @ r0<- obj.field (8/16/32 bits)
+    SMP_DMB                            @ acquiring load
+    mov     r2, rINST, lsr #8           @ r2<- A+
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    and     r2, r2, #15                 @ r2<- A
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SET_VREG(r0, r2)                    @ fp[A]<- r0
+    GOTO_OPCODE(ip)                     @ jump to next instruction
 
 /* continuation for OP_IGET_WIDE_VOLATILE */
 
@@ -9016,9 +9088,9 @@
     cmp     r9, #0                      @ check object for null
     ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
     beq     common_errNullObject        @ object was null
-    .if 1
+    .if     1
     add     r0, r9, r3                  @ r0<- address of field
-    bl      android_quasiatomic_read_64 @ r0/r1<- contents of field
+    bl      dvmQuasiAtomicRead64        @ r0/r1<- contents of field
     .else
     ldrd    r0, [r9, r3]                @ r0/r1<- obj.field (64-bit align ok)
     .endif
@@ -9030,7 +9102,6 @@
     stmia   r3, {r0-r1}                 @ fp[A]<- r0/r1
     GOTO_OPCODE(ip)                     @ jump to next instruction
 
-
 /* continuation for OP_IPUT_WIDE_VOLATILE */
 
     /*
@@ -9048,15 +9119,14 @@
     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     ldmia   r2, {r0-r1}                 @ r0/r1<- fp[A]
     GET_INST_OPCODE(r10)                @ extract opcode from rINST
-    .if 1
+    .if     1
     add     r2, r9, r3                  @ r2<- target address
-    bl      android_quasiatomic_swap_64 @ stores r0/r1 into addr r2
+    bl      dvmQuasiAtomicSwap64        @ stores r0/r1 into addr r2
     .else
     strd    r0, [r9, r3]                @ obj.field (64 bits, aligned)<- r0/r1
     .endif
     GOTO_OPCODE(r10)                    @ jump to next instruction
 
-
 /* continuation for OP_SGET_WIDE_VOLATILE */
 
     /*
@@ -9074,7 +9144,6 @@
     bne     .LOP_SGET_WIDE_VOLATILE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_SPUT_WIDE_VOLATILE */
 
     /*
@@ -9094,7 +9163,6 @@
     bne     .LOP_SPUT_WIDE_VOLATILE_finish          @ yes, finish
     b       common_exceptionThrown      @ no, handle exception
 
-
 /* continuation for OP_EXECUTE_INLINE */
 
     /*
@@ -9130,7 +9198,6 @@
 .LOP_EXECUTE_INLINE_table:
     .word   gDvmInlineOpsTable
 
-
 /* continuation for OP_EXECUTE_INLINE_RANGE */
 
     /*
@@ -9160,6 +9227,56 @@
 .LOP_EXECUTE_INLINE_RANGE_table:
     .word   gDvmInlineOpsTable
 
+/* continuation for OP_IPUT_OBJECT_VOLATILE */
+
+    /*
+     * Currently:
+     *  r0 holds resolved field
+     *  r9 holds object
+     */
+.LOP_IPUT_OBJECT_VOLATILE_finish:
+    @bl      common_squeak0
+    mov     r1, rINST, lsr #8           @ r1<- A+
+    ldr     r3, [r0, #offInstField_byteOffset]  @ r3<- byte offset of field
+    and     r1, r1, #15                 @ r1<- A
+    cmp     r9, #0                      @ check object for null
+    GET_VREG(r0, r1)                    @ r0<- fp[A]
+    beq     common_errNullObject        @ object was null
+    FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
+    GET_INST_OPCODE(ip)                 @ extract opcode from rINST
+    SMP_DMB                            @ releasing store
+    str  r0, [r9, r3]                @ obj.field (8/16/32 bits)<- r0
+    GOTO_OPCODE(ip)                     @ jump to next instruction
+
+/* continuation for OP_SGET_OBJECT_VOLATILE */
+
+    /*
+     * Continuation if the field has not yet been resolved.
+     *  r1: BBBB field ref
+     */
+.LOP_SGET_OBJECT_VOLATILE_resolve:
+    ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw, so export now
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_SGET_OBJECT_VOLATILE_finish          @ yes, finish
+    b       common_exceptionThrown      @ no, handle exception
+
+/* continuation for OP_SPUT_OBJECT_VOLATILE */
+
+    /*
+     * Continuation if the field has not yet been resolved.
+     *  r1: BBBB field ref
+     */
+.LOP_SPUT_OBJECT_VOLATILE_resolve:
+    ldr     r2, [rGLUE, #offGlue_method]    @ r2<- current method
+    EXPORT_PC()                         @ resolve() could throw, so export now
+    ldr     r0, [r2, #offMethod_clazz]  @ r0<- method->clazz
+    bl      dvmResolveStaticField       @ r0<- resolved StaticField ptr
+    cmp     r0, #0                      @ success?
+    bne     .LOP_SPUT_OBJECT_VOLATILE_finish          @ yes, finish
+    b       common_exceptionThrown      @ no, handle exception
 
     .size   dvmAsmSisterStart, .-dvmAsmSisterStart
     .global dvmAsmSisterEnd
@@ -10392,4 +10509,3 @@
 .LstrPrintLong:
     .asciz  "<%lld>"
 
-
diff --git a/vm/mterp/out/InterpAsm-x86-atom.S b/vm/mterp/out/InterpAsm-x86-atom.S
index d32ff2f..d259f6e 100644
--- a/vm/mterp/out/InterpAsm-x86-atom.S
+++ b/vm/mterp/out/InterpAsm-x86-atom.S
@@ -528,7 +528,6 @@
     MTERP_ENTRY
 #endif
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE: /* 0x01 */
@@ -732,7 +731,6 @@
     movq        %xmm0, (rFP, rINST, 4)  # vA<- vB
     FGETOP_JMP  2, %eax                 # jump to next instruction; getop, jmp
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_WIDE_16: /* 0x06 */
@@ -1153,7 +1151,6 @@
     SET_VREG    %edx, rINST             # vAA<- glue->self->exception
     FGETOP_JMP  1, %eax                 # jump to next instruction; getop, jmp
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RETURN_VOID: /* 0x0e */
@@ -1179,7 +1176,6 @@
 
     jmp         common_returnFromMethod
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RETURN: /* 0x0f */
@@ -1240,8 +1236,6 @@
     jmp         common_returnFromMethod # jump to common return code
 
 
-
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RETURN_WIDE: /* 0x10 */
@@ -1341,7 +1335,6 @@
     jmp         common_returnFromMethod # jump to common return code
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_4: /* 0x12 */
@@ -1875,7 +1868,6 @@
 #endif
     FGETOP_JMP  1, %edx                 # jump to next instruction; getop, jmp
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MONITOR_EXIT: /* 0x1e */
@@ -1927,7 +1919,6 @@
     je          common_exceptionThrown  # handle exception
     FINISH_JMP  %edx                    # jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CHECK_CAST: /* 0x1f */
@@ -2419,7 +2410,6 @@
     movl        rINST, offThread_exception(%ecx) # thread->exception<- object
     jmp         common_exceptionThrown  # handle exception
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_GOTO: /* 0x28 */
@@ -2461,7 +2451,6 @@
     js          common_periodicChecks2  # do check on backwards branch
     FINISH_RB   %edx, %ecx              # jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_GOTO_16: /* 0x29 */
@@ -2543,7 +2532,6 @@
     jc          common_periodicChecks2  # do check on backwards branch
     FINISH_RB   %edx, %ecx              # jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_PACKED_SWITCH: /* 0x2b */
@@ -3975,7 +3963,6 @@
     call        common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_3F: /* 0x3f */
@@ -4032,7 +4019,6 @@
     call        common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_40: /* 0x40 */
@@ -4089,7 +4075,6 @@
     call        common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_41: /* 0x41 */
@@ -4146,7 +4131,6 @@
     call        common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_42: /* 0x42 */
@@ -4203,7 +4187,6 @@
     call        common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_43: /* 0x43 */
@@ -4260,7 +4243,6 @@
     call        common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET: /* 0x44 */
@@ -5876,8 +5858,6 @@
     jmp         .LOP_IPUT_OBJECT_finish
 
 
-
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IPUT_BOOLEAN: /* 0x5c */
@@ -6328,8 +6308,6 @@
     jmp         .LOP_SGET_OBJECT_finish
 
 
-
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SGET_BOOLEAN: /* 0x63 */
@@ -6395,7 +6373,6 @@
     jmp         .LOP_SGET_BOOLEAN_finish
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SGET_BYTE: /* 0x64 */
@@ -7377,7 +7354,6 @@
     call        common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_VIRTUAL_RANGE: /* 0x74 */
@@ -7851,7 +7827,6 @@
     call        common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_7A: /* 0x7a */
@@ -7908,7 +7883,6 @@
     call        common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_NEG_INT: /* 0x7b */
@@ -8111,9 +8085,6 @@
     FGETOP_JMP  1, %eax                 # jump to next instruction; getop, jmp
 
 
-
-
-
 /* ------------------------------ */
     .balign 64
 .L_OP_NOT_LONG: /* 0x7e */
@@ -8182,8 +8153,6 @@
     FGETOP_JMP  1, %eax                 # jump to next instruction; getop, jmp
 
 
-
-
 /* ------------------------------ */
     .balign 64
 .L_OP_NEG_FLOAT: /* 0x7f */
@@ -8319,9 +8288,6 @@
     FGETOP_JMP  1, %eax                 # jump to next instruction; getop, jmp
 
 
-
-
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INT_TO_LONG: /* 0x81 */
@@ -8408,7 +8374,6 @@
     movss       %xmm0, (rFP, rINST, 4)  # vA<- %xmm0
     FINISH      1                       # jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INT_TO_DOUBLE: /* 0x83 */
@@ -8598,7 +8563,6 @@
     fstpl       (rFP, %ecx, 4)          # vA<- FPU; (double) vB
     FGETOP_JMP  1, %eax                 # jump to next instruction; getop, jmp
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_FLOAT_TO_INT: /* 0x87 */
@@ -9066,7 +9030,6 @@
     SET_VREG    %ecx, rINST             # vA<- result
     FGETOP_JMP  1, %eax                 # jump to next instruction; getop, jmp
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_INT: /* 0x90 */
@@ -9135,8 +9098,6 @@
     OLD_JMP_4   %eax
 
 
-
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_INT: /* 0x91 */
@@ -9205,9 +9166,6 @@
     OLD_JMP_4   %eax
 
 
-
-
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_INT: /* 0x92 */
@@ -9330,7 +9288,6 @@
     .endif
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_INT: /* 0x94 */
@@ -9480,9 +9437,6 @@
     OLD_JMP_4   %eax
 
 
-
-
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_INT: /* 0x96 */
@@ -9551,8 +9505,6 @@
     OLD_JMP_4   %eax
 
 
-
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_INT: /* 0x97 */
@@ -9621,8 +9573,6 @@
     OLD_JMP_4   %eax
 
 
-
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHL_INT: /* 0x98 */
@@ -10468,7 +10418,6 @@
     movsd       %xmm1, (rFP, rINST, 4)  # vAA<- shifted vBB
     FINISH      2                       # jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_FLOAT: /* 0xa6 */
@@ -10751,7 +10700,6 @@
     fstps       (rFP, rINST, 4)         # vAA<- remainder; return of fmod
     FINISH      2                       # jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_DOUBLE: /* 0xab */
@@ -10989,7 +10937,6 @@
     FFETCH_ADV  2, %eax                 # %eax<- next instruction hi; fetch, advance
     FGETOP_JMP  2, %eax                 # jump to next instruction; getop, jmp
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_DOUBLE: /* 0xaf */
@@ -11108,8 +11055,6 @@
     OLD_JMP_4   %eax
 
 
-
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_INT_2ADDR: /* 0xb1 */
@@ -11180,8 +11125,6 @@
     OLD_JMP_4   %eax
 
 
-
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_INT_2ADDR: /* 0xb2 */
@@ -11300,7 +11243,6 @@
 
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_INT_2ADDR: /* 0xb4 */
@@ -11385,7 +11327,6 @@
 
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AND_INT_2ADDR: /* 0xb5 */
@@ -11456,8 +11397,6 @@
     OLD_JMP_4   %eax
 
 
-
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_INT_2ADDR: /* 0xb6 */
@@ -11528,8 +11467,6 @@
     OLD_JMP_4   %eax
 
 
-
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_INT_2ADDR: /* 0xb7 */
@@ -11600,8 +11537,6 @@
     OLD_JMP_4   %eax
 
 
-
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHL_INT_2ADDR: /* 0xb8 */
@@ -12385,7 +12320,6 @@
     movq        %xmm1, (rFP, rINST, 4)  # vA<- shifted vA
     FINISH      1                       # jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHR_LONG_2ADDR: /* 0xc4 */
@@ -12479,7 +12413,6 @@
     movq        %xmm1, (rFP, rINST, 4)  # vA<- shifted vA
     FINISH      1                       # jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_FLOAT_2ADDR: /* 0xc6 */
@@ -12769,9 +12702,6 @@
     fstps       (rFP, rINST, 4)
     FINISH      1                       # jump to next instruction
 
-
-
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_DOUBLE_2ADDR: /* 0xcb */
@@ -13018,7 +12948,6 @@
     fstpl       (rFP, %edx, 4)          # vAA<- result
     FINISH      1                       # jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_DOUBLE_2ADDR: /* 0xcf */
@@ -13729,7 +13658,6 @@
     SET_VREG    %edx, rINST             # vAA<- %edx; result
     FINISH      2                       # jump to next instruction
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_INT_LIT8: /* 0xda */
@@ -14353,8 +14281,7 @@
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E3: /* 0xe3 */
-/* File: x86-atom/OP_UNUSED_E3.S */
+.L_OP_IGET_VOLATILE: /* 0xe3 */
    /* Copyright (C) 2008 The Android Open Source Project
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
@@ -14371,47 +14298,18 @@
     */
 
    /*
-    * File: OP_UNUSED_E3.S
+    * File: stub.S
     */
 
-/* File: x86-atom/unused.S */
-   /* Copyright (C) 2008 The Android Open Source Project
-    *
-    * Licensed under the Apache License, Version 2.0 (the "License");
-    * you may not use this file except in compliance with the License.
-    * You may obtain a copy of the License at
-    *
-    * http://www.apache.org/licenses/LICENSE-2.0
-    *
-    * Unless required by applicable law or agreed to in writing, software
-    * distributed under the License is distributed on an "AS IS" BASIS,
-    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    * See the License for the specific language governing permissions and
-    * limitations under the License.
-    */
-
-   /*
-    * File: unused.S
-    *
-    * Code: Common code for unused bytecodes. Uses no subtitutions.
-    *
-    * For: all unused bytecodes
-    *
-    * Description: aborts if executed.
-    *
-    * Format: ØØ|op (10x)
-    *
-    * Syntax: op
-    */
-
-    call        common_abort
-
-
-
+    SAVE_PC_FP_TO_GLUE %edx             # save program counter and frame pointer
+    pushl       rGLUE                   # push parameter glue
+    call        dvmMterp_OP_IGET_VOLATILE      # call c-based implementation
+    lea         4(%esp), %esp
+    LOAD_PC_FP_FROM_GLUE                # restore program counter and frame pointer
+    FINISH_A                            # jump to next instruction
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E4: /* 0xe4 */
-/* File: x86-atom/OP_UNUSED_E4.S */
+.L_OP_IPUT_VOLATILE: /* 0xe4 */
    /* Copyright (C) 2008 The Android Open Source Project
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
@@ -14428,47 +14326,18 @@
     */
 
    /*
-    * File: OP_UNUSED_E4.S
+    * File: stub.S
     */
 
-/* File: x86-atom/unused.S */
-   /* Copyright (C) 2008 The Android Open Source Project
-    *
-    * Licensed under the Apache License, Version 2.0 (the "License");
-    * you may not use this file except in compliance with the License.
-    * You may obtain a copy of the License at
-    *
-    * http://www.apache.org/licenses/LICENSE-2.0
-    *
-    * Unless required by applicable law or agreed to in writing, software
-    * distributed under the License is distributed on an "AS IS" BASIS,
-    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    * See the License for the specific language governing permissions and
-    * limitations under the License.
-    */
-
-   /*
-    * File: unused.S
-    *
-    * Code: Common code for unused bytecodes. Uses no subtitutions.
-    *
-    * For: all unused bytecodes
-    *
-    * Description: aborts if executed.
-    *
-    * Format: ØØ|op (10x)
-    *
-    * Syntax: op
-    */
-
-    call        common_abort
-
-
-
+    SAVE_PC_FP_TO_GLUE %edx             # save program counter and frame pointer
+    pushl       rGLUE                   # push parameter glue
+    call        dvmMterp_OP_IPUT_VOLATILE      # call c-based implementation
+    lea         4(%esp), %esp
+    LOAD_PC_FP_FROM_GLUE                # restore program counter and frame pointer
+    FINISH_A                            # jump to next instruction
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E5: /* 0xe5 */
-/* File: x86-atom/OP_UNUSED_E5.S */
+.L_OP_SGET_VOLATILE: /* 0xe5 */
    /* Copyright (C) 2008 The Android Open Source Project
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
@@ -14485,47 +14354,18 @@
     */
 
    /*
-    * File: OP_UNUSED_E5.S
+    * File: stub.S
     */
 
-/* File: x86-atom/unused.S */
-   /* Copyright (C) 2008 The Android Open Source Project
-    *
-    * Licensed under the Apache License, Version 2.0 (the "License");
-    * you may not use this file except in compliance with the License.
-    * You may obtain a copy of the License at
-    *
-    * http://www.apache.org/licenses/LICENSE-2.0
-    *
-    * Unless required by applicable law or agreed to in writing, software
-    * distributed under the License is distributed on an "AS IS" BASIS,
-    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    * See the License for the specific language governing permissions and
-    * limitations under the License.
-    */
-
-   /*
-    * File: unused.S
-    *
-    * Code: Common code for unused bytecodes. Uses no subtitutions.
-    *
-    * For: all unused bytecodes
-    *
-    * Description: aborts if executed.
-    *
-    * Format: ØØ|op (10x)
-    *
-    * Syntax: op
-    */
-
-    call        common_abort
-
-
-
+    SAVE_PC_FP_TO_GLUE %edx             # save program counter and frame pointer
+    pushl       rGLUE                   # push parameter glue
+    call        dvmMterp_OP_SGET_VOLATILE      # call c-based implementation
+    lea         4(%esp), %esp
+    LOAD_PC_FP_FROM_GLUE                # restore program counter and frame pointer
+    FINISH_A                            # jump to next instruction
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E6: /* 0xe6 */
-/* File: x86-atom/OP_UNUSED_E6.S */
+.L_OP_SPUT_VOLATILE: /* 0xe6 */
    /* Copyright (C) 2008 The Android Open Source Project
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
@@ -14542,47 +14382,18 @@
     */
 
    /*
-    * File: OP_UNUSED_E6.S
+    * File: stub.S
     */
 
-/* File: x86-atom/unused.S */
-   /* Copyright (C) 2008 The Android Open Source Project
-    *
-    * Licensed under the Apache License, Version 2.0 (the "License");
-    * you may not use this file except in compliance with the License.
-    * You may obtain a copy of the License at
-    *
-    * http://www.apache.org/licenses/LICENSE-2.0
-    *
-    * Unless required by applicable law or agreed to in writing, software
-    * distributed under the License is distributed on an "AS IS" BASIS,
-    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    * See the License for the specific language governing permissions and
-    * limitations under the License.
-    */
-
-   /*
-    * File: unused.S
-    *
-    * Code: Common code for unused bytecodes. Uses no subtitutions.
-    *
-    * For: all unused bytecodes
-    *
-    * Description: aborts if executed.
-    *
-    * Format: ØØ|op (10x)
-    *
-    * Syntax: op
-    */
-
-    call        common_abort
-
-
-
+    SAVE_PC_FP_TO_GLUE %edx             # save program counter and frame pointer
+    pushl       rGLUE                   # push parameter glue
+    call        dvmMterp_OP_SPUT_VOLATILE      # call c-based implementation
+    lea         4(%esp), %esp
+    LOAD_PC_FP_FROM_GLUE                # restore program counter and frame pointer
+    FINISH_A                            # jump to next instruction
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E7: /* 0xe7 */
-/* File: x86-atom/OP_UNUSED_E7.S */
+.L_OP_IGET_OBJECT_VOLATILE: /* 0xe7 */
    /* Copyright (C) 2008 The Android Open Source Project
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
@@ -14599,43 +14410,15 @@
     */
 
    /*
-    * File: OP_UNUSED_E7.S
+    * File: stub.S
     */
 
-/* File: x86-atom/unused.S */
-   /* Copyright (C) 2008 The Android Open Source Project
-    *
-    * Licensed under the Apache License, Version 2.0 (the "License");
-    * you may not use this file except in compliance with the License.
-    * You may obtain a copy of the License at
-    *
-    * http://www.apache.org/licenses/LICENSE-2.0
-    *
-    * Unless required by applicable law or agreed to in writing, software
-    * distributed under the License is distributed on an "AS IS" BASIS,
-    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    * See the License for the specific language governing permissions and
-    * limitations under the License.
-    */
-
-   /*
-    * File: unused.S
-    *
-    * Code: Common code for unused bytecodes. Uses no subtitutions.
-    *
-    * For: all unused bytecodes
-    *
-    * Description: aborts if executed.
-    *
-    * Format: ØØ|op (10x)
-    *
-    * Syntax: op
-    */
-
-    call        common_abort
-
-
-
+    SAVE_PC_FP_TO_GLUE %edx             # save program counter and frame pointer
+    pushl       rGLUE                   # push parameter glue
+    call        dvmMterp_OP_IGET_OBJECT_VOLATILE      # call c-based implementation
+    lea         4(%esp), %esp
+    LOAD_PC_FP_FROM_GLUE                # restore program counter and frame pointer
+    FINISH_A                            # jump to next instruction
 /* ------------------------------ */
     .balign 64
 .L_OP_IGET_WIDE_VOLATILE: /* 0xe8 */
@@ -14798,7 +14581,7 @@
    /*
     * File: OP_THROW_VERIFICATION_ERROR.S
     *
-    * Code: 
+    * Code:
     *
     * For: throw-verification-error
     *
@@ -14978,7 +14761,6 @@
     call        common_abort
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IGET_QUICK: /* 0xf2 */
@@ -15065,8 +14847,6 @@
     movq        %xmm0, (rFP, rINST, 4)  # fp[A]<- %xmm0
     FGETOP_JMP  2, %eax                 # jump to next instruction; getop, jmp
 
-
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IGET_OBJECT_QUICK: /* 0xf4 */
@@ -15173,8 +14953,6 @@
     movl        rINST, (%eax, %ecx)     # object field<- vA
     FGETOP_JMP  2, %edx                 # jump to next instruction; getop, jmp
 
-
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IPUT_WIDE_QUICK: /* 0xf6 */
@@ -15218,7 +14996,6 @@
     movq        %xmm0, (%edx, %ecx)     # object field<- %xmm0; fp[A]
     FGETOP_JMP  2, %eax                 # jump to next instruction; getop, jmp
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IPUT_OBJECT_QUICK: /* 0xf7 */
@@ -15282,8 +15059,6 @@
     FGETOP_JMP  2, %edx                 # jump to next instruction; getop, jmp
 
 
-
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_VIRTUAL_QUICK: /* 0xf8 */
@@ -15326,8 +15101,6 @@
     movl        (%edx, %ecx, 4), %ecx   # %ecx<- vtable[methodIndex]
     jmp         common_invokeMethodNoRange # invoke method common code
 
-
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_VIRTUAL_QUICK_RANGE: /* 0xf9 */
@@ -15391,8 +15164,6 @@
     jmp         common_invokeMethodRange # invoke method common code
 
 
-
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_SUPER_QUICK: /* 0xfa */
@@ -15437,9 +15208,6 @@
     je          common_errNullObject    # handle null object
     jmp         common_invokeMethodNoRange # invoke method common code
 
-
-
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_SUPER_QUICK_RANGE: /* 0xfb */
@@ -15505,13 +15273,9 @@
     jmp         common_invokeMethodRange # invoke method common code
 
 
-
-
-
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_FC: /* 0xfc */
-/* File: x86-atom/OP_UNUSED_FC.S */
+.L_OP_IPUT_OBJECT_VOLATILE: /* 0xfc */
    /* Copyright (C) 2008 The Android Open Source Project
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
@@ -15528,47 +15292,18 @@
     */
 
    /*
-    * File: OP_UNUSED_FC.S
+    * File: stub.S
     */
 
-/* File: x86-atom/unused.S */
-   /* Copyright (C) 2008 The Android Open Source Project
-    *
-    * Licensed under the Apache License, Version 2.0 (the "License");
-    * you may not use this file except in compliance with the License.
-    * You may obtain a copy of the License at
-    *
-    * http://www.apache.org/licenses/LICENSE-2.0
-    *
-    * Unless required by applicable law or agreed to in writing, software
-    * distributed under the License is distributed on an "AS IS" BASIS,
-    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    * See the License for the specific language governing permissions and
-    * limitations under the License.
-    */
-
-   /*
-    * File: unused.S
-    *
-    * Code: Common code for unused bytecodes. Uses no subtitutions.
-    *
-    * For: all unused bytecodes
-    *
-    * Description: aborts if executed.
-    *
-    * Format: ØØ|op (10x)
-    *
-    * Syntax: op
-    */
-
-    call        common_abort
-
-
-
+    SAVE_PC_FP_TO_GLUE %edx             # save program counter and frame pointer
+    pushl       rGLUE                   # push parameter glue
+    call        dvmMterp_OP_IPUT_OBJECT_VOLATILE      # call c-based implementation
+    lea         4(%esp), %esp
+    LOAD_PC_FP_FROM_GLUE                # restore program counter and frame pointer
+    FINISH_A                            # jump to next instruction
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_FD: /* 0xfd */
-/* File: x86-atom/OP_UNUSED_FD.S */
+.L_OP_SGET_OBJECT_VOLATILE: /* 0xfd */
    /* Copyright (C) 2008 The Android Open Source Project
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
@@ -15585,47 +15320,18 @@
     */
 
    /*
-    * File: OP_UNUSED_FD.S
+    * File: stub.S
     */
 
-/* File: x86-atom/unused.S */
-   /* Copyright (C) 2008 The Android Open Source Project
-    *
-    * Licensed under the Apache License, Version 2.0 (the "License");
-    * you may not use this file except in compliance with the License.
-    * You may obtain a copy of the License at
-    *
-    * http://www.apache.org/licenses/LICENSE-2.0
-    *
-    * Unless required by applicable law or agreed to in writing, software
-    * distributed under the License is distributed on an "AS IS" BASIS,
-    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    * See the License for the specific language governing permissions and
-    * limitations under the License.
-    */
-
-   /*
-    * File: unused.S
-    *
-    * Code: Common code for unused bytecodes. Uses no subtitutions.
-    *
-    * For: all unused bytecodes
-    *
-    * Description: aborts if executed.
-    *
-    * Format: ØØ|op (10x)
-    *
-    * Syntax: op
-    */
-
-    call        common_abort
-
-
-
+    SAVE_PC_FP_TO_GLUE %edx             # save program counter and frame pointer
+    pushl       rGLUE                   # push parameter glue
+    call        dvmMterp_OP_SGET_OBJECT_VOLATILE      # call c-based implementation
+    lea         4(%esp), %esp
+    LOAD_PC_FP_FROM_GLUE                # restore program counter and frame pointer
+    FINISH_A                            # jump to next instruction
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_FE: /* 0xfe */
-/* File: x86-atom/OP_UNUSED_FE.S */
+.L_OP_SPUT_OBJECT_VOLATILE: /* 0xfe */
    /* Copyright (C) 2008 The Android Open Source Project
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
@@ -15642,43 +15348,15 @@
     */
 
    /*
-    * File: OP_UNUSED_FE.S
+    * File: stub.S
     */
 
-/* File: x86-atom/unused.S */
-   /* Copyright (C) 2008 The Android Open Source Project
-    *
-    * Licensed under the Apache License, Version 2.0 (the "License");
-    * you may not use this file except in compliance with the License.
-    * You may obtain a copy of the License at
-    *
-    * http://www.apache.org/licenses/LICENSE-2.0
-    *
-    * Unless required by applicable law or agreed to in writing, software
-    * distributed under the License is distributed on an "AS IS" BASIS,
-    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    * See the License for the specific language governing permissions and
-    * limitations under the License.
-    */
-
-   /*
-    * File: unused.S
-    *
-    * Code: Common code for unused bytecodes. Uses no subtitutions.
-    *
-    * For: all unused bytecodes
-    *
-    * Description: aborts if executed.
-    *
-    * Format: ØØ|op (10x)
-    *
-    * Syntax: op
-    */
-
-    call        common_abort
-
-
-
+    SAVE_PC_FP_TO_GLUE %edx             # save program counter and frame pointer
+    pushl       rGLUE                   # push parameter glue
+    call        dvmMterp_OP_SPUT_OBJECT_VOLATILE      # call c-based implementation
+    lea         4(%esp), %esp
+    LOAD_PC_FP_FROM_GLUE                # restore program counter and frame pointer
+    FINISH_A                            # jump to next instruction
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_FF: /* 0xff */
@@ -15736,7 +15414,6 @@
 
 
 
-
     .balign 64
     .size   dvmAsmInstructionStart, .-dvmAsmInstructionStart
     .global dvmAsmInstructionEnd
@@ -16112,7 +15789,6 @@
     SET_VREG    %eax, rINST             # vA<- pArray
     FINISH      2                       # jump to next instruction
 
-
 /* continuation for OP_FILLED_NEW_ARRAY */
 
 .LOP_FILLED_NEW_ARRAY_break:
@@ -16325,12 +16001,10 @@
 .LOP_PACKED_SWITCH_finish:
     FINISH_RB   %edx, %ecx              # jump to next instruction
 
-
 /* continuation for OP_SPARSE_SWITCH */
 .LOP_SPARSE_SWITCH_finish:
     FINISH_RB   %edx, %ecx              # jump to next instruction
 
-
 /* continuation for OP_CMPL_FLOAT */
 .LOP_CMPL_FLOAT_greater:
     movl        $0x1, (rFP, rINST, 4)  # vAA<- greater than
@@ -16397,8 +16071,6 @@
     movl        $0x1, (rFP, rINST, 4)  # vAA<- greater than
     FINISH      2                       # jump to next instruction
 
-
-
 /* continuation for OP_APUT_OBJECT */
 
 .LOP_APUT_OBJECT_finish:
@@ -16478,8 +16150,6 @@
     movq        %xmm0, (rFP, rINST, 4)  # vA<- %xmm0; object field
     FGETOP_JMP  2, %eax                 # jump to next instruction; getop, jmp
 
-
-
 /* continuation for OP_IGET_OBJECT */
 
 .LOP_IGET_OBJECT_finish:
@@ -16644,7 +16314,6 @@
     movl     rINST, (%edx, %ecx)     # object field<- vA
     FGETOP_JMP  2, %eax                 # jump to next instruction; getop, jmp
 
-
 /* continuation for OP_IPUT_WIDE */
 
 .LOP_IPUT_WIDE_finish2:
@@ -16675,8 +16344,6 @@
     movq        %xmm0, (%ecx, %edx)     # object field<- %xmm0; vA
     FGETOP_JMP  2, %eax                 # jump to next instruction; getop, jmp
 
-
-
 /* continuation for OP_IPUT_OBJECT */
 
 .LOP_IPUT_OBJECT_finish:
@@ -16706,7 +16373,6 @@
     movl     rINST, (%edx, %ecx)     # object field<- vA
     FGETOP_JMP  2, %eax                 # jump to next instruction; getop, jmp
 
-
 /* continuation for OP_IPUT_BOOLEAN */
 
 .LOP_IPUT_BOOLEAN_finish:
@@ -16736,7 +16402,6 @@
     movl     rINST, (%edx, %ecx)     # object field<- vA
     FGETOP_JMP  2, %eax                 # jump to next instruction; getop, jmp
 
-
 /* continuation for OP_IPUT_BYTE */
 
 .LOP_IPUT_BYTE_finish:
@@ -16766,7 +16431,6 @@
     movl     rINST, (%edx, %ecx)     # object field<- vA
     FGETOP_JMP  2, %eax                 # jump to next instruction; getop, jmp
 
-
 /* continuation for OP_IPUT_CHAR */
 
 .LOP_IPUT_CHAR_finish:
@@ -16796,7 +16460,6 @@
     movl     rINST, (%edx, %ecx)     # object field<- vA
     FGETOP_JMP  2, %eax                 # jump to next instruction; getop, jmp
 
-
 /* continuation for OP_IPUT_SHORT */
 
 .LOP_IPUT_SHORT_finish:
@@ -16826,7 +16489,6 @@
     movl     rINST, (%edx, %ecx)     # object field<- vA
     FGETOP_JMP  2, %eax                 # jump to next instruction; getop, jmp
 
-
 /* continuation for OP_SGET */
 
 .LOP_SGET_resolve:
@@ -17171,7 +16833,6 @@
     movl        (%edx, %eax, 4), %ecx   # %ecx<- vtable[methodIndex]
     jmp         common_invokeMethodNoRange # invoke method common code
 
-
 /* continuation for OP_INVOKE_SUPER */
 
 .LOP_INVOKE_SUPER_continue2:
@@ -17222,7 +16883,6 @@
     movl        offMethod_name(%ecx), %edx # %edx<- method name
     jmp         common_errNoSuchMethod
 
-
 /* continuation for OP_INVOKE_DIRECT */
 
    /*
@@ -17268,8 +16928,6 @@
     movl        %eax, %ecx              # %ecx<- method
     jmp         common_invokeMethodNoRange # invoke method common code
 
-
-
 /* continuation for OP_INVOKE_INTERFACE */
 .LOP_INVOKE_INTERFACE_break:
     movl        rGLUE, %ecx             # %ecx<- pMterpGlue
@@ -17323,7 +16981,6 @@
     movl        (%edx, %eax, 4), %ecx   # %ecx<- vtable[methodIndex]
     jmp         common_invokeMethodRange # invoke method common code
 
-
 /* continuation for OP_INVOKE_SUPER_RANGE */
 
 .LOP_INVOKE_SUPER_RANGE_continue2:
@@ -17374,7 +17031,6 @@
     movl        offMethod_name(%ecx), %edx # %edx<- method name
     jmp         common_errNoSuchMethod
 
-
 /* continuation for OP_INVOKE_DIRECT_RANGE */
 
    /*
@@ -17420,8 +17076,6 @@
     movl        %eax, %ecx              # %ecx<- method
     jmp         common_invokeMethodRange # invoke method common code
 
-
-
 /* continuation for OP_INVOKE_INTERFACE_RANGE */
 .LOP_INVOKE_INTERFACE_RANGE_break:
     movl        rGLUE, %ecx             # %ecx<- pMterpGlue
@@ -17498,8 +17152,6 @@
     movq        %xmm0, (rFP, %edx, 4)   # vA<- %xmm0; negInf
     FINISH      1                       # jump to next instruction
 
-
-
 /* continuation for OP_DOUBLE_TO_INT */
 
 .LOP_DOUBLE_TO_INT_break:
@@ -17528,7 +17180,6 @@
     movl        $0x80000000,  (rFP, %edx, 4) # vA<- negInf
     FINISH      1                       # jump to next instruction
 
-
 /* continuation for OP_DOUBLE_TO_LONG */
 
 .LOP_DOUBLE_TO_LONG_break:
@@ -17560,7 +17211,6 @@
     movq        %xmm0, (rFP, %edx, 4)   # vA<- %xmm0; negInf
     FINISH      1                       # jump to next instruction
 
-
 /* continuation for OP_DIV_INT */
 .LOP_DIV_INT_break:
     FFETCH_ADV  2 %eax
@@ -17602,7 +17252,6 @@
     movl        %eax, (rFP, rINST, 4)   # vAA<- results lo
     FINISH      2                       # jump to next instruction
 
-
 /* continuation for OP_DIV_LONG */
 .LOP_DIV_LONG_finish:
     movq        %xmm0, -16(%esp)        # push arg vBB,vBB+1
@@ -17636,7 +17285,6 @@
     movq        %xmm1, (rFP, rINST, 4)  # vAA<- shifted vBB
     FINISH      2                       # jump to next instruction
 
-
 /* continuation for OP_REM_DOUBLE */
 
 .LOP_REM_DOUBLE_break:
@@ -17646,7 +17294,6 @@
     fstpl       (rFP, rINST, 4)         # vAA<- remainder; return of fmod
     FINISH      2                       # jump to next instruction
 
-
 /* continuation for OP_DIV_INT_2ADDR */
 .LOP_DIV_INT_2ADDR_break:
     FFETCH_ADV  1, %edx                 # %ecx<- next instruction hi; fetch, advance
@@ -17657,7 +17304,6 @@
     .endif
     FGETOP_JMP  1, %edx                 # jump to next instruction; getop, jmp
 
-
 /* continuation for OP_REM_INT_2ADDR */
 .LOP_REM_INT_2ADDR_break:
     FFETCH_ADV  1, %edx                 # %ecx<- next instruction hi; fetch, advance
@@ -17668,7 +17314,6 @@
     .endif
     FGETOP_JMP  1, %edx                 # jump to next instruction; getop, jmp
 
-
 /* continuation for OP_MUL_LONG_2ADDR */
 
    /*
@@ -17692,7 +17337,6 @@
     movl        %eax, (rFP, %edx, 4)    # vA<- results lo
     FINISH      1                       # jump to next instruction
 
-
 /* continuation for OP_DIV_LONG_2ADDR */
 .LOP_DIV_LONG_2ADDR_break:
     movq        %xmm0, -20(%esp)        # push arg vA, vA+1
@@ -17726,8 +17370,6 @@
     movq        %xmm1, (rFP, rINST, 4)  # vAA<- shifted vBB
     FINISH      1                       # jump to next instruction
 
-
-
 /* continuation for OP_REM_DOUBLE_2ADDR */
 
 .LOP_REM_DOUBLE_2ADDR_break:
@@ -17737,14 +17379,6 @@
     fstpl       (rFP, rINST, 4)         # vAA<- remainder; return of fmod
     FINISH      1                       # jump to next instruction
 
-
-
-
-
-
-
-
-
 /* continuation for OP_DIV_INT_LIT16 */
 .LOP_DIV_INT_LIT16_break:
     movzbl      (rPC), %edx
@@ -17756,7 +17390,6 @@
     movzbl      1(rPC), rINST
     jmp         *dvmAsmInstructionJmpTable(, %edx, 4)
 
-
 /* continuation for OP_REM_INT_LIT16 */
 .LOP_REM_INT_LIT16_break:
     movzbl      (rPC), %edx
@@ -17768,7 +17401,6 @@
     movzbl      1(rPC), rINST
     jmp         *dvmAsmInstructionJmpTable(, %edx, 4)
 
-
 /* continuation for OP_DIV_INT_LIT8 */
 .LOP_DIV_INT_LIT8_break:
     movzbl      (rPC), %edx
diff --git a/vm/mterp/out/InterpAsm-x86.S b/vm/mterp/out/InterpAsm-x86.S
index 831586f..914b1d1 100644
--- a/vm/mterp/out/InterpAsm-x86.S
+++ b/vm/mterp/out/InterpAsm-x86.S
@@ -215,7 +215,6 @@
 #include "../common/asm-constants.h"
 
 
-
     .global dvmAsmInstructionStart
     .type   dvmAsmInstructionStart, %function
 dvmAsmInstructionStart = .L_OP_NOP
@@ -258,7 +257,6 @@
     SET_VREG (%ecx,%eax)              # fp[AA]<- ecx]
     GOTO_NEXT
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_16: /* 0x03 */
@@ -355,7 +353,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MOVE_OBJECT_16: /* 0x09 */
@@ -438,7 +435,6 @@
 /* File: x86/OP_RETURN_VOID.S */
     jmp       common_returnFromMethod
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_RETURN: /* 0x0f */
@@ -506,7 +502,6 @@
     SET_VREG(%eax,%ecx)
     GOTO_NEXT
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_16: /* 0x13 */
@@ -591,7 +586,6 @@
     ADVANCE_PC(5)
     GOTO_NEXT
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_WIDE_HIGH16: /* 0x19 */
@@ -607,7 +601,6 @@
     SET_VREG_WORD(%eax,%ecx,0)            # v[AA+0]<- eax
     GOTO_NEXT
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_CONST_STRING: /* 0x1a */
@@ -927,6 +920,7 @@
      */
     /* throw vAA */
     GET_GLUE(%ecx)
+    EXPORT_PC()
     movzbl   rINST_HI,rINST_FULL       # rINST_FULL<- AA
     GET_VREG(%eax,rINST_FULL)          # eax<- exception object
     movl     offGlue_self(%ecx),%ecx   # ecx<- glue->self
@@ -1422,7 +1416,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_NEZ: /* 0x39 */
@@ -1450,7 +1443,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_LTZ: /* 0x3a */
@@ -1478,7 +1470,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_GEZ: /* 0x3b */
@@ -1506,7 +1497,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_GTZ: /* 0x3c */
@@ -1534,7 +1524,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IF_LEZ: /* 0x3d */
@@ -1562,7 +1551,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_3E: /* 0x3e */
@@ -1637,7 +1625,6 @@
     ADVANCE_PC(2)
     GOTO_NEXT
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_WIDE: /* 0x45 */
@@ -1686,7 +1673,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_BOOLEAN: /* 0x47 */
@@ -1715,7 +1701,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_BYTE: /* 0x48 */
@@ -1744,7 +1729,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_CHAR: /* 0x49 */
@@ -1773,7 +1757,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_AGET_SHORT: /* 0x4a */
@@ -1802,7 +1785,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT: /* 0x4b */
@@ -1829,7 +1811,6 @@
     ADVANCE_PC(2)
     GOTO_NEXT
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT_WIDE: /* 0x4c */
@@ -1900,7 +1881,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT_BYTE: /* 0x4f */
@@ -1929,7 +1909,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT_CHAR: /* 0x50 */
@@ -1958,7 +1937,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_APUT_SHORT: /* 0x51 */
@@ -1987,7 +1965,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_IGET: /* 0x52 */
@@ -3621,7 +3598,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_INT: /* 0x91 */
@@ -3648,7 +3624,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_INT: /* 0x92 */
@@ -3749,7 +3724,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_OR_INT: /* 0x96 */
@@ -3776,7 +3750,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_INT: /* 0x97 */
@@ -3803,7 +3776,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHL_INT: /* 0x98 */
@@ -4211,7 +4183,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_FLOAT: /* 0xa7 */
@@ -4234,7 +4205,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_FLOAT: /* 0xa8 */
@@ -4257,7 +4227,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_FLOAT: /* 0xa9 */
@@ -4280,7 +4249,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_FLOAT: /* 0xaa */
@@ -4324,7 +4292,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SUB_DOUBLE: /* 0xac */
@@ -4347,7 +4314,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_MUL_DOUBLE: /* 0xad */
@@ -4370,7 +4336,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_DOUBLE: /* 0xae */
@@ -4393,7 +4358,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_REM_DOUBLE: /* 0xaf */
@@ -4660,7 +4624,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_SHR_INT_2ADDR: /* 0xb9 */
@@ -4683,7 +4646,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_USHR_INT_2ADDR: /* 0xba */
@@ -4706,7 +4668,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_ADD_LONG_2ADDR: /* 0xbb */
@@ -5407,7 +5368,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_INT_LIT16: /* 0xd7 */
@@ -5507,7 +5467,6 @@
     ADVANCE_PC(2)
     GOTO_NEXT
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_DIV_INT_LIT8: /* 0xdb */
@@ -5614,7 +5573,6 @@
     GOTO_NEXT
 
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_XOR_INT_LIT8: /* 0xdf */
@@ -5725,44 +5683,74 @@
 
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E3: /* 0xe3 */
-/* File: x86/OP_UNUSED_E3.S */
-/* File: x86/unused.S */
-    jmp     common_abort
-
-
+.L_OP_IGET_VOLATILE: /* 0xe3 */
+    /* (stub) */
+    GET_GLUE(%ecx)
+    SAVE_PC_TO_GLUE(%ecx)            # only need to export these two
+    SAVE_FP_TO_GLUE(%ecx)            # only need to export these two
+    movl %ecx,OUT_ARG0(%esp)         # glue is first arg to function
+    call      dvmMterp_OP_IGET_VOLATILE     # do the real work
+    GET_GLUE(%ecx)
+    LOAD_PC_FROM_GLUE(%ecx)          # retrieve updated values
+    LOAD_FP_FROM_GLUE(%ecx)          # retrieve updated values
+    FETCH_INST()
+    GOTO_NEXT
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E4: /* 0xe4 */
-/* File: x86/OP_UNUSED_E4.S */
-/* File: x86/unused.S */
-    jmp     common_abort
-
-
+.L_OP_IPUT_VOLATILE: /* 0xe4 */
+    /* (stub) */
+    GET_GLUE(%ecx)
+    SAVE_PC_TO_GLUE(%ecx)            # only need to export these two
+    SAVE_FP_TO_GLUE(%ecx)            # only need to export these two
+    movl %ecx,OUT_ARG0(%esp)         # glue is first arg to function
+    call      dvmMterp_OP_IPUT_VOLATILE     # do the real work
+    GET_GLUE(%ecx)
+    LOAD_PC_FROM_GLUE(%ecx)          # retrieve updated values
+    LOAD_FP_FROM_GLUE(%ecx)          # retrieve updated values
+    FETCH_INST()
+    GOTO_NEXT
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E5: /* 0xe5 */
-/* File: x86/OP_UNUSED_E5.S */
-/* File: x86/unused.S */
-    jmp     common_abort
-
-
+.L_OP_SGET_VOLATILE: /* 0xe5 */
+    /* (stub) */
+    GET_GLUE(%ecx)
+    SAVE_PC_TO_GLUE(%ecx)            # only need to export these two
+    SAVE_FP_TO_GLUE(%ecx)            # only need to export these two
+    movl %ecx,OUT_ARG0(%esp)         # glue is first arg to function
+    call      dvmMterp_OP_SGET_VOLATILE     # do the real work
+    GET_GLUE(%ecx)
+    LOAD_PC_FROM_GLUE(%ecx)          # retrieve updated values
+    LOAD_FP_FROM_GLUE(%ecx)          # retrieve updated values
+    FETCH_INST()
+    GOTO_NEXT
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E6: /* 0xe6 */
-/* File: x86/OP_UNUSED_E6.S */
-/* File: x86/unused.S */
-    jmp     common_abort
-
-
+.L_OP_SPUT_VOLATILE: /* 0xe6 */
+    /* (stub) */
+    GET_GLUE(%ecx)
+    SAVE_PC_TO_GLUE(%ecx)            # only need to export these two
+    SAVE_FP_TO_GLUE(%ecx)            # only need to export these two
+    movl %ecx,OUT_ARG0(%esp)         # glue is first arg to function
+    call      dvmMterp_OP_SPUT_VOLATILE     # do the real work
+    GET_GLUE(%ecx)
+    LOAD_PC_FROM_GLUE(%ecx)          # retrieve updated values
+    LOAD_FP_FROM_GLUE(%ecx)          # retrieve updated values
+    FETCH_INST()
+    GOTO_NEXT
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_E7: /* 0xe7 */
-/* File: x86/OP_UNUSED_E7.S */
-/* File: x86/unused.S */
-    jmp     common_abort
-
-
+.L_OP_IGET_OBJECT_VOLATILE: /* 0xe7 */
+    /* (stub) */
+    GET_GLUE(%ecx)
+    SAVE_PC_TO_GLUE(%ecx)            # only need to export these two
+    SAVE_FP_TO_GLUE(%ecx)            # only need to export these two
+    movl %ecx,OUT_ARG0(%esp)         # glue is first arg to function
+    call      dvmMterp_OP_IGET_OBJECT_VOLATILE     # do the real work
+    GET_GLUE(%ecx)
+    LOAD_PC_FROM_GLUE(%ecx)          # retrieve updated values
+    LOAD_FP_FROM_GLUE(%ecx)          # retrieve updated values
+    FETCH_INST()
+    GOTO_NEXT
 /* ------------------------------ */
     .balign 64
 .L_OP_IGET_WIDE_VOLATILE: /* 0xe8 */
@@ -5850,7 +5838,6 @@
     UNSPILL(rPC)
     jmp      common_exceptionThrown          # handle exception
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_EXECUTE_INLINE: /* 0xee */
@@ -6067,8 +6054,6 @@
     movl      (%eax,%ecx,4),%eax        # eax<- vtable[BBBB]
     jmp       common_invokeMethodNoRange
 
-
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_VIRTUAL_QUICK_RANGE: /* 0xf9 */
@@ -6096,8 +6081,6 @@
     jmp       common_invokeMethodRange
 
 
-
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_SUPER_QUICK: /* 0xfa */
@@ -6126,7 +6109,6 @@
     movl      (%ecx,%eax,4),%eax        # eax<- super->vtable[BBBB]
     jmp       common_invokeMethodNoRange
 
-
 /* ------------------------------ */
     .balign 64
 .L_OP_INVOKE_SUPER_QUICK_RANGE: /* 0xfb */
@@ -6157,31 +6139,48 @@
     jmp       common_invokeMethodRange
 
 
-
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_FC: /* 0xfc */
-/* File: x86/OP_UNUSED_FC.S */
-/* File: x86/unused.S */
-    jmp     common_abort
-
-
+.L_OP_IPUT_OBJECT_VOLATILE: /* 0xfc */
+    /* (stub) */
+    GET_GLUE(%ecx)
+    SAVE_PC_TO_GLUE(%ecx)            # only need to export these two
+    SAVE_FP_TO_GLUE(%ecx)            # only need to export these two
+    movl %ecx,OUT_ARG0(%esp)         # glue is first arg to function
+    call      dvmMterp_OP_IPUT_OBJECT_VOLATILE     # do the real work
+    GET_GLUE(%ecx)
+    LOAD_PC_FROM_GLUE(%ecx)          # retrieve updated values
+    LOAD_FP_FROM_GLUE(%ecx)          # retrieve updated values
+    FETCH_INST()
+    GOTO_NEXT
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_FD: /* 0xfd */
-/* File: x86/OP_UNUSED_FD.S */
-/* File: x86/unused.S */
-    jmp     common_abort
-
-
+.L_OP_SGET_OBJECT_VOLATILE: /* 0xfd */
+    /* (stub) */
+    GET_GLUE(%ecx)
+    SAVE_PC_TO_GLUE(%ecx)            # only need to export these two
+    SAVE_FP_TO_GLUE(%ecx)            # only need to export these two
+    movl %ecx,OUT_ARG0(%esp)         # glue is first arg to function
+    call      dvmMterp_OP_SGET_OBJECT_VOLATILE     # do the real work
+    GET_GLUE(%ecx)
+    LOAD_PC_FROM_GLUE(%ecx)          # retrieve updated values
+    LOAD_FP_FROM_GLUE(%ecx)          # retrieve updated values
+    FETCH_INST()
+    GOTO_NEXT
 /* ------------------------------ */
     .balign 64
-.L_OP_UNUSED_FE: /* 0xfe */
-/* File: x86/OP_UNUSED_FE.S */
-/* File: x86/unused.S */
-    jmp     common_abort
-
-
+.L_OP_SPUT_OBJECT_VOLATILE: /* 0xfe */
+    /* (stub) */
+    GET_GLUE(%ecx)
+    SAVE_PC_TO_GLUE(%ecx)            # only need to export these two
+    SAVE_FP_TO_GLUE(%ecx)            # only need to export these two
+    movl %ecx,OUT_ARG0(%esp)         # glue is first arg to function
+    call      dvmMterp_OP_SPUT_OBJECT_VOLATILE     # do the real work
+    GET_GLUE(%ecx)
+    LOAD_PC_FROM_GLUE(%ecx)          # retrieve updated values
+    LOAD_FP_FROM_GLUE(%ecx)          # retrieve updated values
+    FETCH_INST()
+    GOTO_NEXT
 /* ------------------------------ */
     .balign 64
 .L_OP_UNUSED_FF: /* 0xff */
@@ -6230,7 +6229,6 @@
     ADVANCE_PC(2)
     GOTO_NEXT
 
-
 /* continuation for OP_CONST_STRING_JUMBO */
 
 /* This is the less common path, so we'll redo some work
@@ -6254,7 +6252,6 @@
     ADVANCE_PC(3)
     GOTO_NEXT
 
-
 /* continuation for OP_CONST_CLASS */
 
 /* This is the less common path, so we'll redo some work
@@ -6279,7 +6276,6 @@
     ADVANCE_PC(2)
     GOTO_NEXT
 
-
 /* continuation for OP_MONITOR_ENTER */
 
 .LOP_MONITOR_ENTER_continue:
@@ -6436,7 +6432,6 @@
     movl    offObject_clazz(%eax),%eax  # eax<- obj->clazz
     jmp     .LOP_INSTANCE_OF_resolved
 
-
 /* continuation for OP_NEW_INSTANCE */
 
 .LOP_NEW_INSTANCE_initialized:  # on entry, ecx<- class
@@ -6505,9 +6500,6 @@
     UNSPILL(rPC)
     jmp     common_exceptionThrown
 
-
-
-
 /* continuation for OP_NEW_ARRAY */
 
     /*
@@ -6554,7 +6546,6 @@
     ADVANCE_PC(2)
     GOTO_NEXT
 
-
 /* continuation for OP_FILLED_NEW_ARRAY */
 
 .LOP_FILLED_NEW_ARRAY_more:
@@ -6659,7 +6650,6 @@
     UNSPILL(rPC)
     jmp     common_exceptionThrown
 
-
 /* continuation for OP_FILLED_NEW_ARRAY_RANGE */
 
 .LOP_FILLED_NEW_ARRAY_RANGE_more:
@@ -6764,7 +6754,6 @@
     UNSPILL(rPC)
     jmp     common_exceptionThrown
 
-
 /* continuation for OP_CMPL_FLOAT */
 
 .LOP_CMPL_FLOAT_isNaN:
@@ -6816,7 +6805,6 @@
     ADVANCE_PC(2)
     GOTO_NEXT
 
-
 /* continuation for OP_APUT_WIDE */
 
 .LOP_APUT_WIDE_finish:
@@ -6829,7 +6817,6 @@
     ADVANCE_PC(2)
     GOTO_NEXT
 
-
 /* continuation for OP_APUT_OBJECT */
 
     /* On entry:
@@ -6859,7 +6846,6 @@
     ADVANCE_PC(2)
     GOTO_NEXT
 
-
 /* continuation for OP_IGET */
 
 
@@ -6897,7 +6883,6 @@
     ADVANCE_PC(2)
     GOTO_NEXT
 
-
 /* continuation for OP_IGET_WIDE */
 
 
@@ -6937,7 +6922,6 @@
     ADVANCE_PC(2)
     GOTO_NEXT
 
-
 /* continuation for OP_IGET_OBJECT */
 
 
@@ -6975,7 +6959,6 @@
     ADVANCE_PC(2)
     GOTO_NEXT
 
-
 /* continuation for OP_IGET_BOOLEAN */
 
 
@@ -7013,7 +6996,6 @@
     ADVANCE_PC(2)
     GOTO_NEXT
 
-
 /* continuation for OP_IGET_BYTE */
 
 
@@ -7051,7 +7033,6 @@
     ADVANCE_PC(2)
     GOTO_NEXT
 
-
 /* continuation for OP_IGET_CHAR */
 
 
@@ -7089,7 +7070,6 @@
     ADVANCE_PC(2)
     GOTO_NEXT
 
-
 /* continuation for OP_IGET_SHORT */
 
 
@@ -7127,7 +7107,6 @@
     ADVANCE_PC(2)
     GOTO_NEXT
 
-
 /* continuation for OP_IPUT */
 
 
@@ -7403,7 +7382,6 @@
     jne      .LOP_SGET_finish                 # success, continue
     jmp      common_exceptionThrown             # no, handle exception
 
-
 /* continuation for OP_SGET_WIDE */
 
     /*
@@ -7424,7 +7402,6 @@
     jne      .LOP_SGET_WIDE_finish                 # success, continue
     jmp      common_exceptionThrown             # no, handle exception
 
-
 /* continuation for OP_SGET_OBJECT */
 
     /*
@@ -7445,7 +7422,6 @@
     jne      .LOP_SGET_OBJECT_finish                 # success, continue
     jmp      common_exceptionThrown             # no, handle exception
 
-
 /* continuation for OP_SGET_BOOLEAN */
 
     /*
@@ -7466,7 +7442,6 @@
     jne      .LOP_SGET_BOOLEAN_finish                 # success, continue
     jmp      common_exceptionThrown             # no, handle exception
 
-
 /* continuation for OP_SGET_BYTE */
 
     /*
@@ -7487,7 +7462,6 @@
     jne      .LOP_SGET_BYTE_finish                 # success, continue
     jmp      common_exceptionThrown             # no, handle exception
 
-
 /* continuation for OP_SGET_CHAR */
 
     /*
@@ -7508,7 +7482,6 @@
     jne      .LOP_SGET_CHAR_finish                 # success, continue
     jmp      common_exceptionThrown             # no, handle exception
 
-
 /* continuation for OP_SGET_SHORT */
 
     /*
@@ -7529,7 +7502,6 @@
     jne      .LOP_SGET_SHORT_finish                 # success, continue
     jmp      common_exceptionThrown             # no, handle exception
 
-
 /* continuation for OP_SPUT */
 
     /*
@@ -7550,7 +7522,6 @@
     jne      .LOP_SPUT_finish                 # success, continue
     jmp      common_exceptionThrown             # no, handle exception
 
-
 /* continuation for OP_SPUT_WIDE */
 
     /*
@@ -7571,7 +7542,6 @@
     jne      .LOP_SPUT_WIDE_finish                 # success, continue
     jmp      common_exceptionThrown             # no, handle exception
 
-
 /* continuation for OP_SPUT_OBJECT */
 
     /*
@@ -7592,7 +7562,6 @@
     jne      .LOP_SPUT_OBJECT_finish                 # success, continue
     jmp      common_exceptionThrown             # no, handle exception
 
-
 /* continuation for OP_SPUT_BOOLEAN */
 
     /*
@@ -7613,7 +7582,6 @@
     jne      .LOP_SPUT_BOOLEAN_finish                 # success, continue
     jmp      common_exceptionThrown             # no, handle exception
 
-
 /* continuation for OP_SPUT_BYTE */
 
     /*
@@ -7634,7 +7602,6 @@
     jne      .LOP_SPUT_BYTE_finish                 # success, continue
     jmp      common_exceptionThrown             # no, handle exception
 
-
 /* continuation for OP_SPUT_CHAR */
 
     /*
@@ -7655,7 +7622,6 @@
     jne      .LOP_SPUT_CHAR_finish                 # success, continue
     jmp      common_exceptionThrown             # no, handle exception
 
-
 /* continuation for OP_SPUT_SHORT */
 
     /*
@@ -7676,7 +7642,6 @@
     jne      .LOP_SPUT_SHORT_finish                 # success, continue
     jmp      common_exceptionThrown             # no, handle exception
 
-
 /* continuation for OP_INVOKE_VIRTUAL */
 
 
@@ -7708,7 +7673,6 @@
     movl      (%ecx,%eax,4),%eax        # eax<- vtable[methodIndex]
     jmp       common_invokeMethodNoRange
 
-
 /* continuation for OP_INVOKE_SUPER */
 
     /*
@@ -7791,7 +7755,6 @@
     jne       common_invokeMethodNoRange
     jmp       common_exceptionThrown
 
-
 /* continuation for OP_INVOKE_INTERFACE */
 
 .LOP_INVOKE_INTERFACE_continue:
@@ -7801,7 +7764,6 @@
     je         common_exceptionThrown
     jmp        common_invokeMethodNoRange
 
-
 /* continuation for OP_INVOKE_VIRTUAL_RANGE */
 
 
@@ -7833,7 +7795,6 @@
     movl      (%ecx,%eax,4),%eax        # eax<- vtable[methodIndex]
     jmp       common_invokeMethodRange
 
-
 /* continuation for OP_INVOKE_SUPER_RANGE */
 
     /*
@@ -7916,7 +7877,6 @@
     jne       common_invokeMethodRange
     jmp       common_exceptionThrown
 
-
 /* continuation for OP_INVOKE_INTERFACE_RANGE */
 
 .LOP_INVOKE_INTERFACE_RANGE_continue:
@@ -7926,7 +7886,6 @@
     je         common_exceptionThrown
     jmp        common_invokeMethodRange
 
-
 /* continuation for OP_FLOAT_TO_INT */
 
 
@@ -8096,7 +8055,6 @@
     ADVANCE_PC(2)
     GOTO_NEXT
 
-
 /* continuation for OP_DIV_LONG */
 
 .LOP_DIV_LONG_continue:
@@ -8129,9 +8087,6 @@
     movl     $0x80000000,%edx
     jmp      .LOP_DIV_LONG_finish
 
-
-
-
 /* continuation for OP_REM_LONG */
 
 .LOP_REM_LONG_continue:
@@ -8164,9 +8119,6 @@
     movl     $0,%edx
     jmp      .LOP_REM_LONG_finish
 
-
-
-
 /* continuation for OP_SHL_LONG */
 
 .LOP_SHL_LONG_finish:
@@ -8226,7 +8178,6 @@
     ADVANCE_PC(1)
     GOTO_NEXT
 
-
 /* continuation for OP_DIV_LONG_2ADDR */
 
 .LOP_DIV_LONG_2ADDR_continue:
@@ -8262,7 +8213,6 @@
     movl     $0x80000000,%edx
     jmp      .LOP_DIV_LONG_2ADDR_finish
 
-
 /* continuation for OP_REM_LONG_2ADDR */
 
 .LOP_REM_LONG_2ADDR_continue:
@@ -8298,7 +8248,6 @@
     movl     $0,%edx
     jmp      .LOP_REM_LONG_2ADDR_finish
 
-
 /* continuation for OP_SHL_LONG_2ADDR */
 
 
@@ -8412,7 +8361,6 @@
     jmp       *gDvmInlineOpsTable(%eax)
     # will return to caller of .LOP_EXECUTE_INLINE_continue
 
-
     .size   dvmAsmSisterStart, .-dvmAsmSisterStart
     .global dvmAsmSisterEnd
 dvmAsmSisterEnd:
@@ -9075,4 +9023,3 @@
 .LstrFilledNewArrayNotImpl:
     .asciz  "filled-new-array only implemented for 'int'"
 
-
diff --git a/vm/mterp/out/InterpC-allstubs.c b/vm/mterp/out/InterpC-allstubs.c
index ea1de07..39cd6ba 100644
--- a/vm/mterp/out/InterpC-allstubs.c
+++ b/vm/mterp/out/InterpC-allstubs.c
@@ -422,7 +422,8 @@
 #define INTERP_TYPE INTERP_STD
 #define CHECK_DEBUG_AND_PROF() ((void)0)
 # define CHECK_TRACKED_REFS() ((void)0)
-#define CHECK_JIT() (0)
+#define CHECK_JIT_BOOL() (false)
+#define CHECK_JIT_VOID()
 #define ABORT_JIT_TSELECT() ((void)0)
 
 /*
@@ -1762,7 +1763,6 @@
     FINISH(2);
 OP_END
 
-
 /* File: c/OP_FILLED_NEW_ARRAY.c */
 HANDLE_OPCODE(OP_FILLED_NEW_ARRAY /*vB, {vD, vE, vF, vG, vA}, class@CCCC*/)
     GOTO_invoke(filledNewArray, false);
@@ -1790,7 +1790,7 @@
             arrayData >= curMethod->insns + dvmGetMethodInsnsSize(curMethod))
         {
             /* should have been caught in verifier */
-            dvmThrowException("Ljava/lang/InternalError;", 
+            dvmThrowException("Ljava/lang/InternalError;",
                               "bad fill array data");
             GOTO_exceptionThrown();
         }
@@ -1808,10 +1808,17 @@
     {
         Object* obj;
 
+        /*
+         * We don't create an exception here, but the process of searching
+         * for a catch block can do class lookups and throw exceptions.
+         * We need to update the saved PC.
+         */
+        EXPORT_PC();
+
         vsrc1 = INST_AA(inst);
         ILOGV("|throw v%d  (%p)", vsrc1, (void*)GET_REGISTER(vsrc1));
         obj = (Object*) GET_REGISTER(vsrc1);
-        if (!checkForNullExportPC(obj, fp, pc)) {
+        if (!checkForNull(obj)) {
             /* will throw a null pointer exception */
             LOGVV("Bad exception\n");
         } else {
@@ -2093,8 +2100,9 @@
             }
         }
         ILOGV("+ APUT[%d]=0x%08x", GET_REGISTER(vsrc2), GET_REGISTER(vdst));
-        ((u4*) arrayObj->contents)[GET_REGISTER(vsrc2)] =
-            GET_REGISTER(vdst);
+        dvmSetObjectArrayElement(arrayObj,
+                                 GET_REGISTER(vsrc2),
+                                 (Object *)GET_REGISTER(vdst));
     }
     FINISH(2);
 OP_END
@@ -2772,24 +2780,24 @@
 HANDLE_OP_SHX_INT_LIT8(OP_USHR_INT_LIT8,  "ushr", (u4), >>)
 OP_END
 
-/* File: c/OP_UNUSED_E3.c */
-HANDLE_OPCODE(OP_UNUSED_E3)
+/* File: c/OP_IGET_VOLATILE.c */
+HANDLE_IGET_X(OP_IGET_VOLATILE,         "-volatile", IntVolatile, )
 OP_END
 
-/* File: c/OP_UNUSED_E4.c */
-HANDLE_OPCODE(OP_UNUSED_E4)
+/* File: c/OP_IPUT_VOLATILE.c */
+HANDLE_IPUT_X(OP_IPUT_VOLATILE,         "-volatile", IntVolatile, )
 OP_END
 
-/* File: c/OP_UNUSED_E5.c */
-HANDLE_OPCODE(OP_UNUSED_E5)
+/* File: c/OP_SGET_VOLATILE.c */
+HANDLE_SGET_X(OP_SGET_VOLATILE,         "-volatile", IntVolatile, )
 OP_END
 
-/* File: c/OP_UNUSED_E6.c */
-HANDLE_OPCODE(OP_UNUSED_E6)
+/* File: c/OP_SPUT_VOLATILE.c */
+HANDLE_SPUT_X(OP_SPUT_VOLATILE,         "-volatile", IntVolatile, )
 OP_END
 
-/* File: c/OP_UNUSED_E7.c */
-HANDLE_OPCODE(OP_UNUSED_E7)
+/* File: c/OP_IGET_OBJECT_VOLATILE.c */
+HANDLE_IGET_X(OP_IGET_OBJECT_VOLATILE,  "-object-volatile", ObjectVolatile, _AS_OBJECT)
 OP_END
 
 /* File: c/OP_IGET_WIDE_VOLATILE.c */
@@ -3019,16 +3027,16 @@
     GOTO_invoke(invokeSuperQuick, true);
 OP_END
 
-/* File: c/OP_UNUSED_FC.c */
-HANDLE_OPCODE(OP_UNUSED_FC)
+/* File: c/OP_IPUT_OBJECT_VOLATILE.c */
+HANDLE_IPUT_X(OP_IPUT_OBJECT_VOLATILE,  "-object-volatile", ObjectVolatile, _AS_OBJECT)
 OP_END
 
-/* File: c/OP_UNUSED_FD.c */
-HANDLE_OPCODE(OP_UNUSED_FD)
+/* File: c/OP_SGET_OBJECT_VOLATILE.c */
+HANDLE_SGET_X(OP_SGET_OBJECT_VOLATILE,  "-object-volatile", ObjectVolatile, _AS_OBJECT)
 OP_END
 
-/* File: c/OP_UNUSED_FE.c */
-HANDLE_OPCODE(OP_UNUSED_FE)
+/* File: c/OP_SPUT_OBJECT_VOLATILE.c */
+HANDLE_SPUT_X(OP_SPUT_OBJECT_VOLATILE,  "-object-volatile", ObjectVolatile, _AS_OBJECT)
 OP_END
 
 /* File: c/OP_UNUSED_FF.c */
@@ -3123,7 +3131,6 @@
     longjmp(*pJmpBuf, ((int)changeInterp)+1);
 }
 
-
 /* File: c/gotoTargets.c */
 /*
  * C footer.  This has some common code shared by the various targets.
@@ -3221,6 +3228,9 @@
                 vdst >>= 4;
             }
         }
+        if (typeCh == 'L' || typeCh == '[') {
+            dvmWriteBarrierArray(newArray, 0, newArray->length);
+        }
 
         retval.l = newArray;
     }
@@ -3671,7 +3681,7 @@
             LOGVV("+++ returned into break frame\n");
 #if defined(WITH_JIT)
             /* Let the Jit know the return is terminating normally */
-            CHECK_JIT();
+            CHECK_JIT_VOID();
 #endif
             GOTO_bail();
         }
@@ -4046,7 +4056,7 @@
 
 #if defined(WITH_JIT)
             /* Allow the Jit to end any pending trace building */
-            CHECK_JIT();
+            CHECK_JIT_VOID();
 #endif
 
             /*
diff --git a/vm/mterp/out/InterpC-armv4t.c b/vm/mterp/out/InterpC-armv4t.c
index 76c8664..55a020d 100644
--- a/vm/mterp/out/InterpC-armv4t.c
+++ b/vm/mterp/out/InterpC-armv4t.c
@@ -422,7 +422,8 @@
 #define INTERP_TYPE INTERP_STD
 #define CHECK_DEBUG_AND_PROF() ((void)0)
 # define CHECK_TRACKED_REFS() ((void)0)
-#define CHECK_JIT() (0)
+#define CHECK_JIT_BOOL() (false)
+#define CHECK_JIT_VOID()
 #define ABORT_JIT_TSELECT() ((void)0)
 
 /*
diff --git a/vm/mterp/out/InterpC-armv5te-vfp.c b/vm/mterp/out/InterpC-armv5te-vfp.c
index a991c2b..8e58f8b 100644
--- a/vm/mterp/out/InterpC-armv5te-vfp.c
+++ b/vm/mterp/out/InterpC-armv5te-vfp.c
@@ -422,7 +422,8 @@
 #define INTERP_TYPE INTERP_STD
 #define CHECK_DEBUG_AND_PROF() ((void)0)
 # define CHECK_TRACKED_REFS() ((void)0)
-#define CHECK_JIT() (0)
+#define CHECK_JIT_BOOL() (false)
+#define CHECK_JIT_VOID()
 #define ABORT_JIT_TSELECT() ((void)0)
 
 /*
diff --git a/vm/mterp/out/InterpC-armv5te.c b/vm/mterp/out/InterpC-armv5te.c
index 21ed408..d3c041f 100644
--- a/vm/mterp/out/InterpC-armv5te.c
+++ b/vm/mterp/out/InterpC-armv5te.c
@@ -422,7 +422,8 @@
 #define INTERP_TYPE INTERP_STD
 #define CHECK_DEBUG_AND_PROF() ((void)0)
 # define CHECK_TRACKED_REFS() ((void)0)
-#define CHECK_JIT() (0)
+#define CHECK_JIT_BOOL() (false)
+#define CHECK_JIT_VOID()
 #define ABORT_JIT_TSELECT() ((void)0)
 
 /*
diff --git a/vm/mterp/out/InterpC-armv7-a-neon.c b/vm/mterp/out/InterpC-armv7-a-neon.c
index a9de36f..77b1fce 100644
--- a/vm/mterp/out/InterpC-armv7-a-neon.c
+++ b/vm/mterp/out/InterpC-armv7-a-neon.c
@@ -422,7 +422,8 @@
 #define INTERP_TYPE INTERP_STD
 #define CHECK_DEBUG_AND_PROF() ((void)0)
 # define CHECK_TRACKED_REFS() ((void)0)
-#define CHECK_JIT() (0)
+#define CHECK_JIT_BOOL() (false)
+#define CHECK_JIT_VOID()
 #define ABORT_JIT_TSELECT() ((void)0)
 
 /*
diff --git a/vm/mterp/out/InterpC-armv7-a.c b/vm/mterp/out/InterpC-armv7-a.c
index 3dfca56..7f46f4f 100644
--- a/vm/mterp/out/InterpC-armv7-a.c
+++ b/vm/mterp/out/InterpC-armv7-a.c
@@ -422,7 +422,8 @@
 #define INTERP_TYPE INTERP_STD
 #define CHECK_DEBUG_AND_PROF() ((void)0)
 # define CHECK_TRACKED_REFS() ((void)0)
-#define CHECK_JIT() (0)
+#define CHECK_JIT_BOOL() (false)
+#define CHECK_JIT_VOID()
 #define ABORT_JIT_TSELECT() ((void)0)
 
 /*
diff --git a/vm/mterp/out/InterpC-portdbg.c b/vm/mterp/out/InterpC-portdbg.c
index bcc6b99..9468b24 100644
--- a/vm/mterp/out/InterpC-portdbg.c
+++ b/vm/mterp/out/InterpC-portdbg.c
@@ -425,10 +425,12 @@
     checkDebugAndProf(pc, fp, self, curMethod, &debugIsMethodEntry)
 
 #if defined(WITH_JIT)
-#define CHECK_JIT() (dvmCheckJit(pc, self, interpState))
+#define CHECK_JIT_BOOL() (dvmCheckJit(pc, self, interpState))
+#define CHECK_JIT_VOID() (dvmCheckJit(pc, self, interpState))
 #define ABORT_JIT_TSELECT() (dvmJitAbortTraceSelect(interpState))
 #else
-#define CHECK_JIT() (0)
+#define CHECK_JIT_BOOL() (false)
+#define CHECK_JIT_VOID()
 #define ABORT_JIT_TSELECT(x) ((void)0)
 #endif
 
@@ -465,7 +467,7 @@
         inst = FETCH(0);                                                    \
         CHECK_DEBUG_AND_PROF();                                             \
         CHECK_TRACKED_REFS();                                               \
-        if (CHECK_JIT()) GOTO_bail_switch();                                \
+        if (CHECK_JIT_BOOL()) GOTO_bail_switch();                           \
         goto *handlerTable[INST_INST(inst)];                                \
     }
 # define FINISH_BKPT(_opcode) {                                             \
@@ -1292,7 +1294,7 @@
                 if (pCtrl->size == SS_MIN) {
                     doStop = true;
                     msg = "new instruction";
-                } else if (!dvmAddressSetGet(pCtrl->pAddressSet, 
+                } else if (!dvmAddressSetGet(pCtrl->pAddressSet,
                             pc - method->insns)) {
                     doStop = true;
                     msg = "new line";
@@ -1442,7 +1444,6 @@
 #endif
 }
 
-
 /* File: portable/entry.c */
 /*
  * Main interpreter loop.
@@ -1543,7 +1544,7 @@
         /* just fall through to instruction loop or threaded kickstart */
         break;
     case kInterpEntryReturn:
-        CHECK_JIT();
+        CHECK_JIT_VOID();
         goto returnFromMethod;
     case kInterpEntryThrow:
         goto exceptionThrown;
@@ -2128,7 +2129,6 @@
     FINISH(2);
 OP_END
 
-
 /* File: c/OP_FILLED_NEW_ARRAY.c */
 HANDLE_OPCODE(OP_FILLED_NEW_ARRAY /*vB, {vD, vE, vF, vG, vA}, class@CCCC*/)
     GOTO_invoke(filledNewArray, false);
@@ -2156,7 +2156,7 @@
             arrayData >= curMethod->insns + dvmGetMethodInsnsSize(curMethod))
         {
             /* should have been caught in verifier */
-            dvmThrowException("Ljava/lang/InternalError;", 
+            dvmThrowException("Ljava/lang/InternalError;",
                               "bad fill array data");
             GOTO_exceptionThrown();
         }
@@ -2174,10 +2174,17 @@
     {
         Object* obj;
 
+        /*
+         * We don't create an exception here, but the process of searching
+         * for a catch block can do class lookups and throw exceptions.
+         * We need to update the saved PC.
+         */
+        EXPORT_PC();
+
         vsrc1 = INST_AA(inst);
         ILOGV("|throw v%d  (%p)", vsrc1, (void*)GET_REGISTER(vsrc1));
         obj = (Object*) GET_REGISTER(vsrc1);
-        if (!checkForNullExportPC(obj, fp, pc)) {
+        if (!checkForNull(obj)) {
             /* will throw a null pointer exception */
             LOGVV("Bad exception\n");
         } else {
@@ -2459,8 +2466,9 @@
             }
         }
         ILOGV("+ APUT[%d]=0x%08x", GET_REGISTER(vsrc2), GET_REGISTER(vdst));
-        ((u4*) arrayObj->contents)[GET_REGISTER(vsrc2)] =
-            GET_REGISTER(vdst);
+        dvmSetObjectArrayElement(arrayObj,
+                                 GET_REGISTER(vsrc2),
+                                 (Object *)GET_REGISTER(vdst));
     }
     FINISH(2);
 OP_END
@@ -3138,24 +3146,24 @@
 HANDLE_OP_SHX_INT_LIT8(OP_USHR_INT_LIT8,  "ushr", (u4), >>)
 OP_END
 
-/* File: c/OP_UNUSED_E3.c */
-HANDLE_OPCODE(OP_UNUSED_E3)
+/* File: c/OP_IGET_VOLATILE.c */
+HANDLE_IGET_X(OP_IGET_VOLATILE,         "-volatile", IntVolatile, )
 OP_END
 
-/* File: c/OP_UNUSED_E4.c */
-HANDLE_OPCODE(OP_UNUSED_E4)
+/* File: c/OP_IPUT_VOLATILE.c */
+HANDLE_IPUT_X(OP_IPUT_VOLATILE,         "-volatile", IntVolatile, )
 OP_END
 
-/* File: c/OP_UNUSED_E5.c */
-HANDLE_OPCODE(OP_UNUSED_E5)
+/* File: c/OP_SGET_VOLATILE.c */
+HANDLE_SGET_X(OP_SGET_VOLATILE,         "-volatile", IntVolatile, )
 OP_END
 
-/* File: c/OP_UNUSED_E6.c */
-HANDLE_OPCODE(OP_UNUSED_E6)
+/* File: c/OP_SPUT_VOLATILE.c */
+HANDLE_SPUT_X(OP_SPUT_VOLATILE,         "-volatile", IntVolatile, )
 OP_END
 
-/* File: c/OP_UNUSED_E7.c */
-HANDLE_OPCODE(OP_UNUSED_E7)
+/* File: c/OP_IGET_OBJECT_VOLATILE.c */
+HANDLE_IGET_X(OP_IGET_OBJECT_VOLATILE,  "-object-volatile", ObjectVolatile, _AS_OBJECT)
 OP_END
 
 /* File: c/OP_IGET_WIDE_VOLATILE.c */
@@ -3385,16 +3393,16 @@
     GOTO_invoke(invokeSuperQuick, true);
 OP_END
 
-/* File: c/OP_UNUSED_FC.c */
-HANDLE_OPCODE(OP_UNUSED_FC)
+/* File: c/OP_IPUT_OBJECT_VOLATILE.c */
+HANDLE_IPUT_X(OP_IPUT_OBJECT_VOLATILE,  "-object-volatile", ObjectVolatile, _AS_OBJECT)
 OP_END
 
-/* File: c/OP_UNUSED_FD.c */
-HANDLE_OPCODE(OP_UNUSED_FD)
+/* File: c/OP_SGET_OBJECT_VOLATILE.c */
+HANDLE_SGET_X(OP_SGET_OBJECT_VOLATILE,  "-object-volatile", ObjectVolatile, _AS_OBJECT)
 OP_END
 
-/* File: c/OP_UNUSED_FE.c */
-HANDLE_OPCODE(OP_UNUSED_FE)
+/* File: c/OP_SPUT_OBJECT_VOLATILE.c */
+HANDLE_SPUT_X(OP_SPUT_OBJECT_VOLATILE,  "-object-volatile", ObjectVolatile, _AS_OBJECT)
 OP_END
 
 /* File: c/OP_UNUSED_FF.c */
@@ -3504,6 +3512,9 @@
                 vdst >>= 4;
             }
         }
+        if (typeCh == 'L' || typeCh == '[') {
+            dvmWriteBarrierArray(newArray, 0, newArray->length);
+        }
 
         retval.l = newArray;
     }
@@ -3954,7 +3965,7 @@
             LOGVV("+++ returned into break frame\n");
 #if defined(WITH_JIT)
             /* Let the Jit know the return is terminating normally */
-            CHECK_JIT();
+            CHECK_JIT_VOID();
 #endif
             GOTO_bail();
         }
@@ -4329,7 +4340,7 @@
 
 #if defined(WITH_JIT)
             /* Allow the Jit to end any pending trace building */
-            CHECK_JIT();
+            CHECK_JIT_VOID();
 #endif
 
             /*
@@ -4428,4 +4439,3 @@
     return true;
 }
 
-
diff --git a/vm/mterp/out/InterpC-portstd.c b/vm/mterp/out/InterpC-portstd.c
index 1937bd1..5b0d45b 100644
--- a/vm/mterp/out/InterpC-portstd.c
+++ b/vm/mterp/out/InterpC-portstd.c
@@ -423,7 +423,8 @@
 
 #define CHECK_DEBUG_AND_PROF() ((void)0)
 
-#define CHECK_JIT() (0)
+#define CHECK_JIT_BOOL() (false)
+#define CHECK_JIT_VOID()
 #define ABORT_JIT_TSELECT() ((void)0)
 
 /* File: portable/stubdefs.c */
@@ -459,7 +460,7 @@
         inst = FETCH(0);                                                    \
         CHECK_DEBUG_AND_PROF();                                             \
         CHECK_TRACKED_REFS();                                               \
-        if (CHECK_JIT()) GOTO_bail_switch();                                \
+        if (CHECK_JIT_BOOL()) GOTO_bail_switch();                           \
         goto *handlerTable[INST_INST(inst)];                                \
     }
 # define FINISH_BKPT(_opcode) {                                             \
@@ -1282,7 +1283,7 @@
         /* just fall through to instruction loop or threaded kickstart */
         break;
     case kInterpEntryReturn:
-        CHECK_JIT();
+        CHECK_JIT_VOID();
         goto returnFromMethod;
     case kInterpEntryThrow:
         goto exceptionThrown;
@@ -1867,7 +1868,6 @@
     FINISH(2);
 OP_END
 
-
 /* File: c/OP_FILLED_NEW_ARRAY.c */
 HANDLE_OPCODE(OP_FILLED_NEW_ARRAY /*vB, {vD, vE, vF, vG, vA}, class@CCCC*/)
     GOTO_invoke(filledNewArray, false);
@@ -1895,7 +1895,7 @@
             arrayData >= curMethod->insns + dvmGetMethodInsnsSize(curMethod))
         {
             /* should have been caught in verifier */
-            dvmThrowException("Ljava/lang/InternalError;", 
+            dvmThrowException("Ljava/lang/InternalError;",
                               "bad fill array data");
             GOTO_exceptionThrown();
         }
@@ -1913,10 +1913,17 @@
     {
         Object* obj;
 
+        /*
+         * We don't create an exception here, but the process of searching
+         * for a catch block can do class lookups and throw exceptions.
+         * We need to update the saved PC.
+         */
+        EXPORT_PC();
+
         vsrc1 = INST_AA(inst);
         ILOGV("|throw v%d  (%p)", vsrc1, (void*)GET_REGISTER(vsrc1));
         obj = (Object*) GET_REGISTER(vsrc1);
-        if (!checkForNullExportPC(obj, fp, pc)) {
+        if (!checkForNull(obj)) {
             /* will throw a null pointer exception */
             LOGVV("Bad exception\n");
         } else {
@@ -2198,8 +2205,9 @@
             }
         }
         ILOGV("+ APUT[%d]=0x%08x", GET_REGISTER(vsrc2), GET_REGISTER(vdst));
-        ((u4*) arrayObj->contents)[GET_REGISTER(vsrc2)] =
-            GET_REGISTER(vdst);
+        dvmSetObjectArrayElement(arrayObj,
+                                 GET_REGISTER(vsrc2),
+                                 (Object *)GET_REGISTER(vdst));
     }
     FINISH(2);
 OP_END
@@ -2877,24 +2885,24 @@
 HANDLE_OP_SHX_INT_LIT8(OP_USHR_INT_LIT8,  "ushr", (u4), >>)
 OP_END
 
-/* File: c/OP_UNUSED_E3.c */
-HANDLE_OPCODE(OP_UNUSED_E3)
+/* File: c/OP_IGET_VOLATILE.c */
+HANDLE_IGET_X(OP_IGET_VOLATILE,         "-volatile", IntVolatile, )
 OP_END
 
-/* File: c/OP_UNUSED_E4.c */
-HANDLE_OPCODE(OP_UNUSED_E4)
+/* File: c/OP_IPUT_VOLATILE.c */
+HANDLE_IPUT_X(OP_IPUT_VOLATILE,         "-volatile", IntVolatile, )
 OP_END
 
-/* File: c/OP_UNUSED_E5.c */
-HANDLE_OPCODE(OP_UNUSED_E5)
+/* File: c/OP_SGET_VOLATILE.c */
+HANDLE_SGET_X(OP_SGET_VOLATILE,         "-volatile", IntVolatile, )
 OP_END
 
-/* File: c/OP_UNUSED_E6.c */
-HANDLE_OPCODE(OP_UNUSED_E6)
+/* File: c/OP_SPUT_VOLATILE.c */
+HANDLE_SPUT_X(OP_SPUT_VOLATILE,         "-volatile", IntVolatile, )
 OP_END
 
-/* File: c/OP_UNUSED_E7.c */
-HANDLE_OPCODE(OP_UNUSED_E7)
+/* File: c/OP_IGET_OBJECT_VOLATILE.c */
+HANDLE_IGET_X(OP_IGET_OBJECT_VOLATILE,  "-object-volatile", ObjectVolatile, _AS_OBJECT)
 OP_END
 
 /* File: c/OP_IGET_WIDE_VOLATILE.c */
@@ -3124,16 +3132,16 @@
     GOTO_invoke(invokeSuperQuick, true);
 OP_END
 
-/* File: c/OP_UNUSED_FC.c */
-HANDLE_OPCODE(OP_UNUSED_FC)
+/* File: c/OP_IPUT_OBJECT_VOLATILE.c */
+HANDLE_IPUT_X(OP_IPUT_OBJECT_VOLATILE,  "-object-volatile", ObjectVolatile, _AS_OBJECT)
 OP_END
 
-/* File: c/OP_UNUSED_FD.c */
-HANDLE_OPCODE(OP_UNUSED_FD)
+/* File: c/OP_SGET_OBJECT_VOLATILE.c */
+HANDLE_SGET_X(OP_SGET_OBJECT_VOLATILE,  "-object-volatile", ObjectVolatile, _AS_OBJECT)
 OP_END
 
-/* File: c/OP_UNUSED_FE.c */
-HANDLE_OPCODE(OP_UNUSED_FE)
+/* File: c/OP_SPUT_OBJECT_VOLATILE.c */
+HANDLE_SPUT_X(OP_SPUT_OBJECT_VOLATILE,  "-object-volatile", ObjectVolatile, _AS_OBJECT)
 OP_END
 
 /* File: c/OP_UNUSED_FF.c */
@@ -3243,6 +3251,9 @@
                 vdst >>= 4;
             }
         }
+        if (typeCh == 'L' || typeCh == '[') {
+            dvmWriteBarrierArray(newArray, 0, newArray->length);
+        }
 
         retval.l = newArray;
     }
@@ -3693,7 +3704,7 @@
             LOGVV("+++ returned into break frame\n");
 #if defined(WITH_JIT)
             /* Let the Jit know the return is terminating normally */
-            CHECK_JIT();
+            CHECK_JIT_VOID();
 #endif
             GOTO_bail();
         }
@@ -4068,7 +4079,7 @@
 
 #if defined(WITH_JIT)
             /* Allow the Jit to end any pending trace building */
-            CHECK_JIT();
+            CHECK_JIT_VOID();
 #endif
 
             /*
@@ -4167,4 +4178,3 @@
     return true;
 }
 
-
diff --git a/vm/mterp/out/InterpC-x86-atom.c b/vm/mterp/out/InterpC-x86-atom.c
index 4ee7181..7da241c 100644
--- a/vm/mterp/out/InterpC-x86-atom.c
+++ b/vm/mterp/out/InterpC-x86-atom.c
@@ -422,7 +422,8 @@
 #define INTERP_TYPE INTERP_STD
 #define CHECK_DEBUG_AND_PROF() ((void)0)
 # define CHECK_TRACKED_REFS() ((void)0)
-#define CHECK_JIT() (0)
+#define CHECK_JIT_BOOL() (false)
+#define CHECK_JIT_VOID()
 #define ABORT_JIT_TSELECT() ((void)0)
 
 /*
@@ -1200,6 +1201,26 @@
     }                                                                       \
     FINISH(2);
 
+/* File: c/OP_IGET_VOLATILE.c */
+HANDLE_IGET_X(OP_IGET_VOLATILE,         "-volatile", IntVolatile, )
+OP_END
+
+/* File: c/OP_IPUT_VOLATILE.c */
+HANDLE_IPUT_X(OP_IPUT_VOLATILE,         "-volatile", IntVolatile, )
+OP_END
+
+/* File: c/OP_SGET_VOLATILE.c */
+HANDLE_SGET_X(OP_SGET_VOLATILE,         "-volatile", IntVolatile, )
+OP_END
+
+/* File: c/OP_SPUT_VOLATILE.c */
+HANDLE_SPUT_X(OP_SPUT_VOLATILE,         "-volatile", IntVolatile, )
+OP_END
+
+/* File: c/OP_IGET_OBJECT_VOLATILE.c */
+HANDLE_IGET_X(OP_IGET_OBJECT_VOLATILE,  "-object-volatile", ObjectVolatile, _AS_OBJECT)
+OP_END
+
 /* File: c/OP_IGET_WIDE_VOLATILE.c */
 HANDLE_IGET_X(OP_IGET_WIDE_VOLATILE,    "-wide-volatile", LongVolatile, _WIDE)
 OP_END
@@ -1292,6 +1313,18 @@
     FINISH(3);
 OP_END
 
+/* File: c/OP_IPUT_OBJECT_VOLATILE.c */
+HANDLE_IPUT_X(OP_IPUT_OBJECT_VOLATILE,  "-object-volatile", ObjectVolatile, _AS_OBJECT)
+OP_END
+
+/* File: c/OP_SGET_OBJECT_VOLATILE.c */
+HANDLE_SGET_X(OP_SGET_OBJECT_VOLATILE,  "-object-volatile", ObjectVolatile, _AS_OBJECT)
+OP_END
+
+/* File: c/OP_SPUT_OBJECT_VOLATILE.c */
+HANDLE_SPUT_X(OP_SPUT_OBJECT_VOLATILE,  "-object-volatile", ObjectVolatile, _AS_OBJECT)
+OP_END
+
 /* File: c/gotoTargets.c */
 /*
  * C footer.  This has some common code shared by the various targets.
@@ -1389,6 +1422,9 @@
                 vdst >>= 4;
             }
         }
+        if (typeCh == 'L' || typeCh == '[') {
+            dvmWriteBarrierArray(newArray, 0, newArray->length);
+        }
 
         retval.l = newArray;
     }
@@ -1839,7 +1875,7 @@
             LOGVV("+++ returned into break frame\n");
 #if defined(WITH_JIT)
             /* Let the Jit know the return is terminating normally */
-            CHECK_JIT();
+            CHECK_JIT_VOID();
 #endif
             GOTO_bail();
         }
@@ -2214,7 +2250,7 @@
 
 #if defined(WITH_JIT)
             /* Allow the Jit to end any pending trace building */
-            CHECK_JIT();
+            CHECK_JIT_VOID();
 #endif
 
             /*
diff --git a/vm/mterp/out/InterpC-x86.c b/vm/mterp/out/InterpC-x86.c
index ecbb614..86fe972 100644
--- a/vm/mterp/out/InterpC-x86.c
+++ b/vm/mterp/out/InterpC-x86.c
@@ -422,7 +422,8 @@
 #define INTERP_TYPE INTERP_STD
 #define CHECK_DEBUG_AND_PROF() ((void)0)
 # define CHECK_TRACKED_REFS() ((void)0)
-#define CHECK_JIT() (0)
+#define CHECK_JIT_BOOL() (false)
+#define CHECK_JIT_VOID()
 #define ABORT_JIT_TSELECT() ((void)0)
 
 /*
@@ -1200,6 +1201,26 @@
     }                                                                       \
     FINISH(2);
 
+/* File: c/OP_IGET_VOLATILE.c */
+HANDLE_IGET_X(OP_IGET_VOLATILE,         "-volatile", IntVolatile, )
+OP_END
+
+/* File: c/OP_IPUT_VOLATILE.c */
+HANDLE_IPUT_X(OP_IPUT_VOLATILE,         "-volatile", IntVolatile, )
+OP_END
+
+/* File: c/OP_SGET_VOLATILE.c */
+HANDLE_SGET_X(OP_SGET_VOLATILE,         "-volatile", IntVolatile, )
+OP_END
+
+/* File: c/OP_SPUT_VOLATILE.c */
+HANDLE_SPUT_X(OP_SPUT_VOLATILE,         "-volatile", IntVolatile, )
+OP_END
+
+/* File: c/OP_IGET_OBJECT_VOLATILE.c */
+HANDLE_IGET_X(OP_IGET_OBJECT_VOLATILE,  "-object-volatile", ObjectVolatile, _AS_OBJECT)
+OP_END
+
 /* File: c/OP_IGET_WIDE_VOLATILE.c */
 HANDLE_IGET_X(OP_IGET_WIDE_VOLATILE,    "-wide-volatile", LongVolatile, _WIDE)
 OP_END
@@ -1261,6 +1282,18 @@
     FINISH(3);
 OP_END
 
+/* File: c/OP_IPUT_OBJECT_VOLATILE.c */
+HANDLE_IPUT_X(OP_IPUT_OBJECT_VOLATILE,  "-object-volatile", ObjectVolatile, _AS_OBJECT)
+OP_END
+
+/* File: c/OP_SGET_OBJECT_VOLATILE.c */
+HANDLE_SGET_X(OP_SGET_OBJECT_VOLATILE,  "-object-volatile", ObjectVolatile, _AS_OBJECT)
+OP_END
+
+/* File: c/OP_SPUT_OBJECT_VOLATILE.c */
+HANDLE_SPUT_X(OP_SPUT_OBJECT_VOLATILE,  "-object-volatile", ObjectVolatile, _AS_OBJECT)
+OP_END
+
 /* File: c/gotoTargets.c */
 /*
  * C footer.  This has some common code shared by the various targets.
@@ -1358,6 +1391,9 @@
                 vdst >>= 4;
             }
         }
+        if (typeCh == 'L' || typeCh == '[') {
+            dvmWriteBarrierArray(newArray, 0, newArray->length);
+        }
 
         retval.l = newArray;
     }
@@ -1808,7 +1844,7 @@
             LOGVV("+++ returned into break frame\n");
 #if defined(WITH_JIT)
             /* Let the Jit know the return is terminating normally */
-            CHECK_JIT();
+            CHECK_JIT_VOID();
 #endif
             GOTO_bail();
         }
@@ -2183,7 +2219,7 @@
 
 #if defined(WITH_JIT)
             /* Allow the Jit to end any pending trace building */
-            CHECK_JIT();
+            CHECK_JIT_VOID();
 #endif
 
             /*
diff --git a/vm/mterp/portable/debug.c b/vm/mterp/portable/debug.c
index 7ac4a02..94f735a 100644
--- a/vm/mterp/portable/debug.c
+++ b/vm/mterp/portable/debug.c
@@ -101,7 +101,7 @@
                 if (pCtrl->size == SS_MIN) {
                     doStop = true;
                     msg = "new instruction";
-                } else if (!dvmAddressSetGet(pCtrl->pAddressSet, 
+                } else if (!dvmAddressSetGet(pCtrl->pAddressSet,
                             pc - method->insns)) {
                     doStop = true;
                     msg = "new line";
@@ -250,4 +250,3 @@
     }
 #endif
 }
-
diff --git a/vm/mterp/portable/enddefs.c b/vm/mterp/portable/enddefs.c
index 5ddde3c..af8606e 100644
--- a/vm/mterp/portable/enddefs.c
+++ b/vm/mterp/portable/enddefs.c
@@ -40,4 +40,3 @@
         pc - curMethod->insns, fp);
     return true;
 }
-
diff --git a/vm/mterp/portable/entry.c b/vm/mterp/portable/entry.c
index 2aa7867..b2ec1d8 100644
--- a/vm/mterp/portable/entry.c
+++ b/vm/mterp/portable/entry.c
@@ -97,7 +97,7 @@
         /* just fall through to instruction loop or threaded kickstart */
         break;
     case kInterpEntryReturn:
-        CHECK_JIT();
+        CHECK_JIT_VOID();
         goto returnFromMethod;
     case kInterpEntryThrow:
         goto exceptionThrown;
diff --git a/vm/mterp/portable/portdbg.c b/vm/mterp/portable/portdbg.c
index 030a515..76b7637 100644
--- a/vm/mterp/portable/portdbg.c
+++ b/vm/mterp/portable/portdbg.c
@@ -5,9 +5,11 @@
     checkDebugAndProf(pc, fp, self, curMethod, &debugIsMethodEntry)
 
 #if defined(WITH_JIT)
-#define CHECK_JIT() (dvmCheckJit(pc, self, interpState))
+#define CHECK_JIT_BOOL() (dvmCheckJit(pc, self, interpState))
+#define CHECK_JIT_VOID() (dvmCheckJit(pc, self, interpState))
 #define ABORT_JIT_TSELECT() (dvmJitAbortTraceSelect(interpState))
 #else
-#define CHECK_JIT() (0)
+#define CHECK_JIT_BOOL() (false)
+#define CHECK_JIT_VOID()
 #define ABORT_JIT_TSELECT(x) ((void)0)
 #endif
diff --git a/vm/mterp/portable/portstd.c b/vm/mterp/portable/portstd.c
index e2d8b10..f37c22b 100644
--- a/vm/mterp/portable/portstd.c
+++ b/vm/mterp/portable/portstd.c
@@ -3,5 +3,6 @@
 
 #define CHECK_DEBUG_AND_PROF() ((void)0)
 
-#define CHECK_JIT() (0)
+#define CHECK_JIT_BOOL() (false)
+#define CHECK_JIT_VOID()
 #define ABORT_JIT_TSELECT() ((void)0)
diff --git a/vm/mterp/portable/stubdefs.c b/vm/mterp/portable/stubdefs.c
index 29258fc..b46bb3a 100644
--- a/vm/mterp/portable/stubdefs.c
+++ b/vm/mterp/portable/stubdefs.c
@@ -30,7 +30,7 @@
         inst = FETCH(0);                                                    \
         CHECK_DEBUG_AND_PROF();                                             \
         CHECK_TRACKED_REFS();                                               \
-        if (CHECK_JIT()) GOTO_bail_switch();                                \
+        if (CHECK_JIT_BOOL()) GOTO_bail_switch();                           \
         goto *handlerTable[INST_INST(inst)];                                \
     }
 # define FINISH_BKPT(_opcode) {                                             \
diff --git a/vm/mterp/x86-atom/OP_AND_INT.S b/vm/mterp/x86-atom/OP_AND_INT.S
index 84d8eb6..2f84b34 100644
--- a/vm/mterp/x86-atom/OP_AND_INT.S
+++ b/vm/mterp/x86-atom/OP_AND_INT.S
@@ -18,4 +18,3 @@
     */
 
 %include "x86-atom/binop.S" {"instr":"andl     (rFP, %edx, 4), %ecx"}
-
diff --git a/vm/mterp/x86-atom/OP_CMP_LONG.S b/vm/mterp/x86-atom/OP_CMP_LONG.S
index 2ce2a19..cf021a3 100644
--- a/vm/mterp/x86-atom/OP_CMP_LONG.S
+++ b/vm/mterp/x86-atom/OP_CMP_LONG.S
@@ -53,5 +53,3 @@
 .L${opcode}_greater:
     movl        $$0x1, (rFP, rINST, 4)  # vAA<- greater than
     FINISH      2                       # jump to next instruction
-
-
diff --git a/vm/mterp/x86-atom/OP_DIV_DOUBLE.S b/vm/mterp/x86-atom/OP_DIV_DOUBLE.S
index 3220f36..418a230 100644
--- a/vm/mterp/x86-atom/OP_DIV_DOUBLE.S
+++ b/vm/mterp/x86-atom/OP_DIV_DOUBLE.S
@@ -35,4 +35,3 @@
     fstpl       (rFP, rINST, 4)         # vAA<- result
     FFETCH_ADV  2, %eax                 # %eax<- next instruction hi; fetch, advance
     FGETOP_JMP  2, %eax                 # jump to next instruction; getop, jmp
-
diff --git a/vm/mterp/x86-atom/OP_DIV_DOUBLE_2ADDR.S b/vm/mterp/x86-atom/OP_DIV_DOUBLE_2ADDR.S
index b3173c7..7003e30 100644
--- a/vm/mterp/x86-atom/OP_DIV_DOUBLE_2ADDR.S
+++ b/vm/mterp/x86-atom/OP_DIV_DOUBLE_2ADDR.S
@@ -35,4 +35,3 @@
     fdivl       (rFP, rINST, 4)         # divide double; vA/vB
     fstpl       (rFP, %edx, 4)          # vAA<- result
     FINISH      1                       # jump to next instruction
-
diff --git a/vm/mterp/x86-atom/OP_DIV_INT.S b/vm/mterp/x86-atom/OP_DIV_INT.S
index dd4b514..c7f5b27 100644
--- a/vm/mterp/x86-atom/OP_DIV_INT.S
+++ b/vm/mterp/x86-atom/OP_DIV_INT.S
@@ -18,4 +18,3 @@
     */
 
 %include "x86-atom/binopD.S"
-
diff --git a/vm/mterp/x86-atom/OP_DIV_INT_2ADDR.S b/vm/mterp/x86-atom/OP_DIV_INT_2ADDR.S
index 1ec4eb9..762d82f 100644
--- a/vm/mterp/x86-atom/OP_DIV_INT_2ADDR.S
+++ b/vm/mterp/x86-atom/OP_DIV_INT_2ADDR.S
@@ -18,4 +18,3 @@
     */
 
 %include "x86-atom/binopD2addr.S"
-
diff --git a/vm/mterp/x86-atom/OP_DOUBLE_TO_INT.S b/vm/mterp/x86-atom/OP_DOUBLE_TO_INT.S
index e5494fa..f377762 100644
--- a/vm/mterp/x86-atom/OP_DOUBLE_TO_INT.S
+++ b/vm/mterp/x86-atom/OP_DOUBLE_TO_INT.S
@@ -66,4 +66,3 @@
     fstps       (rFP, %edx, 4)
     movl        $$0x80000000,  (rFP, %edx, 4) # vA<- negInf
     FINISH      1                       # jump to next instruction
-
diff --git a/vm/mterp/x86-atom/OP_DOUBLE_TO_LONG.S b/vm/mterp/x86-atom/OP_DOUBLE_TO_LONG.S
index c12f159..2ce9bcc 100644
--- a/vm/mterp/x86-atom/OP_DOUBLE_TO_LONG.S
+++ b/vm/mterp/x86-atom/OP_DOUBLE_TO_LONG.S
@@ -69,4 +69,3 @@
     fstpl       (rFP, %edx, 4)          # move converted int
     movq        %xmm0, (rFP, %edx, 4)   # vA<- %xmm0; negInf
     FINISH      1                       # jump to next instruction
-
diff --git a/vm/mterp/x86-atom/OP_FLOAT_TO_LONG.S b/vm/mterp/x86-atom/OP_FLOAT_TO_LONG.S
index 2a78424..9a50b78 100644
--- a/vm/mterp/x86-atom/OP_FLOAT_TO_LONG.S
+++ b/vm/mterp/x86-atom/OP_FLOAT_TO_LONG.S
@@ -69,5 +69,3 @@
     fstpl       (rFP, %edx, 4)          # move converted int
     movq        %xmm0, (rFP, %edx, 4)   # vA<- %xmm0; negInf
     FINISH      1                       # jump to next instruction
-
-
diff --git a/vm/mterp/x86-atom/OP_GOTO.S b/vm/mterp/x86-atom/OP_GOTO.S
index cb70859..12d847e 100644
--- a/vm/mterp/x86-atom/OP_GOTO.S
+++ b/vm/mterp/x86-atom/OP_GOTO.S
@@ -34,4 +34,3 @@
     shl         $$1, %edx               # %edx is shifted for byte offset
     js          common_periodicChecks2  # do check on backwards branch
     FINISH_RB   %edx, %ecx              # jump to next instruction
-
diff --git a/vm/mterp/x86-atom/OP_GOTO_32.S b/vm/mterp/x86-atom/OP_GOTO_32.S
index 9409400..4c56915 100644
--- a/vm/mterp/x86-atom/OP_GOTO_32.S
+++ b/vm/mterp/x86-atom/OP_GOTO_32.S
@@ -35,4 +35,3 @@
     shl         $$1, %edx               # %edx is doubled to get the byte offset
     jc          common_periodicChecks2  # do check on backwards branch
     FINISH_RB   %edx, %ecx              # jump to next instruction
-
diff --git a/vm/mterp/x86-atom/OP_IGET_WIDE.S b/vm/mterp/x86-atom/OP_IGET_WIDE.S
index 74973b1..370b0b0 100644
--- a/vm/mterp/x86-atom/OP_IGET_WIDE.S
+++ b/vm/mterp/x86-atom/OP_IGET_WIDE.S
@@ -72,5 +72,3 @@
     movq        (%ecx, %edx), %xmm0     # %xmm0<- object field
     movq        %xmm0, (rFP, rINST, 4)  # vA<- %xmm0; object field
     FGETOP_JMP  2, %eax                 # jump to next instruction; getop, jmp
-
-
diff --git a/vm/mterp/x86-atom/OP_IGET_WIDE_QUICK.S b/vm/mterp/x86-atom/OP_IGET_WIDE_QUICK.S
index 85f1fbe..08a57f6 100644
--- a/vm/mterp/x86-atom/OP_IGET_WIDE_QUICK.S
+++ b/vm/mterp/x86-atom/OP_IGET_WIDE_QUICK.S
@@ -36,5 +36,3 @@
     movq        (%ecx, %edx), %xmm0     # %xmm0<- object field
     movq        %xmm0, (rFP, rINST, 4)  # fp[A]<- %xmm0
     FGETOP_JMP  2, %eax                 # jump to next instruction; getop, jmp
-
-
diff --git a/vm/mterp/x86-atom/OP_INT_TO_FLOAT.S b/vm/mterp/x86-atom/OP_INT_TO_FLOAT.S
index 23c70cf..52ce729 100644
--- a/vm/mterp/x86-atom/OP_INT_TO_FLOAT.S
+++ b/vm/mterp/x86-atom/OP_INT_TO_FLOAT.S
@@ -34,4 +34,3 @@
     cvtsi2ss    (rFP,%eax,4), %xmm0     # %xmm0<- vB
     movss       %xmm0, (rFP, rINST, 4)  # vA<- %xmm0
     FINISH      1                       # jump to next instruction
-
diff --git a/vm/mterp/x86-atom/OP_INT_TO_SHORT.S b/vm/mterp/x86-atom/OP_INT_TO_SHORT.S
index da6ca95..f2b0b87 100644
--- a/vm/mterp/x86-atom/OP_INT_TO_SHORT.S
+++ b/vm/mterp/x86-atom/OP_INT_TO_SHORT.S
@@ -18,4 +18,3 @@
     */
 
 %include "x86-atom/unop.S" { "preinstr":"sal $16, %ecx", "instr":"sar $16, %ecx" }
-
diff --git a/vm/mterp/x86-atom/OP_INVOKE_STATIC.S b/vm/mterp/x86-atom/OP_INVOKE_STATIC.S
index c9ac5ff..30b6d8c 100644
--- a/vm/mterp/x86-atom/OP_INVOKE_STATIC.S
+++ b/vm/mterp/x86-atom/OP_INVOKE_STATIC.S
@@ -68,5 +68,3 @@
     je          common_exceptionThrown
     movl        %eax, %ecx              # %ecx<- method
     jmp         common_invokeMethod${routine} # invoke method common code
-
-
diff --git a/vm/mterp/x86-atom/OP_INVOKE_SUPER.S b/vm/mterp/x86-atom/OP_INVOKE_SUPER.S
index 684a0e9..539bea1 100644
--- a/vm/mterp/x86-atom/OP_INVOKE_SUPER.S
+++ b/vm/mterp/x86-atom/OP_INVOKE_SUPER.S
@@ -103,4 +103,3 @@
 .L${opcode}_nsm:
     movl        offMethod_name(%ecx), %edx # %edx<- method name
     jmp         common_errNoSuchMethod
-
diff --git a/vm/mterp/x86-atom/OP_INVOKE_SUPER_QUICK.S b/vm/mterp/x86-atom/OP_INVOKE_SUPER_QUICK.S
index 3da7346..55c7e94 100644
--- a/vm/mterp/x86-atom/OP_INVOKE_SUPER_QUICK.S
+++ b/vm/mterp/x86-atom/OP_INVOKE_SUPER_QUICK.S
@@ -38,6 +38,3 @@
     movl        (%eax, %ecx, 4), %ecx   # %ecx<- vtable[methodIndex]
     je          common_errNullObject    # handle null object
     jmp         common_invokeMethod${routine} # invoke method common code
-
-
-
diff --git a/vm/mterp/x86-atom/OP_INVOKE_VIRTUAL.S b/vm/mterp/x86-atom/OP_INVOKE_VIRTUAL.S
index b88928b..46c9265 100644
--- a/vm/mterp/x86-atom/OP_INVOKE_VIRTUAL.S
+++ b/vm/mterp/x86-atom/OP_INVOKE_VIRTUAL.S
@@ -91,4 +91,3 @@
     movl        offClassObject_vtable(%edx), %edx # %edx<- thisPtr->clazz->vtable
     movl        (%edx, %eax, 4), %ecx   # %ecx<- vtable[methodIndex]
     jmp         common_invokeMethod${routine} # invoke method common code
-
diff --git a/vm/mterp/x86-atom/OP_INVOKE_VIRTUAL_QUICK.S b/vm/mterp/x86-atom/OP_INVOKE_VIRTUAL_QUICK.S
index efa5fb2..16a4e40 100644
--- a/vm/mterp/x86-atom/OP_INVOKE_VIRTUAL_QUICK.S
+++ b/vm/mterp/x86-atom/OP_INVOKE_VIRTUAL_QUICK.S
@@ -36,5 +36,3 @@
     movl        offClassObject_vtable(%edx), %edx # %edx<- thisPtr->clazz->vtable
     movl        (%edx, %ecx, 4), %ecx   # %ecx<- vtable[methodIndex]
     jmp         common_invokeMethod${routine} # invoke method common code
-
-
diff --git a/vm/mterp/x86-atom/OP_IPUT.S b/vm/mterp/x86-atom/OP_IPUT.S
index eb893f7..4c029be 100644
--- a/vm/mterp/x86-atom/OP_IPUT.S
+++ b/vm/mterp/x86-atom/OP_IPUT.S
@@ -74,4 +74,3 @@
     GET_VREG    rINST                   # rINST<- vA
     mov$mov     rINST, (%edx, %ecx)     # object field<- vA
     FGETOP_JMP  2, %eax                 # jump to next instruction; getop, jmp
-
diff --git a/vm/mterp/x86-atom/OP_IPUT_OBJECT.S b/vm/mterp/x86-atom/OP_IPUT_OBJECT.S
index 0f9cc32..33727ca 100644
--- a/vm/mterp/x86-atom/OP_IPUT_OBJECT.S
+++ b/vm/mterp/x86-atom/OP_IPUT_OBJECT.S
@@ -18,5 +18,3 @@
     */
 
 %include "x86-atom/OP_IPUT.S"
-
-
diff --git a/vm/mterp/x86-atom/OP_IPUT_QUICK.S b/vm/mterp/x86-atom/OP_IPUT_QUICK.S
index 1c5962d..572291e 100644
--- a/vm/mterp/x86-atom/OP_IPUT_QUICK.S
+++ b/vm/mterp/x86-atom/OP_IPUT_QUICK.S
@@ -35,5 +35,3 @@
     GET_VREG    rINST                   # rINST<- vA
     movl        rINST, (%eax, %ecx)     # object field<- vA
     FGETOP_JMP  2, %edx                 # jump to next instruction; getop, jmp
-
-
diff --git a/vm/mterp/x86-atom/OP_IPUT_WIDE.S b/vm/mterp/x86-atom/OP_IPUT_WIDE.S
index 498ebd9..1686219 100644
--- a/vm/mterp/x86-atom/OP_IPUT_WIDE.S
+++ b/vm/mterp/x86-atom/OP_IPUT_WIDE.S
@@ -72,5 +72,3 @@
     movq        (rFP, rINST, 4), %xmm0  # %xmm0<- vA
     movq        %xmm0, (%ecx, %edx)     # object field<- %xmm0; vA
     FGETOP_JMP  2, %eax                 # jump to next instruction; getop, jmp
-
-
diff --git a/vm/mterp/x86-atom/OP_IPUT_WIDE_QUICK.S b/vm/mterp/x86-atom/OP_IPUT_WIDE_QUICK.S
index 5eedbb9..5880231 100644
--- a/vm/mterp/x86-atom/OP_IPUT_WIDE_QUICK.S
+++ b/vm/mterp/x86-atom/OP_IPUT_WIDE_QUICK.S
@@ -36,4 +36,3 @@
     movq        (rFP, rINST, 4), %xmm0  # %xmm0<- fp[A]
     movq        %xmm0, (%edx, %ecx)     # object field<- %xmm0; fp[A]
     FGETOP_JMP  2, %eax                 # jump to next instruction; getop, jmp
-
diff --git a/vm/mterp/x86-atom/OP_LONG_TO_DOUBLE.S b/vm/mterp/x86-atom/OP_LONG_TO_DOUBLE.S
index c21014a..5705e25 100644
--- a/vm/mterp/x86-atom/OP_LONG_TO_DOUBLE.S
+++ b/vm/mterp/x86-atom/OP_LONG_TO_DOUBLE.S
@@ -35,4 +35,3 @@
     fildll      (rFP, rINST, 4)         # FPU<- vB
     fstpl       (rFP, %ecx, 4)          # vA<- FPU; (double) vB
     FGETOP_JMP  1, %eax                 # jump to next instruction; getop, jmp
-
diff --git a/vm/mterp/x86-atom/OP_MONITOR_ENTER.S b/vm/mterp/x86-atom/OP_MONITOR_ENTER.S
index ed33258..d3fada3 100644
--- a/vm/mterp/x86-atom/OP_MONITOR_ENTER.S
+++ b/vm/mterp/x86-atom/OP_MONITOR_ENTER.S
@@ -56,4 +56,3 @@
     jne         common_exceptionThrown  # handle exception
 #endif
     FGETOP_JMP  1, %edx                 # jump to next instruction; getop, jmp
-
diff --git a/vm/mterp/x86-atom/OP_MONITOR_EXIT.S b/vm/mterp/x86-atom/OP_MONITOR_EXIT.S
index 98f062b..31e1165 100644
--- a/vm/mterp/x86-atom/OP_MONITOR_EXIT.S
+++ b/vm/mterp/x86-atom/OP_MONITOR_EXIT.S
@@ -44,4 +44,3 @@
     lea         8(%esp), %esp
     je          common_exceptionThrown  # handle exception
     FINISH_JMP  %edx                    # jump to next instruction
-
diff --git a/vm/mterp/x86-atom/OP_MOVE_EXCEPTION.S b/vm/mterp/x86-atom/OP_MOVE_EXCEPTION.S
index b6e37ce..76e700d 100644
--- a/vm/mterp/x86-atom/OP_MOVE_EXCEPTION.S
+++ b/vm/mterp/x86-atom/OP_MOVE_EXCEPTION.S
@@ -36,4 +36,3 @@
     movl        $$0, offThread_exception(%ecx) # clear exception
     SET_VREG    %edx, rINST             # vAA<- glue->self->exception
     FGETOP_JMP  1, %eax                 # jump to next instruction; getop, jmp
-
diff --git a/vm/mterp/x86-atom/OP_MOVE_WIDE_FROM16.S b/vm/mterp/x86-atom/OP_MOVE_WIDE_FROM16.S
index c9aa966..4056b34 100644
--- a/vm/mterp/x86-atom/OP_MOVE_WIDE_FROM16.S
+++ b/vm/mterp/x86-atom/OP_MOVE_WIDE_FROM16.S
@@ -32,4 +32,3 @@
     movq        (rFP, %edx, 4), %xmm0   # %xmm0<- vB
     movq        %xmm0, (rFP, rINST, 4)  # vA<- vB
     FGETOP_JMP  2, %eax                 # jump to next instruction; getop, jmp
-
diff --git a/vm/mterp/x86-atom/OP_MUL_LONG.S b/vm/mterp/x86-atom/OP_MUL_LONG.S
index 24b6c29..85cccf2 100644
--- a/vm/mterp/x86-atom/OP_MUL_LONG.S
+++ b/vm/mterp/x86-atom/OP_MUL_LONG.S
@@ -69,4 +69,3 @@
     movl        %ecx, 4(rFP, rINST, 4)  # vAA+1<- results hi
     movl        %eax, (rFP, rINST, 4)   # vAA<- results lo
     FINISH      2                       # jump to next instruction
-
diff --git a/vm/mterp/x86-atom/OP_MUL_LONG_2ADDR.S b/vm/mterp/x86-atom/OP_MUL_LONG_2ADDR.S
index 78befcd..d6b8c16 100644
--- a/vm/mterp/x86-atom/OP_MUL_LONG_2ADDR.S
+++ b/vm/mterp/x86-atom/OP_MUL_LONG_2ADDR.S
@@ -70,4 +70,3 @@
     movl        %ecx, 4(rFP, %edx, 4)   # vA+1<- results hi
     movl        %eax, (rFP, %edx, 4)    # vA<- results lo
     FINISH      1                       # jump to next instruction
-
diff --git a/vm/mterp/x86-atom/OP_NEG_DOUBLE.S b/vm/mterp/x86-atom/OP_NEG_DOUBLE.S
index e53cdf1..b6fb070 100644
--- a/vm/mterp/x86-atom/OP_NEG_DOUBLE.S
+++ b/vm/mterp/x86-atom/OP_NEG_DOUBLE.S
@@ -18,4 +18,3 @@
     */
 
 %include "x86-atom/unopWide.S" { "preinstr":"movq .LdoubNeg, %xmm1", "instr":"pxor %xmm1, %xmm0" }
-
diff --git a/vm/mterp/x86-atom/OP_NEG_LONG.S b/vm/mterp/x86-atom/OP_NEG_LONG.S
index 28f66d0..3f500bb 100644
--- a/vm/mterp/x86-atom/OP_NEG_LONG.S
+++ b/vm/mterp/x86-atom/OP_NEG_LONG.S
@@ -18,4 +18,3 @@
     */
 
 %include "x86-atom/unopWide.S" {"preinstr":"xorps %xmm1, %xmm1", "instr":"psubq %xmm0, %xmm1", "result":"%xmm1"}
-
diff --git a/vm/mterp/x86-atom/OP_NEW_ARRAY.S b/vm/mterp/x86-atom/OP_NEW_ARRAY.S
index bb1ef69..a6d5fd3 100644
--- a/vm/mterp/x86-atom/OP_NEW_ARRAY.S
+++ b/vm/mterp/x86-atom/OP_NEW_ARRAY.S
@@ -90,4 +90,3 @@
     je          common_exceptionThrown  # handle exception
     SET_VREG    %eax, rINST             # vA<- pArray
     FINISH      2                       # jump to next instruction
-
diff --git a/vm/mterp/x86-atom/OP_NOP.S b/vm/mterp/x86-atom/OP_NOP.S
index 8460045..9911da3 100644
--- a/vm/mterp/x86-atom/OP_NOP.S
+++ b/vm/mterp/x86-atom/OP_NOP.S
@@ -39,4 +39,3 @@
 dalvik_inst:
     MTERP_ENTRY
 #endif
-
diff --git a/vm/mterp/x86-atom/OP_PACKED_SWITCH.S b/vm/mterp/x86-atom/OP_PACKED_SWITCH.S
index 37a40da..7cb6d64 100644
--- a/vm/mterp/x86-atom/OP_PACKED_SWITCH.S
+++ b/vm/mterp/x86-atom/OP_PACKED_SWITCH.S
@@ -50,4 +50,3 @@
 %break
 .L${opcode}_finish:
     FINISH_RB   %edx, %ecx              # jump to next instruction
-
diff --git a/vm/mterp/x86-atom/OP_REM_DOUBLE.S b/vm/mterp/x86-atom/OP_REM_DOUBLE.S
index d9f15da..aa7d332 100644
--- a/vm/mterp/x86-atom/OP_REM_DOUBLE.S
+++ b/vm/mterp/x86-atom/OP_REM_DOUBLE.S
@@ -49,4 +49,3 @@
     lea         16(%esp), %esp
     fstpl       (rFP, rINST, 4)         # vAA<- remainder; return of fmod
     FINISH      2                       # jump to next instruction
-
diff --git a/vm/mterp/x86-atom/OP_REM_DOUBLE_2ADDR.S b/vm/mterp/x86-atom/OP_REM_DOUBLE_2ADDR.S
index 6fe7169..434c878 100644
--- a/vm/mterp/x86-atom/OP_REM_DOUBLE_2ADDR.S
+++ b/vm/mterp/x86-atom/OP_REM_DOUBLE_2ADDR.S
@@ -50,11 +50,3 @@
     lea         20(%esp), %esp
     fstpl       (rFP, rINST, 4)         # vAA<- remainder; return of fmod
     FINISH      1                       # jump to next instruction
-
-
-
-
-
-
-
-
diff --git a/vm/mterp/x86-atom/OP_REM_FLOAT.S b/vm/mterp/x86-atom/OP_REM_FLOAT.S
index 733c636..de5e161 100644
--- a/vm/mterp/x86-atom/OP_REM_FLOAT.S
+++ b/vm/mterp/x86-atom/OP_REM_FLOAT.S
@@ -41,4 +41,3 @@
     lea         8(%esp), %esp
     fstps       (rFP, rINST, 4)         # vAA<- remainder; return of fmod
     FINISH      2                       # jump to next instruction
-
diff --git a/vm/mterp/x86-atom/OP_REM_FLOAT_2ADDR.S b/vm/mterp/x86-atom/OP_REM_FLOAT_2ADDR.S
index d225851..5ff5af5 100644
--- a/vm/mterp/x86-atom/OP_REM_FLOAT_2ADDR.S
+++ b/vm/mterp/x86-atom/OP_REM_FLOAT_2ADDR.S
@@ -42,6 +42,3 @@
     lea         8(%esp), %esp
     fstps       (rFP, rINST, 4)
     FINISH      1                       # jump to next instruction
-
-
-
diff --git a/vm/mterp/x86-atom/OP_REM_INT_2ADDR.S b/vm/mterp/x86-atom/OP_REM_INT_2ADDR.S
index 534eed7..369ea5c 100644
--- a/vm/mterp/x86-atom/OP_REM_INT_2ADDR.S
+++ b/vm/mterp/x86-atom/OP_REM_INT_2ADDR.S
@@ -18,4 +18,3 @@
     */
 
 %include "x86-atom/binopD2addr.S" {"div":"0"}
-
diff --git a/vm/mterp/x86-atom/OP_RETURN.S b/vm/mterp/x86-atom/OP_RETURN.S
index 55af81b..48d7e34 100644
--- a/vm/mterp/x86-atom/OP_RETURN.S
+++ b/vm/mterp/x86-atom/OP_RETURN.S
@@ -18,4 +18,3 @@
     */
 
 %include "x86-atom/OP_RETURN_COMMON.S"
-
diff --git a/vm/mterp/x86-atom/OP_RETURN_COMMON.S b/vm/mterp/x86-atom/OP_RETURN_COMMON.S
index cda3fea..d58a16c 100644
--- a/vm/mterp/x86-atom/OP_RETURN_COMMON.S
+++ b/vm/mterp/x86-atom/OP_RETURN_COMMON.S
@@ -32,4 +32,3 @@
     GET_VREG    rINST                   # rINST<- vAA
     movl        rINST, offGlue_retval(%edx) # glue->retval<- vAA
     jmp         common_returnFromMethod # jump to common return code
-
diff --git a/vm/mterp/x86-atom/OP_RETURN_VOID.S b/vm/mterp/x86-atom/OP_RETURN_VOID.S
index 8bc786d..4d8c92b 100644
--- a/vm/mterp/x86-atom/OP_RETURN_VOID.S
+++ b/vm/mterp/x86-atom/OP_RETURN_VOID.S
@@ -18,4 +18,3 @@
     */
 
     jmp         common_returnFromMethod
-
diff --git a/vm/mterp/x86-atom/OP_RSUB_INT_LIT8.S b/vm/mterp/x86-atom/OP_RSUB_INT_LIT8.S
index b3633e6..d6114dd 100644
--- a/vm/mterp/x86-atom/OP_RSUB_INT_LIT8.S
+++ b/vm/mterp/x86-atom/OP_RSUB_INT_LIT8.S
@@ -34,4 +34,3 @@
     sub         %ecx, %edx              # %edx<- +CC sub vBB
     SET_VREG    %edx, rINST             # vAA<- %edx; result
     FINISH      2                       # jump to next instruction
-
diff --git a/vm/mterp/x86-atom/OP_SGET_BOOLEAN.S b/vm/mterp/x86-atom/OP_SGET_BOOLEAN.S
index f262b41..8e383b4 100644
--- a/vm/mterp/x86-atom/OP_SGET_BOOLEAN.S
+++ b/vm/mterp/x86-atom/OP_SGET_BOOLEAN.S
@@ -18,4 +18,3 @@
     */
 
 %include "x86-atom/OP_SGET.S"
-
diff --git a/vm/mterp/x86-atom/OP_SGET_OBJECT.S b/vm/mterp/x86-atom/OP_SGET_OBJECT.S
index d893676..5145f14 100644
--- a/vm/mterp/x86-atom/OP_SGET_OBJECT.S
+++ b/vm/mterp/x86-atom/OP_SGET_OBJECT.S
@@ -18,5 +18,3 @@
     */
 
 %include "x86-atom/OP_SGET.S"
-
-
diff --git a/vm/mterp/x86-atom/OP_SHL_LONG_2ADDR.S b/vm/mterp/x86-atom/OP_SHL_LONG_2ADDR.S
index 5bc4870..28dfaf2 100644
--- a/vm/mterp/x86-atom/OP_SHL_LONG_2ADDR.S
+++ b/vm/mterp/x86-atom/OP_SHL_LONG_2ADDR.S
@@ -39,4 +39,3 @@
     psllq       %xmm0, %xmm1            # %xmm1<- shifted vA
     movq        %xmm1, (rFP, rINST, 4)  # vA<- shifted vA
     FINISH      1                       # jump to next instruction
-
diff --git a/vm/mterp/x86-atom/OP_SHR_LONG.S b/vm/mterp/x86-atom/OP_SHR_LONG.S
index 7745cdb..be893ef 100644
--- a/vm/mterp/x86-atom/OP_SHR_LONG.S
+++ b/vm/mterp/x86-atom/OP_SHR_LONG.S
@@ -51,4 +51,3 @@
 .L${opcode}_final:
     movq        %xmm1, (rFP, rINST, 4)  # vAA<- shifted vBB
     FINISH      2                       # jump to next instruction
-
diff --git a/vm/mterp/x86-atom/OP_SHR_LONG_2ADDR.S b/vm/mterp/x86-atom/OP_SHR_LONG_2ADDR.S
index bc98be9..38aefcf 100644
--- a/vm/mterp/x86-atom/OP_SHR_LONG_2ADDR.S
+++ b/vm/mterp/x86-atom/OP_SHR_LONG_2ADDR.S
@@ -52,5 +52,3 @@
 .L${opcode}_final:
     movq        %xmm1, (rFP, rINST, 4)  # vAA<- shifted vBB
     FINISH      1                       # jump to next instruction
-
-
diff --git a/vm/mterp/x86-atom/OP_SUB_INT.S b/vm/mterp/x86-atom/OP_SUB_INT.S
index aab64fc..be530aa 100644
--- a/vm/mterp/x86-atom/OP_SUB_INT.S
+++ b/vm/mterp/x86-atom/OP_SUB_INT.S
@@ -18,4 +18,3 @@
     */
 
 %include "x86-atom/binop.S" {"instr":"subl     (rFP, %edx, 4), %ecx"}
-
diff --git a/vm/mterp/x86-atom/OP_THROW.S b/vm/mterp/x86-atom/OP_THROW.S
index 2b87c88..85afa7a 100644
--- a/vm/mterp/x86-atom/OP_THROW.S
+++ b/vm/mterp/x86-atom/OP_THROW.S
@@ -34,4 +34,3 @@
     je          common_errNullObject    # handle null object
     movl        rINST, offThread_exception(%ecx) # thread->exception<- object
     jmp         common_exceptionThrown  # handle exception
-
diff --git a/vm/mterp/x86-atom/OP_THROW_VERIFICATION_ERROR.S b/vm/mterp/x86-atom/OP_THROW_VERIFICATION_ERROR.S
index 52e52bf..fcd42c7 100644
--- a/vm/mterp/x86-atom/OP_THROW_VERIFICATION_ERROR.S
+++ b/vm/mterp/x86-atom/OP_THROW_VERIFICATION_ERROR.S
@@ -16,7 +16,7 @@
    /*
     * File: OP_THROW_VERIFICATION_ERROR.S
     *
-    * Code: 
+    * Code:
     *
     * For: throw-verification-error
     *
diff --git a/vm/mterp/x86-atom/OP_USHR_LONG.S b/vm/mterp/x86-atom/OP_USHR_LONG.S
index 35e8d69..1c404f0 100644
--- a/vm/mterp/x86-atom/OP_USHR_LONG.S
+++ b/vm/mterp/x86-atom/OP_USHR_LONG.S
@@ -37,4 +37,3 @@
     psrlq       %xmm0, %xmm1            # %xmm1<- shifted vBB
     movsd       %xmm1, (rFP, rINST, 4)  # vAA<- shifted vBB
     FINISH      2                       # jump to next instruction
-
diff --git a/vm/mterp/x86-atom/OP_USHR_LONG_2ADDR.S b/vm/mterp/x86-atom/OP_USHR_LONG_2ADDR.S
index d3a215f..31cb5bc 100644
--- a/vm/mterp/x86-atom/OP_USHR_LONG_2ADDR.S
+++ b/vm/mterp/x86-atom/OP_USHR_LONG_2ADDR.S
@@ -39,4 +39,3 @@
     psrlq       %xmm0, %xmm1            # %xmm1<- shifted vA
     movq        %xmm1, (rFP, rINST, 4)  # vA<- shifted vA
     FINISH      1                       # jump to next instruction
-
diff --git a/vm/mterp/x86-atom/TODO.txt b/vm/mterp/x86-atom/TODO.txt
index 825e7db..5b89db9 100644
--- a/vm/mterp/x86-atom/TODO.txt
+++ b/vm/mterp/x86-atom/TODO.txt
@@ -7,8 +7,8 @@
      skip a memory load when debugger support is completely disabled)
 
 (md) Correct OP_MONITOR_EXIT (need to adjust PC before throw)
+(md) OP_THROW needs to export the PC
 
 (lo) Implement OP_BREAKPOINT
 (lo) Implement OP_EXECUTE_INLINE_RANGE
-(lo) Implement OP_*_WIDE_VOLATILE
-
+(lo) Implement OP_*_VOLATILE (12 instructions)
diff --git a/vm/mterp/x86-atom/binop.S b/vm/mterp/x86-atom/binop.S
index 7fc6de2..0343190 100644
--- a/vm/mterp/x86-atom/binop.S
+++ b/vm/mterp/x86-atom/binop.S
@@ -40,5 +40,3 @@
     $instr                              # %ecx<- vBB op vCC
     SET_VREG    %ecx, rINST             # vAA<- %ecx; result
     OLD_JMP_4   %eax
-
-
diff --git a/vm/mterp/x86-atom/binop2addr.S b/vm/mterp/x86-atom/binop2addr.S
index 2aa55a1..af135a7 100644
--- a/vm/mterp/x86-atom/binop2addr.S
+++ b/vm/mterp/x86-atom/binop2addr.S
@@ -42,5 +42,3 @@
     $instr    # %ecx<- vA op vB
     #FGETOP_JMP  1, %eax                 # jump to next instruction; getop, jmp
     OLD_JMP_4   %eax
-
-
diff --git a/vm/mterp/x86-atom/binopD2addr.S b/vm/mterp/x86-atom/binopD2addr.S
index 789f899..a4fcf65 100644
--- a/vm/mterp/x86-atom/binopD2addr.S
+++ b/vm/mterp/x86-atom/binopD2addr.S
@@ -66,4 +66,3 @@
     movl        $$0, (rFP, rINST, 4)    # vAA<- 0
     .endif
     FGETOP_JMP  1, %edx                 # jump to next instruction; getop, jmp
-
diff --git a/vm/mterp/x86-atom/binopDLit16.S b/vm/mterp/x86-atom/binopDLit16.S
index 7c1a3b3..86bb937 100644
--- a/vm/mterp/x86-atom/binopDLit16.S
+++ b/vm/mterp/x86-atom/binopDLit16.S
@@ -69,4 +69,3 @@
     .endif
     movzbl      1(rPC), rINST
     jmp         *dvmAsmInstructionJmpTable(, %edx, 4)
-
diff --git a/vm/mterp/x86-atom/unopWide.S b/vm/mterp/x86-atom/unopWide.S
index 1e4795c..3790a2c 100644
--- a/vm/mterp/x86-atom/unopWide.S
+++ b/vm/mterp/x86-atom/unopWide.S
@@ -41,5 +41,3 @@
     $instr                              # do operation part 2
     movq        $result, (rFP, %ecx, 4) # vA<- result
     FGETOP_JMP  1, %eax                 # jump to next instruction; getop, jmp
-
-
diff --git a/vm/mterp/x86-atom/unused.S b/vm/mterp/x86-atom/unused.S
index 8898f1e..8267709 100644
--- a/vm/mterp/x86-atom/unused.S
+++ b/vm/mterp/x86-atom/unused.S
@@ -28,4 +28,3 @@
     */
 
     call        common_abort
-
diff --git a/vm/mterp/x86/OP_AGET.S b/vm/mterp/x86/OP_AGET.S
index d83786b..fe87037 100644
--- a/vm/mterp/x86/OP_AGET.S
+++ b/vm/mterp/x86/OP_AGET.S
@@ -21,4 +21,3 @@
     SET_VREG(%eax,%ecx)
     ADVANCE_PC(2)
     GOTO_NEXT
-
diff --git a/vm/mterp/x86/OP_AGET_WIDE.S b/vm/mterp/x86/OP_AGET_WIDE.S
index 2470bc5..c050156 100644
--- a/vm/mterp/x86/OP_AGET_WIDE.S
+++ b/vm/mterp/x86/OP_AGET_WIDE.S
@@ -25,4 +25,3 @@
     FETCH_INST_WORD(2)
     ADVANCE_PC(2)
     GOTO_NEXT
-
diff --git a/vm/mterp/x86/OP_APUT.S b/vm/mterp/x86/OP_APUT.S
index b99c1b2..b9a660f 100644
--- a/vm/mterp/x86/OP_APUT.S
+++ b/vm/mterp/x86/OP_APUT.S
@@ -21,4 +21,3 @@
     $store     $reg,(%eax)
     ADVANCE_PC(2)
     GOTO_NEXT
-
diff --git a/vm/mterp/x86/OP_APUT_OBJECT.S b/vm/mterp/x86/OP_APUT_OBJECT.S
index 640894e..2069950 100644
--- a/vm/mterp/x86/OP_APUT_OBJECT.S
+++ b/vm/mterp/x86/OP_APUT_OBJECT.S
@@ -44,4 +44,3 @@
     FETCH_INST_WORD(2)
     ADVANCE_PC(2)
     GOTO_NEXT
-
diff --git a/vm/mterp/x86/OP_APUT_WIDE.S b/vm/mterp/x86/OP_APUT_WIDE.S
index 1f67057..658ca7c 100644
--- a/vm/mterp/x86/OP_APUT_WIDE.S
+++ b/vm/mterp/x86/OP_APUT_WIDE.S
@@ -25,4 +25,3 @@
     movl      %ecx,(%eax)
     ADVANCE_PC(2)
     GOTO_NEXT
-
diff --git a/vm/mterp/x86/OP_CONST_4.S b/vm/mterp/x86/OP_CONST_4.S
index 284a30b..499f7c3 100644
--- a/vm/mterp/x86/OP_CONST_4.S
+++ b/vm/mterp/x86/OP_CONST_4.S
@@ -8,4 +8,3 @@
     sarl    $$4,%eax
     SET_VREG(%eax,%ecx)
     GOTO_NEXT
-
diff --git a/vm/mterp/x86/OP_CONST_CLASS.S b/vm/mterp/x86/OP_CONST_CLASS.S
index 4d76a7c..fa37917 100644
--- a/vm/mterp/x86/OP_CONST_CLASS.S
+++ b/vm/mterp/x86/OP_CONST_CLASS.S
@@ -39,4 +39,3 @@
     FETCH_INST_WORD(2)
     ADVANCE_PC(2)
     GOTO_NEXT
-
diff --git a/vm/mterp/x86/OP_CONST_STRING.S b/vm/mterp/x86/OP_CONST_STRING.S
index 68e71e6..96e5dcd 100644
--- a/vm/mterp/x86/OP_CONST_STRING.S
+++ b/vm/mterp/x86/OP_CONST_STRING.S
@@ -38,4 +38,3 @@
     FETCH_INST_WORD(2)
     ADVANCE_PC(2)
     GOTO_NEXT
-
diff --git a/vm/mterp/x86/OP_CONST_STRING_JUMBO.S b/vm/mterp/x86/OP_CONST_STRING_JUMBO.S
index 2ccfdb4..45316f9 100644
--- a/vm/mterp/x86/OP_CONST_STRING_JUMBO.S
+++ b/vm/mterp/x86/OP_CONST_STRING_JUMBO.S
@@ -38,4 +38,3 @@
     FETCH_INST_WORD(3)
     ADVANCE_PC(3)
     GOTO_NEXT
-
diff --git a/vm/mterp/x86/OP_CONST_WIDE.S b/vm/mterp/x86/OP_CONST_WIDE.S
index 55145de..aa582b8 100644
--- a/vm/mterp/x86/OP_CONST_WIDE.S
+++ b/vm/mterp/x86/OP_CONST_WIDE.S
@@ -9,4 +9,3 @@
     movl      %eax,(%ecx)
     ADVANCE_PC(5)
     GOTO_NEXT
-
diff --git a/vm/mterp/x86/OP_CONST_WIDE_HIGH16.S b/vm/mterp/x86/OP_CONST_WIDE_HIGH16.S
index 00d1e97..1d726f4 100644
--- a/vm/mterp/x86/OP_CONST_WIDE_HIGH16.S
+++ b/vm/mterp/x86/OP_CONST_WIDE_HIGH16.S
@@ -9,4 +9,3 @@
     xorl       %eax,%eax
     SET_VREG_WORD(%eax,%ecx,0)            # v[AA+0]<- eax
     GOTO_NEXT
-
diff --git a/vm/mterp/x86/OP_DIV_LONG.S b/vm/mterp/x86/OP_DIV_LONG.S
index 6d408ab..f324be3 100644
--- a/vm/mterp/x86/OP_DIV_LONG.S
+++ b/vm/mterp/x86/OP_DIV_LONG.S
@@ -50,6 +50,3 @@
     xorl     %eax,%eax
     movl     $special,%edx
     jmp      .L${opcode}_finish
-
-
-
diff --git a/vm/mterp/x86/OP_DIV_LONG_2ADDR.S b/vm/mterp/x86/OP_DIV_LONG_2ADDR.S
index 01de27c..128ede0 100644
--- a/vm/mterp/x86/OP_DIV_LONG_2ADDR.S
+++ b/vm/mterp/x86/OP_DIV_LONG_2ADDR.S
@@ -52,4 +52,3 @@
     xorl     %eax,%eax
     movl     $special,%edx
     jmp      .L${opcode}_finish
-
diff --git a/vm/mterp/x86/OP_EXECUTE_INLINE.S b/vm/mterp/x86/OP_EXECUTE_INLINE.S
index 9567b74..1eca6e2 100644
--- a/vm/mterp/x86/OP_EXECUTE_INLINE.S
+++ b/vm/mterp/x86/OP_EXECUTE_INLINE.S
@@ -64,4 +64,3 @@
     sall      $$4,%eax      # index *= sizeof(table entry)
     jmp       *gDvmInlineOpsTable(%eax)
     # will return to caller of .L${opcode}_continue
-
diff --git a/vm/mterp/x86/OP_FILLED_NEW_ARRAY.S b/vm/mterp/x86/OP_FILLED_NEW_ARRAY.S
index aa247a8..a98f6b9 100644
--- a/vm/mterp/x86/OP_FILLED_NEW_ARRAY.S
+++ b/vm/mterp/x86/OP_FILLED_NEW_ARRAY.S
@@ -127,4 +127,3 @@
     call    dvmThrowException
     UNSPILL(rPC)
     jmp     common_exceptionThrown
-
diff --git a/vm/mterp/x86/OP_IGET.S b/vm/mterp/x86/OP_IGET.S
index 38a67cd..cd8033f 100644
--- a/vm/mterp/x86/OP_IGET.S
+++ b/vm/mterp/x86/OP_IGET.S
@@ -62,4 +62,3 @@
     SET_VREG(%ecx,%eax)
     ADVANCE_PC(2)
     GOTO_NEXT
-
diff --git a/vm/mterp/x86/OP_IGET_WIDE.S b/vm/mterp/x86/OP_IGET_WIDE.S
index 4a91d1b..77a5994 100644
--- a/vm/mterp/x86/OP_IGET_WIDE.S
+++ b/vm/mterp/x86/OP_IGET_WIDE.S
@@ -62,4 +62,3 @@
     FETCH_INST_WORD(2)
     ADVANCE_PC(2)
     GOTO_NEXT
-
diff --git a/vm/mterp/x86/OP_INSTANCE_OF.S b/vm/mterp/x86/OP_INSTANCE_OF.S
index 1f52b56..71b92d3 100644
--- a/vm/mterp/x86/OP_INSTANCE_OF.S
+++ b/vm/mterp/x86/OP_INSTANCE_OF.S
@@ -100,4 +100,3 @@
     GET_VREG(%eax,%eax)                 # eax<- vB (obj)
     movl    offObject_clazz(%eax),%eax  # eax<- obj->clazz
     jmp     .L${opcode}_resolved
-
diff --git a/vm/mterp/x86/OP_INVOKE_INTERFACE.S b/vm/mterp/x86/OP_INVOKE_INTERFACE.S
index 1631177..ff48ab8 100644
--- a/vm/mterp/x86/OP_INVOKE_INTERFACE.S
+++ b/vm/mterp/x86/OP_INVOKE_INTERFACE.S
@@ -36,4 +36,3 @@
     testl      %eax,%eax
     je         common_exceptionThrown
     jmp        common_invokeMethod${routine}
-
diff --git a/vm/mterp/x86/OP_INVOKE_STATIC.S b/vm/mterp/x86/OP_INVOKE_STATIC.S
index 40dac06..a8a8d77 100644
--- a/vm/mterp/x86/OP_INVOKE_STATIC.S
+++ b/vm/mterp/x86/OP_INVOKE_STATIC.S
@@ -34,4 +34,3 @@
     testl     %eax,%eax                 # got null?
     jne       common_invokeMethod${routine}
     jmp       common_exceptionThrown
-
diff --git a/vm/mterp/x86/OP_INVOKE_SUPER_QUICK.S b/vm/mterp/x86/OP_INVOKE_SUPER_QUICK.S
index 7545eb0..96c662a 100644
--- a/vm/mterp/x86/OP_INVOKE_SUPER_QUICK.S
+++ b/vm/mterp/x86/OP_INVOKE_SUPER_QUICK.S
@@ -24,4 +24,3 @@
     EXPORT_PC()
     movl      (%ecx,%eax,4),%eax        # eax<- super->vtable[BBBB]
     jmp       common_invokeMethod${routine}
-
diff --git a/vm/mterp/x86/OP_INVOKE_VIRTUAL.S b/vm/mterp/x86/OP_INVOKE_VIRTUAL.S
index 20d9120..85fcf83 100644
--- a/vm/mterp/x86/OP_INVOKE_VIRTUAL.S
+++ b/vm/mterp/x86/OP_INVOKE_VIRTUAL.S
@@ -53,4 +53,3 @@
     movl      offClassObject_vtable(%ecx),%ecx # ecx<- thisPtr->clazz->vtable
     movl      (%ecx,%eax,4),%eax        # eax<- vtable[methodIndex]
     jmp       common_invokeMethod${routine}
-
diff --git a/vm/mterp/x86/OP_INVOKE_VIRTUAL_QUICK.S b/vm/mterp/x86/OP_INVOKE_VIRTUAL_QUICK.S
index f36ed2d..1ba93eb 100644
--- a/vm/mterp/x86/OP_INVOKE_VIRTUAL_QUICK.S
+++ b/vm/mterp/x86/OP_INVOKE_VIRTUAL_QUICK.S
@@ -21,5 +21,3 @@
     EXPORT_PC()                         # might throw later - get ready
     movl      (%eax,%ecx,4),%eax        # eax<- vtable[BBBB]
     jmp       common_invokeMethod${routine}
-
-
diff --git a/vm/mterp/x86/OP_MOVE_FROM16.S b/vm/mterp/x86/OP_MOVE_FROM16.S
index e14817d..35d3147 100644
--- a/vm/mterp/x86/OP_MOVE_FROM16.S
+++ b/vm/mterp/x86/OP_MOVE_FROM16.S
@@ -8,4 +8,3 @@
     ADVANCE_PC(2)
     SET_VREG (%ecx,%eax)              # fp[AA]<- ecx]
     GOTO_NEXT
-
diff --git a/vm/mterp/x86/OP_MUL_INT_LIT8.S b/vm/mterp/x86/OP_MUL_INT_LIT8.S
index 8a046c3..2cf11b3 100644
--- a/vm/mterp/x86/OP_MUL_INT_LIT8.S
+++ b/vm/mterp/x86/OP_MUL_INT_LIT8.S
@@ -11,4 +11,3 @@
     FETCH_INST_WORD(2)
     ADVANCE_PC(2)
     GOTO_NEXT
-
diff --git a/vm/mterp/x86/OP_MUL_LONG.S b/vm/mterp/x86/OP_MUL_LONG.S
index 3bee2c6..fd151e0 100644
--- a/vm/mterp/x86/OP_MUL_LONG.S
+++ b/vm/mterp/x86/OP_MUL_LONG.S
@@ -41,4 +41,3 @@
     movl      %eax,(rFP,%ecx,4)   # v[B]<- %eax
     ADVANCE_PC(2)
     GOTO_NEXT
-
diff --git a/vm/mterp/x86/OP_MUL_LONG_2ADDR.S b/vm/mterp/x86/OP_MUL_LONG_2ADDR.S
index 83a042a..5651dfe 100644
--- a/vm/mterp/x86/OP_MUL_LONG_2ADDR.S
+++ b/vm/mterp/x86/OP_MUL_LONG_2ADDR.S
@@ -39,4 +39,3 @@
     UNSPILL(rIBASE)
     ADVANCE_PC(1)
     GOTO_NEXT
-
diff --git a/vm/mterp/x86/OP_NEW_ARRAY.S b/vm/mterp/x86/OP_NEW_ARRAY.S
index cb07aed..74d72ed 100644
--- a/vm/mterp/x86/OP_NEW_ARRAY.S
+++ b/vm/mterp/x86/OP_NEW_ARRAY.S
@@ -70,4 +70,3 @@
     SET_VREG(%eax,%ecx)
     ADVANCE_PC(2)
     GOTO_NEXT
-
diff --git a/vm/mterp/x86/OP_NEW_INSTANCE.S b/vm/mterp/x86/OP_NEW_INSTANCE.S
index d56d55c..e11e518 100644
--- a/vm/mterp/x86/OP_NEW_INSTANCE.S
+++ b/vm/mterp/x86/OP_NEW_INSTANCE.S
@@ -91,6 +91,3 @@
     call    dvmThrowExceptionWithClassMessage
     UNSPILL(rPC)
     jmp     common_exceptionThrown
-
-
-
diff --git a/vm/mterp/x86/OP_OR_INT_LIT16.S b/vm/mterp/x86/OP_OR_INT_LIT16.S
index ec4f9c1..fa70e99 100644
--- a/vm/mterp/x86/OP_OR_INT_LIT16.S
+++ b/vm/mterp/x86/OP_OR_INT_LIT16.S
@@ -1,3 +1,2 @@
 %verify "executed"
 %include "x86/binopLit16.S" {"instr":"orl     %ecx,%eax"}
-
diff --git a/vm/mterp/x86/OP_OR_INT_LIT8.S b/vm/mterp/x86/OP_OR_INT_LIT8.S
index d4cc0b4..5761806 100644
--- a/vm/mterp/x86/OP_OR_INT_LIT8.S
+++ b/vm/mterp/x86/OP_OR_INT_LIT8.S
@@ -1,3 +1,2 @@
 %verify "executed"
 %include "x86/binopLit8.S" {"instr":"orl     %ecx,%eax"}
-
diff --git a/vm/mterp/x86/OP_RETURN_VOID.S b/vm/mterp/x86/OP_RETURN_VOID.S
index 48aaba9..4d4291f 100644
--- a/vm/mterp/x86/OP_RETURN_VOID.S
+++ b/vm/mterp/x86/OP_RETURN_VOID.S
@@ -1,3 +1,2 @@
 %verify "executed"
     jmp       common_returnFromMethod
-
diff --git a/vm/mterp/x86/OP_SGET.S b/vm/mterp/x86/OP_SGET.S
index 7c17579..f05eae7 100644
--- a/vm/mterp/x86/OP_SGET.S
+++ b/vm/mterp/x86/OP_SGET.S
@@ -41,4 +41,3 @@
     testl    %eax,%eax
     jne      .L${opcode}_finish                 # success, continue
     jmp      common_exceptionThrown             # no, handle exception
-
diff --git a/vm/mterp/x86/OP_SGET_WIDE.S b/vm/mterp/x86/OP_SGET_WIDE.S
index 17c71fb..5c038a7 100644
--- a/vm/mterp/x86/OP_SGET_WIDE.S
+++ b/vm/mterp/x86/OP_SGET_WIDE.S
@@ -42,4 +42,3 @@
     testl    %eax,%eax
     jne      .L${opcode}_finish                 # success, continue
     jmp      common_exceptionThrown             # no, handle exception
-
diff --git a/vm/mterp/x86/OP_SPUT.S b/vm/mterp/x86/OP_SPUT.S
index d880422..952ca87 100644
--- a/vm/mterp/x86/OP_SPUT.S
+++ b/vm/mterp/x86/OP_SPUT.S
@@ -41,4 +41,3 @@
     testl    %eax,%eax
     jne      .L${opcode}_finish                 # success, continue
     jmp      common_exceptionThrown             # no, handle exception
-
diff --git a/vm/mterp/x86/OP_SPUT_WIDE.S b/vm/mterp/x86/OP_SPUT_WIDE.S
index 584ce9d..5a48c2e 100644
--- a/vm/mterp/x86/OP_SPUT_WIDE.S
+++ b/vm/mterp/x86/OP_SPUT_WIDE.S
@@ -43,4 +43,3 @@
     testl    %eax,%eax
     jne      .L${opcode}_finish                 # success, continue
     jmp      common_exceptionThrown             # no, handle exception
-
diff --git a/vm/mterp/x86/OP_THROW.S b/vm/mterp/x86/OP_THROW.S
index 7ed2ead..d7e1574 100644
--- a/vm/mterp/x86/OP_THROW.S
+++ b/vm/mterp/x86/OP_THROW.S
@@ -5,6 +5,7 @@
      */
     /* throw vAA */
     GET_GLUE(%ecx)
+    EXPORT_PC()
     movzbl   rINST_HI,rINST_FULL       # rINST_FULL<- AA
     GET_VREG(%eax,rINST_FULL)          # eax<- exception object
     movl     offGlue_self(%ecx),%ecx   # ecx<- glue->self
diff --git a/vm/mterp/x86/OP_THROW_VERIFICATION_ERROR.S b/vm/mterp/x86/OP_THROW_VERIFICATION_ERROR.S
index c3b5063..e492e2d 100644
--- a/vm/mterp/x86/OP_THROW_VERIFICATION_ERROR.S
+++ b/vm/mterp/x86/OP_THROW_VERIFICATION_ERROR.S
@@ -17,4 +17,3 @@
     call     dvmThrowVerificationError       # call(method, kind, ref)
     UNSPILL(rPC)
     jmp      common_exceptionThrown          # handle exception
-
diff --git a/vm/mterp/x86/binflop.S b/vm/mterp/x86/binflop.S
index 6f251ee..233799c 100644
--- a/vm/mterp/x86/binflop.S
+++ b/vm/mterp/x86/binflop.S
@@ -13,4 +13,3 @@
     ADVANCE_PC(2)
     $store   (rFP,%ecx,4)           # %st to vAA
     GOTO_NEXT
-
diff --git a/vm/mterp/x86/binop.S b/vm/mterp/x86/binop.S
index 1370c8f..00d9118 100644
--- a/vm/mterp/x86/binop.S
+++ b/vm/mterp/x86/binop.S
@@ -18,4 +18,3 @@
     ADVANCE_PC(2)
     SET_VREG($result,%ecx)
     GOTO_NEXT
-
diff --git a/vm/mterp/x86/footer.S b/vm/mterp/x86/footer.S
index b322ff7..09eeb6e 100644
--- a/vm/mterp/x86/footer.S
+++ b/vm/mterp/x86/footer.S
@@ -541,4 +541,3 @@
     .asciz  "Ljava/lang/InternalError;"
 .LstrFilledNewArrayNotImpl:
     .asciz  "filled-new-array only implemented for 'int'"
-
diff --git a/vm/mterp/x86/header.S b/vm/mterp/x86/header.S
index ff90d77..bb043ba 100644
--- a/vm/mterp/x86/header.S
+++ b/vm/mterp/x86/header.S
@@ -206,4 +206,3 @@
  * to expand the macros into assembler assignment statements.
  */
 #include "../common/asm-constants.h"
-
diff --git a/vm/mterp/x86/shop2addr.S b/vm/mterp/x86/shop2addr.S
index 63efeee..9e8bd56 100644
--- a/vm/mterp/x86/shop2addr.S
+++ b/vm/mterp/x86/shop2addr.S
@@ -14,4 +14,3 @@
     FETCH_INST_WORD(1)
     ADVANCE_PC(1)
     GOTO_NEXT
-
diff --git a/vm/mterp/x86/zcmp.S b/vm/mterp/x86/zcmp.S
index 3acd093..221822d 100644
--- a/vm/mterp/x86/zcmp.S
+++ b/vm/mterp/x86/zcmp.S
@@ -20,4 +20,3 @@
     FETCH_INST_INDEXED(%eax)
     ADVANCE_PC_INDEXED(%eax)
     GOTO_NEXT
-
diff --git a/vm/native/InternalNative.c b/vm/native/InternalNative.c
index 9b6b801..700c8af 100644
--- a/vm/native/InternalNative.c
+++ b/vm/native/InternalNative.c
@@ -56,7 +56,7 @@
     { "Ldalvik/system/VMStack;",          dvm_dalvik_system_VMStack, 0 },
     { "Lorg/apache/harmony/dalvik/ddmc/DdmServer;",
             dvm_org_apache_harmony_dalvik_ddmc_DdmServer, 0 },
-    { "Lorg/apache/harmony/dalvik/ddmc/DdmVmInternal;", 
+    { "Lorg/apache/harmony/dalvik/ddmc/DdmVmInternal;",
             dvm_org_apache_harmony_dalvik_ddmc_DdmVmInternal, 0 },
     { "Lorg/apache/harmony/dalvik/NativeTestTarget;",
             dvm_org_apache_harmony_dalvik_NativeTestTarget, 0 },
@@ -264,7 +264,7 @@
  * check the access flags at the time of the method call.  This results in
  * "native abstract" methods, which can't exist.  If we see the "abstract"
  * flag set, clear the "native" flag.
- * 
+ *
  * We also move the DECLARED_SYNCHRONIZED flag into the SYNCHRONIZED
  * position, because the callers of this function are trying to convey
  * the "traditional" meaning of the flags to their callers.
@@ -276,11 +276,11 @@
     }
 
     flags &= ~ACC_SYNCHRONIZED;
-    
+
     if ((flags & ACC_DECLARED_SYNCHRONIZED) != 0) {
         flags |= ACC_SYNCHRONIZED;
     }
-    
+
     return flags & JAVA_FLAGS_MASK;
 }
 
@@ -346,4 +346,3 @@
     }
     return false;
 }
-
diff --git a/vm/native/InternalNativePriv.h b/vm/native/InternalNativePriv.h
index bcd9119..6f8d6c9 100644
--- a/vm/native/InternalNativePriv.h
+++ b/vm/native/InternalNativePriv.h
@@ -55,7 +55,7 @@
  * check the access flags at the time of the method call.  This results in
  * "native abstract" methods, which can't exist.  If we see the "abstract"
  * flag set, clear the "native" flag.
- * 
+ *
  * We also move the DECLARED_SYNCHRONIZED flag into the SYNCHRONIZED
  * position, because the callers of this function are trying to convey
  * the "traditional" meaning of the flags to their callers.
diff --git a/vm/native/README.txt b/vm/native/README.txt
index 78630eb..bc8912f 100644
--- a/vm/native/README.txt
+++ b/vm/native/README.txt
@@ -21,4 +21,3 @@
 JNI performance be deemed insufficient.  The Bridge version is used as
 an optimization for a few high-volume Object calls, and should generally
 not be used as we may drop support for it at some point.
-
diff --git a/vm/native/dalvik_system_DexFile.c b/vm/native/dalvik_system_DexFile.c
index fc95d30..25c9dfb 100644
--- a/vm/native/dalvik_system_DexFile.c
+++ b/vm/native/dalvik_system_DexFile.c
@@ -335,6 +335,7 @@
     DvmDex* pDvmDex;
     DexFile* pDexFile;
     ArrayObject* stringArray;
+    Thread* self = dvmThreadSelf();
 
     if (!validateCookie(cookie))
         RETURN_VOID();
@@ -349,10 +350,13 @@
     int count = pDexFile->pHeader->classDefsSize;
     stringArray = dvmAllocObjectArray(gDvm.classJavaLangString, count,
                     ALLOC_DEFAULT);
-    if (stringArray == NULL)
-        RETURN_VOID();          // should be an OOM pending
+    if (stringArray == NULL) {
+        /* probably OOM */
+        LOGD("Failed allocating array of %d strings\n", count);
+        assert(dvmCheckException(self));
+        RETURN_VOID();
+    }
 
-    StringObject** contents = (StringObject**) stringArray->contents;
     int i;
     for (i = 0; i < count; i++) {
         const DexClassDef* pClassDef = dexGetClassDef(pDexFile, i);
@@ -360,12 +364,13 @@
             dexStringByTypeIdx(pDexFile, pClassDef->classIdx);
 
         char* className = dvmDescriptorToDot(descriptor);
-        contents[i] = dvmCreateStringFromCstr(className, ALLOC_DEFAULT);
-        dvmReleaseTrackedAlloc((Object*) contents[i], NULL);
+        StringObject* str = dvmCreateStringFromCstr(className);
+        dvmSetObjectArrayElement(stringArray, i, (Object *)str);
+        dvmReleaseTrackedAlloc((Object *)str, self);
         free(className);
     }
 
-    dvmReleaseTrackedAlloc((Object*)stringArray, NULL);
+    dvmReleaseTrackedAlloc((Object*)stringArray, self);
     RETURN_PTR(stringArray);
 }
 
@@ -447,4 +452,3 @@
         Dalvik_dalvik_system_DexFile_isDexOptNeeded },
     { NULL, NULL, NULL },
 };
-
diff --git a/vm/native/dalvik_system_VMDebug.c b/vm/native/dalvik_system_VMDebug.c
index 34398d0..d27926c 100644
--- a/vm/native/dalvik_system_VMDebug.c
+++ b/vm/native/dalvik_system_VMDebug.c
@@ -30,6 +30,8 @@
  */
 static ArrayObject* convertStringArray(char** strings, size_t count)
 {
+    Thread* self = dvmThreadSelf();
+
     /*
      * Allocate an array to hold the String objects.
      */
@@ -46,27 +48,26 @@
     if (stringArray == NULL) {
         /* probably OOM */
         LOGD("Failed allocating array of %d strings\n", count);
+        assert(dvmCheckException(self));
         return NULL;
     }
 
-    Thread* self = dvmThreadSelf();
-
     /*
      * Create the individual String objects and add them to the array.
      */
-    StringObject** contents = (StringObject**) stringArray->contents;
     size_t i;
     for (i = 0; i < count; i++) {
-        contents[i] = dvmCreateStringFromCstr(strings[i], ALLOC_DEFAULT);
-        if (contents[i] == NULL) {
+        Object *str =
+            (Object *)dvmCreateStringFromCstr(strings[i]);
+        if (str == NULL) {
             /* probably OOM; drop out now */
-            assert(dvmCheckException(dvmThreadSelf()));
+            assert(dvmCheckException(self));
             dvmReleaseTrackedAlloc((Object*)stringArray, self);
             return NULL;
         }
-
+        dvmSetObjectArrayElement(stringArray, i, str);
         /* stored in tracked array, okay to release */
-        dvmReleaseTrackedAlloc((Object*)contents[i], self);
+        dvmReleaseTrackedAlloc(str, self);
     }
 
     dvmReleaseTrackedAlloc((Object*)stringArray, self);
@@ -359,7 +360,7 @@
             RETURN_VOID();
         }
     }
-    
+
     dvmMethodTraceStart(traceFileName != NULL ? traceFileName : "[DDMS]",
         fd, bufferSize, flags, (traceFileName == NULL && fd == -1));
     free(traceFileName);
diff --git a/vm/native/dalvik_system_VMStack.c b/vm/native/dalvik_system_VMStack.c
index d62fea9..8db4a6b 100644
--- a/vm/native/dalvik_system_VMStack.c
+++ b/vm/native/dalvik_system_VMStack.c
@@ -150,18 +150,16 @@
     /*
      * Fill in the array.
      */
-    ClassObject** objects = (ClassObject**) classes->contents;
-
-    unsigned int sidx = 0;
-    for (idx = kSkip; (int) idx < methodCount && sidx < size; idx++) {
-        const Method* meth = methods[idx];
-
-        if (dvmIsReflectionMethod(meth))
+    unsigned int objCount = 0;
+    for (idx = kSkip; (int) idx < methodCount; idx++) {
+        if (dvmIsReflectionMethod(methods[idx])) {
             continue;
-
-        *objects++ = meth->clazz;
-        sidx++;
+        }
+        dvmSetObjectArrayElement(classes, objCount,
+                                 (Object *)methods[idx]->clazz);
+        objCount++;
     }
+    assert(objCount == classes->length);
 
 bail:
     free(methods);
@@ -235,4 +233,3 @@
         Dalvik_dalvik_system_VMStack_getThreadStackTrace },
     { NULL, NULL, NULL },
 };
-
diff --git a/vm/native/dalvik_system_Zygote.c b/vm/native/dalvik_system_Zygote.c
index 0aa811d..8b09b96 100644
--- a/vm/native/dalvik_system_Zygote.c
+++ b/vm/native/dalvik_system_Zygote.c
@@ -88,14 +88,14 @@
 #endif /* ifdef WCOREDUMP */
         }
 
-        /* 
+        /*
          * If the just-crashed process is the system_server, bring down zygote
          * so that it is restarted by init and system server will be restarted
          * from there.
          */
         if (pid == gDvm.systemServerPid) {
             LOG(LOG_INFO, ZYGOTE_LOG_TAG,
-                "Exit zygote because system server (%d) has terminated\n", 
+                "Exit zygote because system server (%d) has terminated\n",
                 (int) pid);
             kill(getpid(), SIGKILL);
         }
@@ -103,7 +103,7 @@
 
     if (pid < 0) {
         LOG(LOG_WARN, ZYGOTE_LOG_TAG,
-            "Zygote SIGCHLD error (%d) in waitpid\n",errno);
+            "Zygote SIGCHLD error in waitpid: %s\n",strerror(errno));
     }
 }
 
@@ -116,7 +116,7 @@
  * This ends up being called repeatedly before each fork(), but there's
  * no real harm in that.
  */
-static void setSignalHandler() 
+static void setSignalHandler()
 {
     int err;
     struct sigaction sa;
@@ -126,9 +126,9 @@
     sa.sa_handler = sigchldHandler;
 
     err = sigaction (SIGCHLD, &sa, NULL);
-    
+
     if (err < 0) {
-        LOGW("Error setting SIGCHLD handler errno: %d", errno);
+        LOGW("Error setting SIGCHLD handler: %s", strerror(errno));
     }
 }
 
@@ -145,13 +145,13 @@
     sa.sa_handler = SIG_DFL;
 
     err = sigaction (SIGCHLD, &sa, NULL);
-    
+
     if (err < 0) {
-        LOGW("Error unsetting SIGCHLD handler errno: %d", errno);
+        LOGW("Error unsetting SIGCHLD handler: %s", strerror(errno));
     }
 }
 
-/* 
+/*
  * Calls POSIX setgroups() using the int[] object as an argument.
  * A NULL argument is tolerated.
  */
@@ -217,7 +217,7 @@
             return -1;
         }
     }
-    
+
     return 0;
 }
 
@@ -238,7 +238,7 @@
         dvmAbort();
     }
 
-    setSignalHandler();      
+    setSignalHandler();
 
     dvmDumpLoaderStats("zygote");
     pid = fork();
@@ -308,22 +308,22 @@
          * to disable that
          */
         if (prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) < 0) {
-            LOGE("could not set dumpable bit flag for pid %d, errno=%d",
-                 getpid(), errno);
+            LOGE("could not set dumpable bit flag for pid %d: %s",
+                 getpid(), strerror(errno));
         } else {
             struct rlimit rl;
             rl.rlim_cur = 0;
             rl.rlim_max = RLIM_INFINITY;
             if (setrlimit(RLIMIT_CORE, &rl) < 0) {
-                LOGE("could not disable core file generation "
-                     "for pid %d, errno=%d", getpid(), errno);
+                LOGE("could not disable core file generation for pid %d: %s",
+                    getpid(), strerror(errno));
             }
         }
     }
 #endif
 }
 
-/* 
+/*
  * Utility routine to fork zygote and specialize the child process.
  */
 static pid_t forkAndSpecializeCommon(const u4* args)
@@ -348,7 +348,7 @@
         dvmAbort();
     }
 
-    setSignalHandler();      
+    setSignalHandler();
 
     dvmDumpLoaderStats("zygote");
     pid = fork();
@@ -366,7 +366,7 @@
             err = prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0);
 
             if (err < 0) {
-                LOGW("cannot PR_SET_KEEPCAPS errno: %d", errno);
+                LOGW("cannot PR_SET_KEEPCAPS: %s", strerror(errno));
             }
         }
 
@@ -375,23 +375,23 @@
         err = setgroupsIntarray(gids);
 
         if (err < 0) {
-            LOGW("cannot setgroups() errno: %d", errno);
+            LOGW("cannot setgroups(): %s", strerror(errno));
         }
 
         err = setrlimitsFromArray(rlimits);
 
         if (err < 0) {
-            LOGW("cannot setrlimit() errno: %d", errno);
+            LOGW("cannot setrlimit(): %s", strerror(errno));
         }
 
         err = setgid(gid);
         if (err < 0) {
-            LOGW("cannot setgid(%d) errno: %d", gid, errno);
+            LOGW("cannot setgid(%d): %s", gid, strerror(errno));
         }
 
         err = setuid(uid);
         if (err < 0) {
-            LOGW("cannot setuid(%d) errno: %d", uid, errno);
+            LOGW("cannot setuid(%d): %s", uid, strerror(errno));
         }
 
         /*
@@ -403,7 +403,7 @@
         /* configure additional debug options */
         enableDebugFeatures(debugFlags);
 
-        unsetSignalHandler();      
+        unsetSignalHandler();
         gDvm.zygote = false;
         if (!dvmInitAfterZygote()) {
             LOGE("error in post-zygote initialization\n");
@@ -416,8 +416,8 @@
     return pid;
 }
 
-/* native public static int forkAndSpecialize(int uid, int gid, 
- *     int[] gids, int debugFlags); 
+/* native public static int forkAndSpecialize(int uid, int gid,
+ *     int[] gids, int debugFlags);
  */
 static void Dalvik_dalvik_system_Zygote_forkAndSpecialize(const u4* args,
     JValue* pResult)
@@ -429,8 +429,8 @@
     RETURN_INT(pid);
 }
 
-/* native public static int forkSystemServer(int uid, int gid, 
- *     int[] gids, int debugFlags); 
+/* native public static int forkSystemServer(int uid, int gid,
+ *     int[] gids, int debugFlags);
  */
 static void Dalvik_dalvik_system_Zygote_forkSystemServer(
         const u4* args, JValue* pResult)
diff --git a/vm/native/java_lang_Class.c b/vm/native/java_lang_Class.c
index 09b440f..1bb9241 100644
--- a/vm/native/java_lang_Class.c
+++ b/vm/native/java_lang_Class.c
@@ -191,12 +191,13 @@
                         0, ALLOC_DEFAULT);
         }
     } else if (publicOnly) {
-        int i, newIdx, publicCount = 0;
+        u4 count, newIdx, publicCount = 0;
         ClassObject** pSource = (ClassObject**) classes->contents;
+        u4 length = classes->length;
 
         /* count up public classes */
-        for (i = 0; i < (int)classes->length; i++) {
-            if (dvmIsPublicClass(pSource[i]))
+        for (count = 0; count < length; count++) {
+            if (dvmIsPublicClass(pSource[count]))
                 publicCount++;
         }
 
@@ -206,12 +207,13 @@
                         publicCount, ALLOC_DEFAULT);
 
         /* copy them over */
-        ClassObject** pDest = (ClassObject**) newClasses->contents;
-        for (i = newIdx = 0; i < (int)classes->length; i++) {
-            if (dvmIsPublicClass(pSource[i]))
-                pDest[newIdx++] = pSource[i];
+        for (count = newIdx = 0; count < length; count++) {
+            if (dvmIsPublicClass(pSource[count])) {
+                dvmSetObjectArrayElement(newClasses, newIdx,
+                                         (Object *)pSource[count]);
+                newIdx++;
+            }
         }
-
         assert(newIdx == publicCount);
         dvmReleaseTrackedAlloc((Object*) classes, NULL);
         classes = newClasses;
@@ -351,7 +353,7 @@
             }
         }
 
-        nameObj = dvmCreateStringFromCstr(name, ALLOC_DEFAULT);
+        nameObj = dvmCreateStringFromCstr(name);
     } else {
         /*
          * Convert the UTF-8 name to a java.lang.String. The
@@ -363,7 +365,7 @@
          * say, 128 bytes).
          */
         char* dotName = dvmDescriptorToDot(clazz->descriptor);
-        nameObj = dvmCreateStringFromCstr(dotName, ALLOC_DEFAULT);
+        nameObj = dvmCreateStringFromCstr(dotName);
         free(dotName);
     }
 
@@ -385,7 +387,7 @@
         const DexFile* pDexFile = clazz->pDexFile;
         const DexClassDef* pClassDef;
         const DexClassId* pClassId;
-        
+
         pDexFile = clazz->pDexFile;
         pClassDef = dvmDexFindClass(pDexFile, clazz->descriptor);
         pClassId = dvmDexGetClassId(pDexFile, pClassDef->classIdx);
@@ -717,7 +719,7 @@
 /*
  * public String getInnerClassName()
  *
- * Returns the simple name of a member class or local class, or null otherwise. 
+ * Returns the simple name of a member class or local class, or null otherwise.
  */
 static void Dalvik_java_lang_Class_getInnerClassName(const u4* args,
     JValue* pResult)
@@ -725,7 +727,7 @@
     ClassObject* clazz = (ClassObject*) args[0];
     StringObject* nameObj;
     int flags;
-    
+
     if (dvmGetInnerClass(clazz, &nameObj, &flags)) {
         dvmReleaseTrackedAlloc((Object*) nameObj, NULL);
         RETURN_PTR(nameObj);
@@ -810,4 +812,3 @@
         Dalvik_java_lang_Class_setAccessibleNoCheck },
     { NULL, NULL, NULL },
 };
-
diff --git a/vm/native/java_lang_Object.c b/vm/native/java_lang_Object.c
index 44f581e..f2adf52 100644
--- a/vm/native/java_lang_Object.c
+++ b/vm/native/java_lang_Object.c
@@ -109,4 +109,3 @@
         Dalvik_java_lang_Object_getClass },
     { NULL, NULL, NULL },
 };
-
diff --git a/vm/native/java_lang_String.c b/vm/native/java_lang_String.c
index 48a8f83..b3cb7ec 100644
--- a/vm/native/java_lang_String.c
+++ b/vm/native/java_lang_String.c
@@ -40,4 +40,3 @@
         Dalvik_java_lang_String_intern },
     { NULL, NULL, NULL },
 };
-
diff --git a/vm/native/java_lang_System.c b/vm/native/java_lang_System.c
index dd76764..064d6da 100644
--- a/vm/native/java_lang_System.c
+++ b/vm/native/java_lang_System.c
@@ -148,6 +148,7 @@
             (*copyFunc)((u1*)dstArray->contents + dstPos * width,
                     (const u1*)srcArray->contents + srcPos * width,
                     length * width);
+            dvmWriteBarrierArray(dstArray, dstPos, dstPos+length);
         } else {
             /*
              * The arrays are not fundamentally compatible.  However, we may
@@ -194,7 +195,7 @@
             (*copyFunc)((u1*)dstArray->contents + dstPos * width,
                     (const u1*)srcArray->contents + srcPos * width,
                     copyCount * width);
-
+            dvmWriteBarrierArray(dstArray, 0, copyCount);
             if (copyCount != length) {
                 dvmThrowExceptionFmt("Ljava/lang/ArrayStoreException;",
                     "source[%d] of type %s cannot be stored in destination array of type %s",
@@ -275,7 +276,7 @@
     name = dvmCreateCstrFromString(nameObj);
     mappedName = dvmCreateSystemLibraryName(name);
     if (mappedName != NULL) {
-        result = dvmCreateStringFromCstr(mappedName, ALLOC_DEFAULT);
+        result = dvmCreateStringFromCstr(mappedName);
         dvmReleaseTrackedAlloc((Object*) result, NULL);
     }
 
@@ -297,4 +298,3 @@
         Dalvik_java_lang_System_mapLibraryName },
     { NULL, NULL, NULL },
 };
-
diff --git a/vm/native/java_lang_SystemProperties.c b/vm/native/java_lang_SystemProperties.c
index d3501f4..bbcf25e 100644
--- a/vm/native/java_lang_SystemProperties.c
+++ b/vm/native/java_lang_SystemProperties.c
@@ -62,4 +62,3 @@
         Dalvik_java_lang_SystemProperties_postInit },
     { NULL, NULL, NULL },
 };
-
diff --git a/vm/native/java_lang_Throwable.c b/vm/native/java_lang_Throwable.c
index cb94f0f..f96ee6d 100644
--- a/vm/native/java_lang_Throwable.c
+++ b/vm/native/java_lang_Throwable.c
@@ -63,4 +63,3 @@
         Dalvik_java_lang_Throwable_nativeGetStackTrace },
     { NULL, NULL, NULL },
 };
-
diff --git a/vm/native/java_lang_VMClassLoader.c b/vm/native/java_lang_VMClassLoader.c
index adec8d1..e8dbc6e 100644
--- a/vm/native/java_lang_VMClassLoader.c
+++ b/vm/native/java_lang_VMClassLoader.c
@@ -199,4 +199,3 @@
         Dalvik_java_lang_VMClassLoader_loadClass },
     { NULL, NULL, NULL },
 };
-
diff --git a/vm/native/java_lang_VMThread.c b/vm/native/java_lang_VMThread.c
index b23b53c..3b7331b 100644
--- a/vm/native/java_lang_VMThread.c
+++ b/vm/native/java_lang_VMThread.c
@@ -33,6 +33,7 @@
     Object* threadObj = (Object*) args[0];
     s8 stackSize = GET_ARG_LONG(args, 1);
 
+    /* copying collector will pin threadObj for us since it was an argument */
     dvmCreateInterpThread(threadObj, (int) stackSize);
     RETURN_VOID();
 }
@@ -67,7 +68,7 @@
     else
         result = THREAD_ZOMBIE;     // assume it used to exist and is now gone
     dvmUnlockThreadList();
-    
+
     RETURN_INT(result);
 }
 
@@ -197,7 +198,7 @@
     Object* thisPtr = (Object*) args[0];
     int newPriority = args[1];
     Thread* thread;
-    
+
     dvmLockThreadList(NULL);
     thread = dvmGetThreadFromThreadObject(thisPtr);
     if (thread != NULL)
@@ -259,4 +260,3 @@
         Dalvik_java_lang_VMThread_yield },
     { NULL, NULL, NULL },
 };
-
diff --git a/vm/native/java_lang_reflect_AccessibleObject.c b/vm/native/java_lang_reflect_AccessibleObject.c
index 3843f26..46a1357 100644
--- a/vm/native/java_lang_reflect_AccessibleObject.c
+++ b/vm/native/java_lang_reflect_AccessibleObject.c
@@ -42,4 +42,3 @@
       Dalvik_java_lang_reflect_AccessibleObject_getClassSignatureAnnotation },
     { NULL, NULL, NULL },
 };
-
diff --git a/vm/native/java_lang_reflect_Array.c b/vm/native/java_lang_reflect_Array.c
index ddd608e..e7713f6 100644
--- a/vm/native/java_lang_reflect_Array.c
+++ b/vm/native/java_lang_reflect_Array.c
@@ -144,4 +144,3 @@
         Dalvik_java_lang_reflect_Array_createMultiArray },
     { NULL, NULL, NULL },
 };
-
diff --git a/vm/native/java_lang_reflect_Constructor.c b/vm/native/java_lang_reflect_Constructor.c
index 6878f7b..76f69a9 100644
--- a/vm/native/java_lang_reflect_Constructor.c
+++ b/vm/native/java_lang_reflect_Constructor.c
@@ -162,4 +162,3 @@
         Dalvik_java_lang_reflect_Constructor_getSignatureAnnotation },
     { NULL, NULL, NULL },
 };
-
diff --git a/vm/native/java_lang_reflect_Field.c b/vm/native/java_lang_reflect_Field.c
index 72f4c65..cb9f2bf 100644
--- a/vm/native/java_lang_reflect_Field.c
+++ b/vm/native/java_lang_reflect_Field.c
@@ -231,6 +231,17 @@
         fieldType->primitiveType == PRIM_DOUBLE)
     {
         fieldPtr->j = value.j;
+    } else if (fieldType->primitiveType == PRIM_NOT) {
+        if (slot < 0) {
+            StaticField *sfield;
+            sfield = (StaticField *)dvmSlotToField(declaringClass, slot);
+            assert(fieldPtr == &sfield->value);
+            dvmSetStaticFieldObject(sfield, value.l);
+        } else {
+            int offset = declaringClass->ifields[slot].byteOffset;
+            assert(fieldPtr == (JValue *)BYTE_OFFSET(obj, offset));
+            dvmSetFieldObject(obj, offset, value.l);
+        }
     } else {
         fieldPtr->i = value.i;
     }
@@ -445,4 +456,3 @@
         Dalvik_java_lang_reflect_Field_getSignatureAnnotation },
     { NULL, NULL, NULL },
 };
-
diff --git a/vm/native/java_lang_reflect_Method.c b/vm/native/java_lang_reflect_Method.c
index 760a090..f73c8d0 100644
--- a/vm/native/java_lang_reflect_Method.c
+++ b/vm/native/java_lang_reflect_Method.c
@@ -217,4 +217,3 @@
         Dalvik_java_lang_reflect_Method_getSignatureAnnotation },
     { NULL, NULL, NULL },
 };
-
diff --git a/vm/native/java_lang_reflect_Proxy.c b/vm/native/java_lang_reflect_Proxy.c
index e71e11d..da1232c 100644
--- a/vm/native/java_lang_reflect_Proxy.c
+++ b/vm/native/java_lang_reflect_Proxy.c
@@ -45,4 +45,3 @@
         Dalvik_java_lang_reflect_Proxy_generateProxy },
     { NULL, NULL, NULL },
 };
-
diff --git a/vm/native/java_security_AccessController.c b/vm/native/java_security_AccessController.c
index e0699f5..378fb94 100644
--- a/vm/native/java_security_AccessController.c
+++ b/vm/native/java_security_AccessController.c
@@ -121,9 +121,8 @@
     }
 
     /* copy the ProtectionDomain objects out */
-    Object** objects = (Object**) domains->contents;
-    for (idx = 0; idx < subIdx; idx++)
-        *objects++ = subSet[idx];
+    memcpy(domains->contents, subSet, subIdx * sizeof(Object *));
+    dvmWriteBarrierArray(domains, 0, subIdx);
 
 bail:
     free(subSet);
@@ -137,4 +136,3 @@
         Dalvik_java_security_AccessController_getStackDomains },
     { NULL, NULL, NULL },
 };
-
diff --git a/vm/native/java_util_concurrent_atomic_AtomicLong.c b/vm/native/java_util_concurrent_atomic_AtomicLong.c
index c46631f..eb1d0de 100644
--- a/vm/native/java_util_concurrent_atomic_AtomicLong.c
+++ b/vm/native/java_util_concurrent_atomic_AtomicLong.c
@@ -36,4 +36,3 @@
         Dalvik_java_util_concurrent_atomic_AtomicLong_VMSupportsCS8 },
     { NULL, NULL, NULL },
 };
-
diff --git a/vm/native/org_apache_harmony_dalvik_NativeTestTarget.c b/vm/native/org_apache_harmony_dalvik_NativeTestTarget.c
index 131acd3..ccc9467 100644
--- a/vm/native/org_apache_harmony_dalvik_NativeTestTarget.c
+++ b/vm/native/org_apache_harmony_dalvik_NativeTestTarget.c
@@ -40,4 +40,3 @@
         Dalvik_org_apache_harmony_dalvik_NativeTestTarget_emptyInternalMethod },
     { NULL, NULL, NULL },
 };
-
diff --git a/vm/native/org_apache_harmony_dalvik_ddmc_DdmServer.c b/vm/native/org_apache_harmony_dalvik_ddmc_DdmServer.c
index 9c940d4..570d469 100644
--- a/vm/native/org_apache_harmony_dalvik_ddmc_DdmServer.c
+++ b/vm/native/org_apache_harmony_dalvik_ddmc_DdmServer.c
@@ -46,4 +46,3 @@
         Dalvik_org_apache_harmony_dalvik_ddmc_DdmServer_nativeSendChunk },
     { NULL, NULL, NULL },
 };
-
diff --git a/vm/native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.c b/vm/native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.c
index 5868a8b..caa280b 100644
--- a/vm/native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.c
+++ b/vm/native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.c
@@ -167,4 +167,3 @@
       Dalvik_org_apache_harmony_dalvik_ddmc_DdmVmInternal_getRecentAllocations },
     { NULL, NULL, NULL },
 };
-
diff --git a/vm/native/sun_misc_Unsafe.c b/vm/native/sun_misc_Unsafe.c
index 9adebc8..7a64c46 100644
--- a/vm/native/sun_misc_Unsafe.c
+++ b/vm/native/sun_misc_Unsafe.c
@@ -84,8 +84,8 @@
     s4 newValue = args[5];
     volatile int32_t* address = (volatile int32_t*) (((u1*) obj) + offset);
 
-    // Note: android_atomic_cmpxchg() returns 0 on success, not failure.
-    int result = android_atomic_cmpxchg(expectedValue, newValue, address);
+    // Note: android_atomic_release_cas() returns 0 on success, not failure.
+    int result = android_atomic_release_cas(expectedValue, newValue, address);
 
     RETURN_BOOLEAN(result == 0);
 }
@@ -106,7 +106,7 @@
 
     // Note: android_atomic_cmpxchg() returns 0 on success, not failure.
     int result =
-        android_quasiatomic_cmpxchg_64(expectedValue, newValue, address);
+        dvmQuasiAtomicCas64(expectedValue, newValue, address);
 
     RETURN_BOOLEAN(result == 0);
 }
@@ -126,9 +126,9 @@
     int32_t* address = (int32_t*) (((u1*) obj) + offset);
 
     // Note: android_atomic_cmpxchg() returns 0 on success, not failure.
-    int result = android_atomic_cmpxchg((int32_t) expectedValue,
+    int result = android_atomic_release_cas((int32_t) expectedValue,
             (int32_t) newValue, address);
-    
+    dvmWriteBarrierField(obj, address);
     RETURN_BOOLEAN(result == 0);
 }
 
@@ -141,9 +141,10 @@
     // We ignore the this pointer in args[0].
     Object* obj = (Object*) args[1];
     s8 offset = GET_ARG_LONG(args, 2);
-    volatile s4* address = (volatile s4*) (((u1*) obj) + offset);
+    volatile int32_t* address = (volatile int32_t*) (((u1*) obj) + offset);
 
-    RETURN_INT(*address);
+    int32_t value = android_atomic_acquire_load(address);
+    RETURN_INT(value);
 }
 
 /*
@@ -156,9 +157,9 @@
     Object* obj = (Object*) args[1];
     s8 offset = GET_ARG_LONG(args, 2);
     s4 value = (s4) args[4];
-    volatile s4* address = (volatile s4*) (((u1*) obj) + offset);
+    volatile int32_t* address = (volatile int32_t*) (((u1*) obj) + offset);
 
-    *address = value;
+    android_atomic_release_store(value, address);
     RETURN_VOID();
 }
 
@@ -171,9 +172,9 @@
     // We ignore the this pointer in args[0].
     Object* obj = (Object*) args[1];
     s8 offset = GET_ARG_LONG(args, 2);
-    volatile s8* address = (volatile s8*) (((u1*) obj) + offset);
+    volatile int64_t* address = (volatile int64_t*) (((u1*) obj) + offset);
 
-    RETURN_LONG(android_quasiatomic_read_64(address));
+    RETURN_LONG(dvmQuasiAtomicRead64(address));
 }
 
 /*
@@ -186,9 +187,9 @@
     Object* obj = (Object*) args[1];
     s8 offset = GET_ARG_LONG(args, 2);
     s8 value = GET_ARG_LONG(args, 4);
-    volatile s8* address = (volatile s8*) (((u1*) obj) + offset);
+    volatile int64_t* address = (volatile int64_t*) (((u1*) obj) + offset);
 
-    android_quasiatomic_swap_64(value, address);
+    dvmQuasiAtomicSwap64(value, address);
     RETURN_VOID();
 }
 
@@ -201,9 +202,9 @@
     // We ignore the this pointer in args[0].
     Object* obj = (Object*) args[1];
     s8 offset = GET_ARG_LONG(args, 2);
-    volatile Object** address = (volatile Object**) (((u1*) obj) + offset);
+    volatile int32_t* address = (volatile int32_t*) (((u1*) obj) + offset);
 
-    RETURN_PTR((void*) *address);
+    RETURN_PTR((Object*) android_atomic_acquire_load(address));
 }
 
 /*
@@ -217,12 +218,13 @@
     Object* obj = (Object*) args[1];
     s8 offset = GET_ARG_LONG(args, 2);
     Object* value = (Object*) args[4];
-    volatile Object** address = (volatile Object**) (((u1*) obj) + offset);
+    volatile int32_t* address = (volatile int32_t*) (((u1*) obj) + offset);
 
-    *address = value;
+    android_atomic_release_store((int32_t)value, address);
+    dvmWriteBarrierField(obj, (void *)address);
     RETURN_VOID();
 }
-            
+
 /*
  * public native int getInt(Object obj, long offset);
  */
@@ -304,6 +306,7 @@
     Object** address = (Object**) (((u1*) obj) + offset);
 
     *address = value;
+    dvmWriteBarrierField(obj, address);
     RETURN_VOID();
 }
 
@@ -347,4 +350,3 @@
       Dalvik_sun_misc_Unsafe_putObject },
     { NULL, NULL, NULL },
 };
-
diff --git a/vm/oo/AccessCheck.c b/vm/oo/AccessCheck.c
index e3a6946..95b7f3e 100644
--- a/vm/oo/AccessCheck.c
+++ b/vm/oo/AccessCheck.c
@@ -148,4 +148,3 @@
     //    field->clazz->descriptor, field->accessFlags);
     return checkAccess(accessFrom, field->clazz, field->accessFlags);
 }
-
diff --git a/vm/oo/Array.c b/vm/oo/Array.c
index c1f5c3a..9749f77 100644
--- a/vm/oo/Array.c
+++ b/vm/oo/Array.c
@@ -222,7 +222,7 @@
  * The dimension we're creating is in dimensions[0], so when we recurse
  * we advance the pointer.
  */
-ArrayObject* dvmAllocMultiArray(ClassObject* arrayClass, int curDim, 
+ArrayObject* dvmAllocMultiArray(ClassObject* arrayClass, int curDim,
     const int* dimensions)
 {
     ArrayObject* newArray;
@@ -246,7 +246,6 @@
         }
     } else {
         ClassObject* subArrayClass;
-        Object** contents;
         int i;
 
         /* if we have X[][], find X[] */
@@ -269,19 +268,16 @@
         /*
          * Create a new sub-array in every element of the array.
          */
-        contents = (Object**) newArray->contents;
         for (i = 0; i < *dimensions; i++) {
-            ArrayObject* newSubArray;
-
-            newSubArray = dvmAllocMultiArray(subArrayClass, curDim-1,
-                            dimensions+1);
+          ArrayObject* newSubArray;
+          newSubArray = dvmAllocMultiArray(subArrayClass, curDim-1,
+                          dimensions+1);
             if (newSubArray == NULL) {
                 dvmReleaseTrackedAlloc((Object*) newArray, NULL);
                 assert(dvmCheckException(dvmThreadSelf()));
                 return NULL;
             }
-
-            *contents++ = (Object*) newSubArray;
+            dvmSetObjectArrayElement(newArray, i, (Object *)newSubArray);
             dvmReleaseTrackedAlloc((Object*) newSubArray, NULL);
         }
     }
@@ -423,16 +419,22 @@
     newClass = (ClassObject*) dvmMalloc(sizeof(*newClass), ALLOC_DEFAULT);
     if (newClass == NULL)
         return NULL;
-    DVM_OBJECT_INIT(&newClass->obj, gDvm.unlinkedJavaLangClass);
+    DVM_OBJECT_INIT(&newClass->obj, gDvm.classJavaLangClass);
     dvmSetClassSerialNumber(newClass);
     newClass->descriptorAlloc = strdup(descriptor);
     newClass->descriptor = newClass->descriptorAlloc;
-    newClass->super = gDvm.classJavaLangObject;
+    dvmSetFieldObject((Object *)newClass,
+                      offsetof(ClassObject, super),
+                      (Object *)gDvm.classJavaLangObject);
     newClass->vtableCount = gDvm.classJavaLangObject->vtableCount;
     newClass->vtable = gDvm.classJavaLangObject->vtable;
     newClass->primitiveType = PRIM_NOT;
-    newClass->elementClass = elementClass;
-    newClass->classLoader = elementClass->classLoader;
+    dvmSetFieldObject((Object *)newClass,
+                      offsetof(ClassObject, elementClass),
+                      (Object *)elementClass);
+    dvmSetFieldObject((Object *)newClass,
+                      offsetof(ClassObject, classLoader),
+                      (Object *)elementClass->classLoader);
     newClass->arrayDim = arrayDim;
     newClass->status = CLASS_INITIALIZED;
 #if WITH_HPROF && WITH_HPROF_STACK
@@ -518,7 +520,6 @@
         /* Clean up the class before letting the
          * GC get its hands on it.
          */
-        assert(newClass->obj.clazz == gDvm.unlinkedJavaLangClass);
         dvmFreeClassInnards(newClass);
 
         /* Let the GC free the class.
@@ -531,9 +532,6 @@
         assert(newClass != NULL);
         return newClass;
     }
-
-    /* make it available to the GC */
-    newClass->obj.clazz = gDvm.classJavaLangClass;
     dvmReleaseTrackedAlloc((Object*) newClass, NULL);
 
     LOGV("Created array class '%s' %p (access=0x%04x.%04x)\n",
@@ -599,8 +597,8 @@
         ClassObject* primClass = createPrimitiveClass(idx);
         dvmReleaseTrackedAlloc((Object*) primClass, NULL);
 
-        if (!ATOMIC_CMP_SWAP((int*) &gDvm.primitiveClass[idx],
-            0, (int) primClass))
+        if (android_atomic_release_cas(0, (int) primClass,
+                (int*) &gDvm.primitiveClass[idx]) != 0)
         {
             /*
              * Looks like somebody beat us to it.  Free up the one we
@@ -665,21 +663,21 @@
     ClassObject* dstElemClass)
 {
     Object** src = (Object**)srcArray->contents;
-    Object** dst = (Object**)dstArray->contents;
-    u4 count = dstArray->length;
+    u4 length, count;
 
     assert(srcArray->length == dstArray->length);
     assert(dstArray->obj.clazz->elementClass == dstElemClass ||
         (dstArray->obj.clazz->elementClass == dstElemClass->elementClass &&
          dstArray->obj.clazz->arrayDim == dstElemClass->arrayDim+1));
 
-    while (count--) {
-        if (!dvmInstanceof((*src)->clazz, dstElemClass)) {
+    length = dstArray->length;
+    for (count = 0; count < length; count++) {
+        if (!dvmInstanceof(src[count]->clazz, dstElemClass)) {
             LOGW("dvmCopyObjectArray: can't store %s in %s\n",
-                (*src)->clazz->descriptor, dstElemClass->descriptor);
+                src[count]->clazz->descriptor, dstElemClass->descriptor);
             return false;
         }
-        *dst++ = *src++;
+        dvmSetObjectArrayElement(dstArray, count, src[count]);
     }
 
     return true;
diff --git a/vm/oo/Class.c b/vm/oo/Class.c
index 119907e..cbb3d8f 100644
--- a/vm/oo/Class.c
+++ b/vm/oo/Class.c
@@ -164,6 +164,8 @@
  */
 #define ZYGOTE_CLASS_CUTOFF 2304
 
+#define CLASS_SFIELD_SLOTS 1
+
 static ClassPathEntry* processClassPath(const char* pathStr, bool isBootstrap);
 static void freeCpeArray(ClassPathEntry* cpe);
 
@@ -283,6 +285,21 @@
     dvmLinearFree(NULL, str);
 }
 
+static size_t classObjectSize(size_t sfieldCount)
+{
+    size_t size;
+
+    size = offsetof(ClassObject, sfields);
+    size += sizeof(StaticField) * sfieldCount;
+    return size;
+}
+
+size_t dvmClassObjectSize(const ClassObject *clazz)
+{
+    assert(clazz != NULL);
+    return classObjectSize(clazz->sfieldCount);
+}
+
 /*
  * Initialize the bootstrap class loader.
  *
@@ -322,24 +339,10 @@
     gDvm.initiatingLoaderList =
         calloc(ZYGOTE_CLASS_CUTOFF, sizeof(InitiatingLoaderList));
 
-    /* This placeholder class is used while a ClassObject is
-     * loading/linking so those not in the know can still say
-     * "obj->clazz->...".
-     */
-    gDvm.unlinkedJavaLangClass =
-        dvmMalloc(sizeof(ClassObject), ALLOC_DONT_TRACK);
-    if (gDvm.unlinkedJavaLangClass == NULL) {
-        LOGE("Unable to allocate gDvm.unlinkedJavaLangClass");
-        dvmAbort();
-    }
-
-    /* Set obj->clazz to NULL so anyone who gets too interested
-     * in the fake class will crash.
-     */
-    DVM_OBJECT_INIT(&gDvm.unlinkedJavaLangClass->obj, NULL);
-    gDvm.unlinkedJavaLangClass->descriptor = "!unlinkedClass";
-    dvmSetClassSerialNumber(gDvm.unlinkedJavaLangClass);
-
+    gDvm.classJavaLangClass = (ClassObject*) dvmMalloc(
+        classObjectSize(CLASS_SFIELD_SLOTS), ALLOC_DEFAULT);
+    DVM_OBJECT_INIT(&gDvm.classJavaLangClass->obj, gDvm.classJavaLangClass);
+    gDvm.classJavaLangClass->descriptor = "Ljava/lang/Class;";
     /*
      * Process the bootstrap class path.  This means opening the specified
      * DEX or Jar files and possibly running them through the optimizer.
@@ -798,7 +801,7 @@
     }
 
     LOGV("+++ using URL='%s'\n", urlBuf);
-    urlObj = dvmCreateStringFromCstr(urlBuf, ALLOC_DEFAULT);
+    urlObj = dvmCreateStringFromCstr(urlBuf);
 
 bail:
     return urlObj;
@@ -821,7 +824,7 @@
 
 static InitiatingLoaderList *dvmGetInitiatingLoaderList(ClassObject* clazz)
 {
-    assert(clazz->serialNumber > INITIAL_CLASS_SERIAL_NUMBER);
+    assert(clazz->serialNumber >= INITIAL_CLASS_SERIAL_NUMBER);
     int classIndex = clazz->serialNumber-INITIAL_CLASS_SERIAL_NUMBER;
     if (gDvm.initiatingLoaderList != NULL &&
         classIndex < ZYGOTE_CLASS_CUTOFF) {
@@ -1126,7 +1129,8 @@
     do {
         oldValue = gDvm.classSerialNumber;
         newValue = oldValue + 1;
-    } while (!ATOMIC_CMP_SWAP(&gDvm.classSerialNumber, oldValue, newValue));
+    } while (android_atomic_release_cas(oldValue, newValue,
+            &gDvm.classSerialNumber) != 0);
 
     clazz->serialNumber = (u4) oldValue;
 }
@@ -1241,7 +1245,7 @@
         dvmThrowException("Ljava/lang/OutOfMemoryError;", NULL);
         goto bail;
     }
-    nameObj = dvmCreateStringFromCstr(dotName, ALLOC_DEFAULT);
+    nameObj = dvmCreateStringFromCstr(dotName);
     if (nameObj == NULL) {
         assert(dvmCheckException(self));
         goto bail;
@@ -1468,7 +1472,6 @@
 
             /* Let the GC free the class.
              */
-            assert(clazz->obj.clazz == gDvm.unlinkedJavaLangClass);
             dvmReleaseTrackedAlloc((Object*) clazz, NULL);
 
             /* Grab the winning class.
@@ -1485,7 +1488,7 @@
         /*
          * Prepare and resolve.
          */
-        if (!dvmLinkClass(clazz, false)) {
+        if (!dvmLinkClass(clazz)) {
             assert(dvmCheckException(self));
 
             /* Make note of the error and clean up the class.
@@ -1674,27 +1677,30 @@
      * Note that we assume that java.lang.Class does not override
      * finalize().
      */
-    newClass = (ClassObject*) dvmMalloc(sizeof(*newClass) +
-                 sizeof(StaticField) * pHeader->staticFieldsSize,
-                                        ALLOC_DEFAULT);
+    /* TODO: Can there be fewer special checks in the usual path? */
+    assert(descriptor != NULL);
+    if (classLoader == NULL &&
+        strcmp(descriptor, "Ljava/lang/Class;") == 0) {
+        assert(gDvm.classJavaLangClass != NULL);
+        newClass = gDvm.classJavaLangClass;
+    } else {
+        size_t size = classObjectSize(pHeader->staticFieldsSize);
+        newClass = (ClassObject*) dvmMalloc(size, ALLOC_DEFAULT);
+    }
     if (newClass == NULL)
         return NULL;
 
-    /* Until the class is loaded and linked, use a placeholder
-     * obj->clazz value as a hint to the GC.  We don't want
-     * the GC trying to scan the object while it's full of Idx
-     * values.  Also, the real java.lang.Class may not exist
-     * yet.
-     */
-    DVM_OBJECT_INIT(&newClass->obj, gDvm.unlinkedJavaLangClass);
-
+    DVM_OBJECT_INIT(&newClass->obj, gDvm.classJavaLangClass);
     dvmSetClassSerialNumber(newClass);
     newClass->descriptor = descriptor;
     assert(newClass->descriptorAlloc == NULL);
     newClass->accessFlags = pClassDef->accessFlags;
-    newClass->classLoader = classLoader;
+    dvmSetFieldObject((Object *)newClass,
+                      offsetof(ClassObject, classLoader),
+                      (Object *)classLoader);
     newClass->pDvmDex = pDvmDex;
     newClass->primitiveType = PRIM_NOT;
+    newClass->status = CLASS_IDX;
 
     /*
      * Stuff the superclass index into the object pointer field.  The linker
@@ -1705,7 +1711,7 @@
      * newClass->super is not traversed or freed by dvmFreeClassInnards, so
      * this is safe.
      */
-    assert(sizeof(u4) == sizeof(ClassObject*));
+    assert(sizeof(u4) == sizeof(ClassObject*)); /* 32-bit check */
     newClass->super = (ClassObject*) pClassDef->superclassIdx;
 
     /*
@@ -1850,7 +1856,6 @@
     }
 
     newClass->sourceFile = dexGetSourceFile(pDexFile, pClassDef);
-    newClass->status = CLASS_LOADED;
 
     /* caller must call dvmReleaseTrackedAlloc */
     return newClass;
@@ -1919,8 +1924,7 @@
     if (clazz == NULL)
         return;
 
-    assert(clazz->obj.clazz == gDvm.classJavaLangClass ||
-           clazz->obj.clazz == gDvm.unlinkedJavaLangClass);
+    assert(clazz->obj.clazz == gDvm.classJavaLangClass);
 
     /* Guarantee that dvmFreeClassInnards can be called on a given
      * class multiple times by clearing things out as we free them.
@@ -2366,11 +2370,6 @@
                 "queueNext", "Ljava/lang/ref/Reference;");
     assert(gDvm.offJavaLangRefReference_queueNext >= 0);
 
-    gDvm.offJavaLangRefReference_vmData =
-        dvmFindFieldOffset(gDvm.classJavaLangRefReference,
-                "vmData", "I");
-    assert(gDvm.offJavaLangRefReference_vmData >= 0);
-
     /* enqueueInternal() is private and thus a direct method. */
     meth = dvmFindDirectMethodByDescriptor(clazz, "enqueueInternal", "()Z");
     assert(meth != NULL);
@@ -2431,86 +2430,155 @@
  * This converts symbolic references into pointers.  It's independent of
  * the source file format.
  *
- * If "classesResolved" is false, we assume that superclassIdx and
- * interfaces[] are holding class reference indices rather than pointers.
- * The class references will be resolved during link.  (This is done when
- * loading from DEX to avoid having to create additional storage to pass
- * the indices around.)
+ * If clazz->status is CLASS_IDX, then clazz->super and interfaces[] are
+ * holding class reference indices rather than pointers.  The class
+ * references will be resolved during link.  (This is done when
+ * loading from DEX to avoid having to create additional storage to
+ * pass the indices around.)
  *
  * Returns "false" with an exception pending on failure.
  */
-bool dvmLinkClass(ClassObject* clazz, bool classesResolved)
+bool dvmLinkClass(ClassObject* clazz)
 {
     u4 superclassIdx = 0;
+    u4 *interfaceIdxArray = NULL;
     bool okay = false;
-    bool resolve_okay;
-    int numInterfacesResolved = 0;
     int i;
 
+    assert(clazz != NULL);
+    assert(clazz->descriptor != NULL);
+    assert(clazz->status == CLASS_IDX || clazz->status == CLASS_LOADED);
     if (gDvm.verboseClass)
         LOGV("CLASS: linking '%s'...\n", clazz->descriptor);
 
-    /* "Resolve" the class.
-     *
-     * At this point, clazz's reference fields contain Dex
-     * file indices instead of direct object references.
-     * We need to translate those indices into real references,
-     * while making sure that the GC doesn't sweep any of
-     * the referenced objects.
-     *
-     * The GC will avoid scanning this object as long as
-     * clazz->obj.clazz is gDvm.unlinkedJavaLangClass.
-     * Once clazz is ready, we'll replace clazz->obj.clazz
-     * with gDvm.classJavaLangClass to let the GC know
-     * to look at it.
-     */
-    assert(clazz->obj.clazz == gDvm.unlinkedJavaLangClass);
-
-    /* It's important that we take care of java.lang.Class
-     * first.  If we were to do this after looking up the
-     * superclass (below), Class wouldn't be ready when
-     * java.lang.Object needed it.
-     *
-     * Note that we don't set clazz->obj.clazz yet.
-     */
-    if (gDvm.classJavaLangClass == NULL) {
-        if (clazz->classLoader == NULL &&
-            strcmp(clazz->descriptor, "Ljava/lang/Class;") == 0)
-        {
-            gDvm.classJavaLangClass = clazz;
-            if (clazz->ifieldCount > CLASS_FIELD_SLOTS) {
-                LOGE("java.lang.Class has %d slots (expected %d)",
-                     clazz->ifieldCount, CLASS_FIELD_SLOTS);
-                dvmAbort();
-            }
-        } else {
-            gDvm.classJavaLangClass =
-                dvmFindSystemClassNoInit("Ljava/lang/Class;");
-            if (gDvm.classJavaLangClass == NULL) {
-                /* should have thrown one */
-                assert(dvmCheckException(dvmThreadSelf()));
-                goto bail;
-            }
+    assert(gDvm.classJavaLangClass != NULL);
+    assert(clazz->obj.clazz == gDvm.classJavaLangClass);
+    if (clazz->classLoader == NULL &&
+        (strcmp(clazz->descriptor, "Ljava/lang/Class;") == 0))
+    {
+        if (gDvm.classJavaLangClass->ifieldCount > CLASS_FIELD_SLOTS) {
+            LOGE("java.lang.Class has %d instance fields (expected at most %d)",
+                 gDvm.classJavaLangClass->ifieldCount, CLASS_FIELD_SLOTS);
+            dvmAbort();
+        }
+        if (gDvm.classJavaLangClass->sfieldCount != CLASS_SFIELD_SLOTS) {
+            LOGE("java.lang.Class has %d static fields (expected %d)",
+                 gDvm.classJavaLangClass->sfieldCount, CLASS_SFIELD_SLOTS);
+            dvmAbort();
         }
     }
-    assert(gDvm.classJavaLangClass != NULL);
-
-    /*
-     * Resolve all Dex indices so we can hand the ClassObject
-     * over to the GC.  If we fail at any point, we need to remove
-     * any tracked references to avoid leaking memory.
+    /* "Resolve" the class.
+     *
+     * At this point, clazz's reference fields may contain Dex file
+     * indices instead of direct object references.  Proxy objects are
+     * an exception, and may be the only exception.  We need to
+     * translate those indices into real references, and let the GC
+     * look inside this ClassObject.
      */
+    if (clazz->status == CLASS_IDX) {
+        if (clazz->interfaceCount > 0) {
+            /* Copy u4 DEX idx values out of the ClassObject* array
+             * where we stashed them.
+             */
+            assert(sizeof(*interfaceIdxArray) == sizeof(*clazz->interfaces));
+            size_t len = clazz->interfaceCount * sizeof(*interfaceIdxArray);
+            interfaceIdxArray = malloc(len);
+            if (interfaceIdxArray == NULL) {
+                LOGW("Unable to allocate memory to link %s", clazz->descriptor);
+                goto bail;
+            }
+            memcpy(interfaceIdxArray, clazz->interfaces, len);
 
-    /*
-     * All classes have a direct superclass, except for java/lang/Object.
-     */
-    if (!classesResolved) {
-        superclassIdx = (u4) clazz->super;          /* unpack temp store */
+            dvmLinearReadWrite(clazz->classLoader, clazz->interfaces);
+            memset(clazz->interfaces, 0, len);
+            dvmLinearReadOnly(clazz->classLoader, clazz->interfaces);
+        }
+
+        assert(sizeof(superclassIdx) == sizeof(clazz->super));
+        superclassIdx = (u4) clazz->super;
         clazz->super = NULL;
-    }
-    if (strcmp(clazz->descriptor, "Ljava/lang/Object;") == 0) {
-        assert(!classesResolved);
+        /* After this line, clazz will be fair game for the GC. The
+         * superclass and interfaces are all NULL.
+         */
+        clazz->status = CLASS_LOADED;
+
         if (superclassIdx != kDexNoIndex) {
+            ClassObject* super = dvmResolveClass(clazz, superclassIdx, false);
+            if (super == NULL) {
+                assert(dvmCheckException(dvmThreadSelf()));
+                if (gDvm.optimizing) {
+                    /* happens with "external" libs */
+                    LOGV("Unable to resolve superclass of %s (%d)\n",
+                         clazz->descriptor, superclassIdx);
+                } else {
+                    LOGW("Unable to resolve superclass of %s (%d)\n",
+                         clazz->descriptor, superclassIdx);
+                }
+                goto bail;
+            }
+            dvmSetFieldObject((Object *)clazz,
+                              offsetof(ClassObject, super),
+                              (Object *)super);
+        }
+
+        if (clazz->interfaceCount > 0) {
+            /* Resolve the interfaces implemented directly by this class. */
+            assert(interfaceIdxArray != NULL);
+            dvmLinearReadWrite(clazz->classLoader, clazz->interfaces);
+            for (i = 0; i < clazz->interfaceCount; i++) {
+                assert(interfaceIdxArray[i] != kDexNoIndex);
+                clazz->interfaces[i] =
+                    dvmResolveClass(clazz, interfaceIdxArray[i], false);
+                if (clazz->interfaces[i] == NULL) {
+                    const DexFile* pDexFile = clazz->pDvmDex->pDexFile;
+
+                    assert(dvmCheckException(dvmThreadSelf()));
+                    dvmLinearReadOnly(clazz->classLoader, clazz->interfaces);
+
+                    const char* classDescriptor;
+                    classDescriptor =
+                        dexStringByTypeIdx(pDexFile, interfaceIdxArray[i]);
+                    if (gDvm.optimizing) {
+                        /* happens with "external" libs */
+                        LOGV("Failed resolving %s interface %d '%s'\n",
+                             clazz->descriptor, interfaceIdxArray[i],
+                             classDescriptor);
+                    } else {
+                        LOGI("Failed resolving %s interface %d '%s'\n",
+                             clazz->descriptor, interfaceIdxArray[i],
+                             classDescriptor);
+                    }
+                    goto bail;
+                }
+
+                /* are we allowed to implement this interface? */
+                if (!dvmCheckClassAccess(clazz, clazz->interfaces[i])) {
+                    dvmLinearReadOnly(clazz->classLoader, clazz->interfaces);
+                    LOGW("Interface '%s' is not accessible to '%s'\n",
+                         clazz->interfaces[i]->descriptor, clazz->descriptor);
+                    dvmThrowException("Ljava/lang/IllegalAccessError;",
+                                      "interface not accessible");
+                    goto bail;
+                }
+                LOGVV("+++  found interface '%s'\n",
+                      clazz->interfaces[i]->descriptor);
+            }
+            dvmLinearReadOnly(clazz->classLoader, clazz->interfaces);
+        }
+    }
+    /*
+     * There are now Class references visible to the GC in super and
+     * interfaces.
+     */
+
+    /*
+     * All classes have a direct superclass, except for
+     * java/lang/Object and primitive classes. Primitive classes are
+     * are created CLASS_INITIALIZED, so won't get here.
+     */
+    assert(clazz->primitiveType == PRIM_NOT);
+    if (strcmp(clazz->descriptor, "Ljava/lang/Object;") == 0) {
+        if (clazz->super != NULL) {
             /* TODO: is this invariant true for all java/lang/Objects,
              * regardless of the class loader?  For now, assume it is.
              */
@@ -2524,25 +2592,10 @@
          */
         CLEAR_CLASS_FLAG(clazz, CLASS_ISFINALIZABLE);
     } else {
-        if (!classesResolved) {
-            if (superclassIdx == kDexNoIndex) {
-                dvmThrowException("Ljava/lang/LinkageError;",
-                    "no superclass defined");
-                goto bail;
-            }
-            clazz->super = dvmResolveClass(clazz, superclassIdx, false);
-            if (clazz->super == NULL) {
-                assert(dvmCheckException(dvmThreadSelf()));
-                if (gDvm.optimizing) {
-                    /* happens with "external" libs */
-                    LOGV("Unable to resolve superclass of %s (%d)\n",
-                        clazz->descriptor, superclassIdx);
-                } else {
-                    LOGW("Unable to resolve superclass of %s (%d)\n",
-                        clazz->descriptor, superclassIdx);
-                }
-                goto bail;
-            }
+        if (clazz->super == NULL) {
+            dvmThrowException("Ljava/lang/LinkageError;",
+                              "no superclass defined");
+            goto bail;
         }
         /* verify */
         if (dvmIsFinalClass(clazz->super)) {
@@ -2565,11 +2618,6 @@
             goto bail;
         }
 
-        /* Don't let the GC reclaim the superclass.
-         * TODO: shouldn't be needed; remove when things stabilize
-         */
-        dvmAddTrackedAlloc((Object *)clazz->super, NULL);
-
         /* Inherit finalizability from the superclass.  If this
          * class also overrides finalize(), its CLASS_ISFINALIZABLE
          * bit will already be set.
@@ -2637,100 +2685,6 @@
         }
     }
 
-    if (!classesResolved && clazz->interfaceCount > 0) {
-        /*
-         * Resolve the interfaces implemented directly by this class.  We
-         * stuffed the class index into the interface pointer slot.
-         */
-        dvmLinearReadWrite(clazz->classLoader, clazz->interfaces);
-        for (i = 0; i < clazz->interfaceCount; i++) {
-            u4 interfaceIdx;
-
-            interfaceIdx = (u4) clazz->interfaces[i];   /* unpack temp store */
-            assert(interfaceIdx != kDexNoIndex);
-
-            clazz->interfaces[i] = dvmResolveClass(clazz, interfaceIdx, false);
-            if (clazz->interfaces[i] == NULL) {
-                const DexFile* pDexFile = clazz->pDvmDex->pDexFile;
-
-                assert(dvmCheckException(dvmThreadSelf()));
-                dvmLinearReadOnly(clazz->classLoader, clazz->interfaces);
-
-                const char* classDescriptor;
-                classDescriptor = dexStringByTypeIdx(pDexFile, interfaceIdx);
-                if (gDvm.optimizing) {
-                    /* happens with "external" libs */
-                    LOGV("Failed resolving %s interface %d '%s'\n",
-                        clazz->descriptor, interfaceIdx, classDescriptor);
-                } else {
-                    LOGI("Failed resolving %s interface %d '%s'\n",
-                        clazz->descriptor, interfaceIdx, classDescriptor);
-                }
-                goto bail_during_resolve;
-            }
-
-            /* are we allowed to implement this interface? */
-            if (!dvmCheckClassAccess(clazz, clazz->interfaces[i])) {
-                dvmLinearReadOnly(clazz->classLoader, clazz->interfaces);
-                LOGW("Interface '%s' is not accessible to '%s'\n",
-                    clazz->interfaces[i]->descriptor, clazz->descriptor);
-                dvmThrowException("Ljava/lang/IllegalAccessError;",
-                    "interface not accessible");
-                goto bail_during_resolve;
-            }
-
-            /* Don't let the GC reclaim the interface class.
-             * TODO: shouldn't be needed; remove when things stabilize
-             */
-            dvmAddTrackedAlloc((Object *)clazz->interfaces[i], NULL);
-            numInterfacesResolved++;
-
-            LOGVV("+++  found interface '%s'\n",
-                clazz->interfaces[i]->descriptor);
-        }
-        dvmLinearReadOnly(clazz->classLoader, clazz->interfaces);
-    }
-
-    /*
-     * The ClassObject is now in a GC-able state.  We let the GC
-     * realize this by punching in the real class type, which is
-     * always java.lang.Class.
-     *
-     * After this line, clazz will be fair game for the GC.
-     * Every field that the GC will look at must now be valid:
-     * - clazz->super
-     * - class->classLoader
-     * - clazz->sfields
-     * - clazz->interfaces
-     */
-    clazz->obj.clazz = gDvm.classJavaLangClass;
-
-    if (false) {
-bail_during_resolve:
-        resolve_okay = false;
-    } else {
-        resolve_okay = true;
-    }
-
-    /*
-     * Now that the GC can scan the ClassObject, we can let
-     * go of the explicit references we were holding onto.
-     *
-     * Either that or we failed, in which case we need to
-     * release the references so we don't leak memory.
-     */
-    if (clazz->super != NULL) {
-        dvmReleaseTrackedAlloc((Object *)clazz->super, NULL);
-    }
-    for (i = 0; i < numInterfacesResolved; i++) {
-        dvmReleaseTrackedAlloc((Object *)clazz->interfaces[i], NULL);
-    }
-
-    if (!resolve_okay) {
-        //LOGW("resolve_okay is false\n");
-        goto bail;
-    }
-
     /*
      * Populate vtable.
      */
@@ -2792,7 +2746,6 @@
             if (gDvm.offJavaLangClass_pd <= 0) {
                 LOGE("ERROR: unable to find 'pd' field in Class\n");
                 dvmAbort();     /* we're not going to get much farther */
-                //goto bail;
             }
         }
     }
@@ -2837,6 +2790,9 @@
             dvmThrowException("Ljava/lang/VirtualMachineError;", NULL);
         }
     }
+    if (interfaceIdxArray != NULL) {
+        free(interfaceIdxArray);
+    }
     return okay;
 }
 
@@ -3869,7 +3825,7 @@
         bool parsed = dvmEncodedArrayIteratorGetNext(&iterator, &value);
         StaticField* sfield = &clazz->sfields[i];
         const char* descriptor = sfield->field.signature;
-        bool needRelease = false;
+        bool isObj = false;
 
         if (! parsed) {
             /*
@@ -3903,13 +3859,13 @@
                     case kDexAnnotationString: {
                         parsed =
                             (strcmp(descriptor, "Ljava/lang/String;") == 0);
-                        needRelease = true;
+                        isObj = true;
                         break;
                     }
                     case kDexAnnotationType: {
                         parsed =
                             (strcmp(descriptor, "Ljava/lang/Class;") == 0);
-                        needRelease = true;
+                        isObj = true;
                         break;
                     }
                     default: {
@@ -3927,13 +3883,18 @@
 
         if (parsed) {
             /*
-             * All's well, so store the value. Note: This always
-             * stores the full width of a JValue, even though most of
-             * the time only the first word is needed.
+             * All's well, so store the value.
              */
-            sfield->value = value.value;
-            if (needRelease) {
+            if (isObj) {
+                dvmSetStaticFieldObject(sfield, value.value.l);
                 dvmReleaseTrackedAlloc(value.value.l, self);
+            } else {
+                /*
+                 * Note: This always stores the full width of a
+                 * JValue, even though most of the time only the first
+                 * word is needed.
+                 */
+                sfield->value = value.value;
             }
         } else {
             /*
@@ -4319,11 +4280,13 @@
         }
 
         clazz->status = CLASS_VERIFYING;
-        if (!dvmVerifyClass(clazz, VERIFY_DEFAULT)) {
+        if (!dvmVerifyClass(clazz)) {
 verify_failed:
             dvmThrowExceptionWithClassMessage("Ljava/lang/VerifyError;",
                 clazz->descriptor);
-            clazz->verifyErrorClass = dvmGetException(self)->clazz;
+            dvmSetFieldObject((Object *)clazz,
+                              offsetof(ClassObject, verifyErrorClass),
+                              (Object *)dvmGetException(self)->clazz);
             clazz->status = CLASS_ERROR;
             goto bail_unlock;
         }
@@ -4884,9 +4847,6 @@
 {
     /* dvmClassStartup() may not have been called before the first GC.
      */
-    if (gDvm.unlinkedJavaLangClass != NULL) {
-        dvmMarkObjectNonNull((Object *)gDvm.unlinkedJavaLangClass);
-    }
     if (gDvm.loadedClasses != NULL) {
         dvmHashTableLock(gDvm.loadedClasses);
         dvmHashForeach(gDvm.loadedClasses, markClassObject, NULL);
@@ -4971,13 +4931,3 @@
 
     return dvmCompareDescriptorAndMethodProto(descriptor, method);
 }
-
-size_t dvmClassObjectSize(const ClassObject *clazz)
-{
-    size_t size;
-
-    assert(clazz != NULL);
-    size = offsetof(ClassObject, sfields);
-    size += sizeof(StaticField) * clazz->sfieldCount;
-    return size;
-}
diff --git a/vm/oo/Class.h b/vm/oo/Class.h
index 34fbff1..7457a60 100644
--- a/vm/oo/Class.h
+++ b/vm/oo/Class.h
@@ -71,7 +71,7 @@
 /*
  * Find the class with the given descriptor.  Load it if it hasn't already
  * been.
- * 
+ *
  * "loader" is the initiating class loader.
  */
 ClassObject* dvmFindClass(const char* descriptor, Object* loader);
@@ -108,7 +108,7 @@
  * variations, this is only called explicitly for synthetic class
  * generation (e.g. reflect.Proxy).
  */
-bool dvmLinkClass(ClassObject* clazz, bool classesResolved);
+bool dvmLinkClass(ClassObject* clazz);
 
 /*
  * Determine if a class has been initialized.
@@ -213,7 +213,7 @@
         const Method* method2)
 {
     return dexProtoCompare(&method1->prototype, &method2->prototype);
-}    
+}
 
 /*
  * Compare the two method prototypes, considering only the parameters
@@ -224,7 +224,7 @@
         const Method* method2)
 {
     return dexProtoCompareParameters(&method1->prototype, &method2->prototype);
-}    
+}
 
 /*
  * Compare the two method names and prototypes, a la strcmp(). The
diff --git a/vm/oo/Object.c b/vm/oo/Object.c
index 0d2da1f..3fa86e3 100644
--- a/vm/oo/Object.c
+++ b/vm/oo/Object.c
@@ -216,7 +216,7 @@
     }
 
     proto = &method->prototype;
-        
+
     if (strcmp(returnType, dexProtoGetReturnType(proto)) != 0) {
         return 1;
     }
@@ -256,7 +256,7 @@
  * and also find a pointer to the return type.
  */
 static inline size_t countArgsAndFindReturnType(const char* descriptor,
-    const char** pReturnType) 
+    const char** pReturnType)
 {
     size_t count = 0;
     bool bogus = false;
@@ -264,7 +264,7 @@
 
     assert(*descriptor == '(');
     descriptor++;
-    
+
     while (!done) {
         switch (*descriptor) {
             case 'B': case 'C': case 'D': case 'F':
@@ -297,7 +297,7 @@
                 break;
             }
             case ')': {
-                /* 
+                /*
                  * Note: The loop will exit after incrementing descriptor
                  * one more time, so it then points at the return type.
                  */
@@ -336,7 +336,7 @@
 
     /* Skip the '('. */
     descriptor++;
-    
+
     for (i = 0; i < argCount; i++) {
         argTypes[i] = buffer;
 
@@ -353,9 +353,9 @@
                 *(buffer++) = c;
             } while (c != ';');
         }
-        
+
         *(buffer++) = '\0';
-    }        
+    }
 }
 
 /*
@@ -395,7 +395,7 @@
             methods = clazz->directMethods;
             methodCount = clazz->directMethodCount;
         }
-        
+
         for (i = 0; i < methodCount; i++) {
             Method* method = &methods[i];
             if (compareMethodHelper(method, name, returnType, argCount,
@@ -424,7 +424,7 @@
  */
 static Method* findMethodInListByProto(const ClassObject* clazz,
     MethodType wantedType, bool isHier, const char* name, const DexProto* proto)
-{    
+{
     while (clazz != NULL) {
         int i;
 
diff --git a/vm/oo/Object.h b/vm/oo/Object.h
index 5ceb42c..7428cef 100644
--- a/vm/oo/Object.h
+++ b/vm/oo/Object.h
@@ -139,8 +139,8 @@
     CLASS_ERROR         = -1,
 
     CLASS_NOTREADY      = 0,
-    CLASS_LOADED        = 1,
-    CLASS_PREPARED      = 2,    /* part of linking */
+    CLASS_IDX           = 1,    /* loaded, DEX idx in super or ifaces */
+    CLASS_LOADED        = 2,    /* DEX idx values resolved */
     CLASS_RESOLVED      = 3,    /* part of linking */
     CLASS_VERIFYING     = 4,    /* in the process of being verified */
     CLASS_VERIFIED      = 5,    /* logically part of linking; done pre-init */
@@ -148,7 +148,6 @@
     CLASS_INITIALIZED   = 7,    /* ready to go */
 } ClassStatus;
 
-
 /*
  * Primitive type identifiers.  We use these values as indexes into an
  * array of synthesized classes, so these start at zero and count up.
@@ -256,8 +255,12 @@
  * Properly initialize an Object.
  * void DVM_OBJECT_INIT(Object *obj, ClassObject *clazz_)
  */
-#define DVM_OBJECT_INIT(obj, clazz_) \
-    do { (obj)->clazz = (clazz_); DVM_LOCK_INIT(&(obj)->lock); } while (0)
+#define DVM_OBJECT_INIT(obj, clazz_)                                    \
+    do {                                                                \
+        dvmSetFieldObject((Object *)obj, offsetof(Object, clazz),       \
+                          (Object *)clazz_);                            \
+        DVM_LOCK_INIT(&(obj)->lock);                                    \
+    } while (0)
 
 /*
  * Data objects have an Object header followed by their instance data.
@@ -674,156 +677,6 @@
 }
 
 /*
- * Field access functions.  Pass in the word offset from Field->byteOffset.
- *
- * We guarantee that long/double field data is 64-bit aligned, so it's safe
- * to access them with ldrd/strd on ARM.
- *
- * The VM treats all fields as 32 or 64 bits, so the field set functions
- * write 32 bits even if the underlying type is smaller.
- */
-#define BYTE_OFFSET(_ptr, _offset)  ((void*) (((u1*)(_ptr)) + (_offset)))
-
-INLINE JValue* dvmFieldPtr(const Object* obj, int offset) {
-    return ((JValue*)BYTE_OFFSET(obj, offset));
-}
-
-INLINE bool dvmGetFieldBoolean(const Object* obj, int offset) {
-    return ((JValue*)BYTE_OFFSET(obj, offset))->z;
-}
-INLINE s1 dvmGetFieldByte(const Object* obj, int offset) {
-    return ((JValue*)BYTE_OFFSET(obj, offset))->b;
-}
-INLINE s2 dvmGetFieldShort(const Object* obj, int offset) {
-    return ((JValue*)BYTE_OFFSET(obj, offset))->s;
-}
-INLINE u2 dvmGetFieldChar(const Object* obj, int offset) {
-    return ((JValue*)BYTE_OFFSET(obj, offset))->c;
-}
-INLINE s4 dvmGetFieldInt(const Object* obj, int offset) {
-    return ((JValue*)BYTE_OFFSET(obj, offset))->i;
-}
-INLINE s8 dvmGetFieldLong(const Object* obj, int offset) {
-    return ((JValue*)BYTE_OFFSET(obj, offset))->j;
-}
-INLINE float dvmGetFieldFloat(const Object* obj, int offset) {
-    return ((JValue*)BYTE_OFFSET(obj, offset))->f;
-}
-INLINE double dvmGetFieldDouble(const Object* obj, int offset) {
-    return ((JValue*)BYTE_OFFSET(obj, offset))->d;
-}
-INLINE Object* dvmGetFieldObject(const Object* obj, int offset) {
-    return ((JValue*)BYTE_OFFSET(obj, offset))->l;
-}
-INLINE s8 dvmGetFieldLongVolatile(const Object* obj, int offset) {
-    const s8* addr = BYTE_OFFSET(obj, offset);
-    return android_quasiatomic_read_64((s8*)addr);
-}
-
-INLINE void dvmSetFieldBoolean(Object* obj, int offset, bool val) {
-    ((JValue*)BYTE_OFFSET(obj, offset))->i = val;
-}
-INLINE void dvmSetFieldByte(Object* obj, int offset, s1 val) {
-    ((JValue*)BYTE_OFFSET(obj, offset))->i = val;
-}
-INLINE void dvmSetFieldShort(Object* obj, int offset, s2 val) {
-    ((JValue*)BYTE_OFFSET(obj, offset))->i = val;
-}
-INLINE void dvmSetFieldChar(Object* obj, int offset, u2 val) {
-    ((JValue*)BYTE_OFFSET(obj, offset))->i = val;
-}
-INLINE void dvmSetFieldInt(Object* obj, int offset, s4 val) {
-    ((JValue*)BYTE_OFFSET(obj, offset))->i = val;
-}
-INLINE void dvmSetFieldLong(Object* obj, int offset, s8 val) {
-    ((JValue*)BYTE_OFFSET(obj, offset))->j = val;
-}
-INLINE void dvmSetFieldFloat(Object* obj, int offset, float val) {
-    ((JValue*)BYTE_OFFSET(obj, offset))->f = val;
-}
-INLINE void dvmSetFieldDouble(Object* obj, int offset, double val) {
-    ((JValue*)BYTE_OFFSET(obj, offset))->d = val;
-}
-INLINE void dvmSetFieldObject(Object* obj, int offset, Object* val) {
-    ((JValue*)BYTE_OFFSET(obj, offset))->l = val;
-}
-INLINE void dvmSetFieldLongVolatile(Object* obj, int offset, s8 val) {
-    s8* addr = BYTE_OFFSET(obj, offset);
-    android_quasiatomic_swap_64(val, addr);
-}
-
-/*
- * Static field access functions.
- */
-INLINE JValue* dvmStaticFieldPtr(const StaticField* sfield) {
-    return (JValue*)&sfield->value;
-}
-
-INLINE bool dvmGetStaticFieldBoolean(const StaticField* sfield) {
-    return sfield->value.z;
-}
-INLINE s1 dvmGetStaticFieldByte(const StaticField* sfield) {
-    return sfield->value.b;
-}
-INLINE s2 dvmGetStaticFieldShort(const StaticField* sfield) {
-    return sfield->value.s;
-}
-INLINE u2 dvmGetStaticFieldChar(const StaticField* sfield) {
-    return sfield->value.c;
-}
-INLINE s4 dvmGetStaticFieldInt(const StaticField* sfield) {
-    return sfield->value.i;
-}
-INLINE s8 dvmGetStaticFieldLong(const StaticField* sfield) {
-    return sfield->value.j;
-}
-INLINE float dvmGetStaticFieldFloat(const StaticField* sfield) {
-    return sfield->value.f;
-}
-INLINE double dvmGetStaticFieldDouble(const StaticField* sfield) {
-    return sfield->value.d;
-}
-INLINE Object* dvmGetStaticFieldObject(const StaticField* sfield) {
-    return sfield->value.l;
-}
-INLINE s8 dvmGetStaticFieldLongVolatile(const StaticField* sfield) {
-    const s8* addr = &sfield->value.j;
-    return android_quasiatomic_read_64((s8*)addr);
-}
-
-INLINE void dvmSetStaticFieldBoolean(StaticField* sfield, bool val) {
-    sfield->value.i = val;
-}
-INLINE void dvmSetStaticFieldByte(StaticField* sfield, s1 val) {
-    sfield->value.i = val;
-}
-INLINE void dvmSetStaticFieldShort(StaticField* sfield, s2 val) {
-    sfield->value.i = val;
-}
-INLINE void dvmSetStaticFieldChar(StaticField* sfield, u2 val) {
-    sfield->value.i = val;
-}
-INLINE void dvmSetStaticFieldInt(StaticField* sfield, s4 val) {
-    sfield->value.i = val;
-}
-INLINE void dvmSetStaticFieldLong(StaticField* sfield, s8 val) {
-    sfield->value.j = val;
-}
-INLINE void dvmSetStaticFieldFloat(StaticField* sfield, float val) {
-    sfield->value.f = val;
-}
-INLINE void dvmSetStaticFieldDouble(StaticField* sfield, double val) {
-    sfield->value.d = val;
-}
-INLINE void dvmSetStaticFieldObject(StaticField* sfield, Object* val) {
-    sfield->value.l = val;
-}
-INLINE void dvmSetStaticFieldLongVolatile(StaticField* sfield, s8 val) {
-    s8* addr = &sfield->value.j;
-    android_quasiatomic_swap_64(val, addr);
-}
-
-/*
  * Helpers.
  */
 INLINE bool dvmIsPublicMethod(const Method* method) {
@@ -893,8 +746,8 @@
 INLINE bool dvmIsAbstractClass(const ClassObject* clazz) {
     return (clazz->accessFlags & ACC_ABSTRACT) != 0;
 }
-INLINE bool dvmIsAnnotationClass(const ClassObject* clazz) { 
-    return (clazz->accessFlags & ACC_ANNOTATION) != 0; 
+INLINE bool dvmIsAnnotationClass(const ClassObject* clazz) {
+    return (clazz->accessFlags & ACC_ANNOTATION) != 0;
 }
 INLINE bool dvmIsPrimitiveClass(const ClassObject* clazz) {
     return clazz->primitiveType != PRIM_NOT;
diff --git a/vm/oo/ObjectInlines.h b/vm/oo/ObjectInlines.h
new file mode 100644
index 0000000..1192059
--- /dev/null
+++ b/vm/oo/ObjectInlines.h
@@ -0,0 +1,226 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * Helper functions to access data fields in Objects.
+ */
+#ifndef _DALVIK_OO_OBJECTINLINES
+#define _DALVIK_OO_OBJECTINLINES
+
+/*
+ * Store a single value in the array, and note in the write barrier.
+ */
+INLINE void dvmSetObjectArrayElement(const ArrayObject* obj, int index,
+                                     Object* val) {
+    ((Object **)(obj)->contents)[index] = val;
+    dvmWriteBarrierArray(obj, index, index+1);
+}
+
+
+/*
+ * Field access functions.  Pass in the word offset from Field->byteOffset.
+ *
+ * We guarantee that long/double field data is 64-bit aligned, so it's safe
+ * to access them with ldrd/strd on ARM.
+ *
+ * The VM treats all fields as 32 or 64 bits, so the field set functions
+ * write 32 bits even if the underlying type is smaller.
+ */
+#define BYTE_OFFSET(_ptr, _offset)  ((void*) (((u1*)(_ptr)) + (_offset)))
+
+INLINE JValue* dvmFieldPtr(const Object* obj, int offset) {
+    return ((JValue*)BYTE_OFFSET(obj, offset));
+}
+
+INLINE bool dvmGetFieldBoolean(const Object* obj, int offset) {
+    return ((JValue*)BYTE_OFFSET(obj, offset))->z;
+}
+INLINE s1 dvmGetFieldByte(const Object* obj, int offset) {
+    return ((JValue*)BYTE_OFFSET(obj, offset))->b;
+}
+INLINE s2 dvmGetFieldShort(const Object* obj, int offset) {
+    return ((JValue*)BYTE_OFFSET(obj, offset))->s;
+}
+INLINE u2 dvmGetFieldChar(const Object* obj, int offset) {
+    return ((JValue*)BYTE_OFFSET(obj, offset))->c;
+}
+INLINE s4 dvmGetFieldInt(const Object* obj, int offset) {
+    return ((JValue*)BYTE_OFFSET(obj, offset))->i;
+}
+INLINE s8 dvmGetFieldLong(const Object* obj, int offset) {
+    return ((JValue*)BYTE_OFFSET(obj, offset))->j;
+}
+INLINE float dvmGetFieldFloat(const Object* obj, int offset) {
+    return ((JValue*)BYTE_OFFSET(obj, offset))->f;
+}
+INLINE double dvmGetFieldDouble(const Object* obj, int offset) {
+    return ((JValue*)BYTE_OFFSET(obj, offset))->d;
+}
+INLINE Object* dvmGetFieldObject(const Object* obj, int offset) {
+    return ((JValue*)BYTE_OFFSET(obj, offset))->l;
+}
+INLINE s4 dvmGetFieldIntVolatile(const Object* obj, int offset) {
+    s4* ptr = &((JValue*)BYTE_OFFSET(obj, offset))->i;
+    return android_atomic_acquire_load(ptr);
+}
+INLINE Object* dvmGetFieldObjectVolatile(const Object* obj, int offset) {
+    void** ptr = &((JValue*)BYTE_OFFSET(obj, offset))->l;
+    return (Object*) android_atomic_acquire_load((int32_t*)ptr);
+}
+INLINE s8 dvmGetFieldLongVolatile(const Object* obj, int offset) {
+    const s8* addr = BYTE_OFFSET(obj, offset);
+    s8 val = dvmQuasiAtomicRead64(addr);
+    ANDROID_MEMBAR_FULL();
+    return val;
+}
+
+INLINE void dvmSetFieldBoolean(Object* obj, int offset, bool val) {
+    ((JValue*)BYTE_OFFSET(obj, offset))->i = val;
+}
+INLINE void dvmSetFieldByte(Object* obj, int offset, s1 val) {
+    ((JValue*)BYTE_OFFSET(obj, offset))->i = val;
+}
+INLINE void dvmSetFieldShort(Object* obj, int offset, s2 val) {
+    ((JValue*)BYTE_OFFSET(obj, offset))->i = val;
+}
+INLINE void dvmSetFieldChar(Object* obj, int offset, u2 val) {
+    ((JValue*)BYTE_OFFSET(obj, offset))->i = val;
+}
+INLINE void dvmSetFieldInt(Object* obj, int offset, s4 val) {
+    ((JValue*)BYTE_OFFSET(obj, offset))->i = val;
+}
+INLINE void dvmSetFieldLong(Object* obj, int offset, s8 val) {
+    ((JValue*)BYTE_OFFSET(obj, offset))->j = val;
+}
+INLINE void dvmSetFieldFloat(Object* obj, int offset, float val) {
+    ((JValue*)BYTE_OFFSET(obj, offset))->f = val;
+}
+INLINE void dvmSetFieldDouble(Object* obj, int offset, double val) {
+    ((JValue*)BYTE_OFFSET(obj, offset))->d = val;
+}
+INLINE void dvmSetFieldObject(Object* obj, int offset, Object* val) {
+    JValue* lhs = BYTE_OFFSET(obj, offset);
+    lhs->l = val;
+    dvmWriteBarrierField(obj, &lhs->l);
+}
+INLINE void dvmSetFieldIntVolatile(Object* obj, int offset, s4 val) {
+    s4* ptr = &((JValue*)BYTE_OFFSET(obj, offset))->i;
+    android_atomic_release_store(val, ptr);
+}
+INLINE void dvmSetFieldObjectVolatile(Object* obj, int offset, Object* val) {
+    void** ptr = &((JValue*)BYTE_OFFSET(obj, offset))->l;
+    android_atomic_release_store((int32_t)val, (int32_t*)ptr);
+    dvmWriteBarrierField(obj, ptr);
+}
+INLINE void dvmSetFieldLongVolatile(Object* obj, int offset, s8 val) {
+    s8* addr = BYTE_OFFSET(obj, offset);
+    ANDROID_MEMBAR_FULL();
+    dvmQuasiAtomicSwap64(val, addr);
+}
+
+/*
+ * Static field access functions.
+ */
+INLINE JValue* dvmStaticFieldPtr(const StaticField* sfield) {
+    return (JValue*)&sfield->value;
+}
+
+INLINE bool dvmGetStaticFieldBoolean(const StaticField* sfield) {
+    return sfield->value.z;
+}
+INLINE s1 dvmGetStaticFieldByte(const StaticField* sfield) {
+    return sfield->value.b;
+}
+INLINE s2 dvmGetStaticFieldShort(const StaticField* sfield) {
+    return sfield->value.s;
+}
+INLINE u2 dvmGetStaticFieldChar(const StaticField* sfield) {
+    return sfield->value.c;
+}
+INLINE s4 dvmGetStaticFieldInt(const StaticField* sfield) {
+    return sfield->value.i;
+}
+INLINE s8 dvmGetStaticFieldLong(const StaticField* sfield) {
+    return sfield->value.j;
+}
+INLINE float dvmGetStaticFieldFloat(const StaticField* sfield) {
+    return sfield->value.f;
+}
+INLINE double dvmGetStaticFieldDouble(const StaticField* sfield) {
+    return sfield->value.d;
+}
+INLINE Object* dvmGetStaticFieldObject(const StaticField* sfield) {
+    return sfield->value.l;
+}
+INLINE s4 dvmGetStaticFieldIntVolatile(const StaticField* sfield) {
+    const s4* ptr = &(sfield->value.i);
+    return android_atomic_acquire_load((s4*)ptr);
+}
+INLINE Object* dvmGetStaticFieldObjectVolatile(const StaticField* sfield) {
+    void* const* ptr = &(sfield->value.l);
+    return (Object*) android_atomic_acquire_load((int32_t*)ptr);
+}
+INLINE s8 dvmGetStaticFieldLongVolatile(const StaticField* sfield) {
+    const s8* addr = &sfield->value.j;
+    s8 val = dvmQuasiAtomicRead64(addr);
+    ANDROID_MEMBAR_FULL();
+    return val;
+}
+
+INLINE void dvmSetStaticFieldBoolean(StaticField* sfield, bool val) {
+    sfield->value.i = val;
+}
+INLINE void dvmSetStaticFieldByte(StaticField* sfield, s1 val) {
+    sfield->value.i = val;
+}
+INLINE void dvmSetStaticFieldShort(StaticField* sfield, s2 val) {
+    sfield->value.i = val;
+}
+INLINE void dvmSetStaticFieldChar(StaticField* sfield, u2 val) {
+    sfield->value.i = val;
+}
+INLINE void dvmSetStaticFieldInt(StaticField* sfield, s4 val) {
+    sfield->value.i = val;
+}
+INLINE void dvmSetStaticFieldLong(StaticField* sfield, s8 val) {
+    sfield->value.j = val;
+}
+INLINE void dvmSetStaticFieldFloat(StaticField* sfield, float val) {
+    sfield->value.f = val;
+}
+INLINE void dvmSetStaticFieldDouble(StaticField* sfield, double val) {
+    sfield->value.d = val;
+}
+INLINE void dvmSetStaticFieldObject(StaticField* sfield, Object* val) {
+    sfield->value.l = val;
+    dvmWriteBarrierField((Object *)sfield->field.clazz, &sfield->value.l);
+}
+INLINE void dvmSetStaticFieldIntVolatile(StaticField* sfield, s4 val) {
+    s4* ptr = &(sfield->value.i);
+    android_atomic_release_store(val, ptr);
+}
+INLINE void dvmSetStaticFieldObjectVolatile(StaticField* sfield, Object* val) {
+    void** ptr = &(sfield->value.l);
+    android_atomic_release_store((int32_t)val, (int32_t*)ptr);
+    dvmWriteBarrierField((Object *)sfield->field.clazz, &sfield->value.l);
+}
+INLINE void dvmSetStaticFieldLongVolatile(StaticField* sfield, s8 val) {
+    s8* addr = &sfield->value.j;
+    ANDROID_MEMBAR_FULL();
+    dvmQuasiAtomicSwap64(val, addr);
+}
+
+#endif /*_DALVIK_OO_OBJECTINLINES*/
diff --git a/vm/oo/Resolve.c b/vm/oo/Resolve.c
index 513a282..c4bda8b 100644
--- a/vm/oo/Resolve.c
+++ b/vm/oo/Resolve.c
@@ -538,8 +538,7 @@
      * already interned.
      */
     utf8 = dexStringAndSizeById(pDvmDex->pDexFile, stringIdx, &utf16Size);
-    strObj = dvmCreateStringFromCstrAndLength(utf8, utf16Size,
-                ALLOC_DEFAULT);
+    strObj = dvmCreateStringFromCstrAndLength(utf8, utf16Size);
     if (strObj == NULL) {
         /* ran out of space in GC heap? */
         assert(dvmCheckException(dvmThreadSelf()));
diff --git a/vm/oo/TypeCheck.c b/vm/oo/TypeCheck.c
index 1762045..fdd38ea 100644
--- a/vm/oo/TypeCheck.c
+++ b/vm/oo/TypeCheck.c
@@ -246,4 +246,3 @@
                 INSTANCEOF_CACHE_SIZE, instance, clazz);
 #undef ATOMIC_CACHE_CALC
 }
-
diff --git a/vm/reflect/Annotation.c b/vm/reflect/Annotation.c
index c2f5131..a5007ba 100644
--- a/vm/reflect/Annotation.c
+++ b/vm/reflect/Annotation.c
@@ -120,8 +120,8 @@
  */
 static u4 readUleb128(const u1** pBuf)
 {
-    u4 result = 0; 
-    int shift = 0; 
+    u4 result = 0;
+    int shift = 0;
     const u1* buf = *pBuf;
     u1 val;
 
@@ -174,7 +174,7 @@
 }
 
 /*
- * Return an array of empty arrays of Annotation objects.  
+ * Return an array of empty arrays of Annotation objects.
  *
  * Caller must call dvmReleaseTrackedAlloc().
  */
@@ -183,7 +183,7 @@
     Thread* self = dvmThreadSelf();
     ArrayObject* arr;
     int i;
-    
+
     arr = dvmAllocArrayByClass(gDvm.classJavaLangAnnotationAnnotationArrayArray,
             numElements, ALLOC_DEFAULT);
     if (arr != NULL) {
@@ -544,8 +544,7 @@
             return false;
         } else {
             ArrayObject* newArray;
-            Object** pObj;
-            u4 size;
+            u4 size, count;
 
             size = readUleb128(&ptr);
             LOGVV("--- annotation array, size is %u at %p\n", size, ptr);
@@ -555,18 +554,17 @@
                 LOGE("annotation element array alloc failed (%d)\n", size);
                 return false;
             }
-            pObj = (Object**)newArray->contents;
 
             AnnotationValue avalue;
-            while (size--) {
+            for (count = 0; count < size; count++) {
                 if (!processAnnotationValue(clazz, &ptr, &avalue,
                                 kAllObjects)) {
                     dvmReleaseTrackedAlloc((Object*)newArray, self);
                     return false;
                 }
                 Object* obj = avalue.value.l;
+                dvmSetObjectArrayElement(newArray, count, obj);
                 dvmReleaseTrackedAlloc(obj, self);
-                *pObj++ = obj;
             }
 
             elemObj = (Object*) newArray;
@@ -734,7 +732,7 @@
         dvmAllocObject(gDvm.classOrgApacheHarmonyLangAnnotationAnnotationMember,
         ALLOC_DEFAULT);
     name = dexStringById(pDexFile, elementNameIdx);
-    nameObj = dvmCreateStringFromCstr(name, ALLOC_DEFAULT);
+    nameObj = dvmCreateStringFromCstr(name);
 
     /* find the method in the annotation class, given only the name */
     if (name != NULL) {
@@ -807,7 +805,7 @@
     ArrayObject* elementArray = NULL;
     const ClassObject* annoClass;
     const u1* ptr;
-    u4 typeIdx, size;
+    u4 typeIdx, size, count;
 
     ptr = *pPtr;
     typeIdx = readUleb128(&ptr);
@@ -836,7 +834,6 @@
      * default values get merged in later.
      */
     JValue result;
-    Object** pElement = NULL;
 
     if (size > 0) {
         elementArray = dvmAllocArrayByClass(
@@ -847,20 +844,19 @@
                 size);
             goto bail;
         }
-        pElement = (Object**) elementArray->contents;
     }
 
     /*
      * "ptr" points to a byte stream with "size" occurrences of
      * annotation_element.
      */
-    while (size--) {
+    for (count = 0; count < size; count++) {
         Object* newMember = createAnnotationMember(clazz, annoClass, &ptr);
         if (newMember == NULL)
             goto bail;
 
         /* add it to the array */
-        *pElement++ = newMember;
+        dvmSetObjectArrayElement(elementArray, count, newMember);
     }
 
     dvmCallMethod(self,
@@ -898,8 +894,8 @@
     DexFile* pDexFile = clazz->pDvmDex->pDexFile;
     const DexAnnotationItem* pAnnoItem;
     ArrayObject* annoArray;
-    Object** pContents;
     int i, count;
+    u4 dstIndex;
 
     /* we need these later; make sure they're initialized */
     if (!dvmIsClassInitialized(gDvm.classOrgApacheHarmonyLangAnnotationAnnotationFactory))
@@ -914,27 +910,29 @@
             count++;
     }
 
-    annoArray =dvmAllocArrayByClass(gDvm.classJavaLangAnnotationAnnotationArray,
-        count, ALLOC_DEFAULT);
+    annoArray =
+        dvmAllocArrayByClass(gDvm.classJavaLangAnnotationAnnotationArray,
+                             count, ALLOC_DEFAULT);
     if (annoArray == NULL)
         return NULL;
-    pContents = (Object**) annoArray->contents;
 
     /*
      * Generate Annotation objects.  We must put them into the array
      * immediately (or add them to the tracked ref table).
      */
+    dstIndex = 0;
     for (i = 0; i < (int) pAnnoSet->size; i++) {
         pAnnoItem = dexGetAnnotationItem(pDexFile, pAnnoSet, i);
         if (pAnnoItem->visibility != visibility)
             continue;
         const u1* ptr = pAnnoItem->annotation;
-        *pContents = processEncodedAnnotation(clazz, &ptr);
-        if (*pContents == NULL) {
+        Object *anno = processEncodedAnnotation(clazz, &ptr);
+        if (anno == NULL) {
             dvmReleaseTrackedAlloc((Object*) annoArray, NULL);
             return NULL;
         }
-        pContents++;
+        dvmSetObjectArrayElement(annoArray, dstIndex, anno);
+        ++dstIndex;
     }
 
     return annoArray;
@@ -1987,7 +1985,6 @@
 {
     DexFile* pDexFile = clazz->pDvmDex->pDexFile;
     ArrayObject* annoArrayArray = NULL;
-    ArrayObject** pContents;
     u4 idx;
 
     /* allocate an array of Annotation arrays to hold results */
@@ -1998,24 +1995,24 @@
         goto bail;
     }
 
-    pContents = (ArrayObject**) annoArrayArray->contents;
-
     for (idx = 0; idx < count; idx++) {
         Thread* self = dvmThreadSelf();
         const DexAnnotationSetRefItem* pItem;
         const DexAnnotationSetItem* pAnnoSet;
+        Object *annoSet;
 
         pItem = dexGetParameterAnnotationSetRef(pAnnoSetList, idx);
         pAnnoSet = dexGetSetRefItemItem(pDexFile, pItem);
-        *pContents = processAnnotationSet(clazz, pAnnoSet,
-                        kDexVisibilityRuntime);
-        if (*pContents == NULL) {
+        annoSet = (Object *)processAnnotationSet(clazz,
+                                                 pAnnoSet,
+                                                 kDexVisibilityRuntime);
+        if (annoSet == NULL) {
             LOGW("processAnnotationSet failed\n");
             annoArrayArray = NULL;
             goto bail;
         }
-        dvmReleaseTrackedAlloc((Object*) *pContents, self);
-        pContents++;
+        dvmSetObjectArrayElement(annoArrayArray, idx, annoSet);
+        dvmReleaseTrackedAlloc((Object*) annoSet, self);
     }
 
 bail:
@@ -2127,7 +2124,7 @@
 
 /**
  * Initializes an encoded array iterator.
- * 
+ *
  * @param iterator iterator to initialize
  * @param encodedArray encoded array to iterate over
  * @param clazz class to use when resolving strings and types
@@ -2153,9 +2150,9 @@
  * cursor. This returns primitive values in their corresponding union
  * slots, and returns everything else (including nulls) as object
  * references in the "l" union slot.
- * 
+ *
  * The caller must call dvmReleaseTrackedAlloc() on any returned reference.
- * 
+ *
  * @param value pointer to store decoded value into
  * @returns true if a value was decoded and the cursor advanced; false if
  * the last value had already been decoded or if there was a problem decoding
@@ -2182,4 +2179,3 @@
     iterator->elementsLeft--;
     return true;
 }
-
diff --git a/vm/reflect/Proxy.c b/vm/reflect/Proxy.c
index 4b95e36..eef658d 100644
--- a/vm/reflect/Proxy.c
+++ b/vm/reflect/Proxy.c
@@ -136,7 +136,7 @@
     ArrayObject* throws = NULL;
     ClassObject* newClass = NULL;
     int i;
-    
+
     nameStr = dvmCreateCstrFromString(str);
     if (nameStr == NULL) {
         dvmThrowException("Ljava/lang/IllegalArgumentException;",
@@ -183,14 +183,18 @@
                                         ALLOC_DEFAULT);
     if (newClass == NULL)
         goto bail;
-    DVM_OBJECT_INIT(&newClass->obj, gDvm.unlinkedJavaLangClass);
+    DVM_OBJECT_INIT(&newClass->obj, gDvm.classJavaLangClass);
     dvmSetClassSerialNumber(newClass);
     newClass->descriptorAlloc = dvmNameToDescriptor(nameStr);
     newClass->descriptor = newClass->descriptorAlloc;
     newClass->accessFlags = ACC_PUBLIC | ACC_FINAL;
-    newClass->super = gDvm.classJavaLangReflectProxy;
+    dvmSetFieldObject((Object *)newClass,
+                      offsetof(ClassObject, super),
+                      (Object *)gDvm.classJavaLangReflectProxy);
     newClass->primitiveType = PRIM_NOT;
-    newClass->classLoader = loader;
+    dvmSetFieldObject((Object *)newClass,
+                      offsetof(ClassObject, classLoader),
+                      (Object *)loader);
 #if WITH_HPROF && WITH_HPROF_STACK
     hprofFillInStackTrace(newClass);
 #endif
@@ -241,10 +245,12 @@
     dvmSetStaticFieldObject(sfield, (Object*)throws);
 
     /*
-     * Everything is ready.  See if the linker will lap it up.
+     * Everything is ready. This class didn't come out of a DEX file
+     * so we didn't tuck any indexes into the class object.  We can
+     * advance to LOADED state immediately.
      */
     newClass->status = CLASS_LOADED;
-    if (!dvmLinkClass(newClass, true)) {
+    if (!dvmLinkClass(newClass)) {
         LOGD("Proxy class link failed\n");
         goto bail;
     }
@@ -795,7 +801,7 @@
     meth->name = "<init>";
     meth->prototype =
         gDvm.methJavaLangReflectProxy_constructorPrototype->prototype;
-    meth->shorty = 
+    meth->shorty =
         gDvm.methJavaLangReflectProxy_constructorPrototype->shorty;
     // no pDexCode or pDexMethod
 
@@ -860,7 +866,7 @@
      */
 
     int srcIndex = 0;
-    
+
     argCount = 0;
     while (*desc != '\0') {
         char descChar = *(desc++);
diff --git a/vm/reflect/Reflect.c b/vm/reflect/Reflect.c
index 7fc07b5..cf63462 100644
--- a/vm/reflect/Reflect.c
+++ b/vm/reflect/Reflect.c
@@ -71,9 +71,9 @@
         return false;
     }
 
-    gDvm.classJavaLangClassArray = 
+    gDvm.classJavaLangClassArray =
         dvmFindArrayClass("[Ljava/lang/Class;", NULL);
-    gDvm.classJavaLangObjectArray = 
+    gDvm.classJavaLangObjectArray =
         dvmFindArrayClass("[Ljava/lang/Object;", NULL);
     if (gDvm.classJavaLangClassArray == NULL ||
         gDvm.classJavaLangObjectArray == NULL)
@@ -240,7 +240,6 @@
     ClassObject* defClass)
 {
     ArrayObject* classArray;
-    ClassObject** classes;
     char* signature = *pSignature;
     char* cp;
     int i, count;
@@ -273,7 +272,6 @@
         return NULL;
 
     /* fill it in */
-    classes = (ClassObject**) classArray->contents;
     cp = signature;
     for (i = 0; i < count; i++) {
         ClassObject* clazz;
@@ -284,8 +282,7 @@
             return NULL;
         }
         LOGVV("REFLECT  %d: '%s'\n", i, clazz->descriptor);
-
-        *classes++ = clazz;
+        dvmSetObjectArrayElement(classArray, i, (Object *)clazz);
     }
 
     *pSignature = cp;
@@ -362,7 +359,7 @@
     if (type == NULL)
         goto bail;
 
-    nameObj = dvmCreateStringFromCstr(field->name, ALLOC_DEFAULT);
+    nameObj = dvmCreateStringFromCstr(field->name);
     if (nameObj == NULL)
         goto bail;
 
@@ -395,7 +392,6 @@
 ArrayObject* dvmGetDeclaredFields(ClassObject* clazz, bool publicOnly)
 {
     ArrayObject* fieldArray = NULL;
-    Object** fields;
     int i, count;
 
     if (!dvmIsClassInitialized(gDvm.classJavaLangReflectField))
@@ -421,34 +417,38 @@
                     kObjectArrayRefWidth, ALLOC_DEFAULT);
     if (fieldArray == NULL)
         return NULL;
-    fields = (Object**) fieldArray->contents;
 
     /* populate */
+    size_t fieldCount = 0;
     for (i = 0; i < clazz->sfieldCount; i++) {
         if (!publicOnly ||
             (clazz->sfields[i].field.accessFlags & ACC_PUBLIC) != 0)
         {
-            *fields = createFieldObject(&clazz->sfields[i].field, clazz);
-            if (*fields == NULL)
+            Object* field = createFieldObject(&clazz->sfields[i].field, clazz);
+            if (field == NULL) {
                 goto fail;
-            dvmReleaseTrackedAlloc(*fields, NULL);
-            fields++;
-            count--;
+            }
+            dvmSetObjectArrayElement(fieldArray, fieldCount, field);
+            dvmReleaseTrackedAlloc(field, NULL);
+            ++fieldCount;
         }
     }
     for (i = 0; i < clazz->ifieldCount; i++) {
         if (!publicOnly ||
             (clazz->ifields[i].field.accessFlags & ACC_PUBLIC) != 0)
         {
-            *fields = createFieldObject(&clazz->ifields[i].field, clazz);
-            if (*fields == NULL)
+            Object* field = createFieldObject(&clazz->ifields[i].field, clazz);
+            if (field == NULL) {
                 goto fail;
-            dvmReleaseTrackedAlloc(*fields, NULL);
-            fields++;
-            count--;
+            }
+            dvmSetObjectArrayElement(fieldArray, fieldCount, field);
+            dvmReleaseTrackedAlloc(field, NULL);
+            ++fieldCount;
         }
     }
 
+    assert(fieldCount == fieldArray->length);
+
     /* caller must call dvmReleaseTrackedAlloc */
     return fieldArray;
 
@@ -575,7 +575,6 @@
 ArrayObject* dvmGetDeclaredConstructors(ClassObject* clazz, bool publicOnly)
 {
     ArrayObject* consArray;
-    Object** consObjPtr;
     Method* meth;
     int i, count;
 
@@ -610,12 +609,11 @@
     if (consArray == NULL)
         return NULL;
 
-    consObjPtr = (Object**) consArray->contents;
-
     /*
      * Fill out the array.
      */
     meth = clazz->directMethods;
+    size_t consObjCount = 0;
     for (i = 0; i < clazz->directMethodCount; i++, meth++) {
         if ((!publicOnly || dvmIsPublicMethod(meth)) &&
             dvmIsConstructorMethod(meth) && !dvmIsStaticMethod(meth))
@@ -623,12 +621,13 @@
             Object* consObj = createConstructorObject(meth);
             if (consObj == NULL)
                 goto fail;
-            *consObjPtr++ = consObj;
+            dvmSetObjectArrayElement(consArray, consObjCount, consObj);
+            ++consObjCount;
             dvmReleaseTrackedAlloc(consObj, NULL);
         }
     }
 
-    assert(consObjPtr - (Object**) consArray->contents == count);
+    assert(consObjCount == consArray->length);
 
     /* caller must call dvmReleaseTrackedAlloc */
     return consArray;
@@ -700,7 +699,7 @@
         goto bail;
 
     /* method name */
-    nameObj = dvmCreateStringFromCstr(meth->name, ALLOC_DEFAULT);
+    nameObj = dvmCreateStringFromCstr(meth->name);
     if (nameObj == NULL)
         goto bail;
 
@@ -740,7 +739,6 @@
 ArrayObject* dvmGetDeclaredMethods(ClassObject* clazz, bool publicOnly)
 {
     ArrayObject* methodArray;
-    Object** methObjPtr;
     Method* meth;
     int i, count;
 
@@ -778,12 +776,12 @@
     if (methodArray == NULL)
         return NULL;
 
-    methObjPtr = (Object**) methodArray->contents;
 
     /*
      * Fill out the array.
      */
     meth = clazz->virtualMethods;
+    size_t methObjCount = 0;
     for (i = 0; i < clazz->virtualMethodCount; i++, meth++) {
         if ((!publicOnly || dvmIsPublicMethod(meth)) &&
             !dvmIsMirandaMethod(meth))
@@ -791,7 +789,8 @@
             Object* methObj = dvmCreateReflectMethodObject(meth);
             if (methObj == NULL)
                 goto fail;
-            *methObjPtr++ = methObj;
+            dvmSetObjectArrayElement(methodArray, methObjCount, methObj);
+            ++methObjCount;
             dvmReleaseTrackedAlloc(methObj, NULL);
         }
     }
@@ -803,12 +802,13 @@
             Object* methObj = dvmCreateReflectMethodObject(meth);
             if (methObj == NULL)
                 goto fail;
-            *methObjPtr++ = methObj;
+            dvmSetObjectArrayElement(methodArray, methObjCount, methObj);
+            ++methObjCount;
             dvmReleaseTrackedAlloc(methObj, NULL);
         }
     }
 
-    assert(methObjPtr - (Object**) methodArray->contents == count);
+    assert(methObjCount == methodArray->length);
 
     /* caller must call dvmReleaseTrackedAlloc */
     return methodArray;
@@ -841,11 +841,9 @@
     /*
      * Fill out the array.
      */
-    Object** interfaceObjPtr = (Object**) interfaceArray->contents;
-    int i;
-    for (i = 0; i < count; i++) {
-        *interfaceObjPtr++ = (Object*) clazz->interfaces[i];
-    }
+    memcpy(interfaceArray->contents, clazz->interfaces,
+           count * sizeof(Object *));
+    dvmWriteBarrierArray(interfaceArray, 0, count);
 
     /* caller must call dvmReleaseTrackedAlloc */
     return interfaceArray;
@@ -1029,7 +1027,7 @@
 DataObject* dvmWrapPrimitive(JValue value, ClassObject* returnType)
 {
     static const char* boxTypes[] = {       // order from enum PrimitiveType
-        "Ljava/lang/Boolean;", 
+        "Ljava/lang/Boolean;",
         "Ljava/lang/Character;",
         "Ljava/lang/Float;",
         "Ljava/lang/Double;",
@@ -1102,6 +1100,8 @@
                 value->clazz->descriptor, returnType->descriptor);
             return false;
         }
+        /* Never on the heap, so no write barrier needed. */
+        assert(!dvmIsValidObjectAddress(pResult));
         pResult->l = value;
         return true;
     } else if (typeIndex == PRIM_VOID) {
diff --git a/vm/reflect/Reflect.h b/vm/reflect/Reflect.h
index cd8e76c..16e7148 100644
--- a/vm/reflect/Reflect.h
+++ b/vm/reflect/Reflect.h
@@ -208,7 +208,7 @@
 
 /**
  * Initializes an encoded array iterator.
- * 
+ *
  * @param iterator iterator to initialize
  * @param encodedArray encoded array to iterate over
  * @param clazz class to use when resolving strings and types
@@ -226,9 +226,9 @@
  * cursor. This returns primitive values in their corresponding union
  * slots, and returns everything else (including nulls) as object
  * references in the "l" union slot.
- * 
+ *
  * The caller must call dvmReleaseTrackedAlloc() on any returned reference.
- * 
+ *
  * @param value pointer to store decoded value into
  * @returns true if a value was decoded and the cursor advanced; false if
  * the last value had already been decoded or if there was a problem decoding
diff --git a/vm/test/AtomicSpeed.c b/vm/test/AtomicSpeed.c
deleted file mode 100644
index b569668..0000000
--- a/vm/test/AtomicSpeed.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Atomic operation performance test.
- */
-#include "Dalvik.h"
-
-//#define TRIVIAL_COMPARE     /* do something simple instead of an atomic op */
-
-/*
- * Perform operation.  Returns elapsed time.
- */
-u8 dvmTestAtomicSpeedSub(int repeatCount)
-{
-    static int value = 7;
-    int* valuePtr = &value;
-    u8 start, end;
-    int i;
-    
-#ifdef TRIVIAL_COMPARE
-    /* init to arg value so compiler can't pre-determine result */
-    int j = repeatCount;
-#endif
-
-    assert((repeatCount % 10) == 0);
-
-    start = dvmGetRelativeTimeNsec();
-
-    for (i = repeatCount / 10; i != 0; i--) {
-#ifdef TRIVIAL_COMPARE
-        // integer add (Dream: 3.4ns -- THUMB has 10 adds, ARM condenses)
-        j += i; j += i; j += i; j += i; j += i;
-        j += i; j += i; j += i; j += i; j += i;
-#else
-        // succeed 10x (Dream: 155.9ns)
-        (void)ATOMIC_CMP_SWAP(valuePtr, 7, 7);
-        (void)ATOMIC_CMP_SWAP(valuePtr, 7, 7);
-        (void)ATOMIC_CMP_SWAP(valuePtr, 7, 7);
-        (void)ATOMIC_CMP_SWAP(valuePtr, 7, 7);
-        (void)ATOMIC_CMP_SWAP(valuePtr, 7, 7);
-        (void)ATOMIC_CMP_SWAP(valuePtr, 7, 7);
-        (void)ATOMIC_CMP_SWAP(valuePtr, 7, 7);
-        (void)ATOMIC_CMP_SWAP(valuePtr, 7, 7);
-        (void)ATOMIC_CMP_SWAP(valuePtr, 7, 7);
-        (void)ATOMIC_CMP_SWAP(valuePtr, 7, 7);
-
-        // fail 10x (Dream: 158.5ns)
-        /*
-        ATOMIC_CMP_SWAP(valuePtr, 6, 7);
-        ATOMIC_CMP_SWAP(valuePtr, 6, 7);
-        ATOMIC_CMP_SWAP(valuePtr, 6, 7);
-        ATOMIC_CMP_SWAP(valuePtr, 6, 7);
-        ATOMIC_CMP_SWAP(valuePtr, 6, 7);
-        ATOMIC_CMP_SWAP(valuePtr, 6, 7);
-        ATOMIC_CMP_SWAP(valuePtr, 6, 7);
-        ATOMIC_CMP_SWAP(valuePtr, 6, 7);
-        ATOMIC_CMP_SWAP(valuePtr, 6, 7);
-        ATOMIC_CMP_SWAP(valuePtr, 6, 7);
-        */
-#endif
-    }
-
-    end = dvmGetRelativeTimeNsec();
-
-#ifdef TRIVIAL_COMPARE
-    /* use value so compiler can't eliminate it */
-    dvmFprintf(stdout, "%d\n", j);
-#else
-    dvmFprintf(stdout, ".");
-    fflush(stdout);     // not quite right if they intercepted fprintf
-#endif
-    return end - start;
-}
-
-/*
- * Control loop.
- */
-bool dvmTestAtomicSpeed(void)
-{
-    static const int kIterations = 10;
-    static const int kRepeatCount = 5 * 1000 * 1000;
-    static const int kDelay = 500 * 1000;
-    u8 results[kIterations];
-    int i;
-
-    for (i = 0; i < kIterations; i++) {
-        results[i] = dvmTestAtomicSpeedSub(kRepeatCount);
-        usleep(kDelay);
-    }
-
-    dvmFprintf(stdout, "\n");
-    dvmFprintf(stdout, "Atomic speed test results (%d per iteration):\n",
-        kRepeatCount);
-    for (i = 0; i < kIterations; i++) {
-        dvmFprintf(stdout,
-            " %2d: %.3fns\n", i, (double) results[i] / kRepeatCount);
-    }
-
-    return true;
-}
-
diff --git a/vm/test/AtomicTest.c b/vm/test/AtomicTest.c
new file mode 100644
index 0000000..e976d8d
--- /dev/null
+++ b/vm/test/AtomicTest.c
@@ -0,0 +1,383 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * This provides a handful of correctness and speed tests on our atomic
+ * operations.
+ *
+ * This doesn't really belong here, but we currently lack a better place
+ * for it, so this will do for now.
+ */
+#include "Dalvik.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <pthread.h>
+#include <unistd.h>
+#include <cutils/atomic.h>
+#ifdef __arm__
+# include <machine/cpu-features.h>
+#endif
+
+#define USE_ATOMIC      1
+#define THREAD_COUNT    10
+#define ITERATION_COUNT 500000
+
+#ifdef HAVE_ANDROID_OS
+/*#define TEST_BIONIC 1*/
+#endif
+
+
+#ifdef TEST_BIONIC
+extern int __atomic_cmpxchg(int old, int _new, volatile int *ptr);
+extern int __atomic_swap(int _new, volatile int *ptr);
+extern int __atomic_dec(volatile int *ptr);
+extern int __atomic_inc(volatile int *ptr);
+#endif
+
+static pthread_mutex_t waitLock = PTHREAD_MUTEX_INITIALIZER;
+static pthread_cond_t waitCond = PTHREAD_COND_INITIALIZER;
+
+static volatile int threadsStarted = 0;
+
+/* results */
+static int incTest = 0;
+static int decTest = 0;
+static int addTest = 0;
+static int andTest = 0;
+static int orTest = 0;
+static int casTest = 0;
+static int failingCasTest = 0;
+static int swapTest = 0;
+static int64_t wideCasTest = 0x6600000077000000LL;
+
+/*
+ * Get a relative time value.
+ */
+static int64_t getRelativeTimeNsec(void)
+{
+#define HAVE_POSIX_CLOCKS
+#ifdef HAVE_POSIX_CLOCKS
+    struct timespec now;
+    clock_gettime(CLOCK_MONOTONIC, &now);
+    return (int64_t) now.tv_sec*1000000000LL + now.tv_nsec;
+#else
+    struct timeval now;
+    gettimeofday(&now, NULL);
+    return (int64_t) now.tv_sec*1000000000LL + now.tv_usec * 1000LL;
+#endif
+}
+
+
+/*
+ * Non-atomic implementations, for comparison.
+ *
+ * If these get inlined the compiler may figure out what we're up to and
+ * completely elide the operations.
+ */
+static void incr(void) __attribute__((noinline));
+static void decr(void) __attribute__((noinline));
+static void add(int addVal) __attribute__((noinline));
+static int compareAndSwap(int oldVal, int newVal, int* addr) __attribute__((noinline));
+static int compareAndSwapWide(int64_t oldVal, int64_t newVal, int64_t* addr) __attribute__((noinline));
+
+static void incr(void)
+{
+    incTest++;
+}
+static void decr(void)
+{
+    decTest--;
+}
+static void add(int32_t addVal)
+{
+    addTest += addVal;
+}
+static int compareAndSwap(int32_t oldVal, int32_t newVal, int32_t* addr)
+{
+    if (*addr == oldVal) {
+        *addr = newVal;
+        return 0;
+    }
+    return 1;
+}
+static int compareAndSwapWide(int64_t oldVal, int64_t newVal, int64_t* addr)
+{
+    if (*addr == oldVal) {
+        *addr = newVal;
+        return 0;
+    }
+    return 1;
+}
+
+/*
+ * Exercise several of the atomic ops.
+ */
+static void doAtomicTest(int num)
+{
+    int addVal = (num & 0x01) + 1;
+
+    int i;
+    for (i = 0; i < ITERATION_COUNT; i++) {
+        if (USE_ATOMIC) {
+            android_atomic_inc(&incTest);
+            android_atomic_dec(&decTest);
+            android_atomic_add(addVal, &addTest);
+
+            int val;
+            do {
+                val = casTest;
+            } while (android_atomic_release_cas(val, val+3, &casTest) != 0);
+            do {
+                val = casTest;
+            } while (android_atomic_acquire_cas(val, val-1, &casTest) != 0);
+
+            int64_t wval;
+            do {
+                wval = dvmQuasiAtomicRead64(&wideCasTest);
+            } while (dvmQuasiAtomicCas64(wval,
+                        wval + 0x0000002000000001LL, &wideCasTest) != 0);
+            do {
+                wval = dvmQuasiAtomicRead64(&wideCasTest);
+            } while (dvmQuasiAtomicCas64(wval,
+                        wval - 0x0000002000000001LL, &wideCasTest) != 0);
+        } else {
+            incr();
+            decr();
+            add(addVal);
+
+            int val;
+            do {
+                val = casTest;
+            } while (compareAndSwap(val, val+3, &casTest) != 0);
+            do {
+                val = casTest;
+            } while (compareAndSwap(val, val-1, &casTest) != 0);
+
+            int64_t wval;
+            do {
+                wval = wideCasTest;
+            } while (compareAndSwapWide(wval,
+                        wval + 0x0000002000000001LL, &wideCasTest) != 0);
+            do {
+                wval = wideCasTest;
+            } while (compareAndSwapWide(wval,
+                        wval - 0x0000002000000001LL, &wideCasTest) != 0);
+        }
+    }
+}
+
+/*
+ * Entry point for multi-thread test.
+ */
+static void* atomicTest(void* arg)
+{
+    pthread_mutex_lock(&waitLock);
+    threadsStarted++;
+    pthread_cond_wait(&waitCond, &waitLock);
+    pthread_mutex_unlock(&waitLock);
+
+    doAtomicTest((int) arg);
+
+    return NULL;
+}
+
+/* lifted from a VM test */
+static int64_t testAtomicSpeedSub(int repeatCount)
+{
+    static int value = 7;
+    int* valuePtr = &value;
+    int64_t start, end;
+    int i;
+
+    start = getRelativeTimeNsec();
+
+    for (i = repeatCount / 10; i != 0; i--) {
+        if (USE_ATOMIC) {
+            // succeed 10x
+            (void) android_atomic_release_cas(7, 7, valuePtr);
+            (void) android_atomic_release_cas(7, 7, valuePtr);
+            (void) android_atomic_release_cas(7, 7, valuePtr);
+            (void) android_atomic_release_cas(7, 7, valuePtr);
+            (void) android_atomic_release_cas(7, 7, valuePtr);
+            (void) android_atomic_release_cas(7, 7, valuePtr);
+            (void) android_atomic_release_cas(7, 7, valuePtr);
+            (void) android_atomic_release_cas(7, 7, valuePtr);
+            (void) android_atomic_release_cas(7, 7, valuePtr);
+            (void) android_atomic_release_cas(7, 7, valuePtr);
+        } else {
+            // succeed 10x
+            compareAndSwap(7, 7, valuePtr);
+            compareAndSwap(7, 7, valuePtr);
+            compareAndSwap(7, 7, valuePtr);
+            compareAndSwap(7, 7, valuePtr);
+            compareAndSwap(7, 7, valuePtr);
+            compareAndSwap(7, 7, valuePtr);
+            compareAndSwap(7, 7, valuePtr);
+            compareAndSwap(7, 7, valuePtr);
+            compareAndSwap(7, 7, valuePtr);
+            compareAndSwap(7, 7, valuePtr);
+        }
+    }
+
+    end = getRelativeTimeNsec();
+
+    dvmFprintf(stdout, ".");
+    fflush(stdout);
+    return end - start;
+}
+
+static void testAtomicSpeed(void)
+{
+    static const int kIterations = 10;
+    static const int kRepeatCount = 5 * 1000 * 1000;
+    static const int kDelay = 50 * 1000;
+    int64_t results[kIterations];
+    int i;
+
+    for (i = 0; i < kIterations; i++) {
+        results[i] = testAtomicSpeedSub(kRepeatCount);
+        usleep(kDelay);
+    }
+
+    dvmFprintf(stdout, "\n");
+    dvmFprintf(stdout, "%s speed test results (%d per iteration):\n",
+        USE_ATOMIC ? "Atomic" : "Non-atomic", kRepeatCount);
+    for (i = 0; i < kIterations; i++) {
+        dvmFprintf(stdout,
+            " %2d: %.3fns\n", i, (double) results[i] / kRepeatCount);
+    }
+}
+
+/*
+ * Start tests, show results.
+ */
+bool dvmTestAtomicSpeed(void)
+{
+    pthread_t threads[THREAD_COUNT];
+    void *(*startRoutine)(void*) = atomicTest;
+    int64_t startWhen, endWhen;
+
+#if defined(__ARM_ARCH__)
+    dvmFprintf(stdout, "__ARM_ARCH__ is %d\n", __ARM_ARCH__);
+#endif
+#if defined(ANDROID_SMP)
+    dvmFprintf(stdout, "ANDROID_SMP is %d\n", ANDROID_SMP);
+#endif
+    dvmFprintf(stdout, "Creating threads\n");
+
+    int i;
+    for (i = 0; i < THREAD_COUNT; i++) {
+        void* arg = (void*) i;
+        if (pthread_create(&threads[i], NULL, startRoutine, arg) != 0) {
+            dvmFprintf(stderr, "thread create failed\n");
+        }
+    }
+
+    /* wait for all the threads to reach the starting line */
+    while (1) {
+        pthread_mutex_lock(&waitLock);
+        if (threadsStarted == THREAD_COUNT) {
+            dvmFprintf(stdout, "Starting test\n");
+            startWhen = getRelativeTimeNsec();
+            pthread_cond_broadcast(&waitCond);
+            pthread_mutex_unlock(&waitLock);
+            break;
+        }
+        pthread_mutex_unlock(&waitLock);
+        usleep(100000);
+    }
+
+    for (i = 0; i < THREAD_COUNT; i++) {
+        void* retval;
+        if (pthread_join(threads[i], &retval) != 0) {
+            dvmFprintf(stderr, "thread join (%d) failed\n", i);
+        }
+    }
+
+    endWhen = getRelativeTimeNsec();
+    dvmFprintf(stdout, "All threads stopped, time is %.6fms\n",
+        (endWhen - startWhen) / 1000000.0);
+
+    /*
+     * Show results; expecting:
+     *
+     * incTest = 5000000
+     * decTest = -5000000
+     * addTest = 7500000
+     * casTest = 10000000
+     * wideCasTest = 0x6600000077000000
+     */
+    dvmFprintf(stdout, "incTest = %d\n", incTest);
+    dvmFprintf(stdout, "decTest = %d\n", decTest);
+    dvmFprintf(stdout, "addTest = %d\n", addTest);
+    dvmFprintf(stdout, "casTest = %d\n", casTest);
+    dvmFprintf(stdout, "wideCasTest = 0x%llx\n", wideCasTest);
+
+    /* do again, serially (SMP check) */
+    startWhen = getRelativeTimeNsec();
+    for (i = 0; i < THREAD_COUNT; i++) {
+        doAtomicTest(i);
+    }
+    endWhen = getRelativeTimeNsec();
+    dvmFprintf(stdout, "Same iterations done serially: time is %.6fms\n",
+        (endWhen - startWhen) / 1000000.0);
+
+    /*
+     * Hard to do a meaningful thrash test on these, so just do a simple
+     * function test.
+     */
+    andTest = 0xffd7fa96;
+    orTest = 0x122221ff;
+    swapTest = 0x11111111;
+    android_atomic_and(0xfffdaf96, &andTest);
+    android_atomic_or(0xdeaaeb00, &orTest);
+    int oldSwap = android_atomic_swap(0x22222222, &swapTest);
+    int oldSwap2 = android_atomic_release_swap(0x33333333, &swapTest);
+    if (android_atomic_release_cas(failingCasTest+1, failingCasTest-1,
+            &failingCasTest) == 0)
+        dvmFprintf(stdout, "failing test did not fail!\n");
+
+    dvmFprintf(stdout, "andTest = 0x%x\n", andTest);
+    dvmFprintf(stdout, "orTest = 0x%x\n", orTest);
+    dvmFprintf(stdout, "acquire swapTest = 0x%x -> 0x%x\n", oldSwap, oldSwap2);
+    dvmFprintf(stdout, "release swapTest = 0x%x -> 0x%x\n", oldSwap2, swapTest);
+    dvmFprintf(stdout, "failingCasTest = %d\n", failingCasTest);
+
+#ifdef TEST_BIONIC
+    /*
+     * Quick function test on the bionic ops.
+     */
+    int prev;
+    int tester = 7;
+    prev = __atomic_inc(&tester);
+    __atomic_inc(&tester);
+    __atomic_inc(&tester);
+    dvmFprintf(stdout, "bionic 3 inc: %d -> %d\n", prev, tester);
+    prev = __atomic_dec(&tester);
+    __atomic_dec(&tester);
+    __atomic_dec(&tester);
+    dvmFprintf(stdout, "bionic 3 dec: %d -> %d\n", prev, tester);
+    prev = __atomic_swap(27, &tester);
+    dvmFprintf(stdout, "bionic swap: %d -> %d\n", prev, tester);
+    int swapok = __atomic_cmpxchg(27, 72, &tester);
+    dvmFprintf(stdout, "bionic cmpxchg: %d (%d)\n", tester, swapok);
+#endif
+
+    testAtomicSpeed();
+
+    return 0;
+}