ark-lang / ark

A compiled systems programming language written in Go using the LLVM framework
https://ark-lang.github.io/
MIT License
679 stars 47 forks source link

Separate attributes from types/decls #605

Closed MovingtoMars closed 8 years ago

MovingtoMars commented 8 years ago

Right now, attributes are stored in type/decl structs (this is my fault). This is unnecessarily unwieldy, so it would be better to separate attributes out. For example, create map[Decl]AttrGroup and map[*NamedType]AttrGroup

(@felixangell, there are so many issue tags it's painful)

(I noticed this because I was having a look at how Ark's types are implemented while working on nnvm, my new llvm clone (I scrapped ssvm))

(no more parentheses now, I promise)

felixangell commented 8 years ago

@MovingtoMars I like the tags :(

felixangell commented 8 years ago

@ark-lang/owners Attributes seem to be causing a lot of trouble, is it worth stripping them out entirely and redoing them somehow? It's not like they're used for an awful lot other than C interop.

MovingtoMars commented 8 years ago

They just need to be separated from the nodes themselves. That should remove a lot of boilerplate.

kiljacken commented 8 years ago

Wouldn't this just introduce unnecessary complexity elsewhere? We'd have to find a place in the AST and just jam them in there, and then pass around the AST root everywhere we'd want access to attributes.

kiljacken commented 8 years ago

@ark-lang/owners Bump

MovingtoMars commented 8 years ago

I don't really see a reason anymore.