File tree 5 files changed +10
-10
lines changed
5 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ use core::raw;
16
16
#[ inline]
17
17
#[ deprecated]
18
18
pub fn get_box_size ( body_size : uint , body_align : uint ) -> uint {
19
- let header_size = mem:: size_of :: < raw:: Box < ( ) > > ( ) ;
19
+ let header_size = mem:: size_of :: < raw:: GcBox < ( ) > > ( ) ;
20
20
let total_size = align_to ( header_size, body_align) + body_size;
21
21
total_size
22
22
}
Original file line number Diff line number Diff line change 20
20
21
21
use mem;
22
22
23
- /// The representation of a Rust managed box
24
- pub struct Box < T > {
23
+ /// The representation of `std::gc::Gc`.
24
+ pub struct GcBox < T > {
25
25
pub ref_count : uint ,
26
26
pub drop_glue : fn ( ptr : * mut u8 ) ,
27
- pub prev : * mut Box < T > ,
28
- pub next : * mut Box < T > ,
27
+ pub prev : * mut GcBox < T > ,
28
+ pub next : * mut GcBox < T > ,
29
29
pub data : T ,
30
30
}
31
31
Original file line number Diff line number Diff line change @@ -277,7 +277,7 @@ impl<'a> TyVisitor for ReprVisitor<'a> {
277
277
fn visit_box ( & mut self , mtbl : uint , inner : * const TyDesc ) -> bool {
278
278
try!( self , self . writer . write ( "box(GC) " . as_bytes ( ) ) ) ;
279
279
self . write_mut_qualifier ( mtbl) ;
280
- self . get :: < & raw:: Box < ( ) > > ( |this, b| {
280
+ self . get :: < & raw:: GcBox < ( ) > > ( |this, b| {
281
281
let p = & b. data as * const ( ) as * const u8 ;
282
282
this. visit_ptr_inner ( p, inner)
283
283
} )
Original file line number Diff line number Diff line change @@ -24,15 +24,15 @@ use task::Task;
24
24
25
25
static RC_IMMORTAL : uint = 0x77777777 ;
26
26
27
- pub type Box = raw:: Box < ( ) > ;
27
+ pub type Box = raw:: GcBox < ( ) > ;
28
28
29
29
pub struct MemoryRegion {
30
30
live_allocations : uint ,
31
31
}
32
32
33
33
pub struct LocalHeap {
34
34
memory_region : MemoryRegion ,
35
- live_allocs : * mut raw:: Box < ( ) > ,
35
+ live_allocs : * mut raw:: GcBox < ( ) > ,
36
36
}
37
37
38
38
impl LocalHeap {
@@ -161,7 +161,7 @@ impl LocalHeap {
161
161
}
162
162
163
163
unsafe fn each_live_alloc ( & mut self , read_next_before : bool ,
164
- f : |& mut LocalHeap , alloc : * mut raw:: Box < ( ) > |) {
164
+ f : |& mut LocalHeap , alloc : * mut raw:: GcBox < ( ) > |) {
165
165
//! Walks the internal list of allocations
166
166
167
167
let mut alloc = self . live_allocs ;
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ impl<T: Default + 'static> Default for Gc<T> {
89
89
}
90
90
}
91
91
92
- impl < T : ' static > raw:: Repr < * const raw:: Box < T > > for Gc < T > { }
92
+ impl < T : ' static > raw:: Repr < * const raw:: GcBox < T > > for Gc < T > { }
93
93
94
94
impl < S : hash:: Writer , T : hash:: Hash < S > + ' static > hash:: Hash < S > for Gc < T > {
95
95
fn hash ( & self , s : & mut S ) {
You can’t perform that action at this time.
0 commit comments