Mercurial > hg > Members > kono > jpf-core
comparison src/main/gov/nasa/jpf/vm/Instruction.java @ 23:db918c531e6d
streamlined class init, which was a mixed case of registerClass()/initializeClass() and pushRequiredClinits(). Now it is a single initializeClass(ti) method which combines the previous initializeClass(), pushRequiredClinits() and pushClinit() methods. The reason for combining these is the forthcoming replacement of separately locked clinits from different DirectCallStackFrames with a single synthetic frame that calls clinits from nested synchronized blocks. This is required to model hotspot, which does cause deadlocks with concurrent init of classes that cause subclass init during their clinit executions.
author | Peter Mehlitz <Peter.C.Mehlitz@nasa.gov> |
---|---|
date | Wed, 15 Apr 2015 22:40:21 -0700 |
parents | 61d41facf527 |
children |
comparison
equal
deleted
inserted
replaced
22:cd7880ab73c7 | 23:db918c531e6d |
---|---|
333 * this is a misnomer - we actually push the clinit calls here in case | 333 * this is a misnomer - we actually push the clinit calls here in case |
334 * we need some. 'causedClinitCalls' might be more appropriate, but it is | 334 * we need some. 'causedClinitCalls' might be more appropriate, but it is |
335 * used in a number of external projects | 335 * used in a number of external projects |
336 */ | 336 */ |
337 public boolean requiresClinitExecution(ThreadInfo ti, ClassInfo ci) { | 337 public boolean requiresClinitExecution(ThreadInfo ti, ClassInfo ci) { |
338 return ci.pushRequiredClinits(ti); | 338 return ci.initializeClass(ti); |
339 } | 339 } |
340 | 340 |
341 /** | 341 /** |
342 * this is returning the next Instruction to enter, to be called to obtain | 342 * this is returning the next Instruction to enter, to be called to obtain |
343 * the return value of enter() if this is not a branch insn | 343 * the return value of enter() if this is not a branch insn |