jit documentation fixes

gcc/jit/ChangeLog:
	* docs/cp/intro/tutorial03.rst: Add missing arguments to
	gccjit::block::end_with_conditional call.  Add on_true/on_false
	comments.  Tweak the wording.
	* docs/intro/tutorial03.rst: Add missing arguments to
	gcc_jit_block_end_with_conditional call.  Add some clarifying
	comments.
	* docs/topics/compilation.rst: Tweak the wording to avoid an
	ambiguous use of "this".
	* docs/topics/contexts.rst: Fix a typo.
	* docs/topics/expressions.rst (GCC_JIT_BINARY_OP_MINUS): Remove
	a stray backtick.
	* docs/_build/texinfo/libgccjit.texi: Regenerate.

From-SVN: r221218
This commit is contained in:
David Malcolm 2015-03-05 15:38:15 +00:00 committed by David Malcolm
parent d81177988c
commit 7ef9618369
7 changed files with 398 additions and 358 deletions

View File

@ -1,3 +1,18 @@
2015-03-05 David Malcolm <dmalcolm@redhat.com>
* docs/cp/intro/tutorial03.rst: Add missing arguments to
gccjit::block::end_with_conditional call. Add on_true/on_false
comments. Tweak the wording.
* docs/intro/tutorial03.rst: Add missing arguments to
gcc_jit_block_end_with_conditional call. Add some clarifying
comments.
* docs/topics/compilation.rst: Tweak the wording to avoid an
ambiguous use of "this".
* docs/topics/contexts.rst: Fix a typo.
* docs/topics/expressions.rst (GCC_JIT_BINARY_OP_MINUS): Remove
a stray backtick.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
PR libgomp/64625

File diff suppressed because it is too large Load Diff

View File

@ -238,7 +238,9 @@ and can then use this to add `b_loop_cond`'s sole statement, via
.. code-block:: c++
b_loop_cond.end_with_conditional (guard);
b_loop_cond.end_with_conditional (guard,
b_after_loop, // on_true
b_loop_body); // on_false
However :type:`gccjit::rvalue` has overloaded operators for this, so we
express the conditional as
@ -247,14 +249,14 @@ express the conditional as
gccjit::rvalue guard = (i >= n);
and hence write the block more concisely as:
and hence we can write the block more concisely as:
.. code-block:: c++
b_loop_cond.end_with_conditional (
i >= n,
b_after_loop,
b_loop_body);
b_after_loop, // on_true
b_loop_body); // on_false
Next, we populate the body of the loop.

View File

@ -229,6 +229,7 @@ We build the comparison using :c:func:`gcc_jit_context_new_comparison`:
.. code-block:: c
/* (i >= n) */
gcc_jit_rvalue *guard =
gcc_jit_context_new_comparison (
ctxt, NULL,
@ -241,7 +242,16 @@ and can then use this to add `b_loop_cond`'s sole statement, via
.. code-block:: c
gcc_jit_block_end_with_conditional (b_loop_cond, NULL, guard);
/* Equivalent to:
if (guard)
goto after_loop;
else
goto loop_body; */
gcc_jit_block_end_with_conditional (
b_loop_cond, NULL,
guard,
b_after_loop, /* on_true */
b_loop_body); /* on_false */
Next, we populate the body of the loop.

View File

@ -37,7 +37,7 @@ In-memory compilation
This calls into GCC and builds the code, returning a
`gcc_jit_result *`.
If this is non-NULL, the caller becomes responsible for
If the result is non-NULL, the caller becomes responsible for
calling :func:`gcc_jit_result_release` on it once they're done
with it.

View File

@ -138,7 +138,7 @@ be responsible for all of the rest:
If no errors occurred, this will be NULL.
If you are wrapping the C API for a higher-level language that supports
exception-handling, you may instead by interested in the last error that
exception-handling, you may instead be interested in the last error that
occurred on the context, so that you can embed this in an exception:
.. function:: const char *\

View File

@ -233,7 +233,7 @@ Binary Operation C equivalent
For pointer addition, use :c:func:`gcc_jit_context_new_array_access`.
.. c:macro:: GCC_JIT_BINARY_OP_MINUS`
.. c:macro:: GCC_JIT_BINARY_OP_MINUS
Subtraction of arithmetic values; analogous to: