[Issue 12327] New: [IMPLEMENTATION] Target fields in frontend should be private to target.c

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Mar 9 05:47:05 PDT 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12327

           Summary: [IMPLEMENTATION] Target fields in frontend should be
                    private to target.c
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: ibuclaw at ubuntu.com


--- Comment #0 from Iain Buclaw <ibuclaw at ubuntu.com> 2014-03-09 05:47:04 PDT ---
There are a number of isXXX fields in mars.h (struct Params). Some do nothing,
others control code generation or semantics or the language, others the ABI. 
In all cases regardless, these should not be public to the frontend, and go
against at least GDC's goals to be a platform agnostic compiler.

What changes that need to happen are that any place where isLinux, isOSX, is
checked in the frontend should be replaced with a Target hook describing the
target behaviour, eg vectorSupported (true/false), prefixLabel ("_" on OSX, for
instance) - some cod examples I can think of that may need better names.

Once this transition has been completed, DMD can make these private to its own
target.c - which allows other compiler backends to omit the setting these
values in their own glue if they so wish.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list