Hey buddy. I wanted to tell you this before you heard it from someone
else...
I refactored ICG.
Now, it's gonna look a little scary at first. But I promise you'll like
it when you get used to it. It'll be fine. You can trust me. #341
Once we determine the type of a variable we should stop processing the
AST tree at that point. We do this for record types but not for the
built in types. Changed the return value of the process builtin
function to false so we stop processing.
So using consts as arguments to STLs causes errors in our io code and SWIG.
Added a check for const template arguments and going to ignore them for
both ICG and what we input to SWIG.
Changed the storage of offsets from bytes to bits to better handle bitfields.
Added code to track classes that are defined within other classes and are
private/protected. These classes cannot be used in templates because our
io_src code declares variables outside of the class that would try and use
these private/protected variables. When a template is found to use a
private/protected class it is skipped.
refs #218
Removed the requirement of passing flags throughout ICG indicating if we are
in an inherited class or not. Removed the init_attr friends throughout
Trick core headers.
Moved field offset calculations for inherited classes to when the inherited
classes are processed. This removes the need to have to remember if fields
were inherited or not, the offset already reflects the correct offset.
refs #218
Mostly working. This removes the use of offsetof from all I/O code. This was
the only reason we needed friends. In it's place we put the offset value that
clang has calculated for the field. Still need to work on virtually inherited
classes and confirm bitfields.
refs #218
Modified ICG to save the non-canonical name for STLs. This is typically more readable
because it is shorter. Added code to the variable server to filter out requests accessing
STLs, because those accesses will not currently work.
refs #206
When we parse header files and find std::basic_string we change that to std::string.
Added a check for std::__cxx11::basic_string to do the same. We also carry a
list of STL names, added std::__cxx11::[template_name] to the list of possilbe STL
names we are searching for.
refs #214
Initial checkin of STL checkpointing. This checkin only covers the sequential
STLs, vector, list, deque, set, and multiset. This checkin does include the
changes in Trick header files to include/exclude our STLs properly to make a
restartable checkpoint.
refs #206
Maybe this is the last time we visit this issue, probably not. We were not
processing typedefs of templates correctly... I found a way to process
all templates whether they are the actual template, or a typedef of a template,
through the same code. They were separate before. Fixing this issue has
reduced the overall line count in FieldVisitor. That leads me to believe
we're on the right track.
refs #203
I found that in ICG I have access to the canonical type of a variable which
in most cases is the type I should process. Doing this eliminates the
need for some of the code that resolved typedefs because the canonical type
has already done that.
refs #200
Interesting case. I found that we should process the canonical type names where
we were not before. This resolves all typedefs and should be be more
accurate in the future. When we process the canonical type we need to ignore
the processing of the non-canonical type. We set a flag after
the canonical type is processed to ignore any type that is processed after.
refs #198
We pull file names out of the clang infrastructure to match where
classes are defined. We use the file name to pull comments and find
and process Trick header comments. Up to now clang gave us the realpath
of files and when we looked up comments we already had the realpath and
everything worked. In clang 3.6 in some places we are not getting the
realpath anymore which confuses ICG. Added code to get the realpath of
any file name we use throughout the code.
refs #167
I want Trick to parse and understand ODE header files. The ODE header files
include some typedef constructs ICG was skipping. Added code to handle the
typedefs we did not handle before. Also made a small change the way
TRICK_ICG_EXCLDUE and TRICK_EXCLUDE are used so that they support excluding
individual files as well as directories.
Wrote a python routine called get_value_by_ref_name that takes
a variable name string as an argument. The string is passed to
ref_attributes to find the address and returns a REF2 structure. The REF2
structure is passed to ref_to_value and the type and value of the variable
is returned in a structure. We call vval_<type> to extract the raw value
from the structure and return that to python space.
Made a couple of other bug fixes in the FieldVisior and cpp input file
example found while investigating this issue.
refs #123
Added new doxygen style tags for truning on/off Trick attributes processing,
comment processing, and library dependencies. Here are the tags we recognize
(@|\)trick_parse(everything|attributes|dependencies_only)
(@|\)trick_exclude_typename(class_name)
(@|\)trick_link_dependency(link_name)
refs #114
Found that on the Mac ICG was ignoring all of header files comments in ${TRICK_HOME}/include because it had the relative directory "include" listed as a system path. Comments were only processed if it wasn't in a system directory. Changed the check to use our function that checks to see if a header is in user or Trick code, basically the same check, but it only uses full paths and doesn't get confused with "include".
refs #63
Found that my check for embedded classes was also catching some typedef structures.
This was causing some io_src code not to be generated. Changed the test so that
we can differentiate between embedded classes and the typedefs.
This change fixes#10 and fixes#23.