bugMIT/GNU Scheme - Bugs: bug #27256, Compiled SOS define-generics...

 
 

bug #27256: Compiled SOS define-generics impossible to load

Submitter:  Eugenio M. Vigo <nvteighen>
Submitted:  Sat 15 Aug 2009 12:18:05 PM UTC
   
 
Category:  sos Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect behavior
Status:  Invalid Privacy:  Public
Assigned to:  riastradh Originator Name: 
Open/Closed:  Closed
Keywords: 
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 16 Aug 2009 10:37:05 AM UTC, comment #2: 

I see. Yes, the workaround works flawlessly.

Thanks! I guess this bug can be closed.

Eugenio M. Vigo <nvteighen>
Sat 15 Aug 2009 08:51:32 PM UTC, comment #1: 

Load SOS before compiling the file.  The bug you are really observing is that LOAD on source files exhibits different semantics from LOAD on compiled (or merely syntaxed) files.  When you load from source, every form is evaluated before the subsequent ones are even macro-expanded; the compiler, however, macro-expands everything at once and evaluates nothing.  The way to work around this is never to call LOAD-OPTION or similar procedures (such as LOAD or LOAD-PACKAGE-SET) at the top levels of files where you want to use what you just loaded.  See, for example, imail/compile.scm and imail/load.scm.

Taylor R. Campbell <riastradh>
Group Member
Sat 15 Aug 2009 12:18:05 PM UTC, original submission:  

Hi!

I've noticed the following issue when compiling (no matter if into SCode or native) a module that's using SOS 1.9. The compiling runs perfectly, but if I attempt to load the compiled file (using the load procedure), MIT/GNU Scheme will complain that the names used at define-generic's lambda list are unbound and therefore, failing to load.

But, loading the module from source file won't yield any error. That annoying detail makes me think this can be a bug and not just a mistake by myself :P

I attach you a sample module and its compiled versions. Loading the .scm through load will be succesful, but not the compiled ones.

This issue has led me to use MIT/GNU Scheme's make-generic-procedure instead of define-generic.

My MIT/GNU Scheme image information is:
Image saved on Wednesday January 7, 2009 at 11:20:40 PM
  Release 7.7.90.+ || Microcode 15.1 || Runtime 15.7 || SF 4.41
  LIAR/i386 4.118  || Edwin 3.116

I installed MIT/GNU Scheme from Debian Squeeze (current testing version). The mit-scheme package version is 7.7.90+20090107-1

Thanks for your great job!

Eugenio M. Vigo <nvteighen>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #18576:  generics.scm added by nvteighen (337B - text/x-scheme - Compiled under i386)
file #18575:  generics.bin added by nvteighen (1KiB - application/octet-stream - Compiled under i386)
file #18574:  generics.com added by nvteighen (2KiB - application/x-msdos-program - Compiled under i386)
file #18573:  generics.bci added by nvteighen (2KiB - application/octet-stream - Compiled under i386)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by riastradh (Posted a comment)
  • -email is unavailable- added by nvteighen (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-08-17 riastradh Open/ClosedOpen Closed
        CategoryNone sos
        StatusNone Invalid
        Assigned toNone riastradh
    2009-08-15 nvteighen Attached File- Added generics.bin, #18575
        Attached File- Added generics.scm, #18576
        Attached File- Added generics.bci, #18573
        Attached File- Added generics.com, #18574

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code