Remove dmd.iasm from the gluelayer module (#16182)

This commit is contained in:
Iain Buclaw 2024-02-13 13:21:18 +01:00 committed by GitHub
parent 7fc21e7071
commit e367663549
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 19 additions and 25 deletions

View file

@ -1529,7 +1529,7 @@ auto sourceFiles()
} }
DmdSources dmd = { DmdSources dmd = {
glue: fileArray(env["D"], " glue: fileArray(env["D"], "
dmsc.d e2ir.d iasm.d iasmdmd.d iasmgcc.d glue.d objc_glue.d dmsc.d e2ir.d iasmdmd.d glue.d objc_glue.d
s2ir.d tocsym.d toctype.d tocvdebug.d todt.d toir.d toobj.d s2ir.d tocsym.d toctype.d tocvdebug.d todt.d toir.d toobj.d
"), "),
driver: fileArray(env["D"], "dinifile.d dmdparams.d gluelayer.d lib.d libelf.d libmach.d libmscoff.d libomf.d driver: fileArray(env["D"], "dinifile.d dmdparams.d gluelayer.d lib.d libelf.d libmach.d libmscoff.d libomf.d
@ -1541,8 +1541,8 @@ auto sourceFiles()
cli.d clone.d compiler.d cond.d constfold.d cppmangle.d cppmanglewin.d cpreprocess.d ctfeexpr.d cli.d clone.d compiler.d cond.d constfold.d cppmangle.d cppmanglewin.d cpreprocess.d ctfeexpr.d
ctorflow.d dcast.d dclass.d declaration.d delegatize.d denum.d dimport.d ctorflow.d dcast.d dclass.d declaration.d delegatize.d denum.d dimport.d
dinterpret.d dmacro.d dmangle.d dmodule.d doc.d dscope.d dstruct.d dsymbol.d dsymbolsem.d dinterpret.d dmacro.d dmangle.d dmodule.d doc.d dscope.d dstruct.d dsymbol.d dsymbolsem.d
dtemplate.d dtoh.d dversion.d enumsem.d escape.d expression.d expressionsem.d func.d funcsem.d hdrgen.d impcnvtab.d dtemplate.d dtoh.d dversion.d enumsem.d escape.d expression.d expressionsem.d func.d funcsem.d hdrgen.d iasm.d iasmgcc.d
imphint.d importc.d init.d initsem.d inline.d inlinecost.d intrange.d json.d lambdacomp.d impcnvtab.d imphint.d importc.d init.d initsem.d inline.d inlinecost.d intrange.d json.d lambdacomp.d
mtype.d mustuse.d nogc.d nspace.d ob.d objc.d opover.d optimize.d mtype.d mustuse.d nogc.d nspace.d ob.d objc.d opover.d optimize.d
parse.d parsetimevisitor.d permissivevisitor.d postordervisitor.d pragmasem.d printast.d rootobject.d safe.d sapply.d parse.d parsetimevisitor.d permissivevisitor.d postordervisitor.d pragmasem.d printast.d rootobject.d safe.d sapply.d
semantic2.d semantic3.d sideeffect.d statement.d statement_rewrite_walker.d semantic2.d semantic3.d sideeffect.d statement.d statement_rewrite_walker.d

View file

@ -7582,6 +7582,10 @@ extern const char* toChars(const Initializer* const i);
extern const char* toChars(const Type* const t); extern const char* toChars(const Type* const t);
extern Statement* asmSemantic(AsmStatement* s, Scope* sc);
extern Statement* gccAsmSemantic(GccAsmStatement* s, Scope* sc);
extern void json_generate(Array<Module* >& modules, OutBuffer& buf); extern void json_generate(Array<Module* >& modules, OutBuffer& buf);
extern JsonFieldFlags tryParseJsonField(const char* fieldName); extern JsonFieldFlags tryParseJsonField(const char* fieldName);

View file

@ -30,19 +30,9 @@ version (NoBackend)
struct TYPE; struct TYPE;
alias type = TYPE; alias type = TYPE;
extern (C++) extern(C++) abstract class ObjcGlue
{ {
// iasm static void initialize() {}
Statement asmSemantic(AsmStatement s, Scope* sc)
{
sc.func.hasReturnExp = 8;
return null;
}
extern(C++) abstract class ObjcGlue
{
static void initialize() {}
}
} }
} }
else version (IN_GCC) else version (IN_GCC)
@ -53,11 +43,6 @@ else version (IN_GCC)
alias code = tree_node; alias code = tree_node;
alias type = tree_node; alias type = tree_node;
extern (C++)
{
Statement asmSemantic(AsmStatement s, Scope* sc);
}
// stubs // stubs
extern(C++) abstract class ObjcGlue extern(C++) abstract class ObjcGlue
{ {
@ -70,6 +55,5 @@ else
public import dmd.backend.type : type; public import dmd.backend.type : type;
public import dmd.backend.el : elem; public import dmd.backend.el : elem;
public import dmd.backend.code_x86 : code; public import dmd.backend.code_x86 : code;
public import dmd.iasm : asmSemantic;
public import dmd.objc_glue : ObjcGlue; public import dmd.objc_glue : ObjcGlue;
} }

View file

@ -23,7 +23,10 @@ import dmd.tokens;
import dmd.statement; import dmd.statement;
import dmd.statementsem; import dmd.statementsem;
version (IN_GCC) version (NoBackend)
{
}
else version (IN_GCC)
{ {
import dmd.iasmgcc; import dmd.iasmgcc;
} }
@ -48,7 +51,11 @@ extern(C++) Statement asmSemantic(AsmStatement s, Scope *sc)
// Assume assembler code takes care of setting the return value // Assume assembler code takes care of setting the return value
sc.func.hasReturnExp |= 8; sc.func.hasReturnExp |= 8;
version (MARS) version (NoBackend)
{
return null;
}
else version (MARS)
{ {
/* If it starts with a string literal, it's gcc inline asm /* If it starts with a string literal, it's gcc inline asm
*/ */

View file

@ -41,8 +41,8 @@ import dmd.expressionsem;
import dmd.func; import dmd.func;
import dmd.funcsem; import dmd.funcsem;
import dmd.globals; import dmd.globals;
import dmd.gluelayer;
import dmd.hdrgen; import dmd.hdrgen;
import dmd.iasm;
import dmd.id; import dmd.id;
import dmd.identifier; import dmd.identifier;
import dmd.importc; import dmd.importc;

View file

@ -126,7 +126,6 @@ subPackage {
e2ir,\ e2ir,\
eh,\ eh,\
glue,\ glue,\
iasm,\
iasmdmd,\ iasmdmd,\
iasmgcc,\ iasmgcc,\
irstate,\ irstate,\