bugKawa - Bugs: bug #17984, Compile time error in expansion of...

 
 

bug #17984: Compile time error in expansion of hygienic macros ending in literals

Submitted by:  Chris Wegrzyn <cwegrzyn>
Submitted on:  Thu 12 Oct 2006 05:33:36 PM UTC  
 
Category: Scheme languageSeverity: 3 - Normal
Item Group: Compile-time exceptionStatus: Fixed
Privacy: PublicAssigned to: Per Bothner <bothner>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Mon 16 Oct 2006 06:05:01 PM UTC, comment #3:

Patch and test-case checked into to SVN.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Mon 16 Oct 2006 01:19:25 PM UTC, comment #2:

The new patch does indeed fix the problems that I had. I was pretty sure mine didn't Do the Right Thing! Thanks!

Chris Wegrzyn <cwegrzyn>
Fri 13 Oct 2006 11:25:28 PM UTC, comment #1:

Thanks for the useful test-case and patch.
While the patch works, it has one awkwardness:
If there are multiple expressions in the tail,
then the popForms creates a Values object (for multiple values).
This then gets passed to wrapSyntax and 'new Pair'.
This works, because it later gets passed to the scanForm
method (above), which knows how to handle Values.
(At least I assume that is what happens.)

Another problem with your patch is that it doesn't
preserve line number information.

Could you please try the new patch?

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Thu 12 Oct 2006 05:33:36 PM UTC, original submission:

When a hygienic macro template is of the form (begin <statements> "constant"), the compiler fails with a "body is not a proper list" error. No error occurs if begin is replaced by a function, such as list. However, I have seen it occur when function calls are nested in begin. This appears to affect all versions from 1.8 onward. I am currently testing against r5517 of the trunk.

I have attached a test case and a patch. The test case includes three expressions, two that succeed and one that fails. The first and last of these should evaluate equivalently, I believe, and highlights the main problem. The patch is against r5517 of the trunk. I don't know if it is the best way to solve the problem, but it appears to work without causing any other problems.

Chris Wegrzyn <cwegrzyn>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #10969:  scan.patch added by bothner (889B - text/x-patch)
file #10955:  fix_macro_literal_end.patch added by cwegrzyn (363B - text/plain - patch to Translator.scanBody)
file #10954:  macro-literal-end.scm added by cwegrzyn (767B - application/octet-stream - test case)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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 6 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Mon 16 Oct 2006 06:05:01 PM UTCbothnerOpen/ClosedOpen=>Closed
Fri 13 Oct 2006 11:25:28 PM UTCbothnerStatusNone=>Fixed
  Assigned toNone=>bothner
  Attached File-=>Added scan.patch, #10969
Thu 12 Oct 2006 05:34:05 PM UTCcwegrzynAttached File-=>Added fix_macro_literal_end.patch, #10955
Thu 12 Oct 2006 05:33:36 PM UTCcwegrzynAttached File-=>Added macro-literal-end.scm, #10954

Back to the top


Powered by Savane 3.1-cleanup1