jakarta-bcel-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Francis ANDRE" <francis.an...@easynet.fr>
Subject Re: returnAddress and localVariable
Date Tue, 20 Jan 2004 17:20:30 GMT
Steven

Thank for the precision...but I am not speaking of Java...but of a JVM
bytecode method generated by the Cobol compiler I am building... I need to
store this returnAddress but BCEL forbids it as well as the Sun JDK
1.4.2...Thus, I was wondering if BCEL was rejecting the
declaration...because Sun JVM was rejecting it or for another reason!

Regards


----- Original Message -----
From: "Steven Smith" <steven.smith@tonic.com>
To: "'BCEL Users List'" <bcel-user@jakarta.apache.org>
Sent: Tuesday, January 20, 2004 5:27 PM
Subject: RE: returnAddress and localVariable


> 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
>
>


---------------------------------------------------------------------
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