Mercurial > hg > truffle
comparison graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java @ 2596:1c36b17f7ee0
new node layout: AccessMonitor, Invoke
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Thu, 05 May 2011 16:07:00 +0200 |
parents | 4a4dab936c1e |
children | f1bc67c2d453 |
comparison
equal
deleted
inserted
replaced
2595:4a4dab936c1e | 2596:1c36b17f7ee0 |
---|---|
899 appendInvoke(INVOKESPECIAL, target, args, cpi, constantPool); | 899 appendInvoke(INVOKESPECIAL, target, args, cpi, constantPool); |
900 } | 900 } |
901 | 901 |
902 private void appendInvoke(int opcode, RiMethod target, Value[] args, int cpi, RiConstantPool constantPool) { | 902 private void appendInvoke(int opcode, RiMethod target, Value[] args, int cpi, RiConstantPool constantPool) { |
903 CiKind resultType = returnKind(target); | 903 CiKind resultType = returnKind(target); |
904 Value result = append(new Invoke(opcode, resultType.stackKind(), args, target, target.signature().returnType(compilation.method.holder()), null)); | 904 Value result = append(new Invoke(opcode, resultType.stackKind(), args, target, target.signature().returnType(compilation.method.holder()), null, graph)); |
905 pushReturn(resultType, result); | 905 pushReturn(resultType, result); |
906 } | 906 } |
907 | 907 |
908 private RiType getExactType(RiType staticType, Value receiver) { | 908 private RiType getExactType(RiType staticType, Value receiver) { |
909 RiType exact = staticType.exactType(); | 909 RiType exact = staticType.exactType(); |
1019 MonitorAddress lockAddress = null; | 1019 MonitorAddress lockAddress = null; |
1020 if (compilation.runtime.sizeOfBasicObjectLock() != 0) { | 1020 if (compilation.runtime.sizeOfBasicObjectLock() != 0) { |
1021 lockAddress = new MonitorAddress(lockNumber); | 1021 lockAddress = new MonitorAddress(lockNumber); |
1022 append(lockAddress); | 1022 append(lockAddress); |
1023 } | 1023 } |
1024 append(new MonitorExit(rootMethodSynchronizedObject, lockAddress, lockNumber, stateBefore)); | 1024 append(new MonitorExit(rootMethodSynchronizedObject, lockAddress, lockNumber, stateBefore, graph)); |
1025 curState.unlock(); | 1025 curState.unlock(); |
1026 } | 1026 } |
1027 append(new Return(x, !noSafepoints())); | 1027 append(new Return(x, !noSafepoints())); |
1028 } | 1028 } |
1029 | 1029 |
1039 MonitorAddress lockAddress = null; | 1039 MonitorAddress lockAddress = null; |
1040 if (compilation.runtime.sizeOfBasicObjectLock() != 0) { | 1040 if (compilation.runtime.sizeOfBasicObjectLock() != 0) { |
1041 lockAddress = new MonitorAddress(lockNumber); | 1041 lockAddress = new MonitorAddress(lockNumber); |
1042 append(lockAddress); | 1042 append(lockAddress); |
1043 } | 1043 } |
1044 MonitorEnter monitorEnter = new MonitorEnter(x, lockAddress, lockNumber, null); | 1044 MonitorEnter monitorEnter = new MonitorEnter(x, lockAddress, lockNumber, null, graph); |
1045 appendWithoutOptimization(monitorEnter, bci); | 1045 appendWithoutOptimization(monitorEnter, bci); |
1046 curState.lock(ir, x, lockNumber + 1); | 1046 curState.lock(ir, x, lockNumber + 1); |
1047 monitorEnter.setStateAfter(curState.immutableCopy(bci)); | 1047 monitorEnter.setStateAfter(curState.immutableCopy(bci)); |
1048 killMemoryMap(); // prevent any optimizations across synchronization | 1048 killMemoryMap(); // prevent any optimizations across synchronization |
1049 } | 1049 } |
1056 MonitorAddress lockAddress = null; | 1056 MonitorAddress lockAddress = null; |
1057 if (compilation.runtime.sizeOfBasicObjectLock() != 0) { | 1057 if (compilation.runtime.sizeOfBasicObjectLock() != 0) { |
1058 lockAddress = new MonitorAddress(lockNumber); | 1058 lockAddress = new MonitorAddress(lockNumber); |
1059 append(lockAddress); | 1059 append(lockAddress); |
1060 } | 1060 } |
1061 appendWithoutOptimization(new MonitorExit(x, lockAddress, lockNumber, null), bci); | 1061 appendWithoutOptimization(new MonitorExit(x, lockAddress, lockNumber, null, graph), bci); |
1062 curState.unlock(); | 1062 curState.unlock(); |
1063 killMemoryMap(); // prevent any optimizations across synchronization | 1063 killMemoryMap(); // prevent any optimizations across synchronization |
1064 } | 1064 } |
1065 | 1065 |
1066 void genJsr(int dest) { | 1066 void genJsr(int dest) { |