all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: Compiled vs. interpreted ERT test
Date: Thu, 27 Feb 2020 21:18:23 -0500	[thread overview]
Message-ID: <jwvo8tj78y3.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: 87r1yfr7vs.fsf@fastmail.fm

> I opened an issue on the package's Github page but the maintainer says he
> doesn't know how to debug this.[2] So I'm coming here in the hopes someone
> has an idea or a suggestion how to debug this.

I haven't looked at the rest of the code, but the first thing I saw is:

    (defmacro wsi-current-lexical-environment ()
      "Return the current lexical environment.
    
    If `lexical-binding' is not enabled, return nil.
    
    This macro expands to a Lisp form that evaluates to the current
    lexical environment. It works by creating a closure and then
    extracting and returning its lexical environment.
    
    This can be used to manually construct closures in that
    environment."
      `(let ((temp-closure (lambda () t)))
         (when (eq (car temp-closure) 'closure)
           (cadr temp-closure))))

which clearly assumes the code is interpreted since once compiled,
`temp-closure` is not going to be a list any more (and you won't be
able to extract the lexical env from it).


        Stefan




  parent reply	other threads:[~2020-02-28  2:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-27 22:19 Compiled vs. interpreted ERT test Joost Kremers
2020-02-28  1:48 ` Noam Postavsky
2020-02-28  2:18 ` Stefan Monnier [this message]
2020-02-28  3:16   ` Stefan Monnier
2020-02-28  8:07     ` Joost Kremers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvo8tj78y3.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.