From 5db336e8b696c96b8512233e6e3d39bb211b4064 Mon Sep 17 00:00:00 2001 From: Matthew Ballance Date: Fri, 23 Aug 2024 15:39:26 -0700 Subject: [PATCH] XX Signed-off-by: Matthew Ballance --- src/TaskBuildExpr.cpp | 5 +++-- src/TaskBuildTypeExecStmt.cpp | 7 ++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/TaskBuildExpr.cpp b/src/TaskBuildExpr.cpp index cd6015d..36f9ded 100644 --- a/src/TaskBuildExpr.cpp +++ b/src/TaskBuildExpr.cpp @@ -451,8 +451,9 @@ void TaskBuildExpr::visitExprSignedNumber(ast::IExprSignedNumber *i) { void TaskBuildExpr::visitExprUnsignedNumber(ast::IExprUnsignedNumber *i) { DEBUG_ENTER("visitExprUnsignedNumber"); - m_expr = m_ctxt->ctxt()->mkTypeExprVal( - m_ctxt->ctxt()->mkValRefInt(i->getValue(), false, i->getWidth())); + vsc::dm::ValRefInt val_i(m_ctxt->ctxt()->mkValRefInt(i->getValue(), false, i->getWidth())); + DEBUG("val: %lld", val_i.get_val_s()); + m_expr = m_ctxt->ctxt()->mkTypeExprVal(val_i); DEBUG_LEAVE("visitExprUnsignedNumber"); } diff --git a/src/TaskBuildTypeExecStmt.cpp b/src/TaskBuildTypeExecStmt.cpp index 04e2777..f8c64aa 100644 --- a/src/TaskBuildTypeExecStmt.cpp +++ b/src/TaskBuildTypeExecStmt.cpp @@ -82,11 +82,16 @@ void TaskBuildTypeExecStmt::visitProceduralStmtReturn(ast::IProceduralStmtReturn vsc::dm::ITypeExpr *expr = 0; if (i->getExpr()) { expr = TaskBuildExpr(m_ctxt).build(i->getExpr()); + vsc::dm::ITypeExprVal *ev = dynamic_cast(expr); + DEBUG("expr: %p", expr); + DEBUG(" flags: 0x%08x ; vp: 0x%08llx", + ev->val().flags(), + ev->val().vp()); } m_stmt = m_ctxt->ctxt()->mkTypeProcStmtReturn(expr); - DEBUG_LEAVE("visitProceduralStmtReturn"); + DEBUG_LEAVE("visitProceduralStmtReturn %p", m_stmt); } void TaskBuildTypeExecStmt::visitProceduralStmtRepeat(ast::IProceduralStmtRepeat *i) {