Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 27834 invoked from network); 18 Sep 2007 13:03:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Sep 2007 13:03:37 -0000 Received: (qmail 30654 invoked by uid 500); 18 Sep 2007 13:03:27 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 30627 invoked by uid 500); 18 Sep 2007 13:03:27 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 30618 invoked by uid 99); 18 Sep 2007 13:03:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Sep 2007 06:03:27 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gshimansky@gmail.com designates 64.233.162.237 as permitted sender) Received: from [64.233.162.237] (HELO nz-out-0506.google.com) (64.233.162.237) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Sep 2007 13:03:26 +0000 Received: by nz-out-0506.google.com with SMTP id o37so1070764nzf for ; Tue, 18 Sep 2007 06:03:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; bh=3JKBpZFiJxZd13OwBwxXE73ks1sosbsHomRJ50JEibY=; b=TmNiDXgv9hAAKIYdH+PZ7vR4X2vYybrJ2ZRGADh4GORt4w44pwqyj1/TxroBCL0MB5NkFI1Qlh55c48eH30mhW6ObY+ddAVhuo13DhXYgnKk5dAZQvdyZ2lxdmmLiueMaHDvT2m/1Z9k8tlCCoeUhlua7AvDOyYnQTh0el2N2ls= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=pzho8eVTLq56PclS5Gm3aw/Tfypt+HYgqRRnZm4m1kQC31jCsVYscrkyOucaYsV/kUkg8FYLA4UWNzd8LttrfClOZRqq75ntBr+KrlGyuwg/eIWIja3M7Blz6rC1khuVmntqTYo6YrhcBldFUk3nFod7ZCvLJGbAZLHfFuq+8Iw= Received: by 10.115.78.1 with SMTP id f1mr4641223wal.1190120585159; Tue, 18 Sep 2007 06:03:05 -0700 (PDT) Received: from ?127.0.0.1? ( [140.211.11.9]) by mx.google.com with ESMTPS id f36sm11069481rvb.2007.09.18.06.02.59 (version=SSLv3 cipher=RC4-MD5); Tue, 18 Sep 2007 06:03:01 -0700 (PDT) Message-ID: <46EFCC7E.8010608@gmail.com> Date: Tue, 18 Sep 2007 17:02:54 +0400 From: Gregory Shimansky User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: dev@harmony.apache.org Subject: Re: [drlvm] DRLVM should accept Java6 classes now References: <46DD72E3.9060108@gmail.com> <6e47b64f0709042159r39240301m220ac43c992599be@mail.gmail.com> <46DE8E11.3060909@gmail.com> <46DFEC63.7020709@gmail.com> <46DFFB6F.1050909@gmail.com> <0vqvean3npr.fsf@gmail.com> <46E007A0.3030609@gmail.com> <46E0338D.30105@gmail.com> <46E11C7A.9050102@gmail.com> <46E1343E.2010305@gmail.com> <46EFA4AE.70604@gmail.com> In-Reply-To: <46EFA4AE.70604@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Tim Ellison wrote: > Sorry for the delay in responding... > > Gregory Shimansky wrote: >> Gregory Shimansky wrote: >>> Tim Ellison wrote: >>>> Yuri Dolgov wrote: >>>>>> we can make this constant definable by the build. >>>>> That's a great idea. I agree. >>>> Would it be too expensive as a runtime check? i.e ask the classlib at >>>> start-up if the VM should behave like Java 5 or Java 6, then we don't >>>> even have to produce separate VM builds. >>> I don't think it would be expensive in any way. This constant >>> CLASSFILE_MAJOR_MAX is currently used only in 2 places, to check that >>> class file version is supported by VM, and to define >>> java.class.version property value on startup. >>> >>> This property could be defined by classlib code, and VM would use its >>> value in class loader instead of hardcoded class version. >> Hmm now that I think of it there may be a recursion. To get a value of >> java.class.version VM would need to load at least some classes from >> classlib which would require knowing the supported class version of VM >> side. But this property could be supplied by the launcher from the VM >> command line. >> >> Launcher is still a part of classlib so there may be different version >> of for Java5 and Java6. > > I wasn't thinking of running any java code to supply it, but how early > do you need to know? Is it too late after create java vm? How about we > notify you in the class library JNI_OnLoad for LUNI, i.e. call into the > VM and set the java.class.version using the VMI functions. > > I'm reluctant to add extra login in the launcher since the VM should > work equivalently when embedded in anyone's program. This could work well if JNI_OnLoad for LUNI works before any Java code is loaded. I think it works this way currently because when bootstrap class loader initializes it loads bootstrap native libraries, LUNI first of all. I think it is the best solution! -- Gregory