Re: How do I use the new @BootstrapMethod annotation?

2010-11-16 Thread assembling signals
John, thank you a lot for such an effort with that example! I will try this later. But first, I have few non-technical questions about JSR-292 in JDK7. (Sorry, I'm not sure, if these questions has been asked a lot already.) 1) Which JSR-292 features will people be able to use with standard (non

How do I use the new @BootstrapMethod annotation?

2010-11-12 Thread assembling signals
Hello! Sorry, but I seem not to understand the description of @BootstrapMethod javadoc. I declare a class with a static method (which returns a CallSite). The class from which InvokeDynamic is performed is annotated with the new annotation. Error is: java.lang.IllegalStateException: no bootstrap

Re: Few questions about invokeDynamic

2010-11-09 Thread assembling signals
Remi, with your suggestion and the workaround the bug (by returning int), here the updated "benchmark". Works, but still much slower than usual reflection. The new code is under doDynSyntaxSpread() and displayed as "invoke dynamic syntax: spread". Output is at the end. = = = = = = = = = = CODE

Re: Few questions about invokeDynamic

2010-11-08 Thread assembling signals
Ok, I extended my "benchmark" to support a method handle with spread args, and this part slower than everything else :( Note: I use Object[] for spread arguments, because in my real-world scenario, as mentioned before, I would need any possible method signature to work. Sadly, I still couldn't fi

Re: Few questions about invokeDynamic

2010-11-08 Thread assembling signals
> Le 08/11/2010 07:43, John Rose a écrit : > > On Nov 7, 2010, at 1:17 AM, assembling signals wrote: > > > >> For the use case "calling a method whose signature is unknown prior to > runtime" > >> (such as some lib, loaded externally) : > &

Re: Few questions about invokeDynamic

2010-11-07 Thread assembling signals
07.11.10, 14:58, "Rémi Forax" : > Works with javac. Do you use it ? Hm, strange, I thought Netbeans would use the usual javac, but now I guess it uses some API calls to compile files. Because using javac from command line works indeed! > Why do you want to call a method with a signature whic

Re: Few questions about invokeDynamic

2010-11-07 Thread assembling signals
Hello again! For that compiler error which you could reproduce, will you file a bug report, or is the API that much under change currently, that it's not relevant yet? Sorry, the proposed workaround produces same error for me. For the use case "calling a method whose signature is unknown prior t

Re[2]: Few questions about invokeDynamic

2010-11-06 Thread assembling signals
Remi, thank you a lot for such a quick reply! I tried to do what you suggested, but it keeps failing. Note, that I don't use some customized build, but instead, as also mentionen in previous mail, JDK7 b116. Could you please try the code by yourself? It's a single class. Thanks again! = = =

Few questions about invokeDynamic

2010-11-06 Thread assembling signals
Hello, everyone! I couldn't find information about several issues, so I'll ask here for help: I'm using JDK7 b116. When using MethodHandle.invokeExact(...), I can only invoke a method, which signature is "Object (Object[])", anything else fails with: WrongMethodTypeException: ()V cannot be c