MethodType and others
向雅
fyaoxy at gmail.com
Fri May 11 09:22:28 PDT 2012
Today checkout some messages, and browse the mlvm jdk patches.
Seems I slow the step, the MethodType changed by weak style.
Again, really not enough, The internal weakset can do more work, since
it be there, let the internal self be a KEY to just like this: synch{
internTable.get(type.... types)}.
There is no necessary to create a new MethodType gc-ed object.
Maybe when the change occurs, I buzy in my bytecode library, so maybe
ignore something.
I found there have some like thing in the LF.
In my library there have a factory builder, and less wrapper object.
I think the vm runtime more need the style than my library.
again BTW, the MH constant seems use full visibility Lookup, my feel
at least util now. If so, you know, bad?
again, BTW, people in jdk project really like cp code? two many cp
code in rt! it's a really cp?
致敬
向雅
2012/4/24 向雅 <fyaoxy at gmail.com>:
> Hi,
> Design of MethodType have problems:
> 1, the immutable have more execution time.
> 2, It will prevent loader from gc-ing.
>
> why?
> 1, in methodType(*) creation methods, every temp rubbish MethodType
> immutable will take more time, There must have more people know more
> about it.
> There need a true factory for MethodType,
> In my implementation, it will be:
> MTFactory extends ArrayList<Class>{ Class rtype;
> hashCode(){}
> equals(){}
> methodType(*){
> rtype=returnType, addAll(types);
> result=internTable.get(this);
> if(result!=null) return result;
> ...
> }
> }
> And the factory far away the global singleton, so the point 2 not
> problem any more.
> As to how to hold your MTFactory, it's your biz, OK?
>
>
> BTW:
> 1, JVMS7 StackMapTable attribute chapter say: it's can be ignore even
> if >=java7.
> But in 4.10.1 say like this : must verify the stack frame map, if
> not, error reported.
> So who is the stupid PM?
>
> 2, Lamda is just a tool, If the tool changed to the target, the nature
> of tool is lose!
>
> 3, can you redesign the BootstrapMethods? it's just a CallSiteFactory. KISS.
> Since it's a factory, so there are rich factory pattern and factory
> method implementations.
> Why not limit it static or new style? In nature the new is static of Class.
> My advice, when redesign, clear the concepts:
> MethodHandle just a invoke* instruction.
> MethodType is just FunctionType. dont just for OO so OO.
> BootstrapMethod is right the CallSiteFactory, it's nothing.
> So if it factorized, the static limitation will removed.
>
> 4, Again, I hope JDK team not follow the way of MSh.
> Many people must admit, there are some guys in Msh really smarter than
> most people(include myself). But what about the thing? Msh just not
> let the thing worse, but never have capability to make thing better.
> so even if genius, so what?
> And chinan say: The smarter will kill yourself.
> And I known, some one in the lists not like me. Not a matter. The
> idiot think of all as idiot. That make it funny.
>
> OK, If wrong, pls correct me if you will. I will happy to say thanks.
>
> Best,
> Qinxian
More information about the mlvm-dev
mailing list