emacs-devel
[Top][All Lists]
Advanced

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

Re: MPS native subrs


From: Gerd Möllmann
Subject: Re: MPS native subrs
Date: Tue, 25 Jun 2024 22:10:37 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Helmut Eller <eller.helmut@gmail.com> writes:

> On Sat, Jun 22 2024, Helmut Eller wrote:
>>>> I thought native comp works for you?
>>
>> I haven't tried with the latest dump loading code.  I think that needs
>> some work for native-comp-units.
>
> Here are some patches for this.  

Thanks. Looks like gnu.org is down, for some time now. I'll push your
patches when it works again.

> I also have some questions:

Oh oh :-)

> 1) In fix_subr, the &s->intspec.native field should only traced if the
>    subr is a non-primitive.  Because, for primitives, it's a (possibly
>    non-aligned) char*.  Right?

Right. I thought I had copied that literally from process_mark_stack,
but apparently not. In process_mark_stack it reads

                if (NATIVE_COMP_FUNCTIONP (obj))
                  {
                    set_vector_marked (ptr);
                    struct Lisp_Subr *subr = XSUBR (obj);
                    mark_stack_push_value (subr->intspec.native);
                    mark_stack_push_value (subr->command_modes);
                    mark_stack_push_value (subr->native_comp_u);
                    mark_stack_push_value (subr->lambda_list);
                    mark_stack_push_value (subr->type);
                  }

And command_modes is even fixed twice in fix_subr. There went
something seriously wrong :-/.

> 2) In dump_subr, the command_modes field is dumped with dump_field_lv
>    for non-primitives but for primitives with dump_field_emacs_ptr.
>    Is this intentional or a bug?

Hm, strange. I also can't make sense of that. For meLisp_Object is
Lisp_Object and not a pointer.

>
> 3) In fix_subr, why is the command_modes field only traced if
>    HAVE_NATIVE_COMP?  (Today was the first time I heard of the
>    command-modes function; still have no clue what it's used for :-)

Ja, see 1). Looks like a blackout to me. No idea. Maybe that's from the
phase after I had first tried to mix the two GCs, so that I could make
incremental progress, object type by object, Then I gave up on that
because it didn't work well, and finally had to get "everything" done
with a big bang. That was so incredibly mechanical work that possibly my
brain wandered off intermittendly :-/.

How command-modes, a defun, is exactly used I don't know either, sorry.
I understand the doc string as indicating that certain commands are only
applicable in certain modes, in the sense of minor- and major-mode. I
don't remember that from the good old days, and it doesn't seem to be
explained anywhere.



reply via email to

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