systemc-clang 2.0.0
Parsing SystemC constructs
Loading...
Searching...
No Matches
systemc_hdl::HDLBody Class Reference

#include <HDLBody.h>

Inheritance diagram for systemc_hdl::HDLBody:
Collaboration diagram for systemc_hdl::HDLBody:

Public Member Functions

 HDLBody (clang::DiagnosticsEngine &diag_engine, const ASTContext &ast_context, hdecl_name_map_t &mod_vname_map, hfunc_name_map_t &allmethodecls, overridden_method_map_t &overridden_method_map)
 
virtual ~HDLBody ()
 
void Run (Stmt *stmt, hNodep &h_top, HDLBodyMode runmode, HDLType *HDLt_userclassesp=NULL)
 
bool TraverseStmt (Stmt *stmt)
 
bool VisitCXXOperatorCallExpr (CXXOperatorCallExpr *opcall)
 
bool VisitCXXMemberCallExpr (CXXMemberCallExpr *callexpr)
 
bool VisitCallExpr (CallExpr *callexpr)
 
bool VisitCXXTemporaryObjectExpr (CXXTemporaryObjectExpr *stmt)
 
bool VisitReturnStmt (ReturnStmt *stmt)
 
bool VisitInitListExpr (InitListExpr *stmt)
 
bool VisitCaseStmt (CaseStmt *stmt)
 
bool VisitDefaultStmt (DefaultStmt *stmt)
 
bool VisitBreakStmt (BreakStmt *stmt)
 
bool VisitContinueStmt (ContinueStmt *stmt)
 
bool VisitCompoundStmt (CompoundStmt *compoundStmt)
 
bool VisitDeclStmt (DeclStmt *declstmt)
 
bool ProcessVarDecl (VarDecl *vardecl)
 
bool VisitBinaryOperator (BinaryOperator *expr)
 
bool VisitUnaryOperator (UnaryOperator *expr)
 
bool VisitConditionalOperator (ConditionalOperator *expr)
 
bool VisitIntegerLiteral (IntegerLiteral *lit)
 
bool VisitCXXBoolLiteralExpr (CXXBoolLiteralExpr *b)
 
bool VisitDeclRefExpr (DeclRefExpr *expr)
 
bool VisitArraySubscriptExpr (ArraySubscriptExpr *expr)
 
bool VisitMemberExpr (MemberExpr *memberexpr)
 
bool VisitIfStmt (IfStmt *ifs)
 
bool VisitForStmt (ForStmt *fors)
 
bool VisitSwitchStmt (SwitchStmt *switchs)
 
bool VisitWhileStmt (WhileStmt *whiles)
 
bool VisitDoStmt (DoStmt *whiles)
 
bool ProcessSwitchCase (SwitchCase *cases)
 
string FindVname (NamedDecl *vard)
 
void AddVnames (hNodep &hvns)
 
string FindFname (FunctionDecl *funcd)
 
void GetWaitArg (hNodep &h_callp, Expr *callarg)
 
hNodep NormalizeAssignmentChain (hNodep hinp)
 
void NormalizeSwitchStmt (hNodep hswitchbody)
 

Public Attributes

hfunc_name_map_t methodecls
 
clang::DiagnosticsEngine & diag_e
 
hdecl_name_map_t vname_map
 
overridden_method_map_toverridden_method_map_
 

Private Member Functions

bool isUserClass (const Type *classrectype)
 
bool isLogicalOp (clang::OverloadedOperatorKind opc)
 
bool isAssignOp (hNodep hp)
 
bool isArrayRef (hNodep hp)
 
string generate_vname (string nm)
 

Private Attributes

hNodep h_ret
 
hdecl_name_map_tmod_vname_map_
 
bool add_info
 
const string nextstate_string = "_scclang_nextstate_"
 
HDLBodyMode thismode
 
hfunc_name_map_tallmethodecls_
 
HDLTypeHDLt_userclassesp_
 
util lutil
 
const ASTContext & ast_context_
 

Detailed Description

Definition at line 34 of file HDLBody.h.

Constructor & Destructor Documentation

◆ HDLBody()

systemc_hdl::HDLBody::HDLBody ( clang::DiagnosticsEngine & diag_engine,
const ASTContext & ast_context,
hdecl_name_map_t & mod_vname_map,
hfunc_name_map_t & allmethodecls,
overridden_method_map_t & overridden_method_map )

Definition at line 63 of file HDLBody.cpp.

◆ ~HDLBody()

systemc_hdl::HDLBody::~HDLBody ( )
virtual

Definition at line 104 of file HDLBody.cpp.

Member Function Documentation

◆ AddVnames()

void systemc_hdl::HDLBody::AddVnames ( hNodep & hvns)

Definition at line 1294 of file HDLBody.cpp.

