-
Notifications
You must be signed in to change notification settings - Fork 126
Refactor DataFlow::FunctionNode as a concrete class #362
Refactor DataFlow::FunctionNode as a concrete class #362
Conversation
@@ -216,10 +216,24 @@ class SsaNode extends Node, MkSsaNode { | |||
} | |||
} | |||
|
|||
abstract private class FunctionNodeRange extends Node { |
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.
Shouldn't this be something like
abstract private class FunctionNodeRange extends Node { | |
module FunctionNode { | |
abstract private class Range extends Node { |
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.
I figured there was no point when we don't actually want to expose the range for others to extend. We were using that module technique to fake namespaces / nested classes, but here we never want to address it.
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.
I think I'd prefer for it to be consistent, unless there's some reason it shouldn't be.
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.
Ah, turns out such a thing isn't accessible because it's a private entity inside a module. I either have to define FunctionNode inside the same module, or make the class public and write a bunch of redundant documentation or upset the docubot. That being so, I've left its name alone
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.
Ah, right. Can you just make the module private instead of the class to preserve semantics?
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.
Right, but then the class is public and has to be documented despite being unusable?
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.
Sure, but that's the same as most of the internal data-flow stuff anyway.
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.
k, done
9d14780
to
a74bf0a
Compare
This makes it easier to refine FunctionNode without having to define abstract members.
a74bf0a
to
68bb7b0
Compare
@sauyon is this ok to merge by you? |
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.
👍 yep
This makes it easier to refine FunctionNode without having to define abstract members.