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

 
 

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

Submitted by:  Eugenio M. Vigo <nvteighen>
Submitted on:  Sat 15 Aug 2009 12:18:05 PM UTC  
 
Category: sosSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect behavior
Status: InvalidPrivacy: Public
Assigned to: Taylor R. Campbell <riastradh>Originator Name: 
Open/Closed: Closed
Keywords: 

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project MemberIn charge of this item.
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 File(s):
   
   
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
  • -unavailable- added by riastradh (Posted a comment)
  • -unavailable- added by nvteighen (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 17 Aug 2009 05:17:00 PM UTCriastradhOpen/ClosedOpen=>Closed
      CategoryNone=>sos
      StatusNone=>Invalid
      Assigned toNone=>riastradh
    Sat 15 Aug 2009 12:18:05 PM UTCnvteighenAttached 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.1-cleanup1