comparison graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java @ 2805:c3f64b66fc78

Towards removing the next pointer from Constant and ArithmeticOp
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Fri, 27 May 2011 19:57:56 +0200
parents e1dad0edd57a
children 2b8ef0a06391 ac4b086cbd72
comparison
equal deleted inserted replaced
2804:095162a84dcc 2805:c3f64b66fc78
1029 } 1029 }
1030 append(lookupSwitch); 1030 append(lookupSwitch);
1031 } 1031 }
1032 1032
1033 private Value appendConstant(CiConstant constant) { 1033 private Value appendConstant(CiConstant constant) {
1034 return appendWithBCI(new Constant(constant, graph)); 1034 return append(new Constant(constant, graph));
1035 } 1035 }
1036 1036
1037 private Value append(Instruction x) { 1037 private Value append(Instruction x) {
1038 return appendWithBCI(x); 1038 return appendWithBCI(x);
1039 }
1040
1041 private Value append(Value v) {
1042 return v;
1039 } 1043 }
1040 1044
1041 private Value appendWithBCI(Instruction x) { 1045 private Value appendWithBCI(Instruction x) {
1042 if (x.isAppended()) { 1046 if (x.isAppended()) {
1043 // the instruction has already been added 1047 // the instruction has already been added
1091 } 1095 }
1092 1096
1093 private Value synchronizedObject(FrameStateAccess state, RiMethod target) { 1097 private Value synchronizedObject(FrameStateAccess state, RiMethod target) {
1094 if (isStatic(target.accessFlags())) { 1098 if (isStatic(target.accessFlags())) {
1095 Constant classConstant = new Constant(target.holder().getEncoding(Representation.JavaClass), graph); 1099 Constant classConstant = new Constant(target.holder().getEncoding(Representation.JavaClass), graph);
1096 return appendWithBCI(classConstant); 1100 return append(classConstant);
1097 } else { 1101 } else {
1098 return state.localAt(0); 1102 return state.localAt(0);
1099 } 1103 }
1100 } 1104 }
1101 1105