MCPcopy Index your code
hub / github.com/clojure/clojure / addConstantUtf8Reference

Method addConstantUtf8Reference

src/jvm/clojure/asm/SymbolTable.java:1011–1022  ·  view source on GitHub ↗

Adds a CONSTANT_Class_info, CONSTANT_String_info, CONSTANT_MethodType_info, CONSTANT_Module_info or CONSTANT_Package_info to the constant pool of this symbol table. Does nothing if the constant pool already contains a similar item. @param tag one of Symbol#CONSTANT_CLASS_TAG, {@link Symbol#

(final int tag, final String value)

Source from the content-addressed store, hash-verified

1009 * @return a new or already existing Symbol with the given value.
1010 */
1011 private Symbol addConstantUtf8Reference(final int tag, final String value) {
1012 int hashCode = hash(tag, value);
1013 Entry entry = get(hashCode);
1014 while (entry != null) {
1015 if (entry.tag == tag && entry.hashCode == hashCode && entry.value.equals(value)) {
1016 return entry;
1017 }
1018 entry = entry.next;
1019 }
1020 constantPool.put12(tag, addConstantUtf8(value));
1021 return put(new Entry(constantPoolCount++, tag, value, hashCode));
1022 }
1023
1024 /**
1025 * Adds a new CONSTANT_Class_info, CONSTANT_String_info, CONSTANT_MethodType_info,

Callers 6

SymbolTableMethod · 0.95
addConstantClassMethod · 0.95
addConstantStringMethod · 0.95
addConstantMethodTypeMethod · 0.95
addConstantModuleMethod · 0.95
addConstantPackageMethod · 0.95

Calls 7

hashMethod · 0.95
getMethod · 0.95
addConstantUtf8Method · 0.95
putMethod · 0.95
addMethod · 0.95
put12Method · 0.80
equalsMethod · 0.45

Tested by

no test coverage detected