Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 79431 invoked from network); 18 May 2005 12:57:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 May 2005 12:57:49 -0000 Received: (qmail 26042 invoked by uid 500); 18 May 2005 12:56:06 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 25979 invoked by uid 500); 18 May 2005 12:56:05 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 25957 invoked by uid 99); 18 May 2005 12:56:05 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,RCVD_BY_IP X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of weldonwjw@gmail.com designates 64.233.162.201 as permitted sender) Received: from zproxy.gmail.com (HELO zproxy.gmail.com) (64.233.162.201) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 18 May 2005 05:55:54 -0700 Received: by zproxy.gmail.com with SMTP id 12so148552nzp for ; Wed, 18 May 2005 05:55:31 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=JqCnWbKOuQqnWUliMMwJLscAa2/xEzdYrYb0favNb+MLGLGvZgqH8ShxjGAopA3vtT3wvnSnCpn1ESoJMdAeFh+r/LPMAHbAesIcz2YKpokqYJNYD3YBTF9hDwZvPfeJHOWIysSpMuY3eoGXhqxBYTMC+KhqvjgE83TqiDU3wAs= Received: by 10.36.3.12 with SMTP id 12mr96323nzc; Wed, 18 May 2005 05:55:30 -0700 (PDT) Received: by 10.36.10.13 with HTTP; Wed, 18 May 2005 05:55:30 -0700 (PDT) Message-ID: <4dd1f3f005051805556d52eff5@mail.gmail.com> Date: Wed, 18 May 2005 05:55:30 -0700 From: Weldon Washburn Reply-To: Weldon Washburn To: harmony-dev@incubator.apache.org, David Griffiths Subject: Re: Against using Java to implement Java (Was: Java) Cc: tromey@redhat.com In-Reply-To: <892f710b050518033033b503d7@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <42845E09.7010507@algroup.co.uk> <4284E445.20303@apache.org> <892f710b0505170251627dea61@mail.gmail.com> <892f710b050518033033b503d7@mail.gmail.com> X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 5/18/05, David Griffiths wrote: > I think it's too slow to have the overhead of a function call for > every object allocation. This is the cost of modularization. I doubt > any of the mainstream JVMs you are competing with do this. Yes. I agree. A clean interface would have a function call for every object allocation. However if the allocation code itself is only a few lines of assemby, it can be inlined by the JIT. Using a moving GC, it is possible to get the allocation sequence down to a bump the pointer and a compare to see if you have run off the end of the allocation area. >=20 > Cheers, >=20 > Dave >=20 > On 17 May 2005 18:27:42 -0600, Tom Tromey wrote: > > >>>>> "David" =3D=3D David Griffiths writes= : > > > > David> Maybe a concrete example would help. Let's say you have a GC mod= ule > > David> written in C. One of it's API calls is to allocate a new object.= How > > David> is your JIT module going to produce code to use that API? Via a = C > > David> function pointer? > > > > Yes. > > > > One way is to mandate link- or compile-time pluggability only. Then > > this can be done by name. Your JIT just references > > '&harmony_allocate_object' in its source and uses this pointer > > in the code it generates. > > > > The other way is to have the JIT call some central function to get a > > pointer to the allocator function (or functions, in libgcj it turned > > out to be useful to have several). This only needs to be done once, > > at startup. > > > > For folks interested in pluggability, I advise downloading a copy of > > ORP and reading through it. ORP already solved these problems in a > > fairly reasonable way. > > > > Tom > > >