waneck / haxe-genc

20 stars 2 forks source link

Clean up the Filters filter #23

Closed Simn closed 11 years ago

Simn commented 11 years ago

Could we change the Filters filter to not "do" anything? It seems to apply some transformations related to variables at the moment, which are out of place there.

This is quite important to get right for a good structure, so a quick fix would be appreciated!

waneck commented 11 years ago

You mean this : https://github.com/waneck/haxe-genc/blob/genc/genc.ml#L315 ? If it's that, I'll work on it; It will still deal with variable definitions, which I'm pretty happy with at the moment, as it simplifies expression mapping a lot (not having to deal with where to declare temp vars - plus temp var reuse, which is pretty cool)

Simn commented 11 years ago

Yes, mainly that, although I think it should just provide the filter framework without doing anything whatsoever by itself.

ousado commented 11 years ago

Can we make this explicit, please? For the region inference stuff, as it deals with the lifetimes of objects, we really need some AST that is completely under our control at some point.

waneck commented 11 years ago

Done. Let me know if that's enough - it's still handling var declarations, but it's explicit - meaning that you need to call gen.declare_var for it to declare it.