1 /*
  2  * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  4  *
  5  * This code is free software; you can redistribute it and/or modify it
  6  * under the terms of the GNU General Public License version 2 only, as
  7  * published by the Free Software Foundation.
  8  *
  9  * This code is distributed in the hope that it will be useful, but WITHOUT
 10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  */
 23 
 24 /* Reassembled from the following Java pattern:
 25  *
 26  *  class frameloc01a extends Thread {
 27  *      public void meth01(int i) {
 28  *      try {
 29  *              if (i > 0) {
 30  *                  throw new Throwable();
 31  *              }
 32  *          } catch (Throwable e) {}
 33  *      }
 34  *      public void run() {
 35  *          int local = 2003;
 36  *          synchronized (frameloc01.lock1) {
 37  *              frameloc01.lock1.notify();
 38  *          }
 39  *          synchronized (frameloc01.lock2) {
 40  *              frameloc01.fld = local;
 41  *          }
 42  *      }
 43  *  }
 44  *
 45  */
 46 
 47 super class frameloc01a extends java/lang/Thread {
 48 
 49 	Method "<init>":"()V" stack 1 locals 1 {
 50 		aload_0;
 51 		invokespecial	Method java/lang/Thread."<init>":"()V";
 52 		return;
 53 	}
 54 
 55 	public Method meth01:"(I)V" stack 2 locals 3 {
 56 	try t0;
 57 		iload_1;
 58 		ifle	L12;
 59 		new	class java/lang/Throwable;
 60 		dup;
 61 		invokespecial	Method java/lang/Throwable."<init>":"()V";
 62 		athrow;
 63 	endtry t0;
 64 	L12:	goto	L16;
 65 	catch t0 java/lang/Throwable;
 66 		astore_2;	// bci=15, expected to be here
 67 	L16:	return;
 68 	}
 69 
 70 	public Method run:"()V" stack 1 locals 5 {
 71 		sipush	2003;
 72 		istore_1;
 73 		getstatic	Field frameloc01.lock1:"Ljava/lang/Object;";
 74 		astore_2;
 75 		aload_2;
 76 		monitorenter;
 77 	try t0;
 78 		getstatic	Field frameloc01.lock1:"Ljava/lang/Object;";
 79 		invokevirtual	Method java/lang/Object.notify:"()V";
 80 		aload_2;
 81 		monitorexit;
 82 	endtry t0;
 83 		goto	L26;
 84 	catch t0 #0;
 85 	catch t1 #0;
 86 	try t1;
 87 		astore_3;
 88 		aload_2;
 89 		monitorexit;
 90 	endtry t1;
 91 		aload_3;
 92 		athrow;
 93 	L26:	getstatic	Field frameloc01.lock2:"Ljava/lang/Object;";
 94 		astore_3;
 95 		aload_3;
 96 		monitorenter;	// bci=31, expected to be here
 97 	try t2;
 98 		iload_1;
 99 		putstatic	Field frameloc01.fld:"I";
100 		aload_3;
101 		monitorexit;
102 	endtry t2;
103 		goto	L48;
104 	catch t2 #0;
105 	catch t3 #0;
106 	try t3;
107 		astore	4;
108 		aload_3;
109 		monitorexit;
110 	endtry t3;
111 		aload	4;
112 		athrow;
113 	L48:	return;
114 	}
115 }