The compilation of a class is done by several methods, two of those are mandatory :
Throughout each step of the class compilation process, some information must be share. This class encapsulates the compilation process state. (except vft), eg
nitc :: ClassCompilationInfo :: _is_dead
nitc :: ClassCompilationInfo :: _mclass
nitc :: ClassCompilationInfo :: _mtype
Shortcut to access the class's bound type.nitc :: ClassCompilationInfo :: is_dead
nitc :: ClassCompilationInfo :: is_dead=
nitc :: ClassCompilationInfo :: mclass
nitc :: ClassCompilationInfo :: mclass=
nitc :: ClassCompilationInfo :: mtype
Shortcut to access the class's bound type.nitc :: ClassCompilationInfo :: mtype=
Shortcut to access the class's bound type.nitc $ ClassCompilationInfo :: SELF
Type of this instance, automatically specialized in every classnitc $ ClassCompilationInfo :: init
nitc :: ClassCompilationInfo :: _is_dead
nitc :: ClassCompilationInfo :: _mclass
nitc :: ClassCompilationInfo :: _mtype
Shortcut to access the class's bound type.core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Object :: defaultinit
nitc :: ClassCompilationInfo :: is_dead
nitc :: ClassCompilationInfo :: is_dead=
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.
nitc :: ClassCompilationInfo :: mclass
nitc :: ClassCompilationInfo :: mclass=
nitc :: ClassCompilationInfo :: mtype
Shortcut to access the class's bound type.nitc :: ClassCompilationInfo :: mtype=
Shortcut to access the class's bound 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).
# Encapsulates every information needed to compile a class.
#
# The compilation of a class is done by several methods, two of those are
# mandatory :
# - compile_class_to_c : starts the compilation process
# - compile_class_vft : generate the virtual function table
# And one of them is optional :
# - compile_class_if_universal : compiles the rest of the class if its a universal
# type. Universal type are handle in a case-basis, this is why they need special treatment.
# Generally, universal class will have special structure and a custom allocator.
#
# Throughout each step of the class compilation process, some information must be share.
# This class encapsulates the compilation process state.
# (except vft), eg
class ClassCompilationInfo
var mclass: MClass # class to compile
var is_dead: Bool
var need_corpse: Bool
# Shortcut to access the class's bound type.
var mtype: MClassType is noinit
init
do
mtype = mclass.intro.bound_mtype
end
end
src/compiler/separate_compiler.nit:2596,1--2622,3