Skip to content

Commit

Permalink
More cutting #if cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
yebblies committed Dec 18, 2013
1 parent ccea9b0 commit 99a7572
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
5 changes: 0 additions & 5 deletions src/func.c
Expand Up @@ -3141,11 +3141,6 @@ bool FuncDeclaration::isFinalFunc()
((cd = toParent()->isClassDeclaration()) != NULL && cd->storage_class & STCfinal)));
if (cd)
printf("\tmember of %s\n", cd->toChars());
#if 0
!(isStatic() || protection == PROTprivate || protection == PROTpackage) &&
(cd = toParent()->isClassDeclaration()) != NULL &&
cd->storage_class & STCfinal);
#endif
#endif
return isMember() &&
(Declaration::isFinal() ||
Expand Down
10 changes: 4 additions & 6 deletions src/inline.c
Expand Up @@ -1566,6 +1566,10 @@ int FuncDeclaration::canInline(int hasthis, int hdrscan, int statementsToo)
goto Lno;
}

// cannot inline constructor calls because we need to convert:
// return;
// to:
// return this;
if (
!fbody ||
ident == Id::ensure || // ensure() has magic properties the inliner loses
Expand All @@ -1574,12 +1578,6 @@ int FuncDeclaration::canInline(int hasthis, int hdrscan, int statementsToo)
toParent()->isFuncDeclaration()->needThis()) ||
!hdrscan &&
(
#if 0
isCtorDeclaration() || // cannot because need to convert:
// return;
// to:
// return this;
#endif
isSynchronized() ||
isImportedSymbol() ||
hasNestedFrameRefs() || // no nested references to this frame
Expand Down
5 changes: 4 additions & 1 deletion src/mars.h
Expand Up @@ -417,10 +417,13 @@ void vdeprecation(Loc loc, const char *format, va_list ap, const char *p1 = NULL

#if defined(__GNUC__) || defined(__clang__)
__attribute__((noreturn))
void fatal();
#elif _MSC_VER
__declspec(noreturn)
#endif
void fatal();
#else
void fatal();
#endif

void err_nomem();
int runLINK();
Expand Down

0 comments on commit 99a7572

Please sign in to comment.