This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Add method overload resolution to expression parser


>>>>> "Daniel" == Daniel Jacobowitz <drow@false.org> writes:

Daniel> Maybe we need to get that merged, then, instead of complicated
Daniel> lifetime-confusing hacks around it :-)

Yeah, this would help in several scenarios.  E.g., it would let us
memoize Python Type objects.

However, in this case, if we made a new type, I think we would still
need a new expression operator.  My reasoning is that we are selecting
an overload at expression evaluation time, so we are using the type in a
fundamentally different way from a cast operator.

I don't think I understand why we do this overload selection at
evaluation time and not during the parse.  (It is often preferable to
defer operations until evaluation time so that we can apply them to a
convenience variable's possibly-mutable type -- but that does not apply
in this instance.)

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]