[
https://issues.apache.org/jira/browse/THRIFT-993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12929902#action_12929902
]
Rich Salz commented on THRIFT-993:
----------------------------------
# Yes, it's against the original incubator 20080411_exported version.
# I don't understand your comment about {{const}} -- the use here means you can
use it on a {{const}} object, not that the method returns a constant result.
Yes, it could be optimized because it's an inlinable accessor, but there's
still the method dispatch overhead :)
# If I do this, does the cleanup (oneway local var) come before or after the
fix? The more important point is that once I made that change, the issue of the
extraneous test showed itself to me. Am I right that that test is superfluous?
Anyhow, I'll try to bring up the current trunk, but it will take a few days to
regenerate the patch.
> Some improvements in C++ stubs for oneway operations
> ----------------------------------------------------
>
> Key: THRIFT-993
> URL: https://issues.apache.org/jira/browse/THRIFT-993
> Project: Thrift
> Issue Type: Improvement
> Components: C++ - Compiler
> Reporter: Rich Salz
> Priority: Minor
> Attachments: diff.txt
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> Oneway operations don't use the seqid or oprot parameters, so the generated
> stub should use unnamed parameters for those.
> While changing this I noticed that tfunction->is_oneway() is called many
> times, so cache that result in a local variable.
> While making that change, I noticed what seems to be an extraneous test for
> that, inside a loop which is already inside an if branch. I just commented
> that.
> So far, these changes make generated thrift stubs pass g++ -Wunused cleanly.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.