]> gitweb.factorcode.org Git - factor.git/commitdiff
vm: more descriptive renames 2762/head
authorRazetime <rraghu.11502@gmail.com>
Tue, 28 Feb 2023 17:26:46 +0000 (22:56 +0530)
committerRazetime <rraghu.11502@gmail.com>
Tue, 28 Feb 2023 17:26:46 +0000 (22:56 +0530)
vm/aging_space.hpp
vm/allot.hpp
vm/bump_allocator.hpp
vm/mark_bits.hpp
vm/tenured_space.hpp

index 89c2f797fd8771bc147ad4068b0c74673a483742..5de3f2282fcaba09d8c45960740fd044291e9a06 100644 (file)
@@ -16,9 +16,9 @@ struct aging_space : bump_allocator {
   }
 
   cell next_object_after(cell scan) {
-    cell dsize = ((object*)scan)->size();
-    if (scan + dsize < here)
-      return scan + dsize;
+    cell data_size = ((object*)scan)->size();
+    if (scan + data_size < here)
+      return scan + data_size;
     return 0;
   }
 
index 446f36b2db8a724f740f3c75c53bbf50b697a356..97fdd03222b47553294e0bf47a8e02e0e2795d15 100644 (file)
@@ -64,18 +64,18 @@ inline object* factor_vm::allot_large_object(cell type, cell size) {
 inline object* factor_vm::allot_object(cell type, cell size) {
   FACTOR_ASSERT(!current_gc);
 
-  bump_allocator *dnursery = data->nursery;
+  bump_allocator *data_nursery = data->nursery;
 
   // If the object is bigger than the nursery, allocate it in tenured space
-  if (size >= dnursery->size)
+  if (size >= data_nursery->size)
     return allot_large_object(type, size);
 
   // If the object is smaller than the nursery, allocate it in the nursery,
   // after a GC if needed
-  if (dnursery->here + size > dnursery->end)
+  if (data_nursery->here + size > data_nursery->end)
     primitive_minor_gc();
 
-  object* obj = dnursery->allot(size);
+  object* obj = data_nursery->allot(size);
   obj->initialize(type);
 
   return obj;
index aeb9638762f25623530047b1c38ead68894fd1c3..171226def8b103e8d7e7a2d79460536a93249032 100644 (file)
@@ -14,9 +14,9 @@ struct bump_allocator {
     return (cell)obj >= start && (cell)obj < end;
   }
 
-  object* allot(cell dsize) {
+  object* allot(cell data_size) {
     cell h = here;
-    here = h + align(dsize, data_alignment);
+    here = h + align(data_size, data_alignment);
     return (object*)h;
   }
 
index e7600e2417393f96f07ac06f33572c2ff1b7ce8e..3c52cde026365e631de598caf81447987e5b0185 100644 (file)
@@ -51,20 +51,20 @@ struct mark_bits {
     return (bits[position.first] & ((cell)1 << position.second)) != 0;
   }
 
-  void set_bitmap_range(cell* bits, const cell address, const cell dsize) {
-    std::pair<cell, cell> bstart = bitmap_deref(address);
-    std::pair<cell, cell> end = bitmap_deref(address + dsize);
+  void set_bitmap_range(cell* bits, const cell address, const cell data_size) {
+    std::pair<cell, cell> bitmap_start = bitmap_deref(address);
+    std::pair<cell, cell> end = bitmap_deref(address + data_size);
 
-    cell start_mask = ((cell)1 << bstart.second) - 1;
+    cell start_mask = ((cell)1 << bitmap_start.second) - 1;
     cell end_mask = ((cell)1 << end.second) - 1;
 
-    if (bstart.first == end.first)
-      bits[bstart.first] |= start_mask ^ end_mask;
+    if (bitmap_start.first == end.first)
+      bits[bitmap_start.first] |= start_mask ^ end_mask;
     else {
-      FACTOR_ASSERT(bstart.first < bits_size);
-      bits[bstart.first] |= ~start_mask;
+      FACTOR_ASSERT(bitmap_start.first < bits_size);
+      bits[bitmap_start.first] |= ~start_mask;
 
-      for (cell index = bstart.first + 1; index < end.first; index++)
+      for (cell index = bitmap_start.first + 1; index < end.first; index++)
         bits[index] = (cell)-1;
 
       if (end_mask != 0) {
index 739ba903908db462eec9ffe621b5426e2c88743d..0f05ba9888ed1a7228a79070ba4a199dad9df981 100644 (file)
@@ -28,8 +28,8 @@ struct tenured_space : free_list_allocator<object> {
   }
 
   cell next_object_after(cell scan) {
-    cell dsize = ((object*)scan)->size();
-    return next_allocated_object_after(scan + dsize);
+    cell data_size = ((object*)scan)->size();
+    return next_allocated_object_after(scan + data_size);
   }
 
   void sweep() {