State function's unmunged full name in compiled function's toString()

Description

Currently function instances print their toString() with the munged Java name:

1 2 3 4 5 6 user=> (ns proj.util-fns) nil proj.util-fns=> (defn a->b [a] (inc a)) #'proj.util-fns/a->b proj.util-fns=> a->b #object[proj.util_fns$a__GT_b 0x141ba1f1 "proj.util_fns$a__GT_b@141ba1f1"]

For debugging purposes, it would be useful to have the function toString() describe the Clojure-oriented fn name.

Approach: Store the original name in the function instance and use it in the toString() rather than returning the class name.

1 2 proj.util-fns=> a->b #object[proj.util_fns$a__GT_b 0x47d1a507 "proj.util-fns/a->b(NO_SOURCE_FILE:2)"]

Tradeoffs: Increased function instance size for the function name.

Patch: CLJ-1278-2.patch

Environment

None

Status

Assignee

Unassigned

Reporter

Howard Lewis Ship

Labels

Approval

Triaged

Patch

Code and Test

Affects versions

Release 1.5

Priority

Major