summaryrefslogtreecommitdiffstats
path: root/docs/tutorial/OCamlLangImpl3.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/tutorial/OCamlLangImpl3.html')
-rw-r--r--docs/tutorial/OCamlLangImpl3.html13
1 files changed, 7 insertions, 6 deletions
diff --git a/docs/tutorial/OCamlLangImpl3.html b/docs/tutorial/OCamlLangImpl3.html
index 9caae43..a598875 100644
--- a/docs/tutorial/OCamlLangImpl3.html
+++ b/docs/tutorial/OCamlLangImpl3.html
@@ -95,8 +95,8 @@ an undeclared parameter):</p>
<pre>
exception Error of string
-let the_module = create_module "my cool jit"
-let builder = builder ()
+let the_module = create_module (global_context ()) "my cool jit"
+let builder = builder (global_context ())
let named_values:(string, llvalue) Hashtbl.t = Hashtbl.create 10
</pre>
</div>
@@ -159,7 +159,7 @@ uses "the foo::get(..)" idiom instead of "new foo(..)" or "foo::Create(..)".</p>
</div>
<p>References to variables are also quite simple using LLVM. In the simple
-version of Kaleidoscope, we assume that the variable has already been emited
+version of Kaleidoscope, we assume that the variable has already been emitted
somewhere and its value is available. In practice, the only values that can be
in the <tt>Codegen.named_values</tt> map are function arguments. This code
simply checks to see that the specified name is in the map (if not, an unknown
@@ -323,7 +323,7 @@ code above.</p>
first, we want to allow 'extern'ing a function more than once, as long as the
prototypes for the externs match (since all arguments have the same type, we
just have to check that the number of arguments match). Second, we want to
-allow 'extern'ing a function and then definining a body for it. This is useful
+allow 'extern'ing a function and then defining a body for it. This is useful
when defining mutually recursive functions.</p>
<div class="doc_code">
@@ -899,8 +899,9 @@ open Llvm
exception Error of string
-let the_module = create_module "my cool jit"
-let builder = builder ()
+let context = global_context ()
+let the_module = create_module context "my cool jit"
+let builder = builder context
let named_values:(string, llvalue) Hashtbl.t = Hashtbl.create 10
let rec codegen_expr = function
OpenPOWER on IntegriCloud