-
Notifications
You must be signed in to change notification settings - Fork 220
ConcreteFunction fix and performance improvements #364
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
Conversation
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
7c48738
to
424fe94
Compare
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
@rnett , looks like you'll need to consent my new PR... |
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.
A couple of small things but I'm fine if this is committed as is.
*/ | ||
public Map<String, Operand<?>> call(Scope scope, Map<String, Operand<?>> arguments) { | ||
List<Operand<?>> inputList = new ArrayList<>(signature.inputNames().size()); | ||
List<Operand<?>> inputList = new ArrayList<>(signature().inputNames().size()); |
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.
Why does this go through the signature accessor now? If we want to do that, would it be better to buffer the signature in a local variable to avoid all the times signature()
is called?
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've looked and didn't see any reason for calling signature()
instead of signature
, since there are no class extending ConcreteFunction
that I'm aware of. I've marked the class as final
to make sure of that.
|
||
if (i > outputList.size()) { | ||
throw new IllegalStateException( | ||
"Somehow, not all required outputs were returned from the function"); |
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.
Might be useful if this exception returned both i
and outputList.size()
. Though I suspect it's very unlikely to happen.
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.
Done. I've also move that sanity check outside the loop, it could be done beforehand.
Signed-off-by: Ryan Nett <[email protected]>
424fe94
to
429f66b
Compare
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
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.
LGTM.
|
Signed-off-by: Ryan Nett [email protected]
Rebase of #360