Last updated November 19, 2009 07:06, by jrose
Feedicon  

Experiments with JSR 292 and Rhino Wiki

Contents

Fetching and Building

We use Mercurial to manage code, same as for the Da Vinci Machine Project. You may need to install it first. The with the patch queue extension must be turned on.

Experiment Notes


 $ cd my-workspace-folder
 $ hg clone https://hg.kenai.com/hg/davincimonkey~rhino dm-rhino
 $ cd dm-rhino
 $ hg clone https://hg.kenai.com/hg/davincimonkey~patches ./.hg/patches
 $ hg qpush --all  # apply all the patches

Working with files:

 $ hg loc ScriptRuntime.java  # display pathname of some file
 $ hg qnew mynewexperiment.patch  # start a new patch
 $ vi $(hg loc ScriptRuntime.java)
 $ hg qrefresh  # push changes into your patch

Remarks

Maybe we can eventually use a real MOP for this.

Thanks are due to Google's Chuck Rasbold who discovered the following curious identity:

 MethodHandle f = collectArguments(Arrays#asList, genericMethodType(13));
 MethodHandle g = permuteArguments(f, new int[]{6,9,2,0,1,12,11,10,3,8,4,5,7});
 Object a='a',c='c',d='d',e='e',i='i',k='k',m='m',n='n',o='o',v='v',y='y';
 Object fval = f.invokeExact(d,a,v,i,n,c,i,m,o,n,k,e,y);
 Object gval = g.invokeExact(i,n,v,o,k,e,d,y,n,a,m,i,c);
 //                          0 1 2 3 4 5 6 7 8 9 A B C
 assert fval.equals(gval);
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120518.3c65429)
 
 
Close
loading
Please Confirm
Close