summaryrefslogtreecommitdiff
path: root/scripts/qemu-binfmt-conf.sh
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2016-03-17 16:48:34 -0600
committerMarkus Armbruster <armbru@redhat.com>2016-03-18 10:29:26 +0100
commitc1ff0e6c853111496a3c5ae392b9adae5043c7be (patch)
tree6fc06cb594f105e7c58a721d12849afc143fec28 /scripts/qemu-binfmt-conf.sh
parent386230a249ca6ed0204d8616dfc30c5ea95a809c (diff)
downloadqemu-c1ff0e6c853111496a3c5ae392b9adae5043c7be.tar.gz
qapi-commands: Inline single-use helpers of gen_marshal()
Originally, gen_marshal_input_visit() (or gen_visitor_input_block() before commit f1538019) was factored out to make it easy to do two passes of a visit to each member of a (possibly-implicit) object, without duplicating lots of code. But after recent changes, those visits now occupy a single line of emitted code, and the helper method has become a series of conditionals both before and after the one important line, making it rather awkward to see at a glance what gets emitted on the first (parsing) or second (deallocation) pass. It's a lot easier to read the generator code if we just inline both uses directly into gen_marshal(), without all the conditionals. Once we've done that, it's easy to notice that gen_marshal_vars() is used only once, and inlining it too lets us consolidate some mcgen() calls that used to be split across helpers. gen_call() remains a single-use helper function, but it has enough indentation and complexity that inlining it would hamper legibility. No change to generated output. The fact that the diffstat shows a net reduction in lines is an argument in favor of this cleanup. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <1458254921-17042-10-git-send-email-eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'scripts/qemu-binfmt-conf.sh')
0 files changed, 0 insertions, 0 deletions