Here's a refactor of case 'c':, Both cttz and ctlz need the same upgrading, so they can be handled together. But we do split the mnemonic in the middle, rather than at a .. Even though we know the first letter is 'c', and so could have done Name[1] == 't', IMHO a consume_front("ct") conveys intent more clearly.
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I'm not sure this is really an improvement. It seems better to repeat this small bit of code than do the awkward ct/lz, ct/tz split.
Comment Actions
Fair point. How about this way round -- check the number of args before looking at the name. IMHO That's likely to be more efficient. Of course common handling for a match is also good.