Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do inline for the variable initialization with NRVO function call #2592

Merged
merged 5 commits into from Nov 8, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/declaration.h
Expand Up @@ -709,7 +709,7 @@ class FuncDeclaration : public Declaration
void ctfeCompile();
void inlineScan();
int canInline(int hasthis, int hdrscan, int statementsToo);
Expression *expandInline(InlineScanState *iss, Expression *ethis, Expressions *arguments, Statement **ps);
Expression *expandInline(InlineScanState *iss, Expression *eret, Expression *ethis, Expressions *arguments, Statement **ps);
const char *kind();
void toDocBuffer(OutBuffer *buf, Scope *sc);
FuncDeclaration *isUnique();
Expand Down
4 changes: 4 additions & 0 deletions src/expression.h
Expand Up @@ -1089,6 +1089,7 @@ class CallExp : public UnaExp
int inlineCost3(InlineCostState *ics);
Expression *doInline(InlineDoState *ids);
Expression *inlineScan(InlineScanState *iss);
Expression *inlineScan(InlineScanState *iss, Expression *eret);
};

class AddrExp : public UnaExp
Expand Down Expand Up @@ -1397,6 +1398,9 @@ class AssignExp : public BinExp
Identifier *opId(); // For operator overloading
void buildArrayIdent(OutBuffer *buf, Expressions *arguments);
Expression *buildArrayLoop(Parameters *fparams);

Expression *inlineScan(InlineScanState *iss);

elem *toElem(IRState *irs);
};

Expand Down