vmwritebarrier.java

来自「纯java操作系统jnode,安装简单和操作简单的个人使用的Java操作系统」· Java 代码 · 共 55 行

JAVA
55
字号
/*
 * $Id: VmWriteBarrier.java,v 1.3 2004/02/02 18:42:25 epr Exp $
 */
package org.jnode.vm.memmgr;

import org.jnode.vm.PragmaUninterruptible;
import org.jnode.vm.VmSystemObject;

/**
 * @author Ewout Prangsma (epr@users.sourceforge.net)
 */
public abstract class VmWriteBarrier extends VmSystemObject {

	/**
	 * This method is inlined to implement the write barrier for aastores
	 *
	 * @param ref The base pointer of the array
	 * @param index The array index being stored into.  NOTE: This is the "natural" index; a[3] will pass 3.
	 * @param value The value being stored
	 */
	public abstract void arrayStoreWriteBarrier(Object ref, int index, Object value) 
	throws PragmaUninterruptible;

	/**
	 * This method implements the write barrier for putfields of references
	 *
	 * @param ref    The base pointer of the array
	 * @param offset The offset being stored into.  NOTE: This is in bytes.
	 * @param value  The value being stored
	 */
	public abstract void putfieldWriteBarrier(Object ref, int offset, Object value) 
	throws PragmaUninterruptible;

	/**
	 * This method is inlined to implement the write barrier for putstatics of references
	 *
	 * @param staticsIndex The offset of static field ( from VmStatics)
	 * @param value        The value being stored
	 */
	public abstract void putstaticWriteBarrier(int staticsIndex, Object value) 
	throws PragmaUninterruptible;

	/**
	 * This method generates write barrier entries needed as a consequence of
	 * an explicit user array copies.
	 *
	 * @param array The referring (source) array.
	 * @param start The first "natural" index into the array (e.g. for
	 * <code>a[1]</code>, index = 1).
	 * @param end The last "natural" index into the array
	 */
	public abstract void arrayCopyWriteBarrier(Object array, int start, int end) 
	throws PragmaUninterruptible;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?