Uploaded image for project: 'Lucy'
  1. Lucy
  2. LUCY-94

Eliminate OO from Charmonizer/Core/*

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Charmonizer
    • Labels:
      None

      Description

      Charmonizer's Compiler and OperatingSystem modules have been organized around
      OO techniques, with objects, constructors, destructors, etc. However, since
      we never have to deal with more than one Compiler or OperatingSystem at a
      time, we can move all of their object member variables into module variables,
      so that the modules themselves become something like singletons. We achieve
      something like polymorphism by assigning these module variables custom values
      using either ifdefs or run-time initialization routines.

      With this change, Charmonizer's internals now simplify to a more traditional
      procedural pattern:

      /* Before. */
      success = compiler->compile_exe(compiler, source_path, exe_name, 
          code, code_len);
      /* After. */
      success = CC_compile_exe(source_path, exe_name, code, code_len);
      

      Once this is committed, the only OO code remaining in Charmonizer will be
      TestBatch.

        Attachments

          Activity

            People

            • Assignee:
              creamyg Marvin Humphrey
              Reporter:
              creamyg Marvin Humphrey
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: