GNU bug report logs - #68851
30.0.50; Native comp: Optimization failure for org-element-property-raw: Handler: org-element-property-raw--inliner

Previous Next

Package: emacs;

Reported by: Ihor Radchenko <yantar92 <at> posteo.net>

Date: Wed, 31 Jan 2024 13:48:01 UTC

Severity: normal

Found in version 30.0.50

Full log


Message #14 received at 68851 <at> debbugs.gnu.org (full text, mbox):

From: Ihor Radchenko <yantar92 <at> posteo.net>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 68851 <at> debbugs.gnu.org
Subject: Re: bug#68851: 30.0.50; Native comp: Optimization failure for
 org-element-property-raw: Handler: org-element-property-raw--inliner
Date: Wed, 31 Jan 2024 19:47:54 +0000
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> ⛔ Warning (comp): Warning: Optimization failure for org-element-property-raw: Handler: org-element-property-raw--inliner
>
> This looks like the warning emitted by `macroexp--compiler-macro` when
> a compiler macro (here, generated by `define-inline`) signals an error.
>
> This said, the warning should include (on the next line) the actual
> error encountered.  Not sure why you don't seem to have that.

I also thought so, but the problem only appears during native
compilation. Normal compilation works just fine.

> In any case the origin might be a bug in your code or in `inline.el`.
>
> Is `org-element--standard-properties-idxs` defined at the time of
> macro-expansion?

Yup:

(eval-and-compile ; make available during inline expansion

  (defconst org-element--standard-properties
    '( :begin :post-affiliated :contents-begin :contents-end :end :post-blank
       :secondary :mode :granularity
       :cached :org-element--cache-sync-key
       :robust-begin :robust-end
       :true-level
       :buffer :deferred
       :structure :parent)
    "Standard properties stored in every syntax node structure.
These properties are stored in an array pre-allocated every time a new
object is created.  Two exceptions are `anonymous' and `plain-text'
node types.")

  (defconst org-element--standard-properties-idxs
    (let (plist)
      (seq-do-indexed
       (lambda (property idx)
         (setq plist (plist-put plist property idx)))
       org-element--standard-properties)
      plist)
    "Property list holding standard indexes for `org-element--standard-properties'."))

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




This bug report was last modified 1 year and 127 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.