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

Method addConstantUtf8

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

Adds a CONSTANT_Utf8_info to the constant pool of this symbol table. Does nothing if the constant pool already contains a similar item. @param value a string. @return a new or already existing Symbol with the given value.

(final String value)

Source from the content-addressed store, hash-verified

774 * @return a new or already existing Symbol with the given value.
775 */
776 int addConstantUtf8(final String value) {
777 int hashCode = hash(Symbol.CONSTANT_UTF8_TAG, value);
778 Entry entry = get(hashCode);
779 while (entry != null) {
780 if (entry.tag == Symbol.CONSTANT_UTF8_TAG
781 && entry.hashCode == hashCode
782 && entry.value.equals(value)) {
783 return entry.index;
784 }
785 entry = entry.next;
786 }
787 constantPool.putByte(Symbol.CONSTANT_UTF8_TAG).putUTF8(value);
788 return put(new Entry(constantPoolCount++, Symbol.CONSTANT_UTF8_TAG, value, hashCode)).index;
789 }
790
791 /**
792 * Adds a new CONSTANT_String_info to the constant pool of this symbol table.

Callers 15

SymbolTableMethod · 0.95
putBootstrapMethodsMethod · 0.95
computeAttributesSizeMethod · 0.80
putAttributesMethod · 0.80
FieldWriterMethod · 0.80
visitAnnotationMethod · 0.80
visitTypeAnnotationMethod · 0.80
computeFieldInfoSizeMethod · 0.80
putFieldInfoMethod · 0.80

Calls 7

hashMethod · 0.95
getMethod · 0.95
putMethod · 0.95
addMethod · 0.95
putUTF8Method · 0.80
putByteMethod · 0.80
equalsMethod · 0.45

Tested by

no test coverage detected