@@ -143,9 +143,10 @@ fn dict_is_static(tcx: ty::ctxt, origin: typeck::dict_origin) -> bool {
143
143
}
144
144
145
145
fn get_dict ( bcx : @block_ctxt , origin : typeck:: dict_origin ) -> result {
146
+ let ccx = bcx_ccx ( bcx) ;
146
147
alt origin {
147
148
typeck : : dict_static ( impl_did, tys, sub_origins) {
148
- if dict_is_static ( bcx_tcx ( bcx ) , origin) {
149
+ if dict_is_static ( ccx . tcx , origin) {
149
150
ret rslt ( bcx, get_static_dict ( bcx, origin) ) ;
150
151
}
151
152
let { bcx, ptrs} = get_dict_ptrs ( bcx, origin) ;
@@ -155,7 +156,10 @@ fn get_dict(bcx: @block_ctxt, origin: typeck::dict_origin) -> result {
155
156
Store ( bcx, PointerCast ( bcx, ptr, pty) , GEPi ( bcx, dict, [ 0 , i] ) ) ;
156
157
i += 1 ;
157
158
}
158
- rslt ( bcx, PointerCast ( bcx, dict, T_ptr ( T_dict ( ) ) ) )
159
+ dict = Call ( bcx, ccx. upcalls . intern_dict ,
160
+ [ C_uint ( ccx, vec:: len ( ptrs) ) ,
161
+ PointerCast ( bcx, dict, T_ptr ( T_dict ( ) ) ) ] ) ;
162
+ rslt ( bcx, dict)
159
163
}
160
164
typeck:: dict_param( n_param, n_bound) {
161
165
rslt( bcx, option : : get ( bcx. fcx . lltyparams [ n_param] . dicts ) [ n_bound] )
0 commit comments