Fix special method codegen

Tightened up the conditions under which we can generate frameless
methods.  Added and renamed test case.  Added special handling for
identity functions.

Change-Id: I5b04ea222becefc151ef7ff6b255e58922ccd6f2
diff --git a/src/compiler/CompilerIR.h b/src/compiler/CompilerIR.h
index afddf07..429772a 100644
--- a/src/compiler/CompilerIR.h
+++ b/src/compiler/CompilerIR.h
@@ -45,6 +45,7 @@
     kLocDalvikFrame = 0, // Normal Dalvik register
     kLocPhysReg,
     kLocCompilerTemp,
+    kLocInvalid
 };
 
 struct PromotionMap {
@@ -553,6 +554,7 @@
     kIPutChar,
     kIPutShort,
     kIPutWide,
+    kIdentity,
 };
 
 struct CodePattern {
@@ -580,6 +582,9 @@
     {{Instruction::IPUT_CHAR, Instruction::RETURN_VOID}, kIPutChar},
     {{Instruction::IPUT_SHORT, Instruction::RETURN_VOID}, kIPutShort},
     {{Instruction::IPUT_WIDE, Instruction::RETURN_VOID}, kIPutWide},
+    {{Instruction::RETURN}, kIdentity},
+    {{Instruction::RETURN_OBJECT}, kIdentity},
+    {{Instruction::RETURN_WIDE}, kIdentity},
 };
 
 BasicBlock* oatNewBB(CompilationUnit* cUnit, BBType blockType, int blockId);