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; Test jsr and jsr_w. 19.method public test_jsr()Ljava/lang/Object; 20 .limit locals 3 21 .limit stack 4 22 aload_0 23 jsr j1 24 aload_0 25 pop 26 ; Call j1 with different locals 27 ldc 10 28 istore_0 29 jsr j1 30 iload_0 31 pop 32 jsr j3 33 areturn 34j1: 35 astore_2 36 jsr_w j2 37 ret 2 38j2: 39 ; a subroutine with two returns and a catch block 40 astore_1 41 dup 42 dup 43 ; Just something that could throw an exception... 44 invokevirtual blort.test_jsr()V 45 ifnonnull j2a 46 ret_w 1 47j2a: 48 ret_w 1 49j3: 50 ; a subroutine that does not return 51 pop 52 areturn 53catchBlock: 54 areturn 55 56.catch java/lang/Throwable from j2 to j2a using catchBlock 57.end method 58