slicc: Fix bug in enqueue and peek statements.
These were not generating the correct c names for types declared within a machine scope.
This commit is contained in:
parent
3d8c8a85fa
commit
910638f338
2 changed files with 5 additions and 3 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
# Copyright (c) 2013 Advanced Micro Devices, Inc.
|
||||||
# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
|
# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
|
||||||
# Copyright (c) 2009 The Hewlett-Packard Development Company
|
# Copyright (c) 2009 The Hewlett-Packard Development Company
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
|
@ -54,8 +55,8 @@ class EnqueueStatementAST(StatementAST):
|
||||||
self.symtab.newSymbol(v)
|
self.symtab.newSymbol(v)
|
||||||
|
|
||||||
# Declare message
|
# Declare message
|
||||||
code("std::shared_ptr<${{msg_type.ident}}> out_msg = "\
|
code("std::shared_ptr<${{msg_type.c_ident}}> out_msg = "\
|
||||||
"std::make_shared<${{msg_type.ident}}>(clockEdge());")
|
"std::make_shared<${{msg_type.c_ident}}>(clockEdge());")
|
||||||
|
|
||||||
# The other statements
|
# The other statements
|
||||||
t = self.statements.generate(code, None)
|
t = self.statements.generate(code, None)
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# Copyright (c) 2013 Advanced Micro Devices, Inc.
|
||||||
# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
|
# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
|
||||||
# Copyright (c) 2009 The Hewlett-Packard Development Company
|
# Copyright (c) 2009 The Hewlett-Packard Development Company
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
|
@ -55,7 +56,7 @@ class PeekStatementAST(StatementAST):
|
||||||
self.queue_name.assertType("InPort")
|
self.queue_name.assertType("InPort")
|
||||||
|
|
||||||
# Declare the new "in_msg_ptr" variable
|
# Declare the new "in_msg_ptr" variable
|
||||||
mtid = msg_type.ident
|
mtid = msg_type.c_ident
|
||||||
qcode = self.queue_name.var.code
|
qcode = self.queue_name.var.code
|
||||||
code('''
|
code('''
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue