ruby: fix naming of variables
Review Request #3418 - Created April 4, 2016 and updated
Information | |
---|---|
Brandon Potter | |
gem5 | |
default | |
Reviewers | |
Default | |
Changeset 11420:4330a5015ddb --------------------------- ruby: fix naming of variables The way SLICC compiler has been written, it was difficult to use a variable that appears in the base class AbstractController without adding some special code to the file src/mem/slicc/ast/ObjDeclAST.py. This patch eliminates the need for any such special code. The problem ultimately turned out to be the way SLICC handles pointer and non-pointer variables. Until now, SLICC tried to handle everything using pointers, unless some special rules were specified, as was being done for three variables: version, machineID, and clusterID. Now the Var class will have a field that indicates whether a variable is pointer or not. This field is used to differentiate between pointer variables and other variables. Pointer-based variables are allocated in the init() function of the controller, as was the case before. Other variables now need not be pointer based. Variables that need the constructor to be called on them will now necessarily be declared as pointers. The protocols currently in gem5 have been changed accordingly.