use of org.jikesrvm.classloader.NormalMethod 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.classloader.NormalMethod in project JikesRVM by JikesRVM.
the class InlineSequenceTest method testGetRootMethod.
@Test
public void testGetRootMethod() throws Exception {
InlineSequence s0 = createInlineSequence(Methods.class, "root");
InlineSequence s1 = createInlineSequence(s0, 0, Methods.class, "m");
InlineSequence s2 = createInlineSequence(s1, 2, Methods.class, "n");
NormalMethod methodroot = getNormalMethod(Methods.class, "root");
assertEquals(methodroot, s2.getRootMethod());
}
use of org.jikesrvm.classloader.NormalMethod in project JikesRVM by JikesRVM.
the class InlineSequenceTest method testGetMethod.
@Test
public void testGetMethod() throws Exception {
InlineSequence s0 = createInlineSequence(Methods.class, "root");
InlineSequence s1 = createInlineSequence(s0, 0, Methods.class, "m");
InlineSequence s2 = createInlineSequence(s1, 2, Methods.class, "n");
NormalMethod root = getNormalMethod(Methods.class, "root");
NormalMethod a = getNormalMethod(Methods.class, "m");
NormalMethod b = getNormalMethod(Methods.class, "n");
assertEquals(root, s0.getMethod());
assertEquals(a, s1.getMethod());
assertEquals(b, s2.getMethod());
}
use of org.jikesrvm.classloader.NormalMethod in project JikesRVM by JikesRVM.
the class ActiveSetTest method createActiveSetFromRegisterAllocatorState.
private ActiveSet createActiveSetFromRegisterAllocatorState(RegisterAllocatorState state) throws Exception {
NormalMethod nm = TestingTools.getNormalMethod(MethodsForTests.class, "emptyStaticMethodWithoutAnnotations");
OptOptions opts = new OptOptions();
IR ir = new IR(nm, null, opts);
ir.MIRInfo = new MIRInfo(ir);
ir.MIRInfo.regAllocState = state;
SpillLocationManager spillLocManager = new SpillLocationManager(ir);
this.spillLocations = spillLocManager;
return new ActiveSet(ir, spillLocManager, null);
}
use of org.jikesrvm.classloader.NormalMethod in project JikesRVM by JikesRVM.
the class ActiveSetTest method findAvailableRegisterIgnoresInfrequentIntervalsWhenDesired.
@Test
public void findAvailableRegisterIgnoresInfrequentIntervalsWhenDesired() throws Exception {
NormalMethod nm = TestingTools.getNormalMethod(MethodsForTests.class, "emptyStaticMethodWithoutAnnotations");
OptOptions opts = new OptOptions();
opts.FREQ_FOCUS_EFFORT = true;
IR ir = new IR(nm, null, opts);
ir.MIRInfo = new MIRInfo(ir);
SpillLocationManager spillLocManager = new SpillLocationManager(ir);
this.spillLocations = spillLocManager;
ActiveSet active = new ActiveSet(ir, spillLocManager, null);
CompoundInterval infrequentCode = new CompoundInterval(null);
assertNull(active.findAvailableRegister(infrequentCode));
}
Aggregations