Igalia / pflua

Packet filtering in Lua
Other
313 stars 39 forks source link

Pflua compile ir #227

Open kbara opened 9 years ago

kbara commented 9 years ago

Add the ability to dump the AST, ANF, and SSA IRs to pflua-compile, with and without optimization. Obsolete pflua-expand. Update other tools/internals to reflect convert_anf and convert_ssa requiring an optimize argument.

kbara commented 9 years ago

@andywingo Are you happy with convert_ssa and convert_ast taking an extra boolean parameter for whether to apply optimizations?

wingo commented 9 years ago

I can see us wanting more than one option, for example to turn specific optimizations on or off. Actually the printing could be done by e.g. ssa.lua itself if the debug_ssa option is set. Dunno yo. I'm kinda negative on adding boolean options. Boolean options, especially optional booleans, are an antipattern :) If you want to go ahead please use option dicts and utils.parse_opts but let's treat this as low-priority for now