bugKawa - Bugs: bug #22451, Access to variables in environment...


bug #22451: Access to variables in environment from compiled code

Submitted by:  None
Submitted on:  Sat 01 Mar 2008 05:40:58 PM UTC  
Category:  Code generation Severity:  3 - Normal
Item Group:  Unexpected result Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Add a New Comment(Rich Markup)

You are not logged in

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


Sun 23 Mar 2008 08:14:17 PM UTC, comment #1:

I'm not sure what's going on - a complete setlf-contains test program would help.

One suspicious thing is
new Scheme().getnewEnvironment()'- that shouldn't be needed: If you do 'new Scheme()' that automatically calls getNewEnvironment(). So 'new Scheme().getEnvironment()' makes more sense.

A high-priority item on my TODO list cleaning up and documenting better the Scheme-from-Java API, and in a way compatible with javax.script.

Per Bothner <bothner>
Project Administrator
Sat 01 Mar 2008 05:40:58 PM UTC, original submission:

A location set in an environment from Java is not accessed from compiled code or scripts (or not always!), only its first binding.


Environment env = new Scheme().getnewEnvironment();


Scheme.eval("(define (getInternalInfluence)
(invoke (as <mimosa.scheduler.DefaultState> self) 'getInternalInfluence))",env);
==> call of the function use b1 as the value of self, OK

==> call of the function STILL USE b1
I replaced self by (eval 'self (interaction-environment)) and it works (but it is just a work-around!!)

Unfortunately, it is always like that!! When I use a script referencing a location set differently in different environments, only the first binding is used...very bad for what I have to do




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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by bothner (Posted a comment)

    Do you think this task is very important?
    If so, you can 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):



    No changes have been made to this item

    Back to the top

    Powered by Savane 3.3