◆ FindFname()

string systemc_hdl::HDLBody::FindFname ( FunctionDecl * funcd)

Definition at line 1285 of file HDLBody.cpp.

◆ FindVname()

string systemc_hdl::HDLBody::FindVname ( NamedDecl * vard)

Definition at line 1276 of file HDLBody.cpp.

◆ generate_vname()

string systemc_hdl::HDLBody::generate_vname ( string nm)
inlineprivate

Definition at line 124 of file HDLBody.h.

◆ GetWaitArg()

void systemc_hdl::HDLBody::GetWaitArg ( hNodep & h_callp,
Expr * callarg )

Definition at line 1332 of file HDLBody.cpp.

◆ isArrayRef()

bool systemc_hdl::HDLBody::isArrayRef ( hNodep hp)
inlineprivate

Definition at line 119 of file HDLBody.h.

◆ isAssignOp()

bool systemc_hdl::HDLBody::isAssignOp ( hNodep hp)
inlineprivate

Definition at line 115 of file HDLBody.h.

◆ isLogicalOp()

bool systemc_hdl::HDLBody::isLogicalOp ( clang::OverloadedOperatorKind opc)
private

Definition at line 856 of file HDLBody.cpp.

◆ isUserClass()

bool systemc_hdl::HDLBody::isUserClass ( const Type * classrectype)
inlineprivate

Definition at line 107 of file HDLBody.h.

◆ NormalizeAssignmentChain()

hNodep systemc_hdl::HDLBody::NormalizeAssignmentChain ( hNodep hinp)

Definition at line 1315 of file HDLBody.cpp.

◆ NormalizeSwitchStmt()

void systemc_hdl::HDLBody::NormalizeSwitchStmt ( hNodep hswitchbody)

Definition at line 1344 of file HDLBody.cpp.

◆ ProcessSwitchCase()

bool systemc_hdl::HDLBody::ProcessSwitchCase ( SwitchCase * cases)

Definition at line 1146 of file HDLBody.cpp.

◆ ProcessVarDecl()

bool systemc_hdl::HDLBody::ProcessVarDecl ( VarDecl * vardecl)

Definition at line 332 of file HDLBody.cpp.

◆ Run()

void systemc_hdl::HDLBody::Run ( Stmt * stmt,
hNodep & h_top,
HDLBodyMode runmode,
HDLType * HDLt_userclassesp = NULL )

Definition at line 75 of file HDLBody.cpp.

◆ TraverseStmt()

bool systemc_hdl::HDLBody::TraverseStmt ( Stmt * stmt)

Definition at line 111 of file HDLBody.cpp.

◆ VisitArraySubscriptExpr()

bool systemc_hdl::HDLBody::VisitArraySubscriptExpr ( ArraySubscriptExpr * expr)

Definition at line 670 of file HDLBody.cpp.

◆ VisitBinaryOperator()

bool systemc_hdl::HDLBody::VisitBinaryOperator ( BinaryOperator * expr)

Definition at line 453 of file HDLBody.cpp.

◆ VisitBreakStmt()

bool systemc_hdl::HDLBody::VisitBreakStmt ( BreakStmt * stmt)

Definition at line 270 of file HDLBody.cpp.

◆ VisitCallExpr()

bool systemc_hdl::HDLBody::VisitCallExpr ( CallExpr * callexpr)

Definition at line 1042 of file HDLBody.cpp.

◆ VisitCaseStmt()

bool systemc_hdl::HDLBody::VisitCaseStmt ( CaseStmt * stmt)

Definition at line 234 of file HDLBody.cpp.

◆ VisitCompoundStmt()

bool systemc_hdl::HDLBody::VisitCompoundStmt ( CompoundStmt * compoundStmt)

Definition at line 284 of file HDLBody.cpp.

◆ VisitConditionalOperator()

bool systemc_hdl::HDLBody::VisitConditionalOperator ( ConditionalOperator * expr)

Definition at line 543 of file HDLBody.cpp.

◆ VisitContinueStmt()

bool systemc_hdl::HDLBody::VisitContinueStmt ( ContinueStmt * stmt)

Definition at line 277 of file HDLBody.cpp.

◆ VisitCXXBoolLiteralExpr()

bool systemc_hdl::HDLBody::VisitCXXBoolLiteralExpr ( CXXBoolLiteralExpr * b)

Definition at line 566 of file HDLBody.cpp.

◆ VisitCXXMemberCallExpr()

bool systemc_hdl::HDLBody::VisitCXXMemberCallExpr ( CXXMemberCallExpr * callexpr)

Definition at line 688 of file HDLBody.cpp.

◆ VisitCXXOperatorCallExpr()

bool systemc_hdl::HDLBody::VisitCXXOperatorCallExpr ( CXXOperatorCallExpr * opcall)

