dmd.ctorflow

Manage flow analysis for constructors.

Authors

Walter Bright

Source: ctorflow.d

  • Declaration

    struct FieldInit;

    Individual field in the Ctor with information about its callees and location.

    • csx

      Declaration

      CSX csx;

      information about the field's callees

    • loc

      Declaration

      Loc loc;

      location of the field initialization

  • Declaration

    struct CtorFlow;

    Primitive flow analysis for constructors

    • Declaration

      CSX callSuper;

      state of calling other constructors

    • Declaration

      FieldInit[] fieldinit;

      state of field initializations

    • Declaration

      CtorFlow clone();

      Create a deep copy of this

      Return Value

      a copy

    • Declaration

      pure nothrow @safe void orCSX(CSX csx);

      Set CSX bits in flow analysis state

      Parameters

      CSX csx

      bits to set

    • OR

      Declaration

      pure nothrow @safe void OR(const ref CtorFlow ctorflow);

      OR CSX bits to this

      Parameters

      CtorFlow ctorflow

      bits to OR in

  • Declaration

    pure nothrow @safe bool mergeCallSuper(ref CSX a, const CSX b);

    Merge b flow analysis results into a.

    Parameters

    CSX a

    the path to merge b into

    CSX b

    the other path

    Return Value

    false means one of the paths skips construction

  • Declaration

    pure nothrow @safe bool mergeFieldInit(ref CSX a, const CSX b);

    Merge b flow analysis results into a.

    Parameters

    CSX a

    the path to merge b into

    CSX b

    the other path

    Return Value

    false means either a or b skips initialization