Internals: Fix some spacing. No functional change.

This commit is contained in:
Wilson Snyder 2015-12-05 17:12:03 -05:00
parent 57f2fe77ea
commit f0af8726e3
3 changed files with 13 additions and 13 deletions

View File

@ -172,7 +172,7 @@ private:
m_cellRangep = nodep->rangep();
UINFO(4," CELL "<<nodep<<endl);
AstVar *ifaceVarp = nodep->nextp()->castVar();
AstVar* ifaceVarp = nodep->nextp()->castVar();
bool isIface = ifaceVarp
&& ifaceVarp->dtypep()->castUnpackArrayDType()
&& ifaceVarp->dtypep()->castUnpackArrayDType()->subDTypep()->castIfaceRefDType();
@ -193,9 +193,9 @@ private:
// If this AstCell is actually an interface instantiation, let's ensure we also clone
// the IfaceRef.
if (isIface) {
AstUnpackArrayDType *arrdtype = ifaceVarp->dtypep()->castUnpackArrayDType();
AstUnpackArrayDType* arrdtype = ifaceVarp->dtypep()->castUnpackArrayDType();
AstVar* varNewp = ifaceVarp->cloneTree(false);
AstIfaceRefDType *ifaceRefp = arrdtype->subDTypep()->castIfaceRefDType()->cloneTree(false);
AstIfaceRefDType* ifaceRefp = arrdtype->subDTypep()->castIfaceRefDType()->cloneTree(false);
arrdtype->addNextHere(ifaceRefp);
ifaceRefp->cellp(newp);
ifaceRefp->cellName(newp->name());
@ -246,21 +246,21 @@ private:
} else {
nodep->v3fatalSrc("Width mismatch; V3Width should have errored out.");
}
} else if(AstArraySel *arrselp = nodep->exprp()->castArraySel()) {
if (AstUnpackArrayDType *arrp = arrselp->lhsp()->dtypep()->castUnpackArrayDType()) {
} else if(AstArraySel* arrselp = nodep->exprp()->castArraySel()) {
if (AstUnpackArrayDType* arrp = arrselp->lhsp()->dtypep()->castUnpackArrayDType()) {
if (!arrp->subDTypep()->castIfaceRefDType())
return;
V3Const::constifyParamsEdit(arrselp->rhsp());
AstConst *constp = arrselp->rhsp()->castConst();
AstConst* constp = arrselp->rhsp()->castConst();
if (!constp) {
nodep->v3error("Unsupported: Non-constant index when passing interface to module");
return;
}
string index = AstNode::encodeNumber(constp->toSInt());
AstVarRef *varrefp = arrselp->lhsp()->castVarRef();
AstVarXRef *newp = new AstVarXRef(nodep->fileline(),varrefp->name () + "__BRA__" + index + "__KET__", "", true);
AstVar *varp = varrefp->varp()->cloneTree(true);
AstVarRef* varrefp = arrselp->lhsp()->castVarRef();
AstVarXRef* newp = new AstVarXRef(nodep->fileline(),varrefp->name () + "__BRA__" + index + "__KET__", "", true);
AstVar* varp = varrefp->varp()->cloneTree(true);
varp->name(varp->name() + "__TMP__" + "__BRA__" + index + "__KET__");
if (!nodep->modVarp()->dtypep()) nodep->v3fatalSrc("No dtype for AstPin");
varp->dtypep(nodep->modVarp()->dtypep());

View File

@ -349,12 +349,12 @@ private:
// may remap interfaces to be more like a class.
if (!nodep->hasIfaceVar()) {
string varName = nodep->name() + "__Viftop"; // V3LinkDot looks for this naming
AstIfaceRefDType *idtypep = new AstIfaceRefDType(nodep->fileline(), nodep->name(),
AstIfaceRefDType* idtypep = new AstIfaceRefDType(nodep->fileline(), nodep->name(),
nodep->modp()->name());
idtypep->ifacep(NULL); // cellp overrides
AstVar *varp;
AstVar* varp;
if (nodep->rangep()) {
AstNodeArrayDType *arrp = new AstUnpackArrayDType(nodep->fileline(),VFlagChildDType(), idtypep, nodep->rangep()->cloneTree(true));
AstNodeArrayDType* arrp = new AstUnpackArrayDType(nodep->fileline(),VFlagChildDType(), idtypep, nodep->rangep()->cloneTree(true));
varp = new AstVar(nodep->fileline(), AstVarType::IFACEREF, varName,
VFlagChildDType(), arrp);
} else {

View File

@ -496,7 +496,7 @@ void ParamVisitor::visitCell(AstCell* nodep) {
if (modvarp->isIfaceRef()) {
AstIfaceRefDType* portIrefp = modvarp->subDTypep()->castIfaceRefDType();
AstIfaceRefDType* pinIrefp = NULL;
AstNode *exprp = pinp->exprp();
AstNode* exprp = pinp->exprp();
if (exprp
&& exprp->castVarRef()
&& exprp->castVarRef()->varp()