Clojure

macros that are expanded away still have their vars referenced in the emitted byte code

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Trivial Trivial
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: Release 1.4
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code
  • Approval:
    Ok

Description

if you have a macro like:

(defmacro f [a b] a)

and compile a function like:

(fn [x] (f x (/ 1 0)))

the macro is expand before compilation into:

(fn [x] x) ;; no reference to f

but the emitted byte code still holds the var for the macro 'f' in a static field.

Activity

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: