Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split interfaces to the glue layer and backend into different files
- Loading branch information
Showing
21 changed files
with
166 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
// Compiler implementation of the D programming language | ||
// Copyright (c) 1999-2015 by Digital Mars | ||
// All Rights Reserved | ||
// written by Walter Bright | ||
// http://www.digitalmars.com | ||
// Distributed under the Boost Software License, Version 1.0. | ||
// http://www.boost.org/LICENSE_1_0.txt | ||
|
||
module ddmd.gluelayer; | ||
|
||
import ddmd.aggregate; | ||
import ddmd.dmodule; | ||
import ddmd.dscope; | ||
import ddmd.dsymbol; | ||
import ddmd.expression; | ||
import ddmd.lib; | ||
import ddmd.mtype; | ||
import ddmd.statement; | ||
import ddmd.root.file; | ||
|
||
version (NoBackend) | ||
{ | ||
struct Symbol; | ||
struct code; | ||
struct block; | ||
struct Blockx; | ||
struct elem; | ||
struct TYPE; | ||
alias type = TYPE; | ||
|
||
// tocsym | ||
|
||
extern (C++) Symbol* toInitializer(AggregateDeclaration ad) | ||
{ | ||
return null; | ||
} | ||
|
||
// glue | ||
|
||
extern (C++) void obj_write_deferred(Library library) | ||
{ | ||
} | ||
|
||
extern (C++) void obj_start(char* srcfile) | ||
{ | ||
} | ||
|
||
extern (C++) void obj_end(Library library, File* objfile) | ||
{ | ||
} | ||
|
||
extern (C++) void genObjFile(Module m, bool multiobj) | ||
{ | ||
} | ||
|
||
// msc | ||
|
||
extern (C++) void backend_init() | ||
{ | ||
} | ||
|
||
extern (C++) void backend_term() | ||
{ | ||
} | ||
|
||
// iasm | ||
|
||
extern (C++) Statement asmSemantic(AsmStatement s, Scope* sc) | ||
{ | ||
assert(0); | ||
} | ||
|
||
// toir | ||
|
||
extern (C++) RET retStyle(TypeFunction tf) | ||
{ | ||
return RETregs; | ||
} | ||
|
||
extern (C++) void toObjFile(Dsymbol ds, bool multiobj) | ||
{ | ||
} | ||
|
||
version (OSX) | ||
{ | ||
extern(C++) void objc_initSymbols() | ||
{ | ||
} | ||
} | ||
} | ||
else | ||
{ | ||
import ddmd.backend; | ||
|
||
alias Symbol = ddmd.backend.Symbol; | ||
alias code = ddmd.backend.code; | ||
alias block = ddmd.backend.block; | ||
alias Blockx = ddmd.backend.Blockx; | ||
alias elem = ddmd.backend.elem; | ||
alias type = ddmd.backend.type; | ||
|
||
extern extern (C++) Symbol* toInitializer(AggregateDeclaration sd); | ||
|
||
extern extern (C++) void obj_write_deferred(Library library); | ||
extern extern (C++) void obj_start(char* srcfile); | ||
extern extern (C++) void obj_end(Library library, File* objfile); | ||
extern extern (C++) void genObjFile(Module m, bool multiobj); | ||
|
||
extern extern (C++) void backend_init(); | ||
extern extern (C++) void backend_term(); | ||
|
||
extern extern (C++) Statement asmSemantic(AsmStatement s, Scope* sc); | ||
|
||
extern extern (C++) RET retStyle(TypeFunction tf); | ||
extern extern (C++) void toObjFile(Dsymbol ds, bool multiobj); | ||
|
||
version (OSX) | ||
{ | ||
extern(C++) void objc_initSymbols(); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.