comparison graal/com.oracle.max.criutils/src/com/oracle/max/criutils/CompilationPrinter.java @ 4142:bc8527f3071c

Adjust code base to new level of warnings.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sun, 18 Dec 2011 05:24:06 +0100
parents e233f5660da4
children f5328dda9714
comparison
equal deleted inserted replaced
4141:04d21be7a24f 4142:bc8527f3071c
94 * 94 *
95 * @param method the method for which a timestamp will be printed 95 * @param method the method for which a timestamp will be printed
96 */ 96 */
97 public void printCompilation(RiMethod method) { 97 public void printCompilation(RiMethod method) {
98 begin("compilation"); 98 begin("compilation");
99 out.print("name \" ").print(CiUtil.format("%H::%n", method, true)).println('"'); 99 out.print("name \" ").print(CiUtil.format("%H::%n", method)).println('"');
100 out.print("method \"").print(CiUtil.format("%f %r %H.%n(%p)", method, true)).println('"'); 100 out.print("method \"").print(CiUtil.format("%f %r %H.%n(%p)", method)).println('"');
101 out.print("date ").println(System.currentTimeMillis()); 101 out.print("date ").println(System.currentTimeMillis());
102 end("compilation"); 102 end("compilation");
103 } 103 }
104 104
105 /** 105 /**
123 } 123 }
124 sb.append("\n"); 124 sb.append("\n");
125 } 125 }
126 126
127 if (codePos != null) { 127 if (codePos != null) {
128 CiCodePos curCodePos = codePos;
128 do { 129 do {
129 sb.append(CiUtil.toLocation(codePos.method, codePos.bci)); 130 sb.append(CiUtil.toLocation(curCodePos.method, curCodePos.bci));
130 sb.append('\n'); 131 sb.append('\n');
131 if (codePos instanceof CiFrame) { 132 if (curCodePos instanceof CiFrame) {
132 CiFrame frame = (CiFrame) codePos; 133 CiFrame frame = (CiFrame) curCodePos;
133 if (frame.numStack > 0) { 134 if (frame.numStack > 0) {
134 sb.append("stack: "); 135 sb.append("stack: ");
135 for (int i = 0; i < frame.numStack; i++) { 136 for (int i = 0; i < frame.numStack; i++) {
136 sb.append(valueToString(frame.getStackValue(i), fmt)).append(' '); 137 sb.append(valueToString(frame.getStackValue(i), fmt)).append(' ');
137 } 138 }
150 for (int i = 0; i < frame.numLocals; i++) { 151 for (int i = 0; i < frame.numLocals; i++) {
151 sb.append(valueToString(frame.getLocalValue(i), fmt)).append(' '); 152 sb.append(valueToString(frame.getLocalValue(i), fmt)).append(' ');
152 } 153 }
153 sb.append("\n"); 154 sb.append("\n");
154 } 155 }
155 codePos = codePos.caller; 156 curCodePos = curCodePos.caller;
156 } while (codePos != null); 157 } while (curCodePos != null);
157 } 158 }
158 return sb.toString(); 159 return sb.toString();
159 } 160 }
160 161
161 162