Skip to content

Commit

Permalink
Merge pull request #5043 from WalterBright/whitespace
Browse files Browse the repository at this point in the history
refactor: restore whitespace in func.d
  • Loading branch information
MartinNowak committed Sep 6, 2015
2 parents 9bc340e + a006975 commit d479339
Showing 1 changed file with 53 additions and 43 deletions.
96 changes: 53 additions & 43 deletions src/func.d
Expand Up @@ -387,89 +387,99 @@ public:
}
}

enum FUNCFLAGpurityInprocess = 1;
// working on determining purity
enum FUNCFLAGsafetyInprocess = 2;
// working on determining safety
enum FUNCFLAGnothrowInprocess = 4;
// working on determining nothrow
enum FUNCFLAGnogcInprocess = 8;
// working on determining @nogc
enum FUNCFLAGreturnInprocess = 0x10;

// working on inferring 'return' for parameters
enum FUNCFLAGpurityInprocess = 1; // working on determining purity
enum FUNCFLAGsafetyInprocess = 2; // working on determining safety
enum FUNCFLAGnothrowInprocess = 4; // working on determining nothrow
enum FUNCFLAGnogcInprocess = 8; // working on determining @nogc
enum FUNCFLAGreturnInprocess = 0x10; // working on inferring 'return' for parameters

extern (C++) class FuncDeclaration : Declaration
{
public:
Types* fthrows; // Array of Type's of exceptions (not used)
Types* fthrows; // Array of Type's of exceptions (not used)
Statement frequire;
Statement fensure;
Statement fbody;
FuncDeclarations foverrides; // functions this function overrides
FuncDeclaration fdrequire; // function that does the in contract
FuncDeclaration fdensure; // function that does the out contract
const(char)* mangleString; // mangled symbol created from mangleExact()
Identifier outId; // identifier for out statement
VarDeclaration vresult; // variable corresponding to outId
LabelDsymbol returnLabel; // where the return goes

FuncDeclarations foverrides; // functions this function overrides
FuncDeclaration fdrequire; // function that does the in contract
FuncDeclaration fdensure; // function that does the out contract

const(char)* mangleString; // mangled symbol created from mangleExact()

Identifier outId; // identifier for out statement
VarDeclaration vresult; // variable corresponding to outId
LabelDsymbol returnLabel; // where the return goes

// used to prevent symbols in different
// scopes from having the same name
DsymbolTable localsymtab;
VarDeclaration vthis; // 'this' parameter (member and nested)
VarDeclaration v_arguments; // '_arguments' parameter
VarDeclaration vthis; // 'this' parameter (member and nested)
VarDeclaration v_arguments; // '_arguments' parameter
Objc_FuncDeclaration objc;

version (IN_GCC)
{
VarDeclaration v_argptr; // '_argptr' variable
VarDeclaration v_argptr; // '_argptr' variable
}

VarDeclaration v_argsave; // save area for args passed in registers for variadic functions
VarDeclarations* parameters; // Array of VarDeclaration's for parameters
DsymbolTable labtab; // statement label symbol table
Dsymbol overnext; // next in overload list
FuncDeclaration overnext0; // next in overload list (only used during IFTI)
Loc endloc; // location of closing curly bracket
int vtblIndex; // for member functions, index into vtbl[]
bool naked; // true if naked
VarDeclaration v_argsave; // save area for args passed in registers for variadic functions
VarDeclarations* parameters; // Array of VarDeclaration's for parameters
DsymbolTable labtab; // statement label symbol table
Dsymbol overnext; // next in overload list
FuncDeclaration overnext0; // next in overload list (only used during IFTI)
Loc endloc; // location of closing curly bracket
int vtblIndex; // for member functions, index into vtbl[]
bool naked; // true if naked
ILS inlineStatusStmt;
ILS inlineStatusExp;
PINLINE inlining;
CompiledCtfeFunction* ctfeCode; // Compiled code for interpreter
int inlineNest; // !=0 if nested inline
bool isArrayOp; // true if array operation

CompiledCtfeFunction* ctfeCode; // Compiled code for interpreter
int inlineNest; // !=0 if nested inline
bool isArrayOp; // true if array operation
// true if errors in semantic3 this function's frame ptr
bool semantic3Errors;
ForeachStatement fes; // if foreach body, this is the foreach
bool introducing; // true if 'introducing' function
ForeachStatement fes; // if foreach body, this is the foreach
bool introducing; // true if 'introducing' function
// if !=NULL, then this is the type
// of the 'introducing' function
// this one is overriding
Type tintro;
bool inferRetType; // true if return type is to be inferred
StorageClass storage_class2; // storage class for template onemember's
bool inferRetType; // true if return type is to be inferred
StorageClass storage_class2; // storage class for template onemember's

// Things that should really go into Scope

// 1 if there's a return exp; statement
// 2 if there's a throw statement
// 4 if there's an assert(0)
// 8 if there's inline asm
int hasReturnExp;

// Support for NRVO (named return value optimization)
bool nrvo_can; // true means we can do it
VarDeclaration nrvo_var; // variable to replace with shidden
Symbol* shidden; // hidden pointer passed to function
bool nrvo_can; // true means we can do it
VarDeclaration nrvo_var; // variable to replace with shidden
Symbol* shidden; // hidden pointer passed to function

ReturnStatements* returns;
GotoStatements* gotos; // Gotos with forward references

GotoStatements* gotos; // Gotos with forward references

// set if this is a known, builtin function we can evaluate at compile time
BUILTIN builtin;

// set if someone took the address of this function
int tookAddressOf;
bool requiresClosure; // this function needs a closure

bool requiresClosure; // this function needs a closure

// local variables in this function which are referenced by nested functions
VarDeclarations closureVars;
// Sibling nested functions which called this one
FuncDeclarations siblingCallers;
uint flags; // FUNCFLAGxxxxx

uint flags; // FUNCFLAGxxxxx

/********************************* FuncDeclaration ****************************/
final extern (D) this(Loc loc, Loc endloc, Identifier id, StorageClass storage_class, Type type)
Expand Down

0 comments on commit d479339

Please sign in to comment.