Versions Compared


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


  1. At `analyze` in analyzer.clj we can detect constants. Each one should be entered into a map, likely a dynamic var bound to an atom containing a map. This map should map each constant's original form to a unique identifier, possibly some human readable prefix like `cljs$constant$vector$` plus a short ID of some kind. Note many constants will be composed recursively of constants.
    1. alternatively this could be done in the compiler via an AST pass?
  2. In the compiler when we emit we can instead emit a reference to a lookup table that we will generate later
  3. In closure.clj we will emit this table after we emit core.cljs .but before any user code
  4. Initially this should be an option in order to give time to understand the overhead of this implicit initial allocation for ClojureScript programs.