Re: C to Java Byte Code
Alex Fraser wrote:
[color=blue]
> "Paul Lutus" <nospam@nosite. zzz> wrote in message
> news:10nqmt2okb 8hnec@corp.supe rnews.com...
> [snip][color=green]
>> If the compiler is ANSI C compliant, my example program will compile on
>> that compiler and run on that plartform. Unions are supported by C, they
>> are not supported by Java, and they are not supported by the program
>> under discussion.[/color]
>
> From these statements, I infer that you have an example program which
> demonstrates that unions are not supported. Is this correct? And if so,
> what is this example program?[/color]
1. The OP, unhappy with the original thread and eager to get some additional
free publicity for his commercial product, created a new thread. The old
thread has the same name and starts here:
<a9083a87.04101 41937.1a7d4e1d@ posting.google. com>
2. Java does not support the mapping of one variable type onto another.
3. The product in question solves this problem by turning everything into a
32-bit word, this making the "union" issue moot, since there is no point
creating a union betweeen a thing and itself.
The basic issue is that the disparate data types that can be mapped using
"union" in C, cannot be mapped at all in Java (because of the latter's
strong data typing). The OP solved this problem by making all data into
32-bit words.
[color=blue]
>
> Do you have any other evidence on which you base the claim above?[/color]
Please take the time to read this and the prior thread before raising closed
issues.
[color=blue]
> And if
> so, what is it?[/color]
*sigh*
<cl7gbh$7th$1@h ood.uits.indian a.edu>
*************** *************** *************** *************** *******
"The size of each char, int, long, or float is 1 word (32 bits long).
So, sizeof(int) is 1, sizeof(char) is 1, sizeof(float) is also 1,
you got the idea. Using a large array of int to mimic addressable memory is
the cause for this. The indexes to this large array are treated as
addresses. This memory is word-addressable and not byte-addressable.
And programs that assume a byte-addressable architecture will need to be
modified to suit the one used by MPC. Unions are supported."
*************** *************** *************** *************** *******
If, as the OP claims, all data are 32-bit words, then the claim that unions
are supported is false, since (1) Java will not allow disparate data types
to be overlaid in memory, and (2) a union's purpose is the mapping of
disparate data types, and there aren't any disparate data types.
BTW there is also no support for anything that requires fewer or more than
32 bits, e.g no support for typical doubles as just one example.
--
Paul Lutus
Alex Fraser wrote:
[color=blue]
> "Paul Lutus" <nospam@nosite. zzz> wrote in message
> news:10nqmt2okb 8hnec@corp.supe rnews.com...
> [snip][color=green]
>> If the compiler is ANSI C compliant, my example program will compile on
>> that compiler and run on that plartform. Unions are supported by C, they
>> are not supported by Java, and they are not supported by the program
>> under discussion.[/color]
>
> From these statements, I infer that you have an example program which
> demonstrates that unions are not supported. Is this correct? And if so,
> what is this example program?[/color]
1. The OP, unhappy with the original thread and eager to get some additional
free publicity for his commercial product, created a new thread. The old
thread has the same name and starts here:
<a9083a87.04101 41937.1a7d4e1d@ posting.google. com>
2. Java does not support the mapping of one variable type onto another.
3. The product in question solves this problem by turning everything into a
32-bit word, this making the "union" issue moot, since there is no point
creating a union betweeen a thing and itself.
The basic issue is that the disparate data types that can be mapped using
"union" in C, cannot be mapped at all in Java (because of the latter's
strong data typing). The OP solved this problem by making all data into
32-bit words.
[color=blue]
>
> Do you have any other evidence on which you base the claim above?[/color]
Please take the time to read this and the prior thread before raising closed
issues.
[color=blue]
> And if
> so, what is it?[/color]
*sigh*
<cl7gbh$7th$1@h ood.uits.indian a.edu>
*************** *************** *************** *************** *******
"The size of each char, int, long, or float is 1 word (32 bits long).
So, sizeof(int) is 1, sizeof(char) is 1, sizeof(float) is also 1,
you got the idea. Using a large array of int to mimic addressable memory is
the cause for this. The indexes to this large array are treated as
addresses. This memory is word-addressable and not byte-addressable.
And programs that assume a byte-addressable architecture will need to be
modified to suit the one used by MPC. Unions are supported."
*************** *************** *************** *************** *******
If, as the OP claims, all data are 32-bit words, then the claim that unions
are supported is false, since (1) Java will not allow disparate data types
to be overlaid in memory, and (2) a union's purpose is the mapping of
disparate data types, and there aren't any disparate data types.
BTW there is also no support for anything that requires fewer or more than
32 bits, e.g no support for typical doubles as just one example.
--
Paul Lutus
Comment