summaryrefslogtreecommitdiffstats
path: root/byterun/minor_gc.c
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2000-01-05 13:15:59 +0000
committerDamien Doligez <damien.doligez-inria.fr>2000-01-05 13:15:59 +0000
commitd87a2d30c5d440f21d27d5491f0dcb660d8aa817 (patch)
tree884a98efcbffde89c3a880d6d765f62251ab4841 /byterun/minor_gc.c
parent77551fc8d6d8238d09f101d5569dcf130f3cf489 (diff)
petite amelioration de oldify
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2732 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun/minor_gc.c')
-rw-r--r--byterun/minor_gc.c55
1 files changed, 0 insertions, 55 deletions
diff --git a/byterun/minor_gc.c b/byterun/minor_gc.c
index 28ec5f0ca..735135516 100644
--- a/byterun/minor_gc.c
+++ b/byterun/minor_gc.c
@@ -65,7 +65,6 @@ void set_minor_heap_size (asize_t size)
ref_table_end = ref_table + ref_table_size + ref_table_reserve;
}
-#if 0
void oldify (value v, value *p)
{
value result, field0;
@@ -117,60 +116,6 @@ void oldify (value v, value *p)
*p = v;
}
}
-#else
-void oldify (value v, value *p)
-{
- value result, field0;
- header_t hd;
- mlsize_t sz, i;
- tag_t tag;
-
- tail_call:
- if (Is_block (v) && Is_young (v)){
- Assert (Hp_val (v) >= young_ptr);
- hd = Hd_val (v);
- tag = Tag_hd (hd);
- if (Is_blue_hd (hd)){ /* Already forwarded ? */
- *p = Field (v, 0); /* Then the forward pointer is the first field. */
- }else if (tag == Infix_tag) {
- mlsize_t offset = Infix_offset_hd (hd);
- oldify(v - offset, p);
- *p += offset;
- }else if (tag >= No_scan_tag){
- sz = Wosize_hd (hd);
- result = alloc_shr (sz, tag);
- for (i = 0; i < sz; i++) Field(result, i) = Field(v, i);
- Hd_val (v) = Bluehd_hd (hd); /* Put the forward flag. */
- Field (v, 0) = result; /* And the forward pointer. */
- *p = result;
- }else{
- /* We can do recursive calls before all the fields are filled, because
- we will not be calling the major GC. */
- sz = Wosize_hd (hd);
- result = alloc_shr (sz, tag);
- *p = result;
- field0 = Field (v, 0);
- Hd_val (v) = Bluehd_hd (hd); /* Put the forward flag. */
- Field (v, 0) = result; /* And the forward pointer. */
- if (sz == 1) {
- p = &Field (result, 0);
- v = field0;
- goto tail_call;
- } else {
- oldify (field0, &Field (result, 0));
- for (i = 1; i < sz - 1; i++){
- oldify (Field(v, i), &Field (result, i));
- }
- p = &Field (result, i);
- v = Field (v, i);
- goto tail_call;
- }
- }
- }else{
- *p = v;
- }
-}
-#endif
void minor_collection (void)
{