Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Lowcode 
Redoing NativeBoost Portably 
Ronie Salgado
The Current FFI Problem 
● SqueakFFI/ThreadedFFI, Alien, NativeBoost. 
● The callbacks 
● Performance 
● Raw memory manipu...
Ways of interfacing with C 
● Extend the Interpreter. Done in Java(JNI), Lua, 
Python 
● Just call. Done in .Net, D
Extending the Interpreter 
Python Example. Source: https://docs.python.org/2/extending/extending.html
Just Calling
Why I do not like NativeBoost
More Portable
What I would like to do 
ffiFloat32AtOffsetPut: zeroBasedOffset put: value 
(float*)self atOffset: zeroBasedOffset put: va...
What I also want to do 
ffiFloat32AtOffsetPut: zeroBasedOffset put: value { 
((float*)self)[0] = value; 
}
How it is done 
● Extend the Sista Extended Bytecode set. 
● Expose basic CPU primitive type. 
● Implemented in the VM. 
●...
Many Backends 
● C Interpreter plugin. (Done) 
● C++ LLVM plugin. (Done) 
● VirtualCPU. (Incomplete) 
● StackInterpreter. ...
Upcoming SlideShare
Loading in …5
×

Lowcode: Redoing NativeBoost Portably

708 views

Published on

Show Us Your Project, ESUG 2014, Cambridge
Speaker: Ronie Salgado

Published in: Software
  • Be the first to comment

  • Be the first to like this

Lowcode: Redoing NativeBoost Portably

  1. 1. Lowcode Redoing NativeBoost Portably Ronie Salgado
  2. 2. The Current FFI Problem ● SqueakFFI/ThreadedFFI, Alien, NativeBoost. ● The callbacks ● Performance ● Raw memory manipulation?
  3. 3. Ways of interfacing with C ● Extend the Interpreter. Done in Java(JNI), Lua, Python ● Just call. Done in .Net, D
  4. 4. Extending the Interpreter Python Example. Source: https://docs.python.org/2/extending/extending.html
  5. 5. Just Calling
  6. 6. Why I do not like NativeBoost
  7. 7. More Portable
  8. 8. What I would like to do ffiFloat32AtOffsetPut: zeroBasedOffset put: value (float*)self atOffset: zeroBasedOffset put: value The actual syntax has to be discussed.
  9. 9. What I also want to do ffiFloat32AtOffsetPut: zeroBasedOffset put: value { ((float*)self)[0] = value; }
  10. 10. How it is done ● Extend the Sista Extended Bytecode set. ● Expose basic CPU primitive type. ● Implemented in the VM. ● Implemented in plugins.
  11. 11. Many Backends ● C Interpreter plugin. (Done) ● C++ LLVM plugin. (Done) ● VirtualCPU. (Incomplete) ● StackInterpreter. (ToDo) ● Cogit. (ToDo)

×