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));
}
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));
}
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));
}
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);
}
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);
}
Aggregations