comparison src/main/gov/nasa/jpf/jvm/bytecode/NATIVERETURN.java @ 27:8aded593a50f

fixed the missing class init status update for native clinits. Since we moved that to the clinit RETURN in r24, it has to be duplicated in NATIVERETURN for native clinits. Factoring out to DIRECTCALLRETURN is not an option since there is no good way to determine if the direct call included a clinit (we would have to look at the code, which is suboptimal performance- and change resilience-wise). Thanks to Franz Weitl for the report
author Peter Mehlitz <pcmehlitz@gmail.com>
date Mon, 11 May 2015 12:17:18 -0700
parents 61d41facf527
children
comparison
equal deleted inserted replaced
26:4eb191cbb68c 27:8aded593a50f
57 57
58 if (retAttr != null) { 58 if (retAttr != null) {
59 setReturnAttr(ti, retAttr); 59 setReturnAttr(ti, retAttr);
60 } 60 }
61 61
62 if (mi.isClinit()) {
63 // this is in the clinit RETURN insn for non-MJIs so we have to duplicate here
64 // Duplication could be avoided in DIRECTCALLRETURN, but there is no reliable
65 // way to check if the direct call did return from a clinit since the corresponding
66 // synthetic method could do anything
67 mi.getClassInfo().setInitialized();
68 }
69
62 return frame.getPC().getNext(); 70 return frame.getPC().getNext();
63 } 71 }
64 72
65 @Override 73 @Override
66 public void cleanupTransients(){ 74 public void cleanupTransients(){