summaryrefslogtreecommitdiff
path: root/src/mem/slicc/ast/MethodCallExprAST.py
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2010-03-10 16:22:26 -0800
committerNathan Binkert <nate@binkert.org>2010-03-10 16:22:26 -0800
commitcf86532857ba1e199db6ff16541e7242c6225ff0 (patch)
treee107e443364bd326d791d2c19e126986cf4aa022 /src/mem/slicc/ast/MethodCallExprAST.py
parent1068ca85d0a29bfa71dc6a21a8d6c8888dce4bc3 (diff)
downloadgem5-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/MethodCallExprAST.py')
-rw-r--r--src/mem/slicc/ast/MethodCallExprAST.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mem/slicc/ast/MethodCallExprAST.py b/src/mem/slicc/ast/MethodCallExprAST.py
index 150f391bc..84009c076 100644
--- a/src/mem/slicc/ast/MethodCallExprAST.py
+++ b/src/mem/slicc/ast/MethodCallExprAST.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.ExprAST import ExprAST
class MethodCallExprAST(ExprAST):
@@ -36,7 +34,7 @@ class MethodCallExprAST(ExprAST):
self.expr_ast_vec = expr_ast_vec
def generate(self, code):
- tmp = code_formatter()
+ tmp = self.slicc.codeFormatter()
paramTypes = []
for expr_ast in self.expr_ast_vec:
return_type = expr_ast.generate(tmp)
@@ -91,7 +89,7 @@ class MemberMethodCallExprAST(MethodCallExprAST):
self.obj_expr_ast,
self.expr_ast_vec)
def generate_prefix(self, paramTypes):
- code = code_formatter()
+ code = self.slicc.codeFormatter()
# member method call
obj_type = self.obj_expr_ast.generate(code)