🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #99176

(none)

#99176
From: NEWSMGR
Date: Wed, 17 Oct 1990 07:09
59 lines
2503 bytes
Relay-Version: VMS News - V6.0 1/9/90 VAX/VMS V5.3; site kontu.utu.fi
Path: kontu.utu.fi!polaris.utu.fi!news.funet.fi!sunic!mcsun!uunet!tut.cis.ohio-state.edu!relay.eu.net!nixpbe!uucp
Newsgroups: gnu.emacs.bug
Subject: (none)
Message-ID: <9010142209.AX16021@unido.informatik.uni-dortmund.de>
From: nixpbe!uucp@relay.eu.net
Date: 14 Oct 90 22:09:27 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Approved: bug-gnu-emacs@prep.ai.mit.edu
Lines: 46

>From uucp Sun Oct 14 22:12 MET 1990 remote from nixbln
To: nixpbe!unido!gnu-emacs-bug
Path: nixbln!nixpbe!nixbur!linus!agate!apple!usc!wuarchive!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!tut.cis.ohio-state.edu!BREEZE.BELLCORE.COM!mlittman
From: mlittman@BREEZE.BELLCORE.COM (Michael L. Littman)
Newsgroups: gnu.emacs.bug
Subject: Backquote results in different behavior when byte-compiled
Message-ID: <9010091456.AA18404@breeze.bellcore.com>
Date: 9 Oct 90 14:56:40 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 32


System: Sparc 18.55

 I am using a macro to generate a list which I then tamper with using
"setcar".  Before I byte-compile, "setcar" does not produce a
side-effect to the macro.  After I compile, it does.

 If I define the macro any other way, I get consistent results: either
"setcar" produces side-effects in the compiled version AND the
uncompiled version, or it "setcar" produces no side-effects in the
compiled version OR the uncompiled version.

; Program:

(defmacro nil-list ()
  (` (cons '(nil) nil)))

(defun change-nils (true)
  (let ((a (nil-list)))
    (if true
	(setcar (car a) 'up)
      )
    a))

; Test...

(change-nils t)  =>  ((up))
(change-nils nil) => ((nil))	; No side effect
(byte-compile 'change-nils)
(change-nils t) =>   ((up))
(change-nils nil) => ((up))	; Side effect

-Michael
Technical Details
Message-ID: <1AF88D03A20720618C@kontu.utu.fi>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!KONTU.UTU.FI!NEWSMGR

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,f1dbc4b61e8e8143
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1990-10-17 00:09:00 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!KONTU.UTU.FI!NEWSMGR
From: NEWSMGR@KONTU.UTU.FI
Newsgroups: gnu.emacs.bug
Subject: (none)
Message-ID: <1AF88D03A20720618C@kontu.utu.fi>
Date: 17 Oct 90 07:09:00 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 59
Approved: bug-gnu-emacs@prep.ai.mit.edu
Posted: Wed Oct 17 08:09:00 1990