This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [PING][PATCH] New plugin event when evaluating a constexpr call


2016-04-26 10:41 GMT-03:00 Andres Tiraboschi
<andres.tiraboschi@tallertechnologies.com>:
> Hi, thanks for answering,
>
> 2016-04-25 16:21 GMT-03:00 Jason Merrill <jason@redhat.com>:
>> Let's create a constexpr.h rather than expose constexpr internals to all of
>> the front end.  Really, I'd prefer to avoid exposing them at all. Why does
>> what you want to do require all this implementation detail?
>
> Ok, you are right, I'll make a constexpr.h.
>
>> This is a curious place to invoke the callback.  Why before the
>> *non_constant_p?  More generally, why between evaluating the arguments and
>> evaluating the function body?
>
> That was because I was interested just in the functions and its
> arguments, but you are right, I'll do the callback at the beginning of
> the function.
>
> Regards,
> AndrÃs.

Hi
 I made the the corrections to the patch.


Changelog 2016-5-2  Andres Tiraboschi
<andres.tiraboschi@tallertechnologies.com>
    *gcc/plugin.c (PLUGIN_EVAL_CALL_CONSTEXPR): New event.
    *gcc/plugin.def (PLUGIN_EVAL_CALL_CONSTEXPR): New event.
    *gcc/cp/constexpr.c (constexpr_fundef): Moved to gcc/cp/constexpr.h.
    *gcc/cp/constexpr.c (constexpr_call): Ditto.
    *gcc/cp/constexpr.c (constexpr_ctx): Ditto.
    *gcc/cp/constexpr.c (cxx_eval_constant_expression): Not static anymore.
    *gcc/cp/constexpr.h: New file.
    *gcc/cp/constexpr.h (constexpr_call_info): New Type.
    *gcc/cp/constexpr.h (constexpr_fundef): Moved type from gcc/cp/constexpr.c.
    *gcc/cp/constexpr.h (constexpr_call): Ditto.
    *gcc/cp/constexpr.h (constexpr_ctx): Ditto.
    *gcc/cp/constexpr.h (cxx_eval_constant_expression): Declared.
    *gcc/cp/config-lang.in (gtfiles): Added \$(srcdir)/cp/constexpr.h
    *gcc/cp/Make-lang.in (CP_PLUGIN_HEADERS): Added constexpr.h.

Attachment: patchConstexpr.diff
Description: Text document


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