Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 68272 invoked from network); 27 May 2005 17:03:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 27 May 2005 17:03:47 -0000 Received: (qmail 36533 invoked by uid 500); 27 May 2005 17:03:40 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 36478 invoked by uid 500); 27 May 2005 17:03:40 -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 36465 invoked by uid 99); 27 May 2005 17:03:39 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of tromey@redhat.com designates 66.187.233.31 as permitted sender) Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 27 May 2005 10:03:37 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j4RH3SED013929 for ; Fri, 27 May 2005 13:03:28 -0400 Received: from opsy.redhat.com (vpn50-54.rdu.redhat.com [172.16.50.54]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j4RH3RO12555; Fri, 27 May 2005 13:03:27 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id CBDA32DC19B; Fri, 27 May 2005 10:59:56 -0600 (MDT) Sender: tromey@redhat.com To: harmony-dev@incubator.apache.org Subject: Re: [arch] VM/Classlibrary interface References: <60510FC8-4503-4149-A7EA-9CEBA018D0FA@apache.org> From: Tom Tromey Reply-To: tromey@redhat.com X-Attribution: Tom Date: 27 May 2005 10:59:55 -0600 In-Reply-To: <60510FC8-4503-4149-A7EA-9CEBA018D0FA@apache.org> Message-ID: Lines: 62 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N >>>>> "Geir" == Geir Magnusson writes: Geir> 4) RMI stuff On irc Geir said that he meant "JNI" here. Basically what this means, I think, is that Classpath has an implementation of "jni.h", but the VM has to provide certain typedefs, e.g., "jint". Geir> 2) Are there things that the GNU Classpath model is missing due to Geir> the version of the API it's implementing? (I.e. they don't realize Geir> they need it yet...) Yeah, there are some needed additions for 1.5. E.g., annotations require new reflection info, and in the Classpath model this comes from the VM layer. This will all show up eventually, perhaps on the generics branch. Geir> 3) I was uncomfortable with extending java.lang. I understand the Geir> argument - that as they are package private, the language can be Geir> depended upon to keep them safe from user code using them rather Geir> than some security infrastructure. However, isn't this a bit Geir> dangerous in terms of standard java.lang changes colliding? I don't think there is a killer failure mode. First, note that it is both the language and the VM that implement this protection. This is crucial, as otherwise someone could easily circumvent the protection at runtime. Second, suppose Sun adds java.lang.VMObject to their public API. What then? * A program written against Sun's new release that uses this feature will not work against our old release. But that is already the case -- a program using a new API won't work against an older Classpath that doesn't implement it. The choice of name doesn't matter. * A program written against Sun's new release that uses this feature also won't compile against our old release. But this won't work anyway either. * To implement this new feature we would have to rename our VMObject and thus change the VM interface. But that is also not a huge problem. The VM interface can't remain fixed in general, because sometimes new features (see the 1.5 example) require additions to it. (This does mean some churn for VM implementors, and it is inconvenient. But it only breaks the VM, not anything else.) * Finally, there's no way to compile a program against Classpath that uses the Classpath VMObject, due to the access protection. So failures "the other way" aren't possible. Geir> I'd like to drive to a standard interface that we can all agree on, Geir> and hopefully GNU Classpath will support it. Experience has shown that the Classpath approach is pretty flexible. A wide range of VMs already use it. Also we're pretty open to specific needed changes. Tom