davidmalcolm / gcc-python-plugin

GCC plugin that embeds CPython inside the compiler
GNU General Public License v3.0
199 stars 58 forks source link

RecordType not documented #66

Closed davidmalcolm closed 7 years ago

davidmalcolm commented 7 years ago

I couldn't find documentation on RecordType or fields. I read the autogenerated code, and gccutils.py, to figure out what I needed.

davidmalcolm commented 7 years ago

Imported from trac issue 26. Created by tromey on 2012-01-08T15:56:07, last modified: 2012-01-09T15:44:03

davidmalcolm commented 7 years ago

Trac comment by tromey on 2012-01-08 15:56:29:

Oops, of course now I found the info on FieldDecl.

davidmalcolm commented 7 years ago

Trac comment by dmalcolm on 2012-01-09 15:41:22:

I added an example of extracting them in bd03e3b0845fa785330af3916f4253d505a9fa16

However, it looks like gcc.Block.vars is misnamed; it corresponds to: {{{

define BLOCK_VARS(NODE) (BLOCK_CHECK (NODE)->block.vars)

}}} from tree.h, but this seems to contain all declarations, not just variables (but see ticket #21).

I'm inclined to rename it to "decls" - does this sound sane?

davidmalcolm commented 7 years ago

Trac comment by dmalcolm on 2012-01-09 15:44:03:

Oops, I meant to add that comment to ticket #28 (done now).

I documented gcc.RecordType within bd03e3b0845fa785330af3916f4253d505a9fa16