Mercurial > projects > ddmd
comparison dmd/ClassDeclaration.d @ 23:460959608115
Branch merge.
author | Robert Clipsham <robert@octarineparrot.com> |
---|---|
date | Mon, 12 Apr 2010 17:00:08 +0100 |
parents | 427f8aa74d28 fd4acc376c45 |
children | a8b50ff7f201 |
comparison
equal
deleted
inserted
replaced
13:427f8aa74d28 | 23:460959608115 |
---|---|
69 | 69 |
70 enum OFFSET_RUNTIME = 0x76543210; | 70 enum OFFSET_RUNTIME = 0x76543210; |
71 | 71 |
72 struct Param | 72 struct Param |
73 { | 73 { |
74 int isf(FuncDeclaration fd2) | 74 int isf(void*, FuncDeclaration fd2) |
75 { | 75 { |
76 //printf("param = %p, fd = %p %s\n", param, fd, fd.toChars()); | 76 //printf("param = %p, fd = %p %s\n", param, fd, fd.toChars()); |
77 return fd is fd2; | 77 return fd is fd2; |
78 } | 78 } |
79 | 79 |
906 { | 906 { |
907 for (int i = 0; i < os.a.dim; i++) | 907 for (int i = 0; i < os.a.dim; i++) |
908 { | 908 { |
909 Dsymbol s2 = cast(Dsymbol)os.a.data[i]; | 909 Dsymbol s2 = cast(Dsymbol)os.a.data[i]; |
910 FuncDeclaration f2 = s2.isFuncDeclaration(); | 910 FuncDeclaration f2 = s2.isFuncDeclaration(); |
911 if (f2 && overloadApply(f2, &p.isf)) | 911 if (f2 && overloadApply(f2, &p.isf, &p)) |
912 return false; | 912 return false; |
913 } | 913 } |
914 return true; | 914 return true; |
915 } | 915 } |
916 else | 916 else |
917 { | 917 { |
918 FuncDeclaration fdstart = s.isFuncDeclaration(); | 918 FuncDeclaration fdstart = s.isFuncDeclaration(); |
919 //printf("%s fdstart = %p\n", s.kind(), fdstart); | 919 //printf("%s fdstart = %p\n", s.kind(), fdstart); |
920 return !overloadApply(fdstart, &p.isf); | 920 return !overloadApply(fdstart, &p.isf, &p); |
921 } | 921 } |
922 } | 922 } |
923 } | 923 } |
924 FuncDeclaration findFunc(Identifier ident, TypeFunction tf) | 924 FuncDeclaration findFunc(Identifier ident, TypeFunction tf) |
925 { | 925 { |
1240 | 1240 |
1241 // Generate static initializer | 1241 // Generate static initializer |
1242 sinit.Sclass = scclass; | 1242 sinit.Sclass = scclass; |
1243 sinit.Sfl = FLdata; | 1243 sinit.Sfl = FLdata; |
1244 version (ELFOBJ) { // Burton | 1244 version (ELFOBJ) { // Burton |
1245 sinit.Sseg = CDATA; | 1245 sinit.Sseg = Segment.CDATA; |
1246 } | 1246 } |
1247 version (MACHOBJ) { | 1247 version (MACHOBJ) { |
1248 sinit.Sseg = DATA; | 1248 sinit.Sseg = Segment.DATA; |
1249 } | 1249 } |
1250 toDt(&sinit.Sdt); | 1250 toDt(&sinit.Sdt); |
1251 outdata(sinit); | 1251 outdata(sinit); |
1252 | 1252 |
1253 ////////////////////////////////////////////// | 1253 ////////////////////////////////////////////// |
1566 | 1566 |
1567 | 1567 |
1568 csym.Sdt = dt; | 1568 csym.Sdt = dt; |
1569 version (ELFOBJ_OR_MACHOBJ) { // Burton | 1569 version (ELFOBJ_OR_MACHOBJ) { // Burton |
1570 // ClassInfo cannot be const data, because we use the monitor on it | 1570 // ClassInfo cannot be const data, because we use the monitor on it |
1571 csym.Sseg = DATA; | 1571 csym.Sseg = Segment.DATA; |
1572 } | 1572 } |
1573 outdata(csym); | 1573 outdata(csym); |
1574 if (isExport()) | 1574 if (isExport()) |
1575 obj_export(csym,0); | 1575 obj_export(csym,0); |
1576 | 1576 |
1633 | 1633 |
1634 vtblsym.Sdt = dt; | 1634 vtblsym.Sdt = dt; |
1635 vtblsym.Sclass = scclass; | 1635 vtblsym.Sclass = scclass; |
1636 vtblsym.Sfl = FLdata; | 1636 vtblsym.Sfl = FLdata; |
1637 version (ELFOBJ) { | 1637 version (ELFOBJ) { |
1638 vtblsym.Sseg = CDATA; | 1638 vtblsym.Sseg = Segment.CDATA; |
1639 } | 1639 } |
1640 version (MACHOBJ) { | 1640 version (MACHOBJ) { |
1641 vtblsym.Sseg = DATA; | 1641 vtblsym.Sseg = Segment.DATA; |
1642 } | 1642 } |
1643 outdata(vtblsym); | 1643 outdata(vtblsym); |
1644 if (isExport()) | 1644 if (isExport()) |
1645 obj_export(vtblsym,0); | 1645 obj_export(vtblsym,0); |
1646 } | 1646 } |