@@ -1032,21 +1032,10 @@ trait Types extends api.Types { self: SymbolTable =>
1032
1032
1033
1033
// Console.println("find member " + name.decode + " in " + this + ":" + this.baseClasses)//DEBUG
1034
1034
var members : Scope = null
1035
- var membertpes : mutable.Map [Symbol , Type ] = null
1036
1035
var required = requiredFlags
1037
1036
var excluded = excludedFlags | DEFERRED
1038
1037
var continue = true
1039
1038
var self : Type = null
1040
-
1041
- def getMtpe (cache : mutable.Map [Symbol , Type ], sym : Symbol ): Type = cache get sym match {
1042
- case Some (tpe) if tpe ne null =>
1043
- tpe
1044
- case _ =>
1045
- val result = self memberType sym
1046
- cache(sym) = result
1047
- result
1048
- }
1049
-
1050
1039
while (continue) {
1051
1040
continue = false
1052
1041
val bcs0 = baseClasses
@@ -1064,10 +1053,7 @@ trait Types extends api.Types { self: SymbolTable =>
1064
1053
(bcs eq bcs0) ||
1065
1054
(flags & PrivateLocal ) != PrivateLocal ||
1066
1055
(bcs0.head.hasTransOwner(bcs.head)))) {
1067
- if (members eq null ) {
1068
- members = newScope
1069
- membertpes = new mutable.HashMap
1070
- }
1056
+ if (members eq null ) members = newScope
1071
1057
var others : ScopeEntry = members.lookupEntry(sym.name)
1072
1058
var symtpe : Type = null
1073
1059
while ((others ne null ) && {
@@ -1077,7 +1063,7 @@ trait Types extends api.Types { self: SymbolTable =>
1077
1063
(flags & PRIVATE ) != 0 || {
1078
1064
if (self eq null ) self = this .narrow
1079
1065
if (symtpe eq null ) symtpe = self.memberType(sym)
1080
- ! (getMtpe(membertpes, other) matches symtpe)
1066
+ ! (self.memberType( other) matches symtpe)
1081
1067
})}) {
1082
1068
others = members lookupNextEntry others
1083
1069
}
@@ -1092,7 +1078,7 @@ trait Types extends api.Types { self: SymbolTable =>
1092
1078
bcs = bcs.tail
1093
1079
} // while (!bcs.isEmpty)
1094
1080
required |= DEFERRED
1095
- excluded = excludedFlags
1081
+ excluded &= ~ ( DEFERRED .toLong)
1096
1082
} // while (continue)
1097
1083
Statistics .popTimer(typeOpsStack, start)
1098
1084
if (suspension ne null ) suspension foreach (_.suspended = false )
@@ -1125,32 +1111,12 @@ trait Types extends api.Types { self: SymbolTable =>
1125
1111
var members : List [Symbol ] = null
1126
1112
var lastM : :: [Symbol ] = null
1127
1113
var membertpe : Type = null
1128
- var membertpes : Array [Type ] = null
1129
1114
var required = requiredFlags
1130
1115
var excluded = excludedFlags | DEFERRED
1131
1116
var continue = true
1132
1117
var self : Type = null
1133
1118
val fingerPrint : Long = name.fingerPrint
1134
1119
1135
- def getMtpe (idx : Int , sym : Symbol ): Type = {
1136
- var result = membertpes(idx)
1137
- if (result eq null ) {
1138
- result = self memberType sym
1139
- membertpes(idx) = result
1140
- }
1141
- result
1142
- }
1143
-
1144
- def addMtpe (xs : Array [Type ], idx : Int , tpe : Type ): Array [Type ] =
1145
- if (idx < xs.length) {
1146
- xs(idx) = tpe
1147
- xs
1148
- } else {
1149
- val ys = new Array [Type ](xs.length * 2 )
1150
- Array .copy(xs, 0 , ys, 0 , xs.length)
1151
- addMtpe(ys, idx, tpe)
1152
- }
1153
-
1154
1120
while (continue) {
1155
1121
continue = false
1156
1122
val bcs0 = baseClasses
@@ -1176,24 +1142,18 @@ trait Types extends api.Types { self: SymbolTable =>
1176
1142
} else if (member eq NoSymbol ) {
1177
1143
member = sym
1178
1144
} else if (members eq null ) {
1179
- var symtpe : Type = null
1180
1145
if ((member ne sym) &&
1181
1146
((member.owner eq sym.owner) ||
1182
1147
(flags & PRIVATE ) != 0 || {
1183
1148
if (self eq null ) self = this .narrow
1184
1149
if (membertpe eq null ) membertpe = self.memberType(member)
1185
- symtpe = self.memberType(sym)
1186
- ! (membertpe matches symtpe)
1150
+ ! (membertpe matches self.memberType(sym))
1187
1151
})) {
1188
1152
lastM = new :: (sym, null )
1189
1153
members = member :: lastM
1190
- membertpes = new Array [Type ](8 )
1191
- membertpes(0 ) = membertpe
1192
- membertpes(1 ) = symtpe
1193
1154
}
1194
1155
} else {
1195
1156
var others : List [Symbol ] = members
1196
- var idx = 0
1197
1157
var symtpe : Type = null
1198
1158
while ((others ne null ) && {
1199
1159
val other = others.head
@@ -1202,16 +1162,14 @@ trait Types extends api.Types { self: SymbolTable =>
1202
1162
(flags & PRIVATE ) != 0 || {
1203
1163
if (self eq null ) self = this .narrow
1204
1164
if (symtpe eq null ) symtpe = self.memberType(sym)
1205
- ! (getMtpe(idx, other) matches symtpe)
1165
+ ! (self.memberType( other) matches symtpe)
1206
1166
})}) {
1207
1167
others = others.tail
1208
- idx += 1
1209
1168
}
1210
1169
if (others eq null ) {
1211
1170
val lastM1 = new :: (sym, null )
1212
1171
lastM.tl = lastM1
1213
1172
lastM = lastM1
1214
- membertpes = addMtpe(membertpes, idx, symtpe)
1215
1173
}
1216
1174
}
1217
1175
} else if (excl == DEFERRED ) {
@@ -1225,7 +1183,7 @@ trait Types extends api.Types { self: SymbolTable =>
1225
1183
bcs = if (name == nme.CONSTRUCTOR ) Nil else bcs.tail
1226
1184
} // while (!bcs.isEmpty)
1227
1185
required |= DEFERRED
1228
- excluded = excludedFlags
1186
+ excluded &= ~ ( DEFERRED .toLong)
1229
1187
} // while (continue)
1230
1188
Statistics .popTimer(typeOpsStack, start)
1231
1189
if (suspension ne null ) suspension foreach (_.suspended = false )
0 commit comments