Mercurial > projects > ddmd
comparison dmd/Type.d @ 51:b7d29f613539
StaticAssertStatement.syntaxCopy
IfStatement.syntaxCopy
CompoundDeclarationStatement.syntaxCopy
VoidInitializer.syntaxCopy
TypeAArray.syntaxCopy
TypeTypeof.syntaxCopy
TypeAArray.resolve
TypeSArray.deduceType
TypeAArray.deduceType
TypeAArray.implicitConvTo
TemplateDeclaration.leastAsSpecialized
TemplateTypeParameter.dummyArg
TypeIdentifier.deduceType
TemplateTypeParameter.syntaxCopy
Lexer.hexStringConstant
Lexer.delimitedStringConstant
GotoDefaultStatement.ctor
CaseRangeStatement.ctor
Type.castMod
StorageClassDeclaration.syntaxCopy
TemplateDeclaration.syntaxCopy
author | korDen |
---|---|
date | Sat, 21 Aug 2010 11:17:42 +0400 |
parents | ccbc1e0bb3f0 |
children | a8b50ff7f201 |
comparison
equal
deleted
inserted
replaced
50:adf6f7f216ea | 51:b7d29f613539 |
---|---|
1371 } | 1371 } |
1372 tn.check(); | 1372 tn.check(); |
1373 } | 1373 } |
1374 } | 1374 } |
1375 | 1375 |
1376 /************************************ | |
1377 * Apply MODxxxx bits to existing type. | |
1378 */ | |
1376 Type castMod(uint mod) | 1379 Type castMod(uint mod) |
1377 { | 1380 { |
1378 assert(false); | 1381 Type t; |
1382 | |
1383 switch (mod) | |
1384 { | |
1385 case 0: | |
1386 t = mutableOf(); | |
1387 break; | |
1388 | |
1389 case MODconst: | |
1390 t = constOf(); | |
1391 break; | |
1392 | |
1393 case MODinvariant: | |
1394 t = invariantOf(); | |
1395 break; | |
1396 | |
1397 case MODshared: | |
1398 t = sharedOf(); | |
1399 break; | |
1400 | |
1401 case MODshared | MODconst: | |
1402 t = sharedConstOf(); | |
1403 break; | |
1404 | |
1405 default: | |
1406 assert(0); | |
1407 } | |
1408 return t; | |
1379 } | 1409 } |
1380 | 1410 |
1381 /************************************ | 1411 /************************************ |
1382 * Add MODxxxx bits to existing type. | 1412 * Add MODxxxx bits to existing type. |
1383 * We're adding, not replacing, so adding const to | 1413 * We're adding, not replacing, so adding const to |