Error formatting macro: pagetree: java.lang.NullPointerException

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Finer-grained control of the compilation process

  • A. Global flag for transitive/non-transitive compilation
    • Chas Emerick's patch
      • New system property "clojure.compiler.transitive"
      • When true (default), preserves current behavior
      • When false, only namespaces give as arguments to `compile` are emitted
    • Doesn't handle classes created by deftype/record/etc.
  • B. Specify exactly which .class files should be emitted
    • Stuart Sierra's patch
      • Specified as a Set of Strings, but could be any function, e.g. regex
  • C. Global flag for compiling "interop" forms
    • Is there a universal definition of what an "interop" form is?
      • gen-class, obviously
      • defprotocol?
      • deftype/defrecord?
    • Does not require maintaining list of .class files to emit
    • Could provide a convenient defaults for the common case
    • Macros like "deftype" can opt in with metadata
  • D. Metadata to control AOT-compilation
    • Permits fine-grained control
    • In-line with source code
    • How to support multiple AOT-compilation strategies in a single build
      • E.g. dev build only AOT-compiles interop forms, production AOT-compiles everything

Separate writing class files from compilation

  • E. Compiler holds references to generated bytecode
    • Not currently implemented in any patch
    • After compilation, call function to emit .class files
    • Will use lots of memory!
      • Or will it? The JVM already has this stuff in memory
      • Must disable in production!
    • Brings us closer to a Smalltalk-like "program image"