- accept
void accept(Visitor v)
Undocumented in source. Be warned that the author may not have intended to support it.
- addInstance
TemplateInstance addInstance(TemplateInstance ti)
Add instance ti to TemplateDeclaration's table of instances.
Return a handle we can use to later remove it if it fails instantiation.
- declareParameter
RootObject declareParameter(Scope* sc, TemplateParameter tp, RootObject o)
Declare template parameter tp with value o, and install it in the scope sc.
- deduceFunctionTemplateMatch
MATCH deduceFunctionTemplateMatch(TemplateInstance ti, Scope* sc, FuncDeclaration fd, Type tthis, Expressions* fargs)
Match function arguments against a specific template function.
Input:
ti
sc instantiation scope
fd
tthis 'this' argument if !NULL
fargs arguments to function
Output:
fd Partially instantiated function declaration
ti.tdtypes Expression/Type deduced template arguments
- doHeaderInstantiation
FuncDeclaration doHeaderInstantiation(TemplateInstance ti, Scope* sc2, FuncDeclaration fd, Type tthis, Expressions* fargs)
Limited function template instantiation for using fd.leastAsSpecialized()
- evaluateConstraint
bool evaluateConstraint(TemplateInstance ti, Scope* sc, Scope* paramscope, Objects* dedargs, FuncDeclaration fd)
Check to see if constraint is satisfied.
- findExistingInstance
TemplateInstance findExistingInstance(TemplateInstance tithis, Expressions* fargs)
Given a new instance tithis of this TemplateDeclaration,
see if there already exists an instance.
If so, return that existing instance.
- hasStaticCtorOrDtor
bool hasStaticCtorOrDtor()
Undocumented in source. Be warned that the author may not have intended to support it.
- isOverloadable
bool isOverloadable()
We can overload templates.
- isTemplateDeclaration
inout(TemplateDeclaration) isTemplateDeclaration()
Undocumented in source. Be warned that the author may not have intended to support it.
- isVariadic
TemplateTupleParameter isVariadic()
Check if the last template parameter is a tuple one,
and returns it if so, else returns null.
- kind
const(char)* kind()
Undocumented in source. Be warned that the author may not have intended to support it.
- leastAsSpecialized
MATCH leastAsSpecialized(Scope* sc, TemplateDeclaration td2, Expressions* fargs)
Determine partial specialization order of 'this' vs td2.
- matchWithInstance
MATCH matchWithInstance(Scope* sc, TemplateInstance ti, Objects* dedtypes, Expressions* fargs, int flag)
Given that ti is an instance of this TemplateDeclaration,
deduce the types of the parameters to this, and store
those deduced types in dedtypes[].
Input:
flag 1: don't do semantic() because of dummy types
2: don't change types in matchArg()
Output:
dedtypes deduced arguments
Return match level.
- overloadInsert
bool overloadInsert(Dsymbol s)
Overload existing TemplateDeclaration 'this' with the new one 's'.
Return true if successful; i.e. no conflict.
- prot
Prot prot()
Undocumented in source. Be warned that the author may not have intended to support it.
- removeInstance
void removeInstance(TemplateInstance ti)
Remove TemplateInstance from table of instances.
Input:
handle returned by addInstance()
- semantic
void semantic(Scope* sc)
Undocumented in source. Be warned that the author may not have intended to support it.
- syntaxCopy
Dsymbol syntaxCopy(Dsymbol )
Undocumented in source. Be warned that the author may not have intended to support it.
- toChars
const(char)* toChars()
Undocumented in source. Be warned that the author may not have intended to support it.
- members
Dsymbols* members;
Undocumented in source.
- symtab
DsymbolTable symtab;
Undocumented in source.
- endlinnum
uint endlinnum;
Undocumented in source.
- syntaxCopy
Dsymbol syntaxCopy(Dsymbol s)
Undocumented in source. Be warned that the author may not have intended to support it.
- search
Dsymbol search(Loc loc, Identifier ident, int flags)
This function is #1 on the list of functions that eat cpu time.
Be very, very careful about slowing it down.
- mergeOverloadSet
OverloadSet mergeOverloadSet(Identifier ident, OverloadSet os, Dsymbol s)
Undocumented in source. Be warned that the author may not have intended to support it.
- importScope
void importScope(Dsymbol s, Prot protection)
Undocumented in source. Be warned that the author may not have intended to support it.
- addAccessiblePackage
void addAccessiblePackage(Package p, Prot protection)
Undocumented in source. Be warned that the author may not have intended to support it.
- isPackageAccessible
bool isPackageAccessible(Package p, Prot protection, int flags)
Undocumented in source. Be warned that the author may not have intended to support it.
- isforwardRef
bool isforwardRef()
Undocumented in source. Be warned that the author may not have intended to support it.
- multiplyDefined
void multiplyDefined(Loc loc, Dsymbol s1, Dsymbol s2)
Undocumented in source. Be warned that the author may not have intended to support it.
- kind
const(char)* kind()
Undocumented in source. Be warned that the author may not have intended to support it.
- findGetMembers
FuncDeclaration findGetMembers()
Look for member of the form:
const(MemberInfo)[] getMembers(string);
Returns NULL if not found
- symtabInsert
Dsymbol symtabInsert(Dsymbol s)
Undocumented in source. Be warned that the author may not have intended to support it.
- hasStaticCtorOrDtor
bool hasStaticCtorOrDtor()
Return true if any of the members are static ctors or static dtors, or if
any members have members that are.
- dim
size_t dim(Dsymbols* members)
Determine number of Dsymbols, folding in AttribDeclaration members.
- getNth
Dsymbol getNth(Dsymbols* members, size_t nth, size_t* pn)
Get nth Dsymbol, folding in AttribDeclaration members.
- ForeachDg
alias ForeachDg = int delegate(size_t idx, Dsymbol s)
Undocumented in source.
- _foreach
int _foreach(Scope* sc, Dsymbols* members, ForeachDg dg, size_t* pn)
Expands attribute declarations in members in depth first
order. Calls dg(size_t symidx, Dsymbol *sym) for each
member.
If dg returns !=0, stops and returns that value else returns 0.
Use this function to avoid the O(N + N^2/2) complexity of
calculating dim and calling N times getNth.
- isScopeDsymbol
inout(ScopeDsymbol) isScopeDsymbol()
Undocumented in source. Be warned that the author may not have intended to support it.
- accept
void accept(Visitor v)
Undocumented in source. Be warned that the author may not have intended to support it.