Search in sources :

Example 71 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, final ClassLoader parentClassLoader, ProtectionDomain protectionDomain) {
    if (parentClassLoader != null) {
        return RVMClassLoader.defineClassInternal(name, bytes, off, len, parentClassLoader).getClassForType();
    } else {
        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 72 with Inline

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

the class Unsafe method putLongVolatile.

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

Example 73 with Inline

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

the class Unsafe method getObjectVolatile.

@Inline
public Object getObjectVolatile(Object obj, long offset) {
    Offset off = Offset.fromLong(offset);
    Object result;
    if (NEEDS_OBJECT_GETFIELD_BARRIER) {
        result = objectFieldRead(obj, off, 0);
    } else {
        result = Magic.getObjectAtOffset(obj, off);
    }
    Magic.combinedLoadBarrier();
    return result;
}
Also used : Offset(org.vmmagic.unboxed.Offset) Inline(org.vmmagic.pragma.Inline)

Example 74 with Inline

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

the class Unsafe method getLongVolatile.

@Inline
public long getLongVolatile(Object obj, long offset) {
    Offset off = Offset.fromLong(offset);
    long result;
    if (NEEDS_LONG_GETFIELD_BARRIER) {
        result = longFieldRead(obj, off, 0);
    } else {
        result = Magic.getLongAtOffset(obj, off);
    }
    Magic.combinedLoadBarrier();
    return result;
}
Also used : Offset(org.vmmagic.unboxed.Offset) Inline(org.vmmagic.pragma.Inline)

Example 75 with Inline

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

the class Unsafe method getIntVolatile.

@Inline
public int getIntVolatile(Object obj, long offset) {
    Offset off = Offset.fromLong(offset);
    int result;
    if (NEEDS_INT_GETFIELD_BARRIER) {
        result = intFieldRead(obj, off, 0);
    } else {
        result = Magic.getIntAtOffset(obj, off);
    }
    Magic.combinedLoadBarrier();
    return result;
}
Also used : Offset(org.vmmagic.unboxed.Offset) 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