Mercurial > projects > ldc
comparison dmd2/func.c @ 1487:f62347c22d81
Apply changes from r1482 to D2 frontend too. Completely untested, but ldc2
compiles again.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Mon, 08 Jun 2009 13:45:26 +0200 |
parents | 7d1e815b4f76 |
children | 54b3c1394d62 |
comparison
equal
deleted
inserted
replaced
1486:9ed0695cb93c | 1487:f62347c22d81 |
---|---|
85 #if IN_LLVM | 85 #if IN_LLVM |
86 // LDC | 86 // LDC |
87 isArrayOp = false; | 87 isArrayOp = false; |
88 allowInlining = false; | 88 allowInlining = false; |
89 | 89 |
90 availableExternally = true; // assume this unless proven otherwise | |
91 | |
90 // function types in ldc don't merge if the context parameter differs | 92 // function types in ldc don't merge if the context parameter differs |
91 // so we actually don't care about the function declaration, but only | 93 // so we actually don't care about the function declaration, but only |
92 // what kind of context parameter it has. | 94 // what kind of context parameter it has. |
93 // however, this constructor is usually called from the parser, which | 95 // however, this constructor is usually called from the parser, which |
94 // unfortunately doesn't provide the information needed to get to the | 96 // unfortunately doesn't provide the information needed to get to the |
669 | 671 |
670 //printf(" sc->incontract = %d\n", sc->incontract); | 672 //printf(" sc->incontract = %d\n", sc->incontract); |
671 if (semanticRun >= 3) | 673 if (semanticRun >= 3) |
672 return; | 674 return; |
673 semanticRun = 3; | 675 semanticRun = 3; |
676 | |
677 // LDC | |
678 if (!global.params.useAvailableExternally) | |
679 availableExternally = false; | |
674 | 680 |
675 if (!type || type->ty != Tfunction) | 681 if (!type || type->ty != Tfunction) |
676 return; | 682 return; |
677 f = (TypeFunction *)(type); | 683 f = (TypeFunction *)(type); |
678 size_t nparams = Argument::dim(f->parameters); | 684 size_t nparams = Argument::dim(f->parameters); |