poke-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 06/12] libpoke: Fix trivial errors


From: Jose E. Marchesi
Subject: Re: [PATCH 06/12] libpoke: Fix trivial errors
Date: Thu, 27 May 2021 13:52:23 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

This is OK for both master and maint/poke-1 as obvious.
Thanks!


> 2021-05-22  Mohammad-Reza Nabipoor  <mnabipoor@gnu.org>
>
>       * libpoke/pvm.jitter (return): s/jitter_int/jitter_uint/.
>       (popf): s/JITTER_ARGN0/JITTER_ARGU0/.
>       (sconc): Remove useless `#undef F`.
>       (bnzi): Fix type s/bzni/bnzi/.
>       (substr): Fix doc.
>       (ains): Likewise.
>       (indent): Fix typo.
>       (mka): Remove redundant array offset initialization.
>       * libpoke/ras (BEGIN): Use `\"` instead of `\\\"`.
> ---
>  ChangeLog          | 12 ++++++++++++
>  libpoke/pvm.jitter | 21 +++++++++------------
>  libpoke/ras        |  2 +-
>  3 files changed, 22 insertions(+), 13 deletions(-)
>
> diff --git a/ChangeLog b/ChangeLog
> index f668ffc3..951da58f 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,15 @@
> +2021-05-22  Mohammad-Reza Nabipoor  <mnabipoor@gnu.org>
> +
> +     * libpoke/pvm.jitter (return): s/jitter_int/jitter_uint/.
> +     (popf): s/JITTER_ARGN0/JITTER_ARGU0/.
> +     (sconc): Remove useless `#undef F`.
> +     (bnzi): Fix type s/bzni/bnzi/.
> +     (substr): Fix doc.
> +     (ains): Likewise.
> +     (indent): Fix typo.
> +     (mka): Remove redundant array offset initialization.
> +     * libpoke/ras (BEGIN): Use `\"` instead of `\\\"`.
> +
>  2021-05-22  Mohammad-Reza Nabipoor  <mnabipoor@gnu.org>
>  
>       * libpoke/pkl-rt.pk (_pkl_unit_name): Fix typo. s/gigi/gibi/
> diff --git a/libpoke/pvm.jitter b/libpoke/pvm.jitter
> index 2ead1a7c..176fad7d 100644
> --- a/libpoke/pvm.jitter
> +++ b/libpoke/pvm.jitter
> @@ -1639,7 +1639,7 @@ instruction return ()
>  
>      /* Restore the environment of the caller.  Note the cast to
>         jitter_uint is to avoid a warning in 32-bit.  */
> -    jitter_state_runtime.env = (pvm_env) (jitter_int) JITTER_TOP_RETURNSTACK 
> ();
> +    jitter_state_runtime.env = (pvm_env) (jitter_uint) 
> JITTER_TOP_RETURNSTACK ();
>      JITTER_DROP_RETURNSTACK();
>  
>      return_address = JITTER_TOP_RETURNSTACK();
> @@ -1678,7 +1678,7 @@ instruction popf (?n popf_printer)
>    code
>      jitter_uint i;
>  
> -    for (i = 0; i < JITTER_ARGN0; ++i)
> +    for (i = 0; i < JITTER_ARGU0; ++i)
>          jitter_state_runtime.env
>             = pvm_env_pop_frame (jitter_state_runtime.env);
>    end
> @@ -1801,7 +1801,7 @@ end
>  # 16 - print the number in hexadecimal.
>  # Any other value - print the number in decimal.
>  
> -# Instruction: printind
> +# Instruction: indent
>  #
>  # Indent the output in the terminal for LVL levels of indentation,
>  # using STEP white chars in each indentation level.
> @@ -3249,7 +3249,6 @@ instruction sconc ()
>       res = pvm_make_string_nodup (s);
>  
>       JITTER_PUSH_STACK (res);
> -#undef F
>    end
>  end
>  
> @@ -3810,7 +3809,7 @@ instruction bzlu (?f)
>    end
>  end
>  
> -# Instruction: bzni LABEL
> +# Instruction: bnzi LABEL
>  #
>  # Branch to the given LABEL if the integer at the top of the stack
>  # is nonzero.
> @@ -4160,7 +4159,7 @@ end
>  
>  # Instruction: substr
>  #
> -# Given a string and two indexes FROM AND to conforming a semi-open
> +# Given a string and two indices FROM and TO conforming a semi-open
>  # interval [FROM,TO), push the substring enclosed by that interval.
>  #
>  # Both indexes are zero-based.
> @@ -4244,7 +4243,6 @@ instruction mka ()
>      pvm_val arr = pvm_make_array (JITTER_TOP_STACK (),
>                                    JITTER_UNDER_TOP_STACK ());
>  
> -    PVM_VAL_ARR_OFFSET (arr) = PVM_MAKE_ULONG (0, 64);
>      JITTER_DROP_STACK ();
>      JITTER_DROP_STACK ();
>      JITTER_PUSH_STACK (arr);
> @@ -4253,8 +4251,7 @@ end
>  
>  # Instruction: ains
>  #
> -# Insert a new element VAL, with bit-offset BOFF, at the end of
> -# the array ARR, making it grow.
> +# Insert a new element VAL, at the end of the array ARR, making it grow.
>  #
>  # If IDX is less than the current size of the array, the value is
>  # stored in the referred argument.
> @@ -4266,9 +4263,9 @@ end
>  #
>  # a = [a1, a2, a3]
>  #
> -# [a1, a2, a3] BOFF 2 VAL ains -> INVAL exception
> -# [a1, a2, a3] BOFF 3 VAL ains -> [a1, a2, a3, VAL]
> -# [a1, a2, a3] BOFF 5 VAL ains -> [a1, a2, a3, VAL, VAL, VAL]
> +# [a1, a2, a3] 2 VAL ains -> INVAL exception
> +# [a1, a2, a3] 3 VAL ains -> [a1, a2, a3, VAL]
> +# [a1, a2, a3] 5 VAL ains -> [a1, a2, a3, VAL, VAL, VAL]
>  #
>  # Stack: ( ARR IDX VAL -- ARR )
>  # Exceptions: PVM_E_INVAL
> diff --git a/libpoke/ras b/libpoke/ras
> index 5dfc3f38..3f300332 100755
> --- a/libpoke/ras
> +++ b/libpoke/ras
> @@ -503,7 +503,7 @@ BEGIN {
>      null_re="null"
>      int_re="(u?int)<([0-9]+)>(-?(0x)?[0-9]+)"
>      long_re="(u?long)<([0-9]+)>(-?(0x)?[0-9]+)"
> -    string_re="(\"([^\"]|\\\")*\")"
> +    string_re="(\"([^\"]|\")*\")"
>      var_re="(\\$[a-zA-Z][0-9a-zA-Z_]*)"
>      expt_re="(PVM_E_[A-Z_]+)"
>      anode_re="@([a-zA-Z_][0-9a-zA-Z_]*)"



reply via email to

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