database-stream-processor icon indicating copy to clipboard operation
database-stream-processor copied to clipboard

[JIT] Design document

Open ryzhyk opened this issue 1 year ago • 2 comments

Document JIT architecture and API. The doc should serve two purposes:

  • Explain the semantics of the bytecode supported by the JIT compiler and the architecture of the compiler. This should give the reader enough information to be able to understand the source code of the compiler.
  • Explain how a frontend (e.g., the SQL compiler) and a runtime (e.g., the DBSP pipeline runner) should interact with JIT.
  • Topics to cover
  • [ ] String allocation and string lifetimes
  • [ ] Block parameters and arguments
  • [ ] How to run a JIT program
  • [ ] How nested tuples can be implemented using the JIT
  • [ ] How to call functions which are not built-in into the JIT (if there will be such functions), e.g., from the SQL runtime library
  • [ ] How datatypes such as DECIMAL can be implemented
  • [ ] How to pass tuples as function arguments

ryzhyk avatar May 02 '23 20:05 ryzhyk