mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 18:13:50 +02:00
Internals: Create FuncRef/TaskRef directly from Func/Task pointer. No functional change intended
This commit is contained in:
+2
-5
@@ -1849,16 +1849,13 @@ AstNodeFTask* V3Task::taskConnectWrapNew(AstNodeFTask* taskp, const string& newn
|
||||
newFVarp->name(newTaskp->name());
|
||||
newTaskp->fvarp(newFVarp);
|
||||
newTaskp->dtypeFrom(newFVarp);
|
||||
newCallp = new AstFuncRef{taskp->fileline(), taskp->name(), nullptr};
|
||||
newCallp->taskp(taskp);
|
||||
newCallp->dtypeFrom(newFVarp);
|
||||
newCallp = new AstFuncRef{taskp->fileline(), VN_AS(taskp, Func), nullptr};
|
||||
newCallInsertp
|
||||
= new AstAssign{taskp->fileline(),
|
||||
new AstVarRef{fvarp->fileline(), newFVarp, VAccess::WRITE}, newCallp};
|
||||
newCallInsertp->dtypeFrom(newFVarp);
|
||||
} else if (VN_IS(taskp, Task)) {
|
||||
newCallp = new AstTaskRef{taskp->fileline(), taskp->name(), nullptr};
|
||||
newCallp->taskp(taskp);
|
||||
newCallp = new AstTaskRef{taskp->fileline(), VN_AS(taskp, Task), nullptr};
|
||||
newCallInsertp = new AstStmtExpr{taskp->fileline(), newCallp};
|
||||
} else {
|
||||
taskp->v3fatalSrc("Unsupported: Non-constant default value in missing argument in a "
|
||||
|
||||
Reference in New Issue
Block a user