Includes
Sourcefunc.d
Documentationhttps://dlang.org/phobos/dmd_func.html
ILS: ubyte;uninitializednoyesEnsure;arraySyntaxCopy(Ensures*a);FuncDeclaration:dmd.declaration.Declaration;fbody;foverrides;mangleString;vresult;returnLabel;isTypeIsolatedCache;vthis;v_arguments;v_argptr;parameters;labtab;overnext;overnext0;endloc;vtblIndex;inlineNest;fes;interfaceVirtual;tintro;storage_class2;nrvo_var;shidden;gotos;builtin;tookAddressOf;closureVars;outerVars;siblingCallers;safetyViolation;objc;findTemplateDeclRoot();inUnittest();searchLabel(Identifierident, Locloc);ident.Identifierident | identifier of the requested label |
Locloc | location used when creating a newLabelDsymbol |
identtoFullSignature();isAbstract();setThrow(Locloc, const(char)*format, RootObject[]args...);Locloc | location of action |
const(char)*format | format string for error message |
RootObject[]args | arguments to format string |
setThrowCall(Locloc, FuncDeclarationfd);Locloc | location of call |
FuncDeclarationfd | function being called |
isNested() const;ContractsIf isNested() returns true, isThis() should return false, unless the function needs a dual-context pointer.
isThis() inout;ContractsBoth isThis() and isNested() should return true if function needs a dual-context pointer, otherwise if isThis() returns true, isNested() should return false.
hasNestedFrameRefs();getParameterList();genCfunc(Parameters*fparams, Typetreturn, const(char)*name, STCstc = STC.none);MODMatchToBuffer(OutBuffer*buf, ubytelhsMod, ubyterhsMod);lhsMod andrhsMod and prints themismatching modifiers tobuf.lhsMod mismatching the ones with therhsMod are printed, i.e.lhs(shared) vs. rhs() prints "shared", wheras lhs() vs rhs(shared) prints "non-shared".OutBuffer*buf | output buffer to write to |
ubytelhsMod | modifier on the left-hand side |
ubytelhsMod | modifier on the right-hand side |
lhsMod is missing those modifiers (compared to rhs).OutBufferbuf;auto mismatches =MODMatchToBuffer(&buf, MODFlags.shared_, 0);assert(buf[] =="`shared` ");assert(!mismatches.isNotShared);buf.setsize(0);mismatches =MODMatchToBuffer(&buf, 0, MODFlags.shared_);assert(buf[] =="non-shared ");assert(mismatches.isNotShared);buf.setsize(0);mismatches =MODMatchToBuffer(&buf, MODFlags.const_, 0);assert(buf[] =="`const` ");assert(!mismatches.isMutable);buf.setsize(0);mismatches =MODMatchToBuffer(&buf, 0, MODFlags.const_);assert(buf[] =="mutable ");assert(mismatches.isMutable);
FuncAliasDeclaration:dmd.func.FuncDeclaration;FuncLiteralDeclaration:dmd.func.FuncDeclaration;CtorDeclaration:dmd.func.FuncDeclaration;PostBlitDeclaration:dmd.func.FuncDeclaration;DtorDeclaration:dmd.func.FuncDeclaration;StaticCtorDeclaration:dmd.func.FuncDeclaration;SharedStaticCtorDeclaration:dmd.func.StaticCtorDeclaration;standalone;StaticDtorDeclaration:dmd.func.FuncDeclaration;SharedStaticDtorDeclaration:dmd.func.StaticDtorDeclaration;InvariantDeclaration:dmd.func.FuncDeclaration;UnitTestDeclaration:dmd.func.FuncDeclaration;NewDeclaration:dmd.func.FuncDeclaration;AttributeViolation;AttributeViolation. This way, in case of a big call stack, the error can go down all the way to the root cause.loc;fd;action;