From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: MPS native subrs Date: Tue, 25 Jun 2024 22:10:37 +0200 Message-ID: References: <87v823xvq1.fsf@localhost> <87tthm3gq2.fsf@gmail.com> <87sex6ags5.fsf@localhost> <87msne3flr.fsf@gmail.com> <87frt63dvt.fsf@gmail.com> <86o77ulgk8.fsf@gnu.org> <87zfre1p3r.fsf@gmail.com> <87zfreo5u6.fsf@localhost> <87plsa1n8k.fsf@gmail.com> <87wmmio3vq.fsf@localhost> <87jzii1hbs.fsf_-_@gmail.com> <8734p61evv.fsf@gmail.com> <87iky0zvyz.fsf@gmail.com> <87ikxwamor.fsf_-_@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17979"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Helmut Eller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jun 26 06:06:56 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sMJvr-0004VD-NT for ged-emacs-devel@m.gmane-mx.org; Wed, 26 Jun 2024 06:06:55 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMCvU-0005tq-Et; Tue, 25 Jun 2024 16:38:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sMCv9-0005rq-Tl for emacs-devel@gnu.org; Tue, 25 Jun 2024 16:37:45 -0400 Original-Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sMCuW-0008Px-Ct for emacs-devel@gnu.org; Tue, 25 Jun 2024 16:37:32 -0400 Original-Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3645e9839b3so4580867f8f.3; Tue, 25 Jun 2024 13:35:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719347712; x=1719952512; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=16KDWAUyrMiig5zJtzx+LggCa3Q5PWfEvdXDDwoUv/U=; b=g4PKkNzMbUfbN0qRcx9Q254njY5sKhtxOuy89YIMIwmKTNanMaq2njVkrC0zSRWQZh h7p3CnyHzeC8YdO1Htyt8/ObwCycDNynNEGyhx0n9ewQ2wSVz4soQ77PNvHH0WuZmVsk tAuRT0PLkR7810xdI7dpWPqLnoLOzqfcObxXeM5tbprrYgRSeatZI3LCB6DoUztY+iIA 6XAIylZvZlpC69BU29KyV7+0usjtyTlTow8VolERYoUKPCluhGTNaH4kfzen2PC86tst 1JxcBZAQHhbbIzz+yqkvSWNl7WRHH24DfPd5f/XL+lGRZ1TeOjapTB8Mq6pgHrIvLCFk g/6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719347712; x=1719952512; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=16KDWAUyrMiig5zJtzx+LggCa3Q5PWfEvdXDDwoUv/U=; b=RWuHX79W9aAHbVVEeCPo5hNF9F9vwW9Nfrvhpx4R6KzNeWSCdUqP55LUJeUkE5jrTf sZYzErpm1ZnHo0YUvu1wQavP1D2OU3Is+eW/zAKYsWyp4RJrMnGRayvWSo/kKqk/OQth wI/tQUpRNui0pxCM0f9FFg+GCd5co2WVsUg76XLEvBqwzsQBvqv9HSIFpdLUX5rlowr1 nApfwHwg4b/t0po3NdL/7shZ5kPeQOykeNf7xcuDcxSXMfR/FpX4MIrCGf1V5q/z2IrC nOjE3iz3UgawyflhV5CR+YweVrxNKFfWZKW+wEKSUwuNe6Avyz2q2w/dIZLOqYpZ6tOA NYqA== X-Forwarded-Encrypted: i=1; AJvYcCUWXpfK9y1t0FUuZrDtveBbkpokekBSeqzWpHTSlRurCn1kVbR7L2IoMQaLvJKg7C1SuLdis5Rk/Rf/rDHUxUsUZMM4 X-Gm-Message-State: AOJu0YzUyhZjA83KpheFKu1XPGMpbKsrQ7Ti1P4lAoOqvpnOW0Wz1upz +dQzf2dgBmEsnB391K9x9JpsUNRCdp/Pt1pRAARYrkPdx7wc+C8PRfg9PQ== X-Google-Smtp-Source: AGHT+IFn4A4bLDQmluJRgU4WSk9IBEcl0AWANJf3ZUkzQ/9ThxTpWwvcuuzLwBbWUOpI6lha8srRzQ== X-Received: by 2002:a17:906:e08a:b0:a6f:6701:cd5a with SMTP id a640c23a62f3a-a7242cb7fb7mr561316366b.44.1719346238775; Tue, 25 Jun 2024 13:10:38 -0700 (PDT) Original-Received: from pro2.fritz.box (pd9e36681.dip0.t-ipconnect.de. [217.227.102.129]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7260cbbb8csm164345666b.137.2024.06.25.13.10.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jun 2024 13:10:38 -0700 (PDT) In-Reply-To: <87ikxwamor.fsf_-_@gmail.com> (Helmut Eller's message of "Tue, 25 Jun 2024 20:42:44 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=gerd.moellmann@gmail.com; helo=mail-wr1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, T_SPF_HELO_TEMPERROR=0.01, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:320646 Archived-At: Helmut Eller 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.