gcl-devel
[Top][All Lists]
Advanced

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

Re: [Gcl-devel] Package operation in a bad place?


From: Camm Maguire
Subject: Re: [Gcl-devel] Package operation in a bad place?
Date: Thu, 14 Apr 2016 12:37:20 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Greetings!

This is due to a long-standing design bug in the .data format appended
to the .o file and used to initialize lisp objects on loading compiled
binaries. 

Referenced lisp symbols are written with out with package prefixes, and
stored in a vector, which is unreadable unless the packages exist at
that time.  GCL makes a crude attempt at detecting 'package operations'
and moving these to the head of the file, which of course is dangerous
and triggers the warning.  

The obvious solution is to leave the vector of symbols uninitialized
until an element is referenced, and then store the symbol at the last
minute.  On my todo list.

Take care,

Raymond Toy <address@hidden> writes:

> If you compile something like:
>
> (in-package "CL-USER")
> (defun zot (x)
>   (print x))
> (print *package*)
> (in-package "CL")
> (cl:print *package*)
> (defun zot-cl (x)
>   (print 'zot-cl))
>
> I get warnings from the second in-package that the in-package
> operation is in a bad place.  What does that really mean?
>
> If I load the result, CL-USER is printed twice, but zot-cl is actually
> in the CL package, not CL-USER.
>
> So what does this all really mean?
>
> --
> Ray
>
>
> _______________________________________________
> Gcl-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/gcl-devel
>
>
>
>

-- 
Camm Maguire                                        address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah



reply via email to

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