dgrnbrg / piplin

Compile Clojure to FPGAs
piplin.org
93 stars 10 forks source link

Refactor mkast #32

Closed dgrnbrg closed 12 years ago

dgrnbrg commented 12 years ago

Name sucks

alter-value is used by some math funcs to store constants and by uninst vary-meta is used to alter sim-factory, distribute, and by uninst for changing pipinst?

Could probably have mkast automatically segregate constants into another vector, improving perf and automating things/reducing code.

Need special functions for setting up sim-factory and distribute, esp. since we'll need functions that set distribute to common cases like binop distribution or to a subset of the args

dgrnbrg commented 12 years ago

make-port still uses alter-value to have arguments that aren't piplin types

promote :bundle still uses custom code, because it doesn't have a good way to extract the keys of the map and recompose the args into a map in the sim-factory.

Besides those, smart constant partitioning is done

dgrnbrg commented 12 years ago

promote :bundle is handled by creating another variant of mkast that allows for a keymap and kwargs order to be explicitly passed in.

dgrnbrg commented 12 years ago

Still need: 1) better name 2) function for easing introduction of :distribute

dgrnbrg commented 12 years ago

I give up on the name for now. I could just call it $!#@.