@copying
@quotation
-libgccjit 5.0.0 (experimental 20150409), April 09, 2015
+libgccjit 6.0.0 (experimental 20150630), June 30, 2015
David Malcolm
If you don't need to specify the location, this can also be expressed using
an overloaded operator:
-
-@deffn {C++ Function} gccjit::lvalue gccjit::rvalue::operator* ();
+@geindex gccjit;;rvalue;;operator* (C++ function)
+@anchor{cp/topics/expressions gccjit rvalue mul-operator}@anchor{175}
+@deffn {C++ Function} gccjit::lvalue gccjit::rvalue::operator* ()
@example
gccjit::lvalue content = *ptr;
Field access is provided separately for both lvalues and rvalues:
@geindex gccjit;;lvalue;;access_field (C++ function)
-@anchor{cp/topics/expressions gccjit lvalue access_field__gccjit field gccjit location}@anchor{175}
+@anchor{cp/topics/expressions gccjit lvalue access_field__gccjit field gccjit location}@anchor{176}
@deffn {C++ Function} gccjit::lvalue gccjit::lvalue::access_field (gccjit::field field, gccjit::location loc)
Given an lvalue of struct or union type, access the given field,
@end deffn
@geindex gccjit;;rvalue;;access_field (C++ function)
-@anchor{cp/topics/expressions gccjit rvalue access_field__gccjit field gccjit location}@anchor{176}
+@anchor{cp/topics/expressions gccjit rvalue access_field__gccjit field gccjit location}@anchor{177}
@deffn {C++ Function} gccjit::rvalue gccjit::rvalue::access_field (gccjit::field field, gccjit::location loc)
Given an rvalue of struct or union type, access the given field
@end deffn
@geindex gccjit;;rvalue;;dereference_field (C++ function)
-@anchor{cp/topics/expressions gccjit rvalue dereference_field__gccjit field gccjit location}@anchor{177}
+@anchor{cp/topics/expressions gccjit rvalue dereference_field__gccjit field gccjit location}@anchor{178}
@deffn {C++ Function} gccjit::lvalue gccjit::rvalue::dereference_field (gccjit::field field, gccjit::location loc)
Given an rvalue of pointer type @code{T *} where T is of struct or union
@end deffn
@geindex gccjit;;context;;new_array_access (C++ function)
-@anchor{cp/topics/expressions gccjit context new_array_access__gccjit rvalue gccjit rvalue gccjit location}@anchor{178}
+@anchor{cp/topics/expressions gccjit context new_array_access__gccjit rvalue gccjit rvalue gccjit location}@anchor{179}
@deffn {C++ Function} gccjit::lvalue gccjit::context::new_array_access (gccjit::rvalue ptr, gccjit::rvalue index, gccjit::location loc)
Given an rvalue of pointer type @code{T *}, get at the element @cite{T} at
@c <http://www.gnu.org/licenses/>.
@node Creating and using functions<2>,Source Locations<2>,Expressions<2>,Topic Reference<2>
-@anchor{cp/topics/functions doc}@anchor{179}@anchor{cp/topics/functions creating-and-using-functions}@anchor{17a}
+@anchor{cp/topics/functions doc}@anchor{17a}@anchor{cp/topics/functions creating-and-using-functions}@anchor{17b}
@subsection Creating and using functions
@end menu
@node Params<2>,Functions<2>,,Creating and using functions<2>
-@anchor{cp/topics/functions params}@anchor{17b}
+@anchor{cp/topics/functions params}@anchor{17c}
@subsubsection Params
@geindex gccjit;;param (C++ class)
-@anchor{cp/topics/functions gccjit param}@anchor{17c}
+@anchor{cp/topics/functions gccjit param}@anchor{17d}
@deffn {C++ Class} gccjit::param
A @cite{gccjit::param} represents a parameter to a function.
given type and name.
@end deffn
-@pxref{17c,,gccjit;;param} is a subclass of @pxref{16f,,gccjit;;lvalue} (and thus
+@pxref{17d,,gccjit;;param} is a subclass of @pxref{16f,,gccjit;;lvalue} (and thus
of @pxref{137,,gccjit;;rvalue} and @pxref{121,,gccjit;;object}). It is a thin
wrapper around the C API's @pxref{25,,gcc_jit_param *}.
@node Functions<2>,Blocks<2>,Params<2>,Creating and using functions<2>
-@anchor{cp/topics/functions functions}@anchor{17d}
+@anchor{cp/topics/functions functions}@anchor{17e}
@subsubsection Functions
@geindex gccjit;;function (C++ class)
-@anchor{cp/topics/functions gccjit function}@anchor{17e}
+@anchor{cp/topics/functions gccjit function}@anchor{17f}
@deffn {C++ Class} gccjit::function
A @cite{gccjit::function} represents a function - either one that we're
creating ourselves, or one that we're referencing.
@end deffn
-
-@deffn {C++ Function} gccjit::function gccjit::context::new_function (enum gcc_jit_function_kind, gccjit::type return_type, const char *name, std::vector<param> ¶ms, int is_variadic, gccjit::location loc) \
+@geindex gccjit;;context;;new_function (C++ function)
+@anchor{cp/topics/functions gccjit context new_function__enum gccjit type cCP std vector param R i gccjit location}@anchor{180}
+@deffn {C++ Function} gccjit::function gccjit::context::new_function (enum gcc_jit_function_kind, gccjit::type return_type, const char* name, std::vector<param>& params, int is_variadic, gccjit::location loc)
Create a gcc_jit_function with the given name and parameters.
@end deffn
@geindex gccjit;;context;;get_builtin_function (C++ function)
-@anchor{cp/topics/functions gccjit context get_builtin_function__cCP}@anchor{17f}
+@anchor{cp/topics/functions gccjit context get_builtin_function__cCP}@anchor{181}
@deffn {C++ Function} gccjit::function gccjit::context::get_builtin_function (const char* name)
This is a wrapper around the C API's
@end deffn
@geindex gccjit;;function;;get_param (C++ function)
-@anchor{cp/topics/functions gccjit function get_param__iC}@anchor{180}
+@anchor{cp/topics/functions gccjit function get_param__iC}@anchor{182}
@deffn {C++ Function} gccjit::param gccjit::function::get_param (int index) const
Get the param of the given index (0-based).
@end deffn
@node Blocks<2>,Statements<2>,Functions<2>,Creating and using functions<2>
-@anchor{cp/topics/functions blocks}@anchor{181}
+@anchor{cp/topics/functions blocks}@anchor{183}
@subsubsection Blocks
@geindex gccjit;;block (C++ class)
-@anchor{cp/topics/functions gccjit block}@anchor{182}
+@anchor{cp/topics/functions gccjit block}@anchor{184}
@deffn {C++ Class} gccjit::block
A @cite{gccjit::block} represents a basic block within a function i.e. a
sequence of statements with a single entry point and a single exit
point.
-@pxref{182,,gccjit;;block} is a subclass of @pxref{121,,gccjit;;object}.
+@pxref{184,,gccjit;;block} is a subclass of @pxref{121,,gccjit;;object}.
The first basic block that you create within a function will
be the entrypoint.
@end deffn
@geindex gccjit;;function;;new_block (C++ function)
-@anchor{cp/topics/functions gccjit function new_block__cCP}@anchor{183}
+@anchor{cp/topics/functions gccjit function new_block__cCP}@anchor{185}
@deffn {C++ Function} gccjit::block gccjit::function::new_block (const char* name)
Create a basic block of the given name. The name may be NULL, but
@end deffn
@node Statements<2>,,Blocks<2>,Creating and using functions<2>
-@anchor{cp/topics/functions statements}@anchor{184}
+@anchor{cp/topics/functions statements}@anchor{186}
@subsubsection Statements
@end deffn
@geindex gccjit;;block;;end_with_jump (C++ function)
-@anchor{cp/topics/functions gccjit block end_with_jump__gccjit block gccjit location}@anchor{185}
+@anchor{cp/topics/functions gccjit block end_with_jump__gccjit block gccjit location}@anchor{187}
@deffn {C++ Function} void gccjit::block::end_with_jump (gccjit::block target, gccjit::location loc)
Terminate a block by adding a jump to the given target block.
@end deffn
@geindex gccjit;;block;;end_with_return (C++ function)
-@anchor{cp/topics/functions gccjit block end_with_return__gccjit rvalue gccjit location}@anchor{186}
+@anchor{cp/topics/functions gccjit block end_with_return__gccjit rvalue gccjit location}@anchor{188}
@deffn {C++ Function} void gccjit::block::end_with_return (gccjit::rvalue rvalue, gccjit::location loc)
Terminate a block.
@c <http://www.gnu.org/licenses/>.
@node Source Locations<2>,Compiling a context<2>,Creating and using functions<2>,Topic Reference<2>
-@anchor{cp/topics/locations source-locations}@anchor{187}@anchor{cp/topics/locations doc}@anchor{188}
+@anchor{cp/topics/locations source-locations}@anchor{189}@anchor{cp/topics/locations doc}@anchor{18a}
@subsection Source Locations
@end menu
@node Faking it<2>,,,Source Locations<2>
-@anchor{cp/topics/locations faking-it}@anchor{189}
+@anchor{cp/topics/locations faking-it}@anchor{18b}
@subsubsection Faking it
@c <http://www.gnu.org/licenses/>.
@node Compiling a context<2>,,Source Locations<2>,Topic Reference<2>
-@anchor{cp/topics/compilation compiling-a-context}@anchor{18a}@anchor{cp/topics/compilation doc}@anchor{18b}
+@anchor{cp/topics/compilation compiling-a-context}@anchor{18c}@anchor{cp/topics/compilation doc}@anchor{18d}
@subsection Compiling a context
Once populated, a @pxref{110,,gccjit;;context} can be compiled to
machine code, either in-memory via @pxref{e9,,gccjit;;context;;compile()} or
-to disk via @pxref{18c,,gccjit;;context;;compile_to_file()}.
+to disk via @pxref{18e,,gccjit;;context;;compile_to_file()}.
You can compile a context multiple times (using either form of
compilation), although any errors that occur on the context will
@end menu
@node In-memory compilation<2>,Ahead-of-time compilation<2>,,Compiling a context<2>
-@anchor{cp/topics/compilation in-memory-compilation}@anchor{18d}
+@anchor{cp/topics/compilation in-memory-compilation}@anchor{18f}
@subsubsection In-memory compilation
@end deffn
@node Ahead-of-time compilation<2>,,In-memory compilation<2>,Compiling a context<2>
-@anchor{cp/topics/compilation ahead-of-time-compilation}@anchor{18e}
+@anchor{cp/topics/compilation ahead-of-time-compilation}@anchor{190}
@subsubsection Ahead-of-time compilation
Although libgccjit is primarily aimed at just-in-time compilation, it
can also be used for implementing more traditional ahead-of-time
-compilers, via the @pxref{18c,,gccjit;;context;;compile_to_file()} method.
+compilers, via the @pxref{18e,,gccjit;;context;;compile_to_file()} method.
@geindex gccjit;;context;;compile_to_file (C++ function)
-@anchor{cp/topics/compilation gccjit context compile_to_file__enum cCP}@anchor{18c}
+@anchor{cp/topics/compilation gccjit context compile_to_file__enum cCP}@anchor{18e}
@deffn {C++ Function} void gccjit::context::compile_to_file (enum gcc_jit_output_kind, const char* output_path)
Compile the @pxref{110,,gccjit;;context} to a file of the given
@c <http://www.gnu.org/licenses/>.
@node Internals,Indices and tables,C++ bindings for libgccjit,Top
-@anchor{internals/index internals}@anchor{18f}@anchor{internals/index doc}@anchor{190}
+@anchor{internals/index internals}@anchor{191}@anchor{internals/index doc}@anchor{192}
@chapter Internals
@end menu
@node Working on the JIT library,Running the test suite,,Internals
-@anchor{internals/index working-on-the-jit-library}@anchor{191}
+@anchor{internals/index working-on-the-jit-library}@anchor{193}
@section Working on the JIT library
Here's what those configuration options mean:
@geindex command line option; --enable-host-shared
-@anchor{internals/index cmdoption--enable-host-shared}@anchor{192}
+@anchor{internals/index cmdoption--enable-host-shared}@anchor{194}
@deffn {Option} --enable-host-shared
Configuring with this option means that the compiler is built as
@end deffn
@geindex command line option; --enable-languages=jit@comma{}c++
-@anchor{internals/index cmdoption--enable-languages}@anchor{193}
+@anchor{internals/index cmdoption--enable-languages}@anchor{195}
@deffn {Option} --enable-languages=jit,c++
This specifies which frontends to build. The JIT library looks like
@end deffn
@geindex command line option; --disable-bootstrap
-@anchor{internals/index cmdoption--disable-bootstrap}@anchor{194}
+@anchor{internals/index cmdoption--disable-bootstrap}@anchor{196}
@deffn {Option} --disable-bootstrap
For hacking on the "jit" subdirectory, performing a full
@end deffn
@geindex command line option; --enable-checking=release
-@anchor{internals/index cmdoption--enable-checking}@anchor{195}
+@anchor{internals/index cmdoption--enable-checking}@anchor{197}
@deffn {Option} --enable-checking=release
The compile can perform extensive self-checking as it runs, useful when
@end deffn
@node Running the test suite,Environment variables,Working on the JIT library,Internals
-@anchor{internals/index running-the-test-suite}@anchor{196}
+@anchor{internals/index running-the-test-suite}@anchor{198}
@section Running the test suite
@end menu
@node Running under valgrind,,,Running the test suite
-@anchor{internals/index running-under-valgrind}@anchor{197}
+@anchor{internals/index running-under-valgrind}@anchor{199}
@subsection Running under valgrind
various known false positives.
@node Environment variables,Packaging notes,Running the test suite,Internals
-@anchor{internals/index environment-variables}@anchor{198}
+@anchor{internals/index environment-variables}@anchor{19a}
@section Environment variables
environment variables need to be set up:
@geindex environment variable; LD_LIBRARY_PATH
-@anchor{internals/index envvar-LD_LIBRARY_PATH}@anchor{199}
+@anchor{internals/index envvar-LD_LIBRARY_PATH}@anchor{19b}
@deffn {Environment Variable} LD_LIBRARY_PATH
@quotation
@end deffn
@geindex environment variable; PATH
-@anchor{internals/index envvar-PATH}@anchor{19a}
+@anchor{internals/index envvar-PATH}@anchor{19c}
@deffn {Environment Variable} PATH
The library uses a driver executable for converting from .s assembler
@end deffn
@geindex environment variable; LIBRARY_PATH
-@anchor{internals/index envvar-LIBRARY_PATH}@anchor{19b}
+@anchor{internals/index envvar-LIBRARY_PATH}@anchor{19d}
@deffn {Environment Variable} LIBRARY_PATH
The driver executable invokes the linker, and the latter needs to locate
@noindent
@node Packaging notes,Overview of code structure,Environment variables,Internals
-@anchor{internals/index packaging-notes}@anchor{19c}
+@anchor{internals/index packaging-notes}@anchor{19e}
@section Packaging notes
-The configure-time option @pxref{192,,--enable-host-shared} is needed when
+The configure-time option @pxref{194,,--enable-host-shared} is needed when
building the jit in order to get position-independent code. This will
slow down the regular compiler by a few percent. Hence when packaging gcc
with libgccjit, please configure and build twice:
@itemize *
@item
-once without @pxref{192,,--enable-host-shared} for most languages, and
+once without @pxref{194,,--enable-host-shared} for most languages, and
@item
-once with @pxref{192,,--enable-host-shared} for the jit
+once with @pxref{194,,--enable-host-shared} for the jit
@end itemize
@end quotation
@noindent
@node Overview of code structure,Design notes,Packaging notes,Internals
-@anchor{internals/index overview-of-code-structure}@anchor{19d}
+@anchor{internals/index overview-of-code-structure}@anchor{19f}
@section Overview of code structure
@noindent
@node Design notes,,Overview of code structure,Internals
-@anchor{internals/index design-notes}@anchor{19e}
+@anchor{internals/index design-notes}@anchor{1a0}
@section Design notes
@code{recording::context::validate ()} in jit-recording.c.
@node Indices and tables,Index,Internals,Top
-@anchor{index indices-and-tables}@anchor{19f}
+@anchor{index indices-and-tables}@anchor{1a1}
@unnumbered Indices and tables