From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 109122 invoked by alias); 13 Nov 2016 05:06:57 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 109078 invoked by uid 89); 13 Nov 2016 05:06:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=reflection, Hx-languages-length:1004, gross X-HELO: aibo.runbox.com Received: from aibo.runbox.com (HELO aibo.runbox.com) (91.220.196.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 13 Nov 2016 05:06:45 +0000 Received: from [10.9.9.212] (helo=mailfront12.runbox.com) by bars.runbox.com with esmtp (Exim 4.71) (envelope-from ) id 1c5n06-0002HI-I8 for kawa@sourceware.org; Sun, 13 Nov 2016 06:06:42 +0100 Received: from 70-36-239-8.dsl.dynamic.fusionbroadband.com ([70.36.239.8] helo=toshie.bothner.com) by mailfront12.runbox.com with esmtpsa (uid:757155 ) (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) id 1c5mzt-0002wQ-FY for kawa@sourceware.org; Sun, 13 Nov 2016 06:06:29 +0100 Subject: Re: proposal: move Kawa from Subversion to git on gitlab.com To: kawa@sourceware.org References: <87fe287f-2aa8-3462-ceeb-66e3982ddaeb@bothner.com> <3AAB063E-7110-44CD-81D9-BB9BCFCE9948@theptrgroup.com> From: Per Bothner Message-ID: <78ea0d4a-59ac-dd51-bd2e-d9790788c437@bothner.com> Date: Sun, 13 Nov 2016 05:06:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <3AAB063E-7110-44CD-81D9-BB9BCFCE9948@theptrgroup.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-q4/txt/msg00055.txt.bz2 On 11/12/2016 08:41 PM, Jamison Hope wrote: > Re MethodHandles, I use Kawa on some computers at work that are stuck > with RHEL 6 + Java 6, so please don't break it! Noted! One idea I had is to define a fake MethodHandle class: public class CallContext { .... /* #ifndef use:java.lang.invoke */ // public static abstract class MethodHandle { // public abstract Object invokeExact(Procedure proc, CallContext ctx); // }; /* #endif */ } And in code that uses it: /* #ifdef use:java.lang.invoke */ import java.lang.invoke.Methodhandle; /* #else */ // import gnu.mapping.CallContext.MethodHandle; /* #endif */ It's rather gross but it reduces the places where PreProcessing conditionals would be needed to clutter up the code. (Actual typedefs would be cleaner.) A concrete class that extends CallContext.MethodHandle might use reflection, but it could also be compiler-generated. -- --Per Bothner per@bothner.com http://per.bothner.com/