public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: Per Bothner <per@bothner.com>
To: kawa@sourceware.org
Subject: invoke branch (was: proposal: move Kawa from Subversion to git on gitlab.com)
Date: Wed, 16 Nov 2016 00:53:00 -0000	[thread overview]
Message-ID: <22f35926-8547-f186-3dc4-9a6a3dccd290@bothner.com> (raw)
In-Reply-To: <78ea0d4a-59ac-dd51-bd2e-d9790788c437@bothner.com>

I checked into the invoke branch a change that does this.
It builds and passes the tests using Java 6 (except some Unicode tests).
I assume Android will also work.

We use reflection rather than MethodHandles, which I assume will be slower.

It would be useful to have some sample programs we can benchmark.
We need some numbers of the performance of the invoke branch
compared to the old way (in the trunk) - both Java 6 and Java 8,
both --full-tailcalls and not.


On 11/12/2016 09:06 PM, Per Bothner wrote:
> 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/

  reply	other threads:[~2016-11-16  0:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-13  0:59 proposal: move Kawa from Subversion to git on gitlab.com Per Bothner
2016-11-13  4:42 ` Jamison Hope
2016-11-13  5:06   ` Per Bothner
2016-11-16  0:53     ` Per Bothner [this message]
2016-11-13 17:51 ` David Pirotte
2016-11-13 22:55 ` Charlie Turner
2016-11-13 23:37   ` Per Bothner
2016-11-22 16:57   ` please checkout Kawa from gitlab.com Per Bothner
2016-11-22 22:12     ` David Pirotte
2016-11-23  7:42       ` Per Bothner
2016-11-23 13:17         ` make kawa-manual.epub (Re: please checkout Kawa from gitlab.com) Sudarshan S Chawathe
2016-11-23 18:05           ` Per Bothner
2016-11-27  6:07             ` Per Bothner
2016-11-25  1:33     ` please checkout Kawa from gitlab.com Kumar Appaiah
2016-11-25  5:33       ` Per Bothner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=22f35926-8547-f186-3dc4-9a6a3dccd290@bothner.com \
    --to=per@bothner.com \
    --cc=kawa@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).