equal
deleted
inserted
replaced
998 assert(assertValidCPRefs(this)); |
998 assert(assertValidCPRefs(this)); |
999 } |
999 } |
1000 |
1000 |
1001 /** Write a constant pool reference. */ |
1001 /** Write a constant pool reference. */ |
1002 public void putRef(Entry e) { |
1002 public void putRef(Entry e) { |
1003 assert(index != null); |
|
1004 addValue(encodeRefOrNull(e, index)); |
1003 addValue(encodeRefOrNull(e, index)); |
1005 } |
1004 } |
1006 public void putRef(Entry e, Index index) { |
1005 public void putRef(Entry e, Index index) { |
1007 assert(this.index == null); |
1006 assert(this.index == null); |
1008 addValue(encodeRefOrNull(e, index)); |
1007 addValue(encodeRefOrNull(e, index)); |
1050 private final List<CPRefBand> allKQBands = new ArrayList<>(); |
1049 private final List<CPRefBand> allKQBands = new ArrayList<>(); |
1051 private List<Object[]> needPredefIndex = new ArrayList<>(); |
1050 private List<Object[]> needPredefIndex = new ArrayList<>(); |
1052 |
1051 |
1053 |
1052 |
1054 int encodeRef(Entry e, Index ix) { |
1053 int encodeRef(Entry e, Index ix) { |
|
1054 if (ix == null) |
|
1055 throw new RuntimeException("null index for " + e.stringValue()); |
1055 int coding = ix.indexOf(e); |
1056 int coding = ix.indexOf(e); |
1056 if (verbose > 2) |
1057 if (verbose > 2) |
1057 Utils.log.fine("putRef "+coding+" => "+e); |
1058 Utils.log.fine("putRef "+coding+" => "+e); |
1058 return coding; |
1059 return coding; |
1059 } |
1060 } |