diff options
author | Nathan Binkert <nate@binkert.org> | 2010-03-10 16:22:26 -0800 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2010-03-10 16:22:26 -0800 |
commit | cf86532857ba1e199db6ff16541e7242c6225ff0 (patch) | |
tree | e107e443364bd326d791d2c19e126986cf4aa022 /src/mem/slicc/ast/AssignStatementAST.py | |
parent | 1068ca85d0a29bfa71dc6a21a8d6c8888dce4bc3 (diff) | |
download | gem5-cf86532857ba1e199db6ff16541e7242c6225ff0.tar.xz |
slicc: have a central mechanism for creating a code_formatter.
This makes it easier to add global variables like protocol
Diffstat (limited to 'src/mem/slicc/ast/AssignStatementAST.py')
-rw-r--r-- | src/mem/slicc/ast/AssignStatementAST.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mem/slicc/ast/AssignStatementAST.py b/src/mem/slicc/ast/AssignStatementAST.py index f8e77b03b..3c3426f5b 100644 --- a/src/mem/slicc/ast/AssignStatementAST.py +++ b/src/mem/slicc/ast/AssignStatementAST.py @@ -25,8 +25,6 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -from m5.util import code_formatter - from slicc.ast.StatementAST import StatementAST class AssignStatementAST(StatementAST): @@ -39,8 +37,8 @@ class AssignStatementAST(StatementAST): return "[AssignStatementAST: %r := %r]" % (self.lvalue, self.rvalue) def generate(self, code, return_type): - lcode = code_formatter() - rcode = code_formatter() + lcode = self.slicc.codeFormatter() + rcode = self.slicc.codeFormatter() ltype = self.lvalue.generate(lcode) rtype = self.rvalue.generate(rcode) |