- global tracking of legitimate param types in
separate dict keeps us from having to import
objects in config.py, which gets rid of nasty
circular dependence
- use __all__ in config.py and restrict imports
from mpy_importer to reduce m5 namespace pollution
python/m5/__init__.py:
Try to limit namespace pollution by only importing
what's needed from mpy_importer.
Explicitly set up legal parameter types rather than
relying on eval().
python/m5/config.py:
Use empty ParamType base class to distinguish
types that are legitimate SimObject params.
Explicitly add these to global param_types map.
Rework CheckedInt and Range classes a little bit
to fit in better with the model.
No need to import objects here any longer.
Add __all__ list to specify subset of names that
get exported on 'from m5.config import *'.
--HG--
extra : convert_revision : 01c6e82e0b175fc9b3df25dd0cc80ecd842680bc
the m5 package as convert.py
add a smartdict class which stores strings and can intelligently
interpret those string variables as several other types.
make the env dict use the smartdict class
python/m5/config.py:
move a bunch of conversion functions into convert.py
turn the env dict into a smartdict
adapt the _CheckedInt stuff to deal with derived types
python/m5/objects/BaseCPU.mpy:
env is now a smartdict and can properly convert to bool
--HG--
extra : convert_revision : 8abcd35a5ab14b82f280aea59020953869e33365
python/m5/config.py:
move the type stuff into the Node constructor and
only try to grab self.type if the realtype is a SimObject
--HG--
extra : convert_revision : 00f6ece47e3812f67f9e1f062fe9c060bd6dd1cf