Search in sources :

Example 36 with Inline

use of org.vmmagic.pragma.Inline in project JikesRVM by JikesRVM.

the class Unsafe method defineClass.

@Inline
public Class<?> defineClass(String name, byte[] bytes, int off, int len) {
    ClassLoader callingClassloader = null;
    // ClassLoader callingClassloader = VMStackWalker.getCallingClassLoader();
    VM.sysFail("Implement me with org.jikesrvm.runtime.StackBrowser or move code " + "from VMStackWalker.getCallingClassLoader() to a place that's not in the GNU " + "Classpath namespace");
    return RVMClassLoader.defineClassInternal(name, bytes, off, len, callingClassloader).getClassForType();
}
Also used : RVMClassLoader(org.jikesrvm.classloader.RVMClassLoader) Inline(org.vmmagic.pragma.Inline)

Example 37 with Inline

use of org.vmmagic.pragma.Inline in project JikesRVM by JikesRVM.

the class Unsafe method putOrderedLong.

@Inline
public void putOrderedLong(Object obj, long offset, long value) {
    Offset off = Offset.fromLong(offset);
    Magic.storeStoreBarrier();
    if (NEEDS_LONG_PUTFIELD_BARRIER) {
        longFieldWrite(obj, value, off, 0);
    } else {
        Magic.setLongAtOffset(obj, off, value);
    }
}
Also used : Offset(org.vmmagic.unboxed.Offset) Inline(org.vmmagic.pragma.Inline)

Example 38 with Inline

use of org.vmmagic.pragma.Inline in project JikesRVM by JikesRVM.

the class Unsafe method putOrderedInt.

@Inline
public void putOrderedInt(Object obj, long offset, int value) {
    Offset off = Offset.fromLong(offset);
    Magic.storeStoreBarrier();
    if (NEEDS_INT_PUTFIELD_BARRIER) {
        intFieldWrite(obj, value, off, 0);
    } else {
        Magic.setIntAtOffset(obj, off, value);
    }
}
Also used : Offset(org.vmmagic.unboxed.Offset) Inline(org.vmmagic.pragma.Inline)

Example 39 with Inline

use of org.vmmagic.pragma.Inline in project JikesRVM by JikesRVM.

the class RCHeader method makeUnlogged.

/**
 * Change <code>object</code>'s state to <code>UNLOGGED</code>.
 *
 * @param object The object whose state is to be changed.
 */
@Inline
@Uninterruptible
public static void makeUnlogged(ObjectReference object) {
    Word oldValue, newValue;
    do {
        oldValue = VM.objectModel.prepareAvailableBits(object);
        if (VM.VERIFY_ASSERTIONS)
            VM.assertions._assert(oldValue.and(LOGGING_MASK).EQ(LOGGED));
        newValue = oldValue.or(UNLOGGED);
    } while (!VM.objectModel.attemptAvailableBits(object, oldValue, newValue));
}
Also used : Word(org.vmmagic.unboxed.Word) Uninterruptible(org.vmmagic.pragma.Uninterruptible) Inline(org.vmmagic.pragma.Inline)

Example 40 with Inline

use of org.vmmagic.pragma.Inline in project JikesRVM by JikesRVM.

the class RCHeader method testAndMark.

/**
 * Attempts to atomically mark this object.
 *
 * @param object the object to mark
 * @return {@code true} if the mark was performed, {@code false}
 *  otherwise
 */
@Inline
public static boolean testAndMark(ObjectReference object) {
    Word oldValue, newValue;
    do {
        oldValue = VM.objectModel.prepareAvailableBits(object);
        if (isHeaderMarked(oldValue)) {
            return false;
        }
        newValue = oldValue.or(MARK_BIT_MASK);
    } while (!VM.objectModel.attemptAvailableBits(object, oldValue, newValue));
    return true;
}
Also used : Word(org.vmmagic.unboxed.Word) Inline(org.vmmagic.pragma.Inline)

Aggregations

Inline (org.vmmagic.pragma.Inline)110 NoInline (org.vmmagic.pragma.NoInline)42 Entrypoint (org.vmmagic.pragma.Entrypoint)40 Offset (org.vmmagic.unboxed.Offset)38 ObjectReference (org.vmmagic.unboxed.ObjectReference)35 Address (org.vmmagic.unboxed.Address)15 Word (org.vmmagic.unboxed.Word)15 TypeReference (org.jikesrvm.classloader.TypeReference)12 Uninterruptible (org.vmmagic.pragma.Uninterruptible)6 RVMType (org.jikesrvm.classloader.RVMType)5 RVMClass (org.jikesrvm.classloader.RVMClass)4 Unpreemptible (org.vmmagic.pragma.Unpreemptible)4 RVMClassLoader (org.jikesrvm.classloader.RVMClassLoader)3 TIB (org.jikesrvm.objectmodel.TIB)3 Extent (org.vmmagic.unboxed.Extent)3 MethodReference (org.jikesrvm.classloader.MethodReference)2 ForwardReference (org.jikesrvm.compilers.common.assembler.ForwardReference)2 RVMThread (org.jikesrvm.scheduler.RVMThread)2 CollectorContext (org.mmtk.plan.CollectorContext)2 NoNullCheck (org.vmmagic.pragma.NoNullCheck)2