This commit revises ForwardShapeInferenceAlgorithm to invoke internal
"shape_known" helper instead of global shape_known helper.
This change reduces the amount of code changes for API v2 migration.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
class ForwardShapeInferenceAlgorithm final : public loco::CanonicalNodeVisitor<loco::NodeShape>
{
private:
+ bool shape_known(const loco::Node *node) const { return loco::shape_known(node); }
loco::NodeShape node_shape(const loco::Node *node) const { return loco::shape_get(node); }
public:
// CASE: Push
loco::NodeShape visit(const loco::Push *node) final
{
- assert(loco::shape_known(node->from()));
+ assert(shape_known(node->from()));
return node_shape(node->from());
}