Review Board 2.0.15


scons/swig: refactor some of the scons/SWIG code

Review Request #876 - Created Sept. 24, 2011 and submitted

Information
Steve Reinhardt
gem5
Reviewers
Default
ali, gblack, nate, stever
scons/swig: refactor some of the scons/SWIG code

- Move the random bits of SWIG code generation out of src/SConscript
  file and into methods on the objects being wrapped.
- Cleaned up some variable naming and added some comments to make
  the process a little clearer.
- Did a little generated file/module renaming:
   - vptype_Foo now Foo_vector
   - init_Foo is now Foo_init
  This makes it easier to see all the Foo-related files in a
  sorted directory listing.
- Made cxx_predecls and swig_predecls normal SimObject classmethods.
- Got rid of swig_objdecls hook, even though this breaks the System
  objects get/setMemoryMode method exports.  Will be fixing this in
  a future changeset.

   
Posted (Sept. 24, 2011, 10:26 a.m.)
I don't really know how this code works so I'm not qualified to say much about it, but what I saw all seems fine. I like the idea of this getting easier to understand.
Ship it!
Posted (Sept. 25, 2011, 12:45 p.m.)
Overall, I like where this is going.  Too much code moved for me to give this a very thorough review, but I did a bunch of checking and I didn't notice any issues.
src/python/m5/SimObject.py (Diff revision 1)
 
 
I asume that this works because classmethod is a "public_value"?
  1. Yea, that's right.