Extract prototype declaration generation into a helper function
Created attachment 233216 [details] Patch
Comment on attachment 233216 [details] Patch rs=me
Committed in r170044.