From: <cap...@us...> - 2008-03-13 12:17:09
|
Revision: 14035 http://jikesrvm.svn.sourceforge.net/jikesrvm/?rev=14035&view=rev Author: captain5050 Date: 2008-03-13 05:17:06 -0700 (Thu, 13 Mar 2008) Log Message: ----------- Set the method operand on syscalls allowing them to be evaluated as Pure. Modified Paths: -------------- rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/bc2ir/GenerateMagic.java rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/hir2lir/ConvertToLowLevelIR.java Modified: rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/bc2ir/GenerateMagic.java =================================================================== --- rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/bc2ir/GenerateMagic.java 2008-03-13 12:15:27 UTC (rev 14034) +++ rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/bc2ir/GenerateMagic.java 2008-03-13 12:17:06 UTC (rev 14035) @@ -453,6 +453,7 @@ Call.setResult(call, op0); bc2ir.push(op0.copyD2U(), returnType); } + Call.setMethod(call, MethodOperand.STATIC(meth, meth.peekResolvedMethod())); bc2ir.appendInstruction(call); } else if (meth.isSpecializedInvoke()) { // The callsite looks like RETURN = INVOKE (ID, OBJECT, P0, P1 .. PN) Modified: rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/hir2lir/ConvertToLowLevelIR.java =================================================================== --- rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/hir2lir/ConvertToLowLevelIR.java 2008-03-13 12:15:27 UTC (rev 14034) +++ rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/hir2lir/ConvertToLowLevelIR.java 2008-03-13 12:17:06 UTC (rev 14035) @@ -1308,10 +1308,12 @@ */ public static void expandSysCallTarget(Instruction s, IR ir) { MethodOperand sysM = Call.getMethod(s); - RegisterOperand t1 = getStatic(s, ir, VM_Entrypoints.the_boot_recordField); - VM_Field target = sysM.getMemberRef().asFieldReference().resolve(); - Operand ip = getField(s, ir, t1, target); - Call.setAddress(s, ip); + if (sysM.getMemberRef().isFieldReference()) { + RegisterOperand t1 = getStatic(s, ir, VM_Entrypoints.the_boot_recordField); + VM_Field target = sysM.getMemberRef().asFieldReference().resolve(); + Operand ip = getField(s, ir, t1, target); + Call.setAddress(s, ip); + } } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |