From 69ec359834299f79b2fa1ddbd92e8f391d47cd0e Mon Sep 17 00:00:00 2001 From: dibyendumajumdar Date: Sun, 9 Jun 2024 18:29:48 +0100 Subject: [PATCH] doc update --- README.rst | 2 +- readthedocs/ravi-overview.rst | 2 +- readthedocs/ravi-reference.rst | 11 +++++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index d3b19b5f..132411ec 100644 --- a/README.rst +++ b/README.rst @@ -131,7 +131,7 @@ History * 2021 - Integrated AOT and JIT compilation support - `Embedded C syntax `_ -* 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) diff --git a/readthedocs/ravi-overview.rst b/readthedocs/ravi-overview.rst index 4ffe9de6..132411ec 100644 --- a/readthedocs/ravi-overview.rst +++ b/readthedocs/ravi-overview.rst @@ -131,7 +131,7 @@ History * 2021 - Integrated AOT and JIT compilation support - `Embedded C syntax `_ -* 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) diff --git a/readthedocs/ravi-reference.rst b/readthedocs/ravi-reference.rst index c077e1e3..41456830 100644 --- a/readthedocs/ravi-reference.rst +++ b/readthedocs/ravi-reference.rst @@ -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 --------------- @@ -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()