On 2010.03.25., at 18:33, Charles Oliver Nutter wrote:
> Speaking of that...I was surprised there's no baseline bootstrap
> method built into dynalang/invoke. It was a trivial amount of code to
> write, but I can imagine a lot of simple uses of dynalang/invoke will
> just want to use the standard multimethod Java dispatch directly. If I
> put together a patch to include my DynalangBootstrap.java, will you
> accept it? (or maybe I have commit rights and I don't know it?)
I did give tips for usage in DynamicLinker javadoc; the simplest you can get is:
public class MyLanguageRuntime {
private static final DynamicLinker dynamicLinker = new
DynamicLinkerFactory().createLinker();
public static CallSite bootstrap(Object caller, String name, MethodType
type) {
RelinkableCallSite callSite = new MonomorphicCallSite(caller, name,
type);
dynamicLinker.link(callSite);
return callSite;
}
}
and then every class just does:
public class MyClass {
static {
Linkage.registerBootstrapMethod(MyLanguageRuntime.class, "bootstrap");
}
...
}
> P.S. Switch to git :)
I will; I certainly have the intent. I do have an account on github, I created
it to fork Syrinx last year to integrate it with MOP :-) I'm still learning it
(Git, that is). As I lamented elsewhere: first I encountered CVS[*]. By the
time I mastered CVS, Subversion comes along. By the time I decently learned
Subversion, I need Mercurial (for MLVM). By the time I grasp enough Mercurial
to check out OpenJDK and apply MLVM patches, cool kids go Git. It's hard
keeping up with the version control system fashion... :-)
What (if any) IDE integration do you use with Git?
Attila.
[*] Actually, first was SourceSafe, but I prefer to forget mentioning that.
>
> - Charlie
_______________________________________________
mlvm-dev mailing list
[email protected]
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev