nitc :: FFILanguage
Phase
and is executedby a Phase
.
nitc :: FFILanguage :: _ffi_language_assignation_phase
FFILanguageAssignationPhase
assigning self
to AExternCodeBlock
s
nitc :: FFILanguage :: compile_callback
Generate the code to offer this callback if foreign codenitc :: FFILanguage :: compile_extern_class
Generate wrapper code for this extern classnitc :: FFILanguage :: compile_extern_method
Generate wrapper code for this extern methodnitc :: FFILanguage :: compile_module_block
Generate wrapper code for this module/header code blocknitc :: FFILanguage :: compile_to_files
Complete compilation of generated codenitc :: FFILanguage :: defaultinit
nitc :: FFILanguage :: ffi_language_assignation_phase
FFILanguageAssignationPhase
assigning self
to AExternCodeBlock
s
nitc :: FFILanguage :: ffi_language_assignation_phase=
FFILanguageAssignationPhase
assigning self
to AExternCodeBlock
s
nitc :: FFILanguage :: get_ftype
Get the foreign type of this extern class definitionnitc :: FFILanguage :: identify_language
Is thisblock
written in this language?
nitc $ FFILanguage :: SELF
Type of this instance, automatically specialized in every classnitc $ FFILanguage :: init
nitc :: FFILanguage :: _ffi_language_assignation_phase
FFILanguageAssignationPhase
assigning self
to AExternCodeBlock
s
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: FFILanguage :: compile_callback
Generate the code to offer this callback if foreign codenitc :: FFILanguage :: compile_extern_class
Generate wrapper code for this extern classnitc :: FFILanguage :: compile_extern_method
Generate wrapper code for this extern methodnitc :: FFILanguage :: compile_module_block
Generate wrapper code for this module/header code blocknitc :: FFILanguage :: compile_to_files
Complete compilation of generated codenitc :: FFILanguage :: defaultinit
core :: Object :: defaultinit
nitc :: FFILanguage :: ffi_language_assignation_phase
FFILanguageAssignationPhase
assigning self
to AExternCodeBlock
s
nitc :: FFILanguage :: ffi_language_assignation_phase=
FFILanguageAssignationPhase
assigning self
to AExternCodeBlock
s
nitc :: FFILanguage :: get_ftype
Get the foreign type of this extern class definitionnitc :: FFILanguage :: identify_language
Is thisblock
written in this language?
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).
# Visitor for a specific languages. Works kinda like a `Phase` and is executed
# by a `Phase`.
class FFILanguage
# `FFILanguageAssignationPhase` assigning `self` to `AExternCodeBlock`s
var ffi_language_assignation_phase: FFILanguageAssignationPhase
init
do
ffi_language_assignation_phase.languages.add(self)
end
# Is this `block` written in this language?
fun identify_language(block: AExternCodeBlock ): Bool is abstract
# Generate wrapper code for this module/header code block
fun compile_module_block(block: AExternCodeBlock, ecc: CCompilationUnit, mmodule: MModule) is abstract
# Generate wrapper code for this extern method
fun compile_extern_method(block: AExternCodeBlock, m: AMethPropdef,
ecc: CCompilationUnit, nmodule: MModule) is abstract
# Generate wrapper code for this extern class
fun compile_extern_class(block: AExternCodeBlock, m: AClassdef,
ecc: CCompilationUnit, mmodule: MModule) is abstract
# Get the foreign type of this extern class definition
fun get_ftype(block: AExternCodeBlock, m: AClassdef): ForeignType is abstract
# Complete compilation of generated code
fun compile_to_files(mmodule: MModule, directory: String) do end
end
src/ffi/light_ffi_base.nit:106,1--136,3
# Visitor for a specific languages. Works kinda like a `Phase` and is executed
# by a `Phase`.
redef class FFILanguage
# Generate the code to offer this callback if foreign code
fun compile_callback(callback: NitniCallback, mmodule: MModule,
mainmmodule: MModule, ecc: CCompilationUnit) is abstract
end
src/ffi/ffi_base.nit:32,1--38,3