@@ -450,7 +450,7 @@ struct Module {
450
450
glob_count : Cell < uint > ,
451
451
452
452
// The index of the import we're resolving.
453
- resolved_import_count : uint ,
453
+ resolved_import_count : Cell < uint > ,
454
454
455
455
// Whether this module is populated. If not populated, any attempt to
456
456
// access the children must be preceded with a
@@ -476,14 +476,14 @@ impl Module {
476
476
anonymous_children : @mut HashMap :: new ( ) ,
477
477
import_resolutions : @mut HashMap :: new ( ) ,
478
478
glob_count : Cell :: new ( 0 ) ,
479
- resolved_import_count : 0 ,
479
+ resolved_import_count : Cell :: new ( 0 ) ,
480
480
populated : Cell :: new ( !external) ,
481
481
}
482
482
}
483
483
484
484
fn all_imports_resolved ( & self ) -> bool {
485
485
let imports = & mut * self . imports ;
486
- return imports. len ( ) == self . resolved_import_count ;
486
+ return imports. len ( ) == self . resolved_import_count . get ( ) ;
487
487
}
488
488
}
489
489
@@ -2039,8 +2039,8 @@ impl Resolver {
2039
2039
2040
2040
let imports = & mut * module. imports ;
2041
2041
let import_count = imports. len ( ) ;
2042
- while module. resolved_import_count < import_count {
2043
- let import_index = module. resolved_import_count ;
2042
+ while module. resolved_import_count . get ( ) < import_count {
2043
+ let import_index = module. resolved_import_count . get ( ) ;
2044
2044
let import_directive = imports[ import_index] ;
2045
2045
match self . resolve_import_for_module ( module, import_directive) {
2046
2046
Failed => {
@@ -2060,7 +2060,8 @@ impl Resolver {
2060
2060
}
2061
2061
}
2062
2062
2063
- module. resolved_import_count += 1 ;
2063
+ module. resolved_import_count
2064
+ . set ( module. resolved_import_count . get ( ) + 1 ) ;
2064
2065
}
2065
2066
}
2066
2067
@@ -3151,7 +3152,7 @@ impl Resolver {
3151
3152
}
3152
3153
3153
3154
fn report_unresolved_imports ( & mut self , module_ : @mut Module ) {
3154
- let index = module_. resolved_import_count ;
3155
+ let index = module_. resolved_import_count . get ( ) ;
3155
3156
let imports: & mut ~[ @ImportDirective ] = & mut * module_. imports ;
3156
3157
let import_count = imports. len ( ) ;
3157
3158
if index != import_count {
0 commit comments