Search in sources :

Example 21 with NormalMethod

use of org.jikesrvm.classloader.NormalMethod in project JikesRVM by JikesRVM.

the class BaselineCompilerImplTest method emptyInstanceMethodRequiresThreeWords.

@Test
public void emptyInstanceMethodRequiresThreeWords() throws Exception {
    Class<?>[] noArgs = {};
    NormalMethod emptyInstanceMethod = TestingTools.getNormalMethod(MethodsForTests.class, "emptyInstanceMethodWithoutAnnotations", noArgs);
    int size = BaselineCompilerImpl.calculateRequiredSpaceForFrame(emptyInstanceMethod);
    assertThat(size, is(3 * WORDSIZE));
}
Also used : NormalMethod(org.jikesrvm.classloader.NormalMethod) Test(org.junit.Test)

Example 22 with NormalMethod

use of org.jikesrvm.classloader.NormalMethod in project JikesRVM by JikesRVM.

the class BaselineCompilerImplTest method emptyStaticMethodWithBaselineSaveLSRegistersAnnotationRequiresFourWords.

@Test
public void emptyStaticMethodWithBaselineSaveLSRegistersAnnotationRequiresFourWords() throws Exception {
    Class<?>[] noArgs = {};
    NormalMethod emptyStaticMethod = TestingTools.getNormalMethod(MethodsForTests.class, "emptyStaticMethodWithBaselineSaveLSRegistersAnnotation", noArgs);
    int size = BaselineCompilerImpl.calculateRequiredSpaceForFrame(emptyStaticMethod);
    assertThat(size, is(4 * WORDSIZE));
}
Also used : NormalMethod(org.jikesrvm.classloader.NormalMethod) Test(org.junit.Test)

Example 23 with NormalMethod

use of org.jikesrvm.classloader.NormalMethod in project JikesRVM by JikesRVM.

the class BaselineCompilerImplTest method emptyStaticMethodInClassWithDynamicBridgeRequiresThireenWordsForSSE2_FULLAndX86.

@Test
public void emptyStaticMethodInClassWithDynamicBridgeRequiresThireenWordsForSSE2_FULLAndX86() throws Exception {
    assumeThat(VM.BuildForSSE2Full, is(true));
    assumeThat(VM.BuildFor32Addr, is(true));
    Class<?>[] noArgs = {};
    NormalMethod emptyStaticMethod = TestingTools.getNormalMethod(DynamicBridgeMethodsForTests.class, "emptyStaticMethodInClassWithDynamicBridge", noArgs);
    int size = BaselineCompilerImpl.calculateRequiredSpaceForFrame(emptyStaticMethod);
    assertThat(size, is(13 * WORDSIZE));
}
Also used : NormalMethod(org.jikesrvm.classloader.NormalMethod) Test(org.junit.Test)

Example 24 with NormalMethod

use of org.jikesrvm.classloader.NormalMethod in project JikesRVM by JikesRVM.

the class BaselineGCMapIteratorTest method getNextReturnAddressAddressReturnsZeroIfNoJSRsArePresent.

@Test
public void getNextReturnAddressAddressReturnsZeroIfNoJSRsArePresent() throws Exception {
    NormalMethod nm = TestingTools.getNormalMethod(MethodsForTests.class, "emptyStaticMethodWithoutAnnotations");
    CompiledMethod cm = nm.getCurrentCompiledMethod();
    gcMapIter.setupIterator(cm, NO_OFFSET, NO_FP);
    Address returnAddressAddress = gcMapIter.getNextReturnAddressAddress();
    assertZero(returnAddressAddress);
}
Also used : Address(org.vmmagic.unboxed.Address) NormalMethod(org.jikesrvm.classloader.NormalMethod) CompiledMethod(org.jikesrvm.compilers.common.CompiledMethod) Test(org.junit.Test)

Example 25 with NormalMethod

use of org.jikesrvm.classloader.NormalMethod in project JikesRVM by JikesRVM.

the class BaselineGCMapIteratorTest method setupOfIteratorRequiresOnlyCompiledMethod.

// The following test cases use JikesRVMSupport to access the actual
// compiled methods. This is obviously not possible on VMs other than
// Jikes RVM.
@Test
public void setupOfIteratorRequiresOnlyCompiledMethod() throws Exception {
    NormalMethod nm = TestingTools.getNormalMethod(MethodsForTests.class, "emptyStaticMethodWithoutAnnotations");
    CompiledMethod cm = nm.getCurrentCompiledMethod();
    gcMapIter.setupIterator(cm, NO_OFFSET, NO_FP);
}
Also used : NormalMethod(org.jikesrvm.classloader.NormalMethod) CompiledMethod(org.jikesrvm.compilers.common.CompiledMethod) Test(org.junit.Test)

Aggregations

NormalMethod (org.jikesrvm.classloader.NormalMethod)95 Test (org.junit.Test)66 OptOptions (org.jikesrvm.compilers.opt.OptOptions)45 CompiledMethod (org.jikesrvm.compilers.common.CompiledMethod)41 OptCompiledMethod (org.jikesrvm.compilers.opt.runtimesupport.OptCompiledMethod)31 DefaultInlineOracle (org.jikesrvm.compilers.opt.inlining.DefaultInlineOracle)28 InlineOracle (org.jikesrvm.compilers.opt.inlining.InlineOracle)28 RegisterOperand (org.jikesrvm.compilers.opt.ir.operand.RegisterOperand)28 Instruction (org.jikesrvm.compilers.opt.ir.Instruction)21 InlineSequence (org.jikesrvm.compilers.opt.inlining.InlineSequence)17 TypeReference (org.jikesrvm.classloader.TypeReference)15 ExceptionHandlerBasicBlockBag (org.jikesrvm.compilers.opt.ir.ExceptionHandlerBasicBlockBag)15 MethodOperand (org.jikesrvm.compilers.opt.ir.operand.MethodOperand)15 BasicBlock (org.jikesrvm.compilers.opt.ir.BasicBlock)13 ExceptionHandlerBasicBlock (org.jikesrvm.compilers.opt.ir.ExceptionHandlerBasicBlock)13 Register (org.jikesrvm.compilers.opt.ir.Register)13 RVMMethod (org.jikesrvm.classloader.RVMMethod)8 Operand (org.jikesrvm.compilers.opt.ir.operand.Operand)8 TrueGuardOperand (org.jikesrvm.compilers.opt.ir.operand.TrueGuardOperand)8 TypeOperand (org.jikesrvm.compilers.opt.ir.operand.TypeOperand)8