1; Copyright (C) 2007 The Android Open Source Project 2; 3; Licensed under the Apache License, Version 2.0 (the "License"); 4; you may not use this file except in compliance with the License. 5; You may obtain a copy of the License at 6; 7; http://www.apache.org/licenses/LICENSE-2.0 8; 9; Unless required by applicable law or agreed to in writing, software 10; distributed under the License is distributed on an "AS IS" BASIS, 11; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12; See the License for the specific language governing permissions and 13; limitations under the License. 14 15.class blort 16.super java/lang/Object 17 18.method public <init>()V 19 .limit locals 1 20 21 aload_0 22 invokespecial java/lang/Object/<init>()V 23 return 24.end method 25 26; dead code after the last reachable instruction in a method 27.method public test_deadend1()V 28 return 29 aload_0 30.end method 31 32; dead code after the last reachable instruction in a method 33.method public test_deadend2()V 34 ireturn 35 aload_0 36 aload_0 37.end method 38 39; dead code after the last reachable instruction in a method 40.method public test_deadend3()V 41 aconst_null 42 athrow 43 sipush 0x1234 44.end method 45 46; make sure an exception handler for a dead range doesn't get enlivened 47.method public test_dead_exception_handler()V 48 return 49 nop 50blort: 51 nop 52 nop 53 return 54handler: 55 nop 56 return 57 .catch all from blort to handler using handler 58.end method 59 60; dead code after goto instruction 61.method public test_dead_goto()V 62 goto blort 63 nop 64blort: 65 return 66.end method 67 68; dead code after ret instruction 69.method public test_dead_ret()V 70 ifeq blort 71 ret 0 72 iconst_m1 73blort: 74 return 75.end method 76 77; dead code after tableswitch instruction 78.method public test_dead_tableswitch()V 79 tableswitch 0x10 80 blort 81 default: blort 82 nop 83 nop 84 nop 85 aload_0 86 aload_1 87 aload_2 88 aload_3 89blort: 90 return 91.end method 92 93; dead code after lookupswitch instruction 94.method public test_dead_lookupswitch()V 95 lookupswitch 96 0x10: blort 97 0x20: blort 98 default: blort 99 ldc "WHYA REYO UREA DING THIS ?" 100blort: 101 return 102.end method 103 104; dead code after ireturn instruction 105.method public test_dead_ireturn()V 106 ifeq blort 107 ireturn 108 iconst_1 109blort: 110 return 111.end method 112 113; dead code after lreturn instruction 114.method public test_dead_lreturn()V 115 ifeq blort 116 lreturn 117 iconst_1 118blort: 119 return 120.end method 121 122; dead code after freturn instruction 123.method public test_dead_freturn()V 124 ifeq blort 125 freturn 126 iconst_1 127blort: 128 return 129.end method 130 131; dead code after dreturn instruction 132.method public test_dead_dreturn()V 133 ifeq blort 134 dreturn 135 iconst_1 136blort: 137 return 138.end method 139 140; dead code after areturn instruction 141.method public test_dead_areturn()V 142 ifeq blort 143 areturn 144 iconst_1 145blort: 146 return 147.end method 148 149; dead code after return instruction 150.method public test_dead_return()V 151 ifeq blort 152 return 153 iconst_1 154blort: 155 return 156.end method 157 158; dead code after athrow instruction 159.method public test_dead_athrow()V 160 ifeq blort 161 athrow 162 iconst_1 163blort: 164 return 165.end method 166 167; dead code after wide ret instruction 168.method public test_dead_wideret()V 169 ifeq blort 170 ret 0x0100 171 iconst_1 172blort: 173 return 174.end method 175 176; dead code after goto_w instruction 177.method public test_dead_goto_w()V 178 goto_w blort 179 iconst_1 180blort: 181 return 182.end method 183