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

Method valueOf

src/jvm/clojure/asm/commons/GeneratorAdapter.java:857–867  ·  view source on GitHub ↗

Generates the instructions to box the top stack value using Java 5's valueOf() method. This value is replaced by its boxed equivalent on top of the stack. @param type the type of the top stack value.

(final Type type)

Source from the content-addressed store, hash-verified

855 * @param type the type of the top stack value.
856 */
857 public void valueOf(final Type type) {
858 if (type.getSort() == Type.OBJECT || type.getSort() == Type.ARRAY) {
859 return;
860 }
861 if (type == Type.VOID_TYPE) {
862 push((String) null);
863 } else {
864 Type boxedType = getBoxedType(type);
865 invokeStatic(boxedType, new Method("valueOf", boxedType, new Type[] {type}));
866 }
867 }
868
869 /**
870 * Generates the instructions to unbox the top stack value. This value is replaced by its unboxed

Callers 2

doEmitStaticMethod · 0.95
doEmitPrimMethod · 0.95

Calls 4

pushMethod · 0.95
getBoxedTypeMethod · 0.95
invokeStaticMethod · 0.95
getSortMethod · 0.45

Tested by

no test coverage detected