Skip to content

Commit

Permalink
doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
dibyendumajumdar committed Jun 9, 2024
1 parent 25953d5 commit 69ec359
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ History
* 2021
- Integrated AOT and JIT compilation support
- `Embedded C syntax <https://github.com/dibyendumajumdar/ravi-compiler/wiki/Embedding-C>`_
* 2022-2023
* Future
- Improve Embedded C support with more validation
- Improve tests and documentation overall
- Ensure new compiler is production grade (i.e. always generates correct code)
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/ravi-overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ History
* 2021
- Integrated AOT and JIT compilation support
- `Embedded C syntax <https://github.com/dibyendumajumdar/ravi-compiler/wiki/Embedding-C>`_
* 2022 (plan)
* Future
- Improve Embedded C support with more validation
- Improve tests and documentation overall
- Ensure new compiler is production grade (i.e. always generates correct code)
Expand Down
11 changes: 7 additions & 4 deletions readthedocs/ravi-reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -552,11 +552,14 @@ Generate Parse Tree
JIT Compilation
---------------

``compiler.load(code: string)``
``compiler.load(code: string [, options: string])``
JIT compiles a chunk of code and returns a closure on the stack representing the compiled output.
``compiler.loadfile(filename: string)``
Options available are `--dump-ir` to display the intermediate code in the output.
`--verbose` will dump out the generated C code.
``compiler.loadfile(filename: string [, options: string])``
Opens the named file and JIT compiles its content as a Lua chunk. Returns a closure on the stack representing the compiled output.

The available options are the same as with `compiler.load()`.

AOT Compilation
---------------

Expand Down Expand Up @@ -584,7 +587,7 @@ JIT Examples

Here is an example of a simple JIT compile session::

f = compiler.load("print 'hello'")
f = compiler.load("print 'hello'", '--verbose --dump-ir')
assert(f and type(f) == 'function')
f()
Expand Down

0 comments on commit 69ec359

Please sign in to comment.