Re: idea: MethodHandle#invokeTailCall

2013-05-12 Thread Per Bothner
On 05/11/2013 02:00 AM, Charles Oliver Nutter wrote: > On Fri, May 10, 2013 at 7:16 PM, Per Bothner > wrote: > > Fail hard is probably the wrong thing to do - except when debugging. > I think what you want is the default to not fail if it can't pop > the stack

Re: idea: MethodHandle#invokeTailCall

2013-05-11 Thread Alexander Turner
Remi, You are so correct! However - I was talking about CI no jee :) On Saturday, 11 May 2013, Remi Forax wrote: > On 05/11/2013 12:24 PM, Alexander Turner wrote: > > Hi Per, the snag with expecting code to be inlined is that so much of > > modern JVM work uses instrumentation. If the JVM will i

Re: idea: MethodHandle#invokeTailCall

2013-05-11 Thread Remi Forax
On 05/11/2013 12:24 PM, Alexander Turner wrote: > Hi Per, the snag with expecting code to be inlined is that so much of > modern JVM work uses instrumentation. If the JVM will inline the non > instrumented code it probably will not / cannot do so for instrumented > code. Thus code coverage and p

Re: idea: MethodHandle#invokeTailCall

2013-05-11 Thread Charles Oliver Nutter
On Fri, May 10, 2013 at 7:16 PM, Per Bothner wrote: > Fail hard is probably the wrong thing to do - except when debugging. > I think what you want is the default to not fail if it can't pop > the stack frame, but that there be a VM option to throw an Error > or even do a VM abort in those case.

Re: idea: MethodHandle#invokeTailCall

2013-05-10 Thread Per Bothner
On 05/10/2013 01:32 PM, Charles Oliver Nutter wrote: > Interesting idea...comments below. > > On Fri, May 10, 2013 at 12:44 PM, Per Bothner > wrote: > > So this idea come to me: Could we just have add a method > that tail-calls a MethodHandle? Maybe some variant o

Re: idea: MethodHandle#invokeTailCall

2013-05-10 Thread Charles Oliver Nutter
Interesting idea...comments below. On Fri, May 10, 2013 at 12:44 PM, Per Bothner wrote: > So this idea come to me: Could we just have add a method > that tail-calls a MethodHandle? Maybe some variant of >MethodHandle#invokeAsTailCall(Object... ) > This doesn't require instruction-set or cla