You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After having looked through the eecmain.e file, there is a great possibility of modularizing the code using OOP. For example there are many places where g_optosid is checked against all the constants: OSID_NONE, OSID_MORPHOS, OSID_AMIGAOS and OSID_AMIGAOS4. These could all be combined using inheritance by making g_optosid into a context class and making all the IF, ELSIF, ELSEIF, ELSE, ENDIF statements into a method in that class. The context class may also keep track of library modes, ELF vs. HUNK executable types, and so on with all of the non-applicable methods of library mode, for example, being returned as no-ops in executable mode.
Using this may allow the contexts to be reimplemented as shared libraries for all the different sets of startup-codes and code generators. Some contexts will require more than one codegen such as MorphOS being able to use mixed binaries containing both 68k and PPC code.
The text was updated successfully, but these errors were encountered:
This is a prerequisite of adding more platforms, IMO, because then all the conditionals are replaced all at once using inheritance of the context abstract class rather than a dozen different places.
After having looked through the eecmain.e file, there is a great possibility of modularizing the code using OOP. For example there are many places where g_optosid is checked against all the constants: OSID_NONE, OSID_MORPHOS, OSID_AMIGAOS and OSID_AMIGAOS4. These could all be combined using inheritance by making g_optosid into a context class and making all the IF, ELSIF, ELSEIF, ELSE, ENDIF statements into a method in that class. The context class may also keep track of library modes, ELF vs. HUNK executable types, and so on with all of the non-applicable methods of library mode, for example, being returned as no-ops in executable mode.
Using this may allow the contexts to be reimplemented as shared libraries for all the different sets of startup-codes and code generators. Some contexts will require more than one codegen such as MorphOS being able to use mixed binaries containing both 68k and PPC code.
The text was updated successfully, but these errors were encountered: