gccjit.d

A D API for libgccjit, purely as final class wrapper functions. Copyright (C) 2014-2015 Iain Buclaw. This file is part of gccjitd. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Public Imports

gccjit.c
public import gccjit.c;

Members

Classes

JITBlock
class JITBlock

Class wrapper for gcc_jit_block

JITContext
class JITContext

The top-level of the API is the JITContext class. A JITContext instance encapsulates the state of a compilation. It goes through two states. Initial: During which you can set up options on it, and add types, functions and code, using the API below. Invoking compile on it transitions it to the PostCompilation state. PostCompilation: When you can call JITContext.release to clean it up.

JITError
class JITError

Errors within the API become D exceptions of this class.

JITField
class JITField

Class wrapper for gcc_jit_field

JITFunction
class JITFunction

Class wrapper for gcc_jit_function

JITLValue
class JITLValue

Class wrapper for gcc_jit_lvalue

JITLocation
class JITLocation

Class wrapper for gcc_jit_location. A JITLocation encapsulates a source code locations, so that you can associate locations in your language with statements in the JIT-compiled code.

JITObject
class JITObject

Class wrapper for gcc_jit_object. All JITObject's are created within a JITContext, and are automatically cleaned up when the context is released. The class hierachy looks like this:

    - JITObject
      - JITLocation
      - JITType
        - JITStruct
      - JITField
      - JITFunction
      - JITBlock
      - JITRValue
        - JITLValue
          - JITParam
JITParam
class JITParam

Class wrapper for gcc_jit_param

JITRValue
class JITRValue

Class wrapper for gcc_jit_rvalue

JITResult
class JITResult

Class wrapper for gcc_jit_result

JITStruct
class JITStruct

You can model C struct types by creating JITStruct and JITField instances, in either order:

  • By creating the fields, then the structure.
  • By creating the structure, then populating it with fields, typically to allow modelling self-referential structs.
JITType
class JITType

Types can be created in several ways:

  • Fundamental types can be accessed using JITContext.getType()
  • Derived types can be accessed by calling methods on an existing type.
  • By creating structures via JITStruct.

Enums

JITBinaryOp
enum JITBinaryOp

Kinds of binary ops.

JITBoolOption
enum JITBoolOption

Boolean options

JITComparison
enum JITComparison

Kinds of comparison.

JITFunctionKind
enum JITFunctionKind

Kinds of function.

JITGlobalKind
enum JITGlobalKind

Kinds of global.

JITIntOption
enum JITIntOption

Integer options

JITStrOption
enum JITStrOption

String options

JITTypeKind
enum JITTypeKind

Standard types.

JITUnaryOp
enum JITUnaryOp

Kinds of unary ops.

Meta