bugKawa - Bugs: bug #11578, fluid-let in compiled modules

 
 

bug #11578: fluid-let in compiled modules

Submitted by:  Dean Ferreyra <dferreyra>
Submitted on:  Thu 13 Jan 2005 01:02:22 AM UTC  
 
Category: Code generationSeverity: 3 - Normal
Item Group: Unexpected resultStatus: 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.

 

Thu 27 Jan 2005 06:22:08 AM UTC, comment #4:

I think using define-variable is actually a good style for variables that use dynamic variables: it tells both humans and the compiler this.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Thu 27 Jan 2005 02:05:07 AM UTC, comment #3:

I've confirmed that your fix works with our code. I would have tested this earlier, but I was out of the country for a spell.

Again, thanks for the quick response! I was able to use your (define-variable ...) work-around in the interim.

Dean Ferreyra <dferreyra>
Mon 17 Jan 2005 08:01:57 AM UTC, comment #2:

I just checked in a fix into CVS.
Please confirm that it works for you.
I also checked in the testcase.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Thu 13 Jan 2005 02:56:43 AM UTC, comment #1:

I've duplicated the problem and I think I understand what is happening, but I have to think about what to do.

One work-around is to replace the define of VAR with:
(define-variable VAR 'A)

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Thu 13 Jan 2005 01:02:22 AM UTC, original submission:

It seems like the dynamic binding of fluid-let is not working quite right in compiled modules. Here's the basic code:

(define VAR 'A)
(define (get-var) VAR)
(define (check-fluid-let sym)
(fluid-let ((VAR sym))
(get-var)))

When called from the interpreter, (check-fluid-let 'Z) returns 'Z. From compiled code, this same call returns 'A.

Attached is a patch to the testsuite that demonstrates the bug.

Fluid-let is used in quite a few places in Merced Systems software---I think this is the last issue that's keeping us from using the latest greatest Kawa changes.

Dean Ferreyra <dferreyra>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #2358:  fluid-let-test.patch added by dferreyra (1KiB - application/octet-stream - Patch to add fluid-let test to testsuite)

 

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

Date Changed By Updated Field Previous Value => Replaced By
Thu 27 Jan 2005 06:22:08 AM UTCbothnerOpen/ClosedOpen=>Closed
Mon 17 Jan 2005 08:01:57 AM UTCbothnerStatusNone=>Fixed
Thu 13 Jan 2005 02:56:43 AM UTCbothnerAssigned toNone=>bothner
Thu 13 Jan 2005 01:02:22 AM UTCdferreyraAttached File-=>Added fluid-let-test.patch, #2058

Back to the top


Powered by Savane 3.1-cleanup1