Issue471528

classification
Title: Tracking variables across packages
Type: rfe Severity: normal
Components: Jythonc compiler Versions:
Milestone:
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: pedronis, zyasoft
Priority: normal Keywords:

Created on 2001-10-15.22:43:19 by pedronis, last changed 2008-09-14.01:55:04 by zyasoft.

Messages
msg3003 (view) Author: Samuele Pedroni (pedronis) Date: 2001-10-15.22:43:19
Hi! 

I have got a jytohn package that derives a class from 
a 
java class that's given by the value of a variable of 
another package. In the situations I have in mind, the 
value of that variable would be known at compile time, 
so it would be possible for jythonc to create a proxy 
so the resulting code can work without the presence of 
compiler classes (ProxyMaker in particular). It 
appears 
that jythonc does this for variables of the same 
package, but doesn't seem to track variable 
assignments 
across packages. 

The following two examples illustrate this point. 

The following example works, even when compiled and 
packaged without compiler classes. 
---------- example1.py--------------------- 
import java 

cl=java.lang.Object 

class spam(cl): 
pass 
---------------------------------------------- 

The next example does _not_ work without compiler 
classes. 
---------- example2.py ------------------- 
import java 
import init # any module, can be empty 

init.cl=java.lang.Object 

class spam(init.cl): 
pass 
----------------------------------------- 

It appears that jythonc does not track classes across 
module boundaries,even though this kind of tracking 
shouldn't be too difficult in this case. 

Moreover, the two programs are essentially the same, 
so 
it seems reasonable to expect them to behave in the 
same way. I think it would be highly desirable to have 
jythonc create proxies whenever possible, in order to 
minimize the dependence of the resulting code on the 
presence of compiler classes. This should be possible 
whenever the value of such variables is known at 
compile time. 
Best, 
Peter 
brinkman@math.uiuc.edu 
msg3577 (view) Author: Jim Baker (zyasoft) Date: 2008-09-14.01:55:04
jythonc is no longer supported
History
Date User Action Args
2008-09-14 01:55:04zyasoftsetstatus: open -> closed
resolution: wont fix
messages: + msg3577
nosy: + zyasoft
2008-09-13 22:48:24fwierzbickisetcomponents: + Jythonc compiler, - None
2001-10-15 22:43:19pedroniscreate