Re: C to Java Byte Code
Gerry Quinn wrote:[color=blue]
> In article <10nt68mmg3qtke 5@corp.supernew s.com>, nospam@nosite.z zz
> says...[color=green]
>> Gerry Quinn wrote:[color=darkred]
>>>
>>> typedef union abc
>>> { int x;
>>> float y;
>>> } a_union;
>>>
>>>>>> 2. This is not a union, it it two instances of the same variable.
>>>>>> Again, to reply to my post, you need to provide the Java
>>>>>> bytecode that unites a Java float and a Java integer in the same
>>>>>> address space, something that is not allowed in Java.
>>>
>>> Of course it's a union. It has two members x and y which are in
>>> this instance of different types, although that is by no means part
>>> of the specification.[/color]
>>
>> Yes, it is a union in C, but I am saying it is not a union in the
>> Java bytecode.[/color]
>
> How could it be a union in the Java bytecode? Java bytecode doesn't
> have unions, any more than machine code does. Unions are a feature of
> C. The compiler compiles bytecode from C source. The C source may
> contain unions. The bytecode doesn't, any more than a conventional
> executable would.[/color]
*JAVA* doesn't have unions, they could be compiled to *byte code*, in
the same way Visual Studio (v6 I believe) compiles unions into object
code. I get the feeling you just jumped on the band wagon here, rather
then check the facts. It is *ENTIRELY* possible for the OP's compiler to
support unions, in a similar way many normal C/C++ compilers, like VC
do.
~Galga
Gerry Quinn wrote:[color=blue]
> In article <10nt68mmg3qtke 5@corp.supernew s.com>, nospam@nosite.z zz
> says...[color=green]
>> Gerry Quinn wrote:[color=darkred]
>>>
>>> typedef union abc
>>> { int x;
>>> float y;
>>> } a_union;
>>>
>>>>>> 2. This is not a union, it it two instances of the same variable.
>>>>>> Again, to reply to my post, you need to provide the Java
>>>>>> bytecode that unites a Java float and a Java integer in the same
>>>>>> address space, something that is not allowed in Java.
>>>
>>> Of course it's a union. It has two members x and y which are in
>>> this instance of different types, although that is by no means part
>>> of the specification.[/color]
>>
>> Yes, it is a union in C, but I am saying it is not a union in the
>> Java bytecode.[/color]
>
> How could it be a union in the Java bytecode? Java bytecode doesn't
> have unions, any more than machine code does. Unions are a feature of
> C. The compiler compiles bytecode from C source. The C source may
> contain unions. The bytecode doesn't, any more than a conventional
> executable would.[/color]
*JAVA* doesn't have unions, they could be compiled to *byte code*, in
the same way Visual Studio (v6 I believe) compiles unions into object
code. I get the feeling you just jumped on the band wagon here, rather
then check the facts. It is *ENTIRELY* possible for the OP's compiler to
support unions, in a similar way many normal C/C++ compilers, like VC
do.
~Galga
Comment