Expand Up
@@ -31,6 +31,7 @@
#include "dt.h"
Parameters * Parameters_create ();
Symbol * toSymbol (Dsymbol * s );
/*******************************************
* Get a canonicalized form of the TypeInfo for use with the internal
Expand Down
Expand Up
@@ -274,7 +275,7 @@ class TypeInfoDtVisitor : public Visitor
Type * tm = d -> tinfo -> mutableOf ();
tm = tm -> merge ();
tm -> genTypeInfo (NULL );
dtxoff (pdt , tm -> vtinfo -> toSymbol ( ), 0 );
dtxoff (pdt , toSymbol ( tm -> vtinfo ), 0 );
}
void visit (TypeInfoInvariantDeclaration * d )
Expand All
@@ -287,7 +288,7 @@ class TypeInfoDtVisitor : public Visitor
Type * tm = d -> tinfo -> mutableOf ();
tm = tm -> merge ();
tm -> genTypeInfo (NULL );
dtxoff (pdt , tm -> vtinfo -> toSymbol ( ), 0 );
dtxoff (pdt , toSymbol ( tm -> vtinfo ), 0 );
}
void visit (TypeInfoSharedDeclaration * d )
Expand All
@@ -300,7 +301,7 @@ class TypeInfoDtVisitor : public Visitor
Type * tm = d -> tinfo -> unSharedOf ();
tm = tm -> merge ();
tm -> genTypeInfo (NULL );
dtxoff (pdt , tm -> vtinfo -> toSymbol ( ), 0 );
dtxoff (pdt , toSymbol ( tm -> vtinfo ), 0 );
}
void visit (TypeInfoWildDeclaration * d )
Expand All
@@ -313,7 +314,7 @@ class TypeInfoDtVisitor : public Visitor
Type * tm = d -> tinfo -> mutableOf ();
tm = tm -> merge ();
tm -> genTypeInfo (NULL );
dtxoff (pdt , tm -> vtinfo -> toSymbol ( ), 0 );
dtxoff (pdt , toSymbol ( tm -> vtinfo ), 0 );
}
void visit (TypeInfoTypedefDeclaration * d )
Expand All
@@ -339,7 +340,7 @@ class TypeInfoDtVisitor : public Visitor
sd -> basetype = sd -> basetype -> merge ();
sd -> basetype -> genTypeInfo (NULL ); // generate vtinfo
assert (sd -> basetype -> vtinfo );
dtxoff (pdt , sd -> basetype -> vtinfo -> toSymbol ( ), 0 ); // TypeInfo for basetype
dtxoff (pdt , toSymbol ( sd -> basetype -> vtinfo ), 0 ); // TypeInfo for basetype
const char * name = sd -> toPrettyChars ();
size_t namelen = strlen (name );
Expand Down
Expand Up
@@ -382,7 +383,7 @@ class TypeInfoDtVisitor : public Visitor
if (sd -> memtype )
{
sd -> memtype -> genTypeInfo (NULL );
dtxoff (pdt , sd -> memtype -> vtinfo -> toSymbol ( ), 0 ); // TypeInfo for enum members
dtxoff (pdt , toSymbol ( sd -> memtype -> vtinfo ), 0 ); // TypeInfo for enum members
}
else
dtsize_t (pdt , 0 );
Expand Down
Expand Up
@@ -419,7 +420,7 @@ class TypeInfoDtVisitor : public Visitor
TypePointer * tc = (TypePointer * )d -> tinfo ;
tc -> next -> genTypeInfo (NULL );
dtxoff (pdt , tc -> next -> vtinfo -> toSymbol ( ), 0 ); // TypeInfo for type being pointed to
dtxoff (pdt , toSymbol ( tc -> next -> vtinfo ), 0 ); // TypeInfo for type being pointed to
}
void visit (TypeInfoArrayDeclaration * d )
Expand All
@@ -435,7 +436,7 @@ class TypeInfoDtVisitor : public Visitor
TypeDArray * tc = (TypeDArray * )d -> tinfo ;
tc -> next -> genTypeInfo (NULL );
dtxoff (pdt , tc -> next -> vtinfo -> toSymbol ( ), 0 ); // TypeInfo for array of type
dtxoff (pdt , toSymbol ( tc -> next -> vtinfo ), 0 ); // TypeInfo for array of type
}
void visit (TypeInfoStaticArrayDeclaration * d )
Expand All
@@ -451,7 +452,7 @@ class TypeInfoDtVisitor : public Visitor
TypeSArray * tc = (TypeSArray * )d -> tinfo ;
tc -> next -> genTypeInfo (NULL );
dtxoff (pdt , tc -> next -> vtinfo -> toSymbol ( ), 0 ); // TypeInfo for array of type
dtxoff (pdt , toSymbol ( tc -> next -> vtinfo ), 0 ); // TypeInfo for array of type
dtsize_t (pdt , tc -> dim -> toInteger ()); // length
}
Expand All
@@ -469,7 +470,7 @@ class TypeInfoDtVisitor : public Visitor
TypeVector * tc = (TypeVector * )d -> tinfo ;
tc -> basetype -> genTypeInfo (NULL );
dtxoff (pdt , tc -> basetype -> vtinfo -> toSymbol ( ), 0 ); // TypeInfo for equivalent static array
dtxoff (pdt , toSymbol ( tc -> basetype -> vtinfo ), 0 ); // TypeInfo for equivalent static array
}
void visit (TypeInfoAssociativeArrayDeclaration * d )
Expand All
@@ -485,10 +486,10 @@ class TypeInfoDtVisitor : public Visitor
TypeAArray * tc = (TypeAArray * )d -> tinfo ;
tc -> next -> genTypeInfo (NULL );
dtxoff (pdt , tc -> next -> vtinfo -> toSymbol ( ), 0 ); // TypeInfo for array of type
dtxoff (pdt , toSymbol ( tc -> next -> vtinfo ), 0 ); // TypeInfo for array of type
tc -> index -> genTypeInfo (NULL );
dtxoff (pdt , tc -> index -> vtinfo -> toSymbol ( ), 0 ); // TypeInfo for array of type
dtxoff (pdt , toSymbol ( tc -> index -> vtinfo ), 0 ); // TypeInfo for array of type
}
void visit (TypeInfoFunctionDeclaration * d )
Expand All
@@ -504,7 +505,7 @@ class TypeInfoDtVisitor : public Visitor
TypeFunction * tc = (TypeFunction * )d -> tinfo ;
tc -> next -> genTypeInfo (NULL );
dtxoff (pdt , tc -> next -> vtinfo -> toSymbol ( ), 0 ); // TypeInfo for function return value
dtxoff (pdt , toSymbol ( tc -> next -> vtinfo ), 0 ); // TypeInfo for function return value
const char * name = d -> tinfo -> deco ;
assert (name );
Expand All
@@ -526,7 +527,7 @@ class TypeInfoDtVisitor : public Visitor
TypeDelegate * tc = (TypeDelegate * )d -> tinfo ;
tc -> next -> nextOf ()-> genTypeInfo (NULL );
dtxoff (pdt , tc -> next -> nextOf ()-> vtinfo -> toSymbol ( ), 0 ); // TypeInfo for delegate return value
dtxoff (pdt , toSymbol ( tc -> next -> nextOf ()-> vtinfo ), 0 ); // TypeInfo for delegate return value
const char * name = d -> tinfo -> deco ;
assert (name );
Expand Down
Expand Up
@@ -586,7 +587,7 @@ class TypeInfoDtVisitor : public Visitor
if (FuncDeclaration * fd = search_toHash (sd ))
{
dtxoff (pdt , fd -> toSymbol (), 0 );
dtxoff (pdt , toSymbol (fd ), 0 );
TypeFunction * tf = (TypeFunction * )fd -> type ;
assert (tf -> ty == Tfunction );
/* I'm a little unsure this is the right way to do it. Perhaps a better
Expand All
@@ -601,18 +602,18 @@ class TypeInfoDtVisitor : public Visitor
dtsize_t (pdt , 0 );
if (sd -> xeq )
dtxoff (pdt , sd -> xeq -> toSymbol ( ), 0 );
dtxoff (pdt , toSymbol ( sd -> xeq ), 0 );
else
dtsize_t (pdt , 0 );
if (sd -> xcmp )
dtxoff (pdt , sd -> xcmp -> toSymbol ( ), 0 );
dtxoff (pdt , toSymbol ( sd -> xcmp ), 0 );
else
dtsize_t (pdt , 0 );
if (FuncDeclaration * fd = search_toString (sd ))
{
dtxoff (pdt , fd -> toSymbol (), 0 );
dtxoff (pdt , toSymbol (fd ), 0 );
}
else
dtsize_t (pdt , 0 );
Expand All
@@ -626,22 +627,22 @@ class TypeInfoDtVisitor : public Visitor
// xgetMembers
FuncDeclaration * sgetmembers = sd -> findGetMembers ();
if (sgetmembers )
dtxoff (pdt , sgetmembers -> toSymbol (), 0 );
dtxoff (pdt , toSymbol (sgetmembers ), 0 );
else
dtsize_t (pdt , 0 ); // xgetMembers
#endif
// xdtor
FuncDeclaration * sdtor = sd -> dtor ;
if (sdtor )
dtxoff (pdt , sdtor -> toSymbol (), 0 );
dtxoff (pdt , toSymbol (sdtor ), 0 );
else
dtsize_t (pdt , 0 ); // xdtor
// xpostblit
FuncDeclaration * spostblit = sd -> postblit ;
if (spostblit && !(spostblit -> storage_class & STCdisable ))
dtxoff (pdt , spostblit -> toSymbol (), 0 );
dtxoff (pdt , toSymbol (spostblit ), 0 );
else
dtsize_t (pdt , 0 ); // xpostblit
Expand All
@@ -657,7 +658,7 @@ class TypeInfoDtVisitor : public Visitor
if (t )
{
t -> genTypeInfo (NULL );
dtxoff (pdt , t -> vtinfo -> toSymbol ( ), 0 );
dtxoff (pdt , toSymbol ( t -> vtinfo ), 0 );
}
else
dtsize_t (pdt , 0 );
Expand Down
Expand Up
@@ -696,7 +697,7 @@ class TypeInfoDtVisitor : public Visitor
if (!tc -> sym -> vclassinfo )
tc -> sym -> vclassinfo = TypeInfoClassDeclaration ::create (tc );
s = tc -> sym -> vclassinfo -> toSymbol ( );
s = toSymbol ( tc -> sym -> vclassinfo );
dtxoff (pdt , s , 0 ); // ClassInfo for tinfo
}
Expand Down