use of org.jikesrvm.compilers.common.CompiledMethod in project JikesRVM by JikesRVM.
the class GenerationContextTest method unintBeginAndUnintEndAreNotAddedWhenDirectParentHasThem.
@Test
public void unintBeginAndUnintEndAreNotAddedWhenDirectParentHasThem() throws Exception {
NormalMethod nm = getNormalMethodForTest("emptyStaticUninterruptibleMethod");
CompiledMethod cm = new OptCompiledMethod(-1, nm);
OptOptions opts = new OptOptions();
InlineOracle io = new DefaultInlineOracle();
GenerationContext gc = new GenerationContext(nm, null, cm, opts, io);
assertThatStateIsCorrectForUnsynchronizedEmptyStaticMethod(nm, cm, io, gc);
NormalMethod interruptibleCallee = getNormalMethodForTest("emptyStaticUninterruptibleMethod");
Instruction callInstr = buildCallInstructionForStaticMethodWithoutReturn(interruptibleCallee, nm);
ExceptionHandlerBasicBlockBag ebag = getMockEbag();
GenerationContext child = gc.createChildContext(ebag, interruptibleCallee, callInstr);
Enumeration<Instruction> prologueRealInstr = child.getPrologue().forwardRealInstrEnumerator();
assertThatNoMoreInstructionsExist(prologueRealInstr);
Enumeration<Instruction> epilogueRealInstr = child.getEpilogue().forwardRealInstrEnumerator();
assertThatNoMoreInstructionsExist(epilogueRealInstr);
}
use of org.jikesrvm.compilers.common.CompiledMethod in project JikesRVM by JikesRVM.
the class MagicTest method getCompilerLevelMapsToTheCorrectConstantsForBaseline.
@Test
public void getCompilerLevelMapsToTheCorrectConstantsForBaseline() throws Exception {
testMethodForGetCompilerLevel = TestingTools.getNormalMethod(MagicTest.class, "getCompilerLevel");
CompiledMethod cm = RuntimeCompiler.baselineCompile(testMethodForGetCompilerLevel);
assertThat(cm.getCompilerType(), is(BASELINE));
assertThat(getCompilerLevel(), is(-1));
}
Aggregations