Mercurial > projects > ddmd
comparison dmd/TypeInfoStructDeclaration.d @ 131:206db751bd4c
dmdfe 2.037 compiles now
author | Eldar Insafutdinov <e.insafutdinov@gmail.com> |
---|---|
date | Fri, 10 Sep 2010 00:27:37 +0100 |
parents | 60bb0fe4563e |
children | e8a741997ccf |
comparison
equal
deleted
inserted
replaced
130:60bb0fe4563e | 131:206db751bd4c |
---|---|
98 | 98 |
99 TypeFunction tfeqptr; | 99 TypeFunction tfeqptr; |
100 { | 100 { |
101 // bool opEqual(const T*) const; | 101 // bool opEqual(const T*) const; |
102 scope Scope sc = new Scope(); | 102 scope Scope sc = new Scope(); |
103 auto arguments = new Arguments; | 103 auto arguments = new Parameters; |
104 version (STRUCTTHISREF) { | 104 version (STRUCTTHISREF) { |
105 // arg type is ref const T | 105 // arg type is ref const T |
106 auto arg = new Argument(STC.STCref, tc.constOf(), null, null); | 106 auto arg = new Parameter(STC.STCref, tc.constOf(), null, null); |
107 } else { | 107 } else { |
108 // arg type is const T* | 108 // arg type is const T* |
109 auto arg = new Argument(STC.STCin, tc.pointerTo(), null, null); | 109 auto arg = new Parameter(STC.STCin, tc.pointerTo(), null, null); |
110 } | 110 } |
111 | 111 |
112 arguments.push(arg); | 112 arguments.push(arg); |
113 tfeqptr = new TypeFunction(arguments, Type.tbool, 0, LINK.LINKd); | 113 tfeqptr = new TypeFunction(arguments, Type.tbool, 0, LINK.LINKd); |
114 tfeqptr.mod = MODconst; | 114 tfeqptr.mod = MODconst; |
115 tfeqptr = cast(TypeFunction)tfeqptr.semantic(0, &sc); | 115 tfeqptr = cast(TypeFunction)tfeqptr.semantic(Loc(0), sc); |
116 } | 116 } |
117 | 117 |
118 TypeFunction *tfcmpptr; | |
119 { | 118 { |
120 Scope sc; | 119 Scope sc; |
121 auto arguments = new Arguments; | 120 auto arguments = new Parameters; |
122 version(STRUCTTHISREF) { | 121 version(STRUCTTHISREF) { |
123 // arg type is ref const T | 122 // arg type is ref const T |
124 auto arg = new Argument(STC.STCref, tc.constOf(), null, null); | 123 auto arg = new Parameter(STC.STCref, tc.constOf(), null, null); |
125 } else { | 124 } else { |
126 // arg type is const T* | 125 // arg type is const T* |
127 auto arg = new Argument(STC.STCin, tc.pointerTo(), null, null); | 126 auto arg = new Parameter(STC.STCin, tc.pointerTo(), null, null); |
128 } | 127 } |
129 | 128 |
130 arguments.push(arg); | 129 arguments.push(arg); |
131 tfeqptr = new TypeFunction(arguments, Type.tbool, 0, LINK.LINKd); | 130 tfeqptr = new TypeFunction(arguments, Type.tbool, 0, LINK.LINKd); |
132 tfeqptr.mod = MOD.MODconst; | 131 tfeqptr.mod = MOD.MODconst; |
133 tfeqptr = cast(TypeFunction)tfeqptr.semantic(Loc(0), sc); | 132 tfeqptr = cast(TypeFunction)tfeqptr.semantic(Loc(0), sc); |
134 } | 133 } |
135 | 134 |
136 TypeFunction tfcmpptr; | 135 TypeFunction tfcmpptr; |
137 { | 136 { |
138 scope Scope sc = new Scope(); | 137 scope Scope sc = new Scope(); |
139 auto arguments = new Parameters; | 138 auto arguments = new Parameters; |
140 version (STRUCTTHISREF) { | 139 version (STRUCTTHISREF) { |
141 // arg type is ref const T | 140 // arg type is ref const T |