1 ; Copyright (C) 2008 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 .source TestStubs.java 16 .interface abstract dot.junit.opcodes.aput_object.d.SuperInterface 17 18 .source TestStubs.java 19 .interface public dot.junit.opcodes.aput_object.d.SuperInterface2 20 21 .source TestStubs.java 22 .class public dot.junit.opcodes.aput_object.d.SuperClass 23 .super java/lang/Object 24 .implements dot.junit.opcodes.aput_object.d.SuperInterface 25 .method public <init>()V 26 .limit regs 1 27 28 invoke-direct {v0}, java/lang/Object/<init>()V 29 return-void 30 .end method 31 32 .source TestStubs.java 33 .class public dot.junit.opcodes.aput_object.d.SubClass 34 .super dot.junit.opcodes.aput_object.d.SuperClass 35 .method public <init>()V 36 .limit regs 1 37 38 invoke-direct {v0}, dot/junit/opcodes/aput_object/d/SuperClass/<init>()V 39 return-void 40 .end method 41 42 43 .source T_aput_object_3.java 44 .class public dot.junit.opcodes.aput_object.d.T_aput_object_3 45 .super java/lang/Object 46 47 48 .method public <init>()V 49 .limit regs 1 50 51 invoke-direct {v0}, java/lang/Object/<init>()V 52 return-void 53 .end method 54 55 .method public run()I 56 .limit regs 32 57 58 const v1, 0 59 60 const v0, 1 61 ; v2 = SubClass[] 62 new-array v2, v0, [Ldot/junit/opcodes/aput_object/d/SubClass; 63 64 ; v3 = SuperClass[] 65 new-array v3, v0, [Ldot/junit/opcodes/aput_object/d/SuperClass; 66 67 ; v4 = SubClass 68 new-instance v4, dot/junit/opcodes/aput_object/d/SubClass 69 invoke-direct {v4}, dot/junit/opcodes/aput_object/d/SubClass/<init>()V 70 71 ; v5 = SuperClass 72 new-instance v5, dot/junit/opcodes/aput_object/d/SuperClass 73 invoke-direct {v5}, dot/junit/opcodes/aput_object/d/SuperClass/<init>()V 74 75 ; v6 = SuperInterface[] 76 new-array v6, v0, [Ldot/junit/opcodes/aput_object/d/SuperInterface; 77 78 ; v7 = Object[] 79 new-array v7, v0, [Ljava/lang/Object; 80 81 ; v8 = SuperInterface2[] 82 new-array v8, v0, [Ldot/junit/opcodes/aput_object/d/SuperInterface2; 83 84 const/4 v0, 0 85 86 ; (SubClass -> SuperClass[]) 87 aput-object v4, v3, v0 88 89 ; (SubClass -> SuperInterface[]) 90 aput-object v4, v6, v0 91 92 ; (SubClass -> Object[]) 93 aput-object v4, v7, v0 94 95 ; !(SuperClass -> SubClass[]) 96 Label10: 97 aput-object v5, v2, v0 98 Label11: 99 goto Label2 100 Label12: 101 add-int/lit8 v1, v1, 1 102 goto Label2 103 104 ; !(SuperClass -> SuperInterface2[]) 105 Label2: 106 Label20: 107 aput-object v5, v8, v0 108 Label21: 109 goto Label3 110 Label22: 111 add-int/lit8 v1, v1, 1 112 goto Label3 113 114 ; !(SubClass[] -> SuperInterface[]) 115 Label3: 116 Label30: 117 aput-object v2, v6, v0 118 Label31: 119 goto Label4 120 Label32: 121 add-int/lit8 v1, v1, 1 122 goto Label4 123 124 Label4: 125 return v1 126 127 .catch java/lang/ArrayStoreException from Label10 to Label11 using Label12 128 .catch java/lang/ArrayStoreException from Label20 to Label21 using Label22 129 .catch java/lang/ArrayStoreException from Label30 to Label31 using Label32 130 .end method 131 132 133