Article View: comp.lang.oberon
Article #830Re: Java (cont'd)
From: Matthew B. Kennel
Date: Tue, 23 Jan 1996 23:05
Date: Tue, 23 Jan 1996 23:05
35 lines
2179 bytes
2179 bytes
Mark Hamburg (mhamburg@mv.us.adobe.com) wrote: : Okay, Simon Johnston just pointed me to Intermetrics efforts on an Ada 95 : to Java bytecode compiler, so I probably should elaborate on my previous : posting: : First, note that I said "readily be done". : One could actually implement Oberon's semantics on the Java virtual : machine, but the performance characteristics would be horrendous. : For example, since the Java virtual machine doesn't allow stack allocation : of records or arrays, you would just have the compiler emit code to heap : allocate them. This will behave essentially the same but will result in far : more frequent garbage collection than in Oberon. Somewhat more, but there's the potential to be clever. : Similarly, since Java doesn't support embedding structured types inside : other structured types, you could simply silently allocate a separate heap : block for each embedded construct. An array of N records results in N+1 : heap allocations, one for the array and N for the individual records. Make new aggregate structured types. : VAR parameters make things particularly nasty. Since the Java virtual : machine has no support for passing values by reference, you have to pass an : object pointer. This means that even primitive values like integers have to : be stored as heap allocated objects if you want to pass them as VAR : parameters. Since you won't know whether a public record field will ever be : passed as a VAR parameter, all public record fields will need to be stored : as separate heap objects. These could be wrapped at time of call. : Mark
Technical Details
Message-ID:
<4e3pkn$ian@gaia.ns.utk.edu>Path:
arc1-ca.pugleaf.net!coke.engr.utk.edu!mbkReferences:
<4de8im$6qo@tim.xenologics.com> <mhamburg-170196124403@macb305.mv.us.adobe.com> <mhamburg-180196093617@macb303.mv.us.adobe.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!coke.engr.utk.edu!mbk From: mbk@I_should_put_my_domain_in_etc_NNTP_INEWS_DOMAIN (Matthew B. Kennel) Newsgroups: comp.lang.oberon Subject: Re: Java (cont'd) Date: 23 Jan 1996 23:05:59 GMT Organization: University of Tennessee, Knoxville Message-ID: <4e3pkn$ian@gaia.ns.utk.edu> References: <4de8im$6qo@tim.xenologics.com> <mhamburg-170196124403@macb305.mv.us.adobe.com> <mhamburg-180196093617@macb303.mv.us.adobe.com> Reply-To: kennel@msr.epm.ornl.gov NNTP-Posting-Host: 128.169.100.253 X-Newsreader: TIN [version 1.2 PL2]