Skip to content
This repository has been archived by the owner on Jun 20, 2019. It is now read-only.

Commit

Permalink
Remove IN_GCC code for xopCmp/xopEquals in compiler and library
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuclaw committed May 4, 2017
1 parent 2b7241c commit 495ced0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
4 changes: 0 additions & 4 deletions gcc/d/dfrontend/clone.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,11 +652,7 @@ FuncDeclaration *buildXopCmp(StructDeclaration *sd, Scope *sc)
fop->generated = true;
Expression *e1 = new IdentifierExp(loc, Id::p);
Expression *e2 = new IdentifierExp(loc, Id::q);
#ifdef IN_GCC
Expression *e = new CallExp(loc, new DotIdExp(loc, e1, Id::cmp), e2);
#else
Expression *e = new CallExp(loc, new DotIdExp(loc, e2, Id::cmp), e1);
#endif

fop->fbody = new ReturnStatement(loc, e);

Expand Down
14 changes: 2 additions & 12 deletions libphobos/libdruntime/object.d
Original file line number Diff line number Diff line change
Expand Up @@ -1127,12 +1127,7 @@ class TypeInfo_Struct : TypeInfo
return false;
else if (xopEquals)
{
version(GNU)
{ // BUG: GDC and DMD use different calling conventions
return (*xopEquals)(p2, p1);
}
else
return (*xopEquals)(p1, p2);
return (*xopEquals)(p1, p2);
}
else if (p1 == p2)
return true;
Expand All @@ -1154,12 +1149,7 @@ class TypeInfo_Struct : TypeInfo
return true;
else if (xopCmp)
{
version(GNU)
{ // BUG: GDC and DMD use different calling conventions
return (*xopCmp)(p1, p2);
}
else
return (*xopCmp)(p2, p1);
return (*xopCmp)(p2, p1);
}
else
// BUG: relies on the GC not moving objects
Expand Down

0 comments on commit 495ced0

Please sign in to comment.