-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup some P4Testgen code. #3978
Conversation
|
||
/// Looks up a declaration from a path expression. A BUG occurs if no declaration is found. | ||
const IR::IDeclaration *findProgramDecl(const IR::PathExpression *pathExpr) const; | ||
static const IR::IDeclaration *findProgramDecl(const IR::IGeneralNamespace *ns, | ||
const IR::PathExpression *pathExpr); | ||
|
||
/// Resolves a Type_Name in the current environment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update comment?
@@ -51,12 +75,13 @@ void TestgenTarget::argumentsToTypeDeclarations( | |||
const auto *constructedTypeName = ctorCall->constructedType->checkedTo<IR::Type_Name>(); | |||
|
|||
// Find the corresponding type declaration in the namespace. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update comment.
@@ -137,7 +137,7 @@ void BMv2_V1ModelExprStepper::evalExternMethodCall(const IR::MethodCallExpressio | |||
}; | |||
|
|||
// Provides implementations of BMv2 externs. | |||
static const ExternMethodImpls EXTERN_METHOD_IMPLS({ | |||
static const ExternMethodImpls EXTERN_METHODImplS({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the naming intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice!
Thanks! |
Some issues that came up while implementing a new module for P4Testgen.
Bmv2V1Model
should be the name for the BMv2 extension, notBMv2V1Model
orBMv2_V1Model
orBMv2Model
.