172 |
172 |
173 ValueStack* state = block->state(); |
173 ValueStack* state = block->state(); |
174 int index; |
174 int index; |
175 Value value; |
175 Value value; |
176 |
176 |
177 if (state->stack_size() > 0) { |
|
178 print_begin("stack"); |
|
179 print("size %d", state->stack_size()); |
|
180 |
|
181 for_each_stack_value(state, index, value) { |
|
182 ip.print_phi(index, value, block); |
|
183 print_operand(value); |
|
184 output()->cr(); |
|
185 } |
|
186 |
|
187 print_end("stack"); |
|
188 } |
|
189 |
|
190 if (state->locks_size() > 0) { |
|
191 print_begin("locks"); |
|
192 print("size %d", state->locks_size()); |
|
193 |
|
194 for_each_lock_value(state, index, value) { |
|
195 ip.print_phi(index, value, block); |
|
196 print_operand(value); |
|
197 output()->cr(); |
|
198 } |
|
199 print_end("locks"); |
|
200 } |
|
201 |
|
202 for_each_state(state) { |
177 for_each_state(state) { |
203 print_begin("locals"); |
178 print_begin("locals"); |
204 print("size %d", state->locals_size()); |
179 print("size %d", state->locals_size()); |
205 print("method \"%s\"", method_name(state->scope()->method())); |
180 print("method \"%s\"", method_name(state->scope()->method())); |
206 |
181 |
208 ip.print_phi(index, value, block); |
183 ip.print_phi(index, value, block); |
209 print_operand(value); |
184 print_operand(value); |
210 output()->cr(); |
185 output()->cr(); |
211 } |
186 } |
212 print_end("locals"); |
187 print_end("locals"); |
|
188 |
|
189 if (state->stack_size() > 0) { |
|
190 print_begin("stack"); |
|
191 print("size %d", state->stack_size()); |
|
192 print("method \"%s\"", method_name(state->scope()->method())); |
|
193 |
|
194 for_each_stack_value(state, index, value) { |
|
195 ip.print_phi(index, value, block); |
|
196 print_operand(value); |
|
197 output()->cr(); |
|
198 } |
|
199 |
|
200 print_end("stack"); |
|
201 } |
|
202 |
|
203 if (state->locks_size() > 0) { |
|
204 print_begin("locks"); |
|
205 print("size %d", state->locks_size()); |
|
206 print("method \"%s\"", method_name(state->scope()->method())); |
|
207 |
|
208 for_each_lock_value(state, index, value) { |
|
209 ip.print_phi(index, value, block); |
|
210 print_operand(value); |
|
211 output()->cr(); |
|
212 } |
|
213 print_end("locks"); |
|
214 } |
213 } |
215 } |
214 |
216 |
215 print_end("states"); |
217 print_end("states"); |
216 } |
218 } |
217 |
219 |
228 InstructionPrinter ip(true, output()); |
230 InstructionPrinter ip(true, output()); |
229 |
231 |
230 if (instr->is_pinned()) { |
232 if (instr->is_pinned()) { |
231 output()->put('.'); |
233 output()->put('.'); |
232 } |
234 } |
233 output()->print("%d %d ", instr->bci(), instr->use_count()); |
235 |
|
236 output()->print("%d %d ", instr->printable_bci(), instr->use_count()); |
234 |
237 |
235 print_operand(instr); |
238 print_operand(instr); |
236 |
239 |
237 ip.print_temp(instr); |
240 ip.print_temp(instr); |
238 output()->print(" "); |
241 output()->print(" "); |
269 print_begin("block"); |
272 print_begin("block"); |
270 |
273 |
271 print("name \"B%d\"", block->block_id()); |
274 print("name \"B%d\"", block->block_id()); |
272 |
275 |
273 print("from_bci %d", block->bci()); |
276 print("from_bci %d", block->bci()); |
274 print("to_bci %d", (block->end() == NULL ? -1 : block->end()->bci())); |
277 print("to_bci %d", (block->end() == NULL ? -1 : block->end()->printable_bci())); |
275 |
278 |
276 output()->indent(); |
279 output()->indent(); |
277 output()->print("predecessors "); |
280 output()->print("predecessors "); |
278 int i; |
281 int i; |
279 for (i = 0; i < block->number_of_preds(); i++) { |
282 for (i = 0; i < block->number_of_preds(); i++) { |