Before this update, the method compile_class_to_c handled every part
of the class compilation process even special case (universal class).
By doing so, we can't refined this method efficiently without
reimplementing the entire method. This is a pain since each time we
need to add universal class we have to modify the original code instead
of refining the compiler.
After
The method compile_class_to_c has been divided in three main parts:
the class's vft compilation (same for every type of class)
the compilation of universal class specifics (change alot through
time). This part must managed every part of a universal type, except its
vft compilation which already handled by the 1st step.
the compilation of the default NEW allocator (apply only for
non-universal type).
Moreover, the state of a class compilation is stored in a new class
called ClassCompilationInfo, which has different flag to specify if
the class is dead/alive or need_corpse. This choice was made to prevent
dataclump in each method involved with the class compilation.
With this new way of managing class compilation, we can add new
universal class via refinement instead of code rewriting.
Before
Before this update, the method
compile_class_to_c
handled every part of the class compilation process even special case (universal class). By doing so, we can't refined this method efficiently without reimplementing the entire method. This is a pain since each time we need to add universal class we have to modify the original code instead of refining the compiler.After
The method
compile_class_to_c
has been divided in three main parts:NEW
allocator (apply only for non-universal type).Moreover, the state of a class compilation is stored in a new class called
ClassCompilationInfo
, which has different flag to specify if the class is dead/alive or need_corpse. This choice was made to prevent dataclump in each method involved with the class compilation.With this new way of managing class compilation, we can add new universal class via refinement instead of code rewriting.
Signed-off-by: Louis-Vincent Boudreault lv.boudreault95@gmail.com