Definition at line 871 of file HDLBody.cpp.

◆ VisitCXXTemporaryObjectExpr()

bool systemc_hdl::HDLBody::VisitCXXTemporaryObjectExpr ( CXXTemporaryObjectExpr * stmt)

Definition at line 199 of file HDLBody.cpp.

◆ VisitDeclRefExpr()

bool systemc_hdl::HDLBody::VisitDeclRefExpr ( DeclRefExpr * expr)

Definition at line 574 of file HDLBody.cpp.

◆ VisitDeclStmt()

bool systemc_hdl::HDLBody::VisitDeclStmt ( DeclStmt * declstmt)

Process local variable and signal declarations, promoting to module level with unique names

Definition at line 315 of file HDLBody.cpp.

◆ VisitDefaultStmt()

bool systemc_hdl::HDLBody::VisitDefaultStmt ( DefaultStmt * stmt)

Definition at line 257 of file HDLBody.cpp.

◆ VisitDoStmt()

bool systemc_hdl::HDLBody::VisitDoStmt ( DoStmt * whiles)

Definition at line 1255 of file HDLBody.cpp.

◆ VisitForStmt()

bool systemc_hdl::HDLBody::VisitForStmt ( ForStmt * fors)

Definition at line 1111 of file HDLBody.cpp.

◆ VisitIfStmt()

bool systemc_hdl::HDLBody::VisitIfStmt ( IfStmt * ifs)

Definition at line 1084 of file HDLBody.cpp.

◆ VisitInitListExpr()

bool systemc_hdl::HDLBody::VisitInitListExpr ( InitListExpr * stmt)

Definition at line 214 of file HDLBody.cpp.

◆ VisitIntegerLiteral()

bool systemc_hdl::HDLBody::VisitIntegerLiteral ( IntegerLiteral * lit)

Definition at line 558 of file HDLBody.cpp.

◆ VisitMemberExpr()

bool systemc_hdl::HDLBody::VisitMemberExpr ( MemberExpr * memberexpr)

Definition at line 967 of file HDLBody.cpp.

◆ VisitReturnStmt()

bool systemc_hdl::HDLBody::VisitReturnStmt ( ReturnStmt * stmt)

Definition at line 224 of file HDLBody.cpp.

◆ VisitSwitchStmt()

bool systemc_hdl::HDLBody::VisitSwitchStmt ( SwitchStmt * switchs)

Definition at line 1175 of file HDLBody.cpp.

◆ VisitUnaryOperator()

bool systemc_hdl::HDLBody::VisitUnaryOperator ( UnaryOperator * expr)

Definition at line 515 of file HDLBody.cpp.

◆ VisitWhileStmt()

bool systemc_hdl::HDLBody::VisitWhileStmt ( WhileStmt * whiles)

Definition at line 1228 of file HDLBody.cpp.

Member Data Documentation

◆ add_info

bool systemc_hdl::HDLBody::add_info
private

Definition at line 98 of file HDLBody.h.

◆ allmethodecls_

hfunc_name_map_t& systemc_hdl::HDLBody::allmethodecls_
private

Definition at line 103 of file HDLBody.h.

◆ ast_context_

const ASTContext& systemc_hdl::HDLBody::ast_context_
private

Definition at line 130 of file HDLBody.h.

◆ diag_e

clang::DiagnosticsEngine& systemc_hdl::HDLBody::diag_e

Definition at line 86 of file HDLBody.h.

◆ h_ret

hNodep systemc_hdl::HDLBody::h_ret
private

Definition at line 93 of file HDLBody.h.

◆ HDLt_userclassesp_

HDLType* systemc_hdl::HDLBody::HDLt_userclassesp_
private

Definition at line 105 of file HDLBody.h.

◆ lutil

util systemc_hdl::HDLBody::lutil
private

Definition at line 128 of file HDLBody.h.

◆ methodecls

hfunc_name_map_t systemc_hdl::HDLBody::methodecls

Definition at line 84 of file HDLBody.h.

◆ mod_vname_map_

hdecl_name_map_t& systemc_hdl::HDLBody::mod_vname_map_
private

Definition at line 96 of file HDLBody.h.

◆ nextstate_string

const string systemc_hdl::HDLBody::nextstate_string = "_scclang_nextstate_"
private

Definition at line 100 of file HDLBody.h.

◆ overridden_method_map_

overridden_method_map_t& systemc_hdl::HDLBody::overridden_method_map_

Definition at line 90 of file HDLBody.h.

◆ thismode

HDLBodyMode systemc_hdl::HDLBody::thismode
private

Definition at line 102 of file HDLBody.h.

◆ vname_map

hdecl_name_map_t systemc_hdl::HDLBody::vname_map

Definition at line 88 of file HDLBody.h.


The documentation for this class was generated from the following files: