From: <mic...@us...> - 2007-05-09 17:28:50
|
Revision: 110 http://svn.sourceforge.net/pearcolator/?rev=110&view=rev Author: michael_baer Date: 2007-05-09 10:28:51 -0700 (Wed, 09 May 2007) Log Message: ----------- Derived AutoMappingMemory decorator from CallBasedMemory to enable this decorator in non-interpreted code. Modified Paths: -------------- src/org/binarytranslator/generic/memory/AutoMappingMemory.java Modified: src/org/binarytranslator/generic/memory/AutoMappingMemory.java =================================================================== --- src/org/binarytranslator/generic/memory/AutoMappingMemory.java 2007-05-09 14:15:36 UTC (rev 109) +++ src/org/binarytranslator/generic/memory/AutoMappingMemory.java 2007-05-09 17:28:51 UTC (rev 110) @@ -4,8 +4,6 @@ import org.binarytranslator.vmInterface.TranslationHelper; import org.jikesrvm.classloader.VM_MethodReference; -import org.jikesrvm.compilers.opt.ir.OPT_Operand; -import org.jikesrvm.compilers.opt.ir.OPT_RegisterOperand; /** * A memory implementation that will automatically map pages into memory, as soon @@ -19,11 +17,13 @@ * @author Michael Baer * */ -public class AutoMappingMemory extends Memory { +public class AutoMappingMemory extends CallBasedMemory { private Memory mem; public AutoMappingMemory(Memory memoryImplementation) { + super(AutoMappingMemory.class); + this.mem = memoryImplementation; } @@ -167,46 +167,6 @@ return mem.toString(); } - public void translateLoad32(OPT_Operand addr, OPT_RegisterOperand dest) { - //mem.translateLoad32(addr, dest); - throw new RuntimeException("Automatic mapping of pages during binary translation is currently not provided."); - } - - public void translateLoadSigned16(OPT_Operand addr, OPT_RegisterOperand dest) { - //mem.translateLoadSigned16(addr, dest); - throw new RuntimeException("Automatic mapping of pages during binary translation is currently not provided."); - } - - public void translateLoadSigned8(OPT_Operand addr, OPT_RegisterOperand dest) { - //mem.translateLoadSigned8(addr, dest); - throw new RuntimeException("Automatic mapping of pages during binary translation is currently not provided."); - } - - public void translateLoadUnsigned16(OPT_Operand addr, OPT_RegisterOperand dest) { - //mem.translateLoadUnsigned16(addr, dest); - throw new RuntimeException("Automatic mapping of pages during binary translation is currently not provided."); - } - - public void translateLoadUnsigned8(OPT_Operand addr, OPT_RegisterOperand dest) { - //mem.translateLoadUnsigned8(addr, dest); - throw new RuntimeException("Automatic mapping of pages during binary translation is currently not provided."); - } - - public void translateStore16(OPT_Operand addr, OPT_Operand src) { - //mem.translateStore16(addr, src); - throw new RuntimeException("Automatic mapping of pages during binary translation is currently not provided."); - } - - public void translateStore32(OPT_Operand addr, OPT_Operand src) { - //mem.translateStore32(addr, src); - throw new RuntimeException("Automatic mapping of pages during binary translation is currently not provided."); - } - - public void translateStore8(OPT_Operand addr, OPT_Operand src) { - //mem.translateStore8(addr, src); - throw new RuntimeException("Automatic mapping of pages during binary translation is currently not provided."); - } - public int truncateToNextPage(int addr) { return mem.truncateToNextPage(addr); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |