1*055d4590SKeyi Gui; Copyright (C) 2007 The Android Open Source Project 2*055d4590SKeyi Gui; 3*055d4590SKeyi Gui; Licensed under the Apache License, Version 2.0 (the "License"); 4*055d4590SKeyi Gui; you may not use this file except in compliance with the License. 5*055d4590SKeyi Gui; You may obtain a copy of the License at 6*055d4590SKeyi Gui; 7*055d4590SKeyi Gui; http://www.apache.org/licenses/LICENSE-2.0 8*055d4590SKeyi Gui; 9*055d4590SKeyi Gui; Unless required by applicable law or agreed to in writing, software 10*055d4590SKeyi Gui; distributed under the License is distributed on an "AS IS" BASIS, 11*055d4590SKeyi Gui; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*055d4590SKeyi Gui; See the License for the specific language governing permissions and 13*055d4590SKeyi Gui; limitations under the License. 14*055d4590SKeyi Gui 15*055d4590SKeyi Gui.class blort 16*055d4590SKeyi Gui.super java/lang/Object 17*055d4590SKeyi Gui 18*055d4590SKeyi Gui; Test jsr and jsr_w. 19*055d4590SKeyi Gui.method public test_jsr()Ljava/lang/Object; 20*055d4590SKeyi Gui .limit locals 3 21*055d4590SKeyi Gui .limit stack 4 22*055d4590SKeyi Gui aload_0 23*055d4590SKeyi Gui jsr j1 24*055d4590SKeyi Gui aload_0 25*055d4590SKeyi Gui pop 26*055d4590SKeyi Gui ; Call j1 with different locals 27*055d4590SKeyi Gui ldc 10 28*055d4590SKeyi Gui istore_0 29*055d4590SKeyi Gui jsr j1 30*055d4590SKeyi Gui iload_0 31*055d4590SKeyi Gui pop 32*055d4590SKeyi Gui jsr j3 33*055d4590SKeyi Gui areturn 34*055d4590SKeyi Guij1: 35*055d4590SKeyi Gui astore_2 36*055d4590SKeyi Gui jsr_w j2 37*055d4590SKeyi Gui ret 2 38*055d4590SKeyi Guij2: 39*055d4590SKeyi Gui ; a subroutine with two returns and a catch block 40*055d4590SKeyi Gui astore_1 41*055d4590SKeyi Gui dup 42*055d4590SKeyi Gui dup 43*055d4590SKeyi Gui ; Just something that could throw an exception... 44*055d4590SKeyi Gui invokevirtual blort.test_jsr()V 45*055d4590SKeyi Gui ifnonnull j2a 46*055d4590SKeyi Gui ret_w 1 47*055d4590SKeyi Guij2a: 48*055d4590SKeyi Gui ret_w 1 49*055d4590SKeyi Guij3: 50*055d4590SKeyi Gui ; a subroutine that does not return 51*055d4590SKeyi Gui pop 52*055d4590SKeyi Gui areturn 53*055d4590SKeyi GuicatchBlock: 54*055d4590SKeyi Gui areturn 55*055d4590SKeyi Gui 56*055d4590SKeyi Gui.catch java/lang/Throwable from j2 to j2a using catchBlock 57*055d4590SKeyi Gui.end method 58