www.digitalmars.com         C & C++   DMDScript  

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

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 puremagic.com
        ReportedBy: ibuclaw ubuntu.com


--- Comment #0 from Iain Buclaw <ibuclaw 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: -------
Mar 09 2014