 
package s3.core.services.memory.JMTk;

import ovm.core.services.memory.VM_Address;

/**
  */
public class VM_Magic {

    /**
     * @param address
     * @return
     */
    public static VM_Address getMemoryAddress(VM_Address address) {
        return address.getAddress();
    }

    /**
     * @param address
     * @param prev
     */
    public static void setMemoryAddress(VM_Address loc, VM_Address to) {
        loc.setAddress(to);

    }

    /**
     * @param address
     * @param i
     */
    public static void setMemoryInt(VM_Address address, int i) {
        address.setInt(i);
    }

    /**
     * @param address
     * @return
     */
    public static int getMemoryInt(VM_Address address) {
         // TODO Auto-generated method stub
        return address.getInt();
    }

    /**
     * @param obj
     * @return
     */
    public static VM_Address objectAsAddress(VM_Address obj) {
        // TODO Auto-generated method stub
        return VM_Address.fromObject(obj);
    }

    /**
     * 
     */
    public static void isync() {
        // TODO Auto-generated method stub
        
    }

    /**
     * @param spaceTable
     * @return
     */
    public static VM_Address objectAsAddress(Object o) {
        return VM_Address.fromObject(o);
    }

}
