Support appending to queue via [] (#5421)

This commit is contained in:
Krzysztof Bieganski
2024-09-02 09:45:47 -04:00
committed by GitHub
parent e9f758ce67
commit 088862d449
14 changed files with 190 additions and 47 deletions
+5 -1
View File
@@ -492,8 +492,12 @@ class TaskVisitor final : public VNVisitor {
if (VN_IS(pinp, VarRef) || VN_IS(pinp, MemberSel) || VN_IS(pinp, StructSel)
|| VN_IS(pinp, ArraySel)) {
refArgOk = true;
} else if (const AstCMethodHard* const cMethodp = VN_CAST(pinp, CMethodHard)) {
} else if (AstCMethodHard* const cMethodp = VN_CAST(pinp, CMethodHard)) {
refArgOk = cMethodp->name() == "at" || cMethodp->name() == "atBack";
if (VN_IS(cMethodp->fromp()->dtypep()->skipRefp(), QueueDType)) {
cMethodp->name(cMethodp->name() == "at" ? "atWriteAppend"
: "atWriteAppendBack");
}
}
if (refArgOk) {
if (AstVarRef* const varrefp = VN_CAST(pinp, VarRef)) {