This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Commit: Add support for a temporary input line pointer in gas/read.c
Hi Alan,
>> I could do this, but why ? What do we gain. It is not like these functions
>> need to be fast, or that they affect the performance of the assembler.
>
> We gain:
> a) Less global state. In this case, possibly doesn't affect things
> like https://sourceware.org/ml/binutils/2015-06/msg00010.html, but
> global state without good reason ought to be avoided. Yes, you
> can tell me that next time I add some. :)
> b) Reentrancy. Do we save input_line_pointer and set it to a string
> somewhere then do the same again in some function called? Only
> matters of course if you want to write a bit of generally useful
> infrastructure that might be used is other places.
> c) Local state means asserts and setting saved_ilp NULL after use is
> hardly necessary.
Fair enough. I'll put this as a back-burner project for now. Or maybe a
Google Summer of Code opportunity ?
Cheers
Nick