Mercurial > hg > truffle
comparison agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java @ 1913:3b2dea75431e
6984311: JSR 292 needs optional bootstrap method parameters
Summary: Allow CONSTANT_InvokeDynamic nodes to have any number of extra operands.
Reviewed-by: twisti
author | jrose |
---|---|
date | Sat, 30 Oct 2010 13:08:23 -0700 |
parents | 3e8fbc61cee8 |
children | dad31fc330cd 6da3527317ff |
comparison
equal
deleted
inserted
replaced
1912:8213b0f5c92d | 1913:3b2dea75431e |
---|---|
458 buf.append(" #"); | 458 buf.append(" #"); |
459 buf.append(Integer.toString((val >> 16) & 0xFFFF)); | 459 buf.append(Integer.toString((val >> 16) & 0xFFFF)); |
460 return buf.toString(); | 460 return buf.toString(); |
461 } | 461 } |
462 | 462 |
463 private String genListOfShort(int[] values) { | |
464 Formatter buf = new Formatter(genHTML); | |
465 buf.append('['); | |
466 for (int i = 0; i < values.length; i++) { | |
467 if (i > 0) buf.append(' '); | |
468 buf.append('#'); | |
469 buf.append(Integer.toString(values[i])); | |
470 } | |
471 buf.append(']'); | |
472 return buf.toString(); | |
473 } | |
474 | |
463 protected String genHTMLTableForConstantPool(ConstantPool cpool) { | 475 protected String genHTMLTableForConstantPool(ConstantPool cpool) { |
464 Formatter buf = new Formatter(genHTML); | 476 Formatter buf = new Formatter(genHTML); |
465 buf.beginTable(1); | 477 buf.beginTable(1); |
466 | 478 |
467 buf.beginTag("tr"); | 479 buf.beginTag("tr"); |
582 buf.cell(Integer.toString(cpool.getIntAt(index))); | 594 buf.cell(Integer.toString(cpool.getIntAt(index))); |
583 break; | 595 break; |
584 | 596 |
585 case JVM_CONSTANT_InvokeDynamic: | 597 case JVM_CONSTANT_InvokeDynamic: |
586 buf.cell("JVM_CONSTANT_InvokeDynamic"); | 598 buf.cell("JVM_CONSTANT_InvokeDynamic"); |
587 buf.cell(genLowHighShort(cpool.getIntAt(index))); | 599 buf.cell(genListOfShort(cpool.getMultiOperandsAt(index))); |
588 break; | 600 break; |
589 | 601 |
590 default: | 602 default: |
591 throw new InternalError("unknown tag: " + ctag); | 603 throw new InternalError("unknown tag: " + ctag); |
592 } | 604 } |