totalcross icon indicating copy to clipboard operation
totalcross copied to clipboard

Native support for lambda expressions

Open flsobral opened this issue 4 years ago • 0 comments

  • Make the deployer aware of bytecodes required for Java 8
    • [x] MethodType
    • [x] MethodHandle
    • [x] InvokeDynamic
  • Add classes from package 'invoke' required for invoke dynamic
    • [ ] MethodHandle
    • [ ] MethodType
    • [ ] MethodHandles
    • [ ] LambdaMetafactory
    • [ ] CallSite
  • [ ] Mock implementation for LambdaMetafactory that just prints the arguments received and returns a hard coded noop CallSite
  • [ ] Make the vm aware of the existence of CallSites and able to execute them (maybe we could just make the deployer convert the InvokeDynamic call into a InvokeStatic call and let the vm bind the CallSite to the native method structure)
  • [ ] Add a couple of hard coded CallSites to test the InvokeDynamic execution. The expected result is for the LambdaMetafactory to correctly route calls to the hard coded CallSites (either with the correct implementation or the noop) and execute the CallSite
  • [ ] Implement LambdaMetafactory (that almost seems too trivial, probably will need to add details later)

flsobral avatar Mar 29 '21 16:03 flsobral