poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [COMMITTED] pkl: Add missing POPE insn in codegen of excond operator


From: Jose E. Marchesi
Subject: Re: [COMMITTED] pkl: Add missing POPE insn in codegen of excond operator
Date: Mon, 27 Dec 2021 06:47:34 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hi Mohammad.

> 2021-12-27  Mohammad-Reza Nabipoor  <mnabipoor@gnu.org>
>
>       * libpoke/pkl-gen.c (pkl_gen_pr_op_excond): Add missing `pope` insn.
> ---
>  ChangeLog         | 4 ++++
>  libpoke/pkl-gen.c | 1 +
>  2 files changed, 5 insertions(+)
>
> diff --git a/ChangeLog b/ChangeLog
> index 4970f26a..49e9bf35 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,7 @@
> +2021-12-27  Mohammad-Reza Nabipoor  <mnabipoor@gnu.org>
> +
> +     * libpoke/pkl-gen.c (pkl_gen_pr_op_excond): Add missing `pope` insn.
> +
>  2021-12-26  Mohammad-Reza Nabipoor  <mnabipoor@gnu.org>
>  
>       * libpoke/pkl-ast.h (struct pkl_ast_return_stmt): Add new field
> diff --git a/libpoke/pkl-gen.c b/libpoke/pkl-gen.c
> index 456805ec..0197dfc6 100644
> --- a/libpoke/pkl-gen.c
> +++ b/libpoke/pkl-gen.c
> @@ -4073,6 +4073,7 @@ PKL_PHASE_BEGIN_HANDLER (pkl_gen_pr_op_excond)
>    if (PKL_AST_IS_EXP (op1))
>      pkl_asm_insn (pasm, PKL_INSN_DROP);
>  
> +  pkl_asm_insn (pasm, PKL_INSN_POPE);

Nice catch!

This is correct, but I would put the pope right after the subpass for
the operand, before that conditional DROP.

In any case, OK for master.
Thanks!

>    pkl_asm_insn (pasm, PKL_INSN_BA, done);
>  
>    /* The exception handler just drops the raised exception and the



reply via email to

[Prev in Thread] Current Thread [Next in Thread]