Mercurial > projects > ddmd
comparison dmd/ClassDeclaration.d @ 72:2e2a5c3f943a
reduced warnings by adding override to the methods
think this also normalizes different line endings used all over the place
author | Trass3r |
---|---|
date | Sat, 28 Aug 2010 16:19:48 +0200 |
parents | a8b50ff7f201 |
children | ef02e2e203c2 |
comparison
equal
deleted
inserted
replaced
71:8e24ef1dd139 | 72:2e2a5c3f943a |
---|---|
279 isauto = false; | 279 isauto = false; |
280 isabstract = false; | 280 isabstract = false; |
281 inuse = 0; | 281 inuse = 0; |
282 } | 282 } |
283 | 283 |
284 Dsymbol syntaxCopy(Dsymbol s) | 284 override Dsymbol syntaxCopy(Dsymbol s) |
285 { | 285 { |
286 ClassDeclaration cd; | 286 ClassDeclaration cd; |
287 | 287 |
288 //printf("ClassDeclaration.syntaxCopy('%s')\n", toChars()); | 288 //printf("ClassDeclaration.syntaxCopy('%s')\n", toChars()); |
289 if (s) | 289 if (s) |
303 | 303 |
304 ScopeDsymbol.syntaxCopy(cd); | 304 ScopeDsymbol.syntaxCopy(cd); |
305 return cd; | 305 return cd; |
306 } | 306 } |
307 | 307 |
308 void semantic(Scope sc) | 308 override void semantic(Scope sc) |
309 { | 309 { |
310 int i; | 310 int i; |
311 uint offset; | 311 uint offset; |
312 | 312 |
313 //printf("ClassDeclaration.semantic(%s), type = %p, sizeok = %d, this = %p\n", toChars(), type, sizeok, this); | 313 //printf("ClassDeclaration.semantic(%s), type = %p, sizeok = %d, this = %p\n", toChars(), type, sizeok, this); |
808 } | 808 } |
809 } | 809 } |
810 //printf("-ClassDeclaration.semantic(%s), type = %p\n", toChars(), type); | 810 //printf("-ClassDeclaration.semantic(%s), type = %p\n", toChars(), type); |
811 } | 811 } |
812 | 812 |
813 void toCBuffer(OutBuffer buf, HdrGenState* hgs) | 813 override void toCBuffer(OutBuffer buf, HdrGenState* hgs) |
814 { | 814 { |
815 assert(false); | 815 assert(false); |
816 } | 816 } |
817 | 817 |
818 /********************************************* | 818 /********************************************* |
852 } | 852 } |
853 | 853 |
854 return 0; | 854 return 0; |
855 } | 855 } |
856 | 856 |
857 Dsymbol search(Loc, Identifier ident, int flags) | 857 override Dsymbol search(Loc, Identifier ident, int flags) |
858 { | 858 { |
859 Dsymbol s; | 859 Dsymbol s; |
860 //printf("%s.ClassDeclaration.search('%s')\n", toChars(), ident.toChars()); | 860 //printf("%s.ClassDeclaration.search('%s')\n", toChars(), ident.toChars()); |
861 | 861 |
862 if (scope_) | 862 if (scope_) |
1037 int vtblOffset() | 1037 int vtblOffset() |
1038 { | 1038 { |
1039 assert(false); | 1039 assert(false); |
1040 } | 1040 } |
1041 | 1041 |
1042 string kind() | 1042 override string kind() |
1043 { | 1043 { |
1044 return "class"; | 1044 return "class"; |
1045 } | 1045 } |
1046 | 1046 |
1047 string mangle() | 1047 override string mangle() |
1048 { | 1048 { |
1049 Dsymbol parentsave = parent; | 1049 Dsymbol parentsave = parent; |
1050 | 1050 |
1051 //printf("ClassDeclaration.mangle() %s.%s\n", parent.toChars(), toChars()); | 1051 //printf("ClassDeclaration.mangle() %s.%s\n", parent.toChars(), toChars()); |
1052 | 1052 |
1076 string id = Dsymbol.mangle(); | 1076 string id = Dsymbol.mangle(); |
1077 parent = parentsave; | 1077 parent = parentsave; |
1078 return id; | 1078 return id; |
1079 } | 1079 } |
1080 | 1080 |
1081 void toDocBuffer(OutBuffer buf) | 1081 override void toDocBuffer(OutBuffer buf) |
1082 { | 1082 { |
1083 assert(false); | 1083 assert(false); |
1084 } | 1084 } |
1085 | 1085 |
1086 PROT getAccess(Dsymbol smember) // determine access to smember | 1086 override PROT getAccess(Dsymbol smember) // determine access to smember |
1087 { | 1087 { |
1088 PROT access_ret = PROT.PROTnone; | 1088 PROT access_ret = PROT.PROTnone; |
1089 | 1089 |
1090 version (LOG) { | 1090 version (LOG) { |
1091 printf("+ClassDeclaration::getAccess(this = '%s', smember = '%s')\n", | 1091 printf("+ClassDeclaration::getAccess(this = '%s', smember = '%s')\n", |
1144 } | 1144 } |
1145 | 1145 |
1146 return access_ret; | 1146 return access_ret; |
1147 } | 1147 } |
1148 | 1148 |
1149 void addLocalClass(ClassDeclarations aclasses) | 1149 override void addLocalClass(ClassDeclarations aclasses) |
1150 { | 1150 { |
1151 aclasses.push(cast(void*)this); | 1151 aclasses.push(cast(void*)this); |
1152 } | 1152 } |
1153 | 1153 |
1154 // Back end | 1154 // Back end |
1155 void toObjFile(int multiobj) // compile to .obj file | 1155 override void toObjFile(int multiobj) // compile to .obj file |
1156 { | 1156 { |
1157 uint i; | 1157 uint i; |
1158 uint offset; | 1158 uint offset; |
1159 Symbol* sinit; | 1159 Symbol* sinit; |
1160 enum_SC scclass; | 1160 enum_SC scclass; |
1747 static private __gshared Classsym* scc; | 1747 static private __gshared Classsym* scc; |
1748 | 1748 |
1749 /************************************* | 1749 /************************************* |
1750 * Create the "ClassInfo" symbol | 1750 * Create the "ClassInfo" symbol |
1751 */ | 1751 */ |
1752 Symbol* toSymbol() | 1752 override Symbol* toSymbol() |
1753 { | 1753 { |
1754 if (!csym) | 1754 if (!csym) |
1755 { | 1755 { |
1756 Symbol* s; | 1756 Symbol* s; |
1757 | 1757 |
1898 } | 1898 } |
1899 | 1899 |
1900 Symbol* vtblsym; | 1900 Symbol* vtblsym; |
1901 | 1901 |
1902 ///ClassDeclaration isClassDeclaration() { return cast(ClassDeclaration)this; } /// huh? | 1902 ///ClassDeclaration isClassDeclaration() { return cast(ClassDeclaration)this; } /// huh? |
1903 ClassDeclaration isClassDeclaration() { return this; } | 1903 override ClassDeclaration isClassDeclaration() { return this; } |
1904 } | 1904 } |