use of org.jikesrvm.compilers.opt.ir.Register in project JikesRVM by JikesRVM.
the class ScratchMapTest method endSymbolicIntervalForNotStartedIntervalCausesNPE.
@Test(expected = NullPointerException.class)
public void endSymbolicIntervalForNotStartedIntervalCausesNPE() {
Register symb = createRegister(0);
Instruction inst = createInstruction();
scratchMap.endSymbolicInterval(symb, inst);
}
use of org.jikesrvm.compilers.opt.ir.Register in project JikesRVM by JikesRVM.
the class ScratchMapTest method beginScratchIntervalCreatesANewInterval.
@Test
public void beginScratchIntervalCreatesANewInterval() {
Register scratch = createRegister(0);
Instruction inst = createInstruction();
scratchMap.beginScratchInterval(scratch, inst);
assertThat(scratchMap.isEmpty(), is(false));
}
use of org.jikesrvm.compilers.opt.ir.Register in project JikesRVM by JikesRVM.
the class ScratchMapTest method endScratchIntervalForNotStartedIntervalCausesNPE.
@Test(expected = NullPointerException.class)
public void endScratchIntervalForNotStartedIntervalCausesNPE() {
Register scratch = createRegister(0);
Instruction inst = createInstruction();
scratchMap.endScratchInterval(scratch, inst);
}
use of org.jikesrvm.compilers.opt.ir.Register in project JikesRVM by JikesRVM.
the class ScratchMapTest method markingRegistersAsDirtyMoreThanOnceIsHarmless.
// because of TypeReference
@Category(RequiresBuiltJikesRVM.class)
@Test
public void markingRegistersAsDirtyMoreThanOnceIsHarmless() {
Register resultReg = createRegister(0);
RegisterOperand result = new RegisterOperand(resultReg, TypeReference.Int);
Register op1Reg = new Register(1);
Register op2Reg = new Register(2);
RegisterOperand op1 = new RegisterOperand(op1Reg, TypeReference.Int);
RegisterOperand op2 = new RegisterOperand(op2Reg, TypeReference.Int);
Instruction add = Binary.create(INT_ADD, result, op1, op2);
scratchMap.markDirty(add, op2Reg);
scratchMap.markDirty(add, op2Reg);
assertThat(scratchMap.isDirty(add, op2Reg), is(true));
}
use of org.jikesrvm.compilers.opt.ir.Register in project JikesRVM by JikesRVM.
the class ScratchMapTest method beginSymbolicIntervalCreatesANewInterval.
@Test
public void beginSymbolicIntervalCreatesANewInterval() {
Register symb = createRegister(0);
Register scratch = createRegister(0);
Instruction inst = createInstruction();
scratchMap.beginSymbolicInterval(symb, scratch, inst);
assertThat(scratchMap.isEmpty(), is(false));
}
Aggregations