jakarta-bcel-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Smith <steven.sm...@tonic.com>
Subject RE: returnAddress and localVariable
Date Tue, 20 Jan 2004 16:27:04 GMT
Generally speaking, because it's not possible to declare a local variable in
your Java program as a type that is the return address, as in:

	int x;
	String y;
	ReturnAddress z;	// not possible  

As best I remember, ReturnAddressType can only be the type of a local
variable inside a JSR "subroutine".  It is typically stored onto the stack
as the first instruction in the subroutine (invoked via JSR/JSR_W), so that
a RET instruction will know where to return.  

-----Original Message-----
From: Francis ANDRE [mailto:francis.andre@easynet.fr]
Sent: Tuesday, January 20, 2004 9:47 AM
To: bcel-user@jakarta.apache.org
Subject: [Q]: returnAddress and localVariable


Hi BCEL users


Here a simple question: Why the BCEL is rejecting the declaration of a local
variable of  type Returnaddress ???

java.lang.IllegalArgumentException: Can not use <return address> as type for
local variable
at org.apache.bcel.generic.MethodGen.addLocalVariable(MethodGen.java:352)
at org.apache.bcel.generic.MethodGen.addLocalVariable(MethodGen.java:375)
at com.pac.cob.cmp.JVMCodeGeneration.generate(JVMCodeGeneration.java:144)


Regards


FA


---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-user-help@jakarta.apache.org


Mime
View raw message