]> gitweb.factorcode.org Git - factor.git/commitdiff
vm: replace line comments // with block comments /**/ for consintency
authorAlexander Iljin <ajsoft@yandex.ru>
Sat, 30 Jul 2016 02:23:10 +0000 (05:23 +0300)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 3 Aug 2016 16:19:48 +0000 (09:19 -0700)
Fix #1651.

23 files changed:
vm/bignum.cpp
vm/bitwise_hacks.hpp
vm/code_blocks.hpp
vm/contexts.cpp
vm/cpu-x86.hpp
vm/data_heap.cpp
vm/debug.cpp
vm/errors.hpp
vm/factor.cpp
vm/factor.hpp
vm/gc_info.hpp
vm/io.cpp
vm/layouts.hpp
vm/mach_signal.cpp
vm/mvm.cpp
vm/objects.hpp
vm/os-linux-x86.32.hpp
vm/os-windows.cpp
vm/os-windows.hpp
vm/sampling_profiler.cpp
vm/sampling_profiler.hpp
vm/utilities.hpp
vm/vm.hpp

index 5b78e19d98c42e9b0df9714903d92f2e3542dad4..e4fc0fb326bdbf5d63ec8f07d8c32c8d4634eca8 100644 (file)
@@ -1737,7 +1737,7 @@ bignum* factor_vm::bignum_gcd(bignum* a_, bignum* b_) {
   /* clone the bignums so we can modify them in-place */
   size_a = BIGNUM_LENGTH(a);
   data_root<bignum> c(allot_bignum(size_a, 0), this);
-  // c = allot_bignum(size_a, 0);
+  /* c = allot_bignum(size_a, 0); */
   scan_a = BIGNUM_START_PTR(a);
   a_end = scan_a + size_a;
   scan_c = BIGNUM_START_PTR(c);
@@ -1808,7 +1808,7 @@ bignum* factor_vm::bignum_gcd(bignum* a_, bignum* b_) {
         return c.untagged();
       }
 
-      // copy 'b' to 'a'
+      /* copy 'b' to 'a' */
       scan_a = BIGNUM_START_PTR(a);
       scan_b = BIGNUM_START_PTR(b);
       a_end = scan_a + size_a;
@@ -1819,7 +1819,7 @@ bignum* factor_vm::bignum_gcd(bignum* a_, bignum* b_) {
         *(scan_a++) = 0;
       size_a = size_b;
 
-      // copy 'c' to 'b'
+      /* copy 'c' to 'b' */
       scan_b = BIGNUM_START_PTR(b);
       scan_c = BIGNUM_START_PTR(c);
       size_c = BIGNUM_LENGTH(c);
@@ -1858,7 +1858,7 @@ bignum* factor_vm::bignum_gcd(bignum* a_, bignum* b_) {
         s -= (B * *scan_a);
         t += (D * *scan_a++);
         *scan_c++ = (bignum_digit_type)(s & BIGNUM_DIGIT_MASK);
-        //*scan_d++ = (bignum_digit_type) (t & BIGNUM_DIGIT_MASK);
+        /* *scan_d++ = (bignum_digit_type) (t & BIGNUM_DIGIT_MASK); */
         s >>= BIGNUM_DIGIT_LENGTH;
         t >>= BIGNUM_DIGIT_LENGTH;
       }
@@ -1875,7 +1875,7 @@ bignum* factor_vm::bignum_gcd(bignum* a_, bignum* b_) {
         s += (A * *scan_a);
         t -= (C * *scan_a++);
         *scan_c++ = (bignum_digit_type)(s & BIGNUM_DIGIT_MASK);
-        //*scan_d++ = (bignum_digit_type) (t & BIGNUM_DIGIT_MASK);
+        /* *scan_d++ = (bignum_digit_type) (t & BIGNUM_DIGIT_MASK); */
         s >>= BIGNUM_DIGIT_LENGTH;
         t >>= BIGNUM_DIGIT_LENGTH;
       }
@@ -1883,7 +1883,7 @@ bignum* factor_vm::bignum_gcd(bignum* a_, bignum* b_) {
     BIGNUM_ASSERT(s == 0);
     BIGNUM_ASSERT(t == 0);
 
-    // update size_a and size_b to remove any zeros at end
+    /* update size_a and size_b to remove any zeroes at end */
     while (size_a > 0 && *(--scan_a) == 0)
       size_a--;
     while (size_b > 0 && *(--scan_b) == 0)
index 8a7078b3ddccc6415e16de8cab966f20206629b5..2b5686023a6b9adee24c0989ea663cc10a9cd66e 100644 (file)
@@ -59,11 +59,11 @@ inline cell popcount(cell x) {
   cell ks = 24;
 #endif
 
-  x = x - ((x >> 1) & k1);         // put count of each 2 bits into those 2 bits
-  x = (x & k2) + ((x >> 2) & k2);  // put count of each 4 bits into those 4 bits
-  x = (x + (x >> 4)) & k4;         // put count of each 8 bits into those 8 bits
-  x = (x * kf) >> ks;  // returns 8 most significant bits of x + (x<<8) +
-                       // (x<<16) + (x<<24) + ...
+  x = x - ((x >> 1) & k1);         /* put count of each 2 bits into those 2 bits */
+  x = (x & k2) + ((x >> 2) & k2);  /* put count of each 4 bits into those 4 bits */
+  x = (x + (x >> 4)) & k4;         /* put count of each 8 bits into those 8 bits */
+  x = (x * kf) >> ks;  /* returns 8 most significant bits of x + (x<<8) + */
+                          (x<<16) + (x<<24) + ... */
 
   return x;
 #endif
index 522ea27e67282d4df865087b3a31d48bb102ceea..af787de6b56f68f7caa60518aabac7743c328842 100644 (file)
@@ -2,14 +2,14 @@ namespace factor {
 
 /* The compiled code heap is structured into blocks. */
 struct code_block {
-  // header format (bits indexed with least significant as zero):
-  // bit   0  : free?
-  // bits  1-2: type (as a code_block_type)
-  // if not free:
-  //   bits  3-23: code size / 8
-  //   bits 24-31: stack frame size / 16
-  // if free:
-  //   bits  3-end: code size / 8
+  /* header format (bits indexed with least significant as zero):
+     bit   0  : free?
+     bits  1-2: type (as a code_block_type)
+     if not free:
+       bits  3-23: code size / 8
+       bits 24-31: stack frame size / 16
+     if free:
+       bits  3-end: code size / 8 */
   cell header;
   cell owner;      /* tagged pointer to word, quotation or f */
   cell parameters; /* tagged pointer to array or f */
index 3df7227b4c8df336d1f95717be92dc8eea159ca6..8419f96d67539fa372a0ad568e72e051441874b6 100644 (file)
@@ -140,9 +140,9 @@ VM_C_API void delete_context(factor_vm* parent) {
 /* Allocates memory (init_context()) */
 VM_C_API void reset_context(factor_vm* parent) {
 
-  // The function is used by (start-context-and-delete) which expects
-  // the top two datastack items to be preserved after the context has
-  // been resetted.
+  /* The function is used by (start-context-and-delete) which expects
+     the top two datastack items to be preserved after the context has
+     been reset. */
 
   context* ctx = parent->ctx;
   cell arg1 = ctx->pop();
index 2d1ae42e85e00be828ab5bf3cad9c3fbcd1fb66c..c906693e842ee24ddd0429cadb7b5ad915753084 100644 (file)
@@ -25,7 +25,7 @@ inline static unsigned char call_site_opcode(cell return_address) {
 inline static void check_call_site(cell return_address) {
   unsigned char opcode = call_site_opcode(return_address);
   FACTOR_ASSERT(opcode == call_opcode || opcode == jmp_opcode);
-  (void)opcode; // suppress warning when compiling without assertions
+  (void)opcode; /* suppress warning when compiling without assertions */
 }
 
 inline static void* get_call_target(cell return_address) {
index 4e2abbdcd4c663af943cb274fd83eda5fa5c5c97..a4b439c3fa4c8a5b3c931641665675ab01330a7d 100644 (file)
@@ -35,7 +35,7 @@ data_heap::data_heap(bump_allocator* vm_nursery,
   aging = new aging_space(aging_size, tenured->end);
   aging_semispace = new aging_space(aging_size, aging->end);
 
-  // Initialize vm nursery
+  /* Initialize vm nursery */
   vm_nursery->here = aging_semispace->end;
   vm_nursery->start = aging_semispace->end;
   vm_nursery->end = vm_nursery->start + young_size;
index 4249df3fe63ab82cba44d44df72972662864c056..b2251a39234d31e44e0c7e9f93f6c24710ea92bc 100644 (file)
@@ -440,9 +440,9 @@ void factor_vm::factorbug() {
 
   cout << "Starting low level debugger..." << endl;
 
-  // Even though we've stopped the VM, the stdin_loop thread (see os-*.cpp)
-  // that pumps the console is still running concurrently. We lock a mutex so
-  // the thread will take a break and give us exclusive access to stdin.
+  /* Even though we've stopped the VM, the stdin_loop thread (see os-*.cpp)
+     that pumps the console is still running concurrently. We lock a mutex so
+     the thread will take a break and give us exclusive access to stdin. */
   lock_console();
   ignore_ctrl_c();
 
index 068fa104f96dab717c24b47de742f6e60e060bd1..587678af14ce6da6efd5e145236cbf4bd070e66e 100644 (file)
@@ -1,8 +1,8 @@
 namespace factor {
 
-// Runtime errors must be kept in sync with:
-//   basis/debugger/debugger.factor
-//   core/kernel/kernel.factor
+/* Runtime errors must be kept in sync with:
+     basis/debugger/debugger.factor
+     core/kernel/kernel.factor */
 #define KERNEL_ERROR 0xfac7
 
 enum vm_error_type {
index 7a2200f6db0cebe8c56e042aaf3bfcc41c11b7cc..cfd646af930f0eb79a527a3f2f08c4e6c4187c43 100644 (file)
@@ -9,7 +9,7 @@ void init_globals() { init_mvm(); }
 void factor_vm::prepare_boot_image() {
   std::cout << "*** Stage 2 early init... " << std::flush;
 
-  // Compile all words.
+  /* Compile all words. */
   data_root<array> words(instances(WORD_TYPE), this);
 
   cell n_words = array_capacity(words.untagged());
@@ -21,7 +21,7 @@ void factor_vm::prepare_boot_image() {
   }
   update_code_heap_words(true);
 
-  // Initialize all quotations
+  /* Initialize all quotations */
   data_root<array> quotations(instances(QUOTATION_TYPE), this);
 
   cell n_quots = array_capacity(quotations.untagged());
index d042d3a165847a02215580e102d92b65affe8b0c..56f3c18def01ce3614381189c6eb6ed43eb6bde4 100644 (file)
@@ -4,13 +4,13 @@ VM_C_API void init_globals();
 factor_vm* new_factor_vm();
 VM_C_API void start_standalone_factor(int argc, vm_char** argv);
 
-// image
+/* image */
 bool factor_arg(const vm_char* str, const vm_char* arg, cell* value);
 
-// objects
+/* objects */
 cell object_size(cell tagged);
 
-// os-*
+/* os-* */
 void open_console();
 void close_console();
 void lock_console();
index f5a25d2e3dfd200b22fdc2a997f15dab6cdcde8f..a23a6df8b94189d1a48d89bc3d9d9a9744d6ca96 100644 (file)
@@ -1,8 +1,8 @@
 namespace factor {
 
-// gc_info should be kept in sync with:
-//   basis/compiler/codegen/gc-maps/gc-maps.factor
-//   basis/vm/vm.factor
+/* gc_info should be kept in sync with:
+     basis/compiler/codegen/gc-maps/gc-maps.factor
+     basis/vm/vm.factor */
 struct gc_info {
   uint32_t scrub_d_count;
   uint32_t scrub_r_count;
index 6710a82de9c2b8c1d0c81e82425ce72330c078e3..2a858fd873b6bbcd9ebdddfdf5c5f8b3dfcd778b 100644 (file)
--- a/vm/io.cpp
+++ b/vm/io.cpp
@@ -34,7 +34,7 @@ size_t raw_fread(void* ptr, size_t size, size_t nitems, FILE* stream) {
   return items_read;
 }
 
-// Call fclose() once only. Issues #1335, #908.
+/* Call fclose() once only. Issues #1335, #908. */
 int raw_fclose(FILE* stream) {
   if (fclose(stream) == EOF && errno != EINTR)
     return -1;
index e295e2a00014e8442d1359f8fd6ea824151d245f..e6345ffa1bf82e60ab9d9179d2f8233095b3f454 100644 (file)
@@ -110,14 +110,14 @@ inline static cell tag_fixnum(fixnum untagged) {
 
 struct object {
   NO_TYPE_CHECK;
-  // header format (bits indexed with least significant as zero):
-  // bit 0      : free?
-  // if not forwarding:
-  //   bit 1      : forwarding pointer?
-  //   bit 2-5    : tag
-  //   bit 7-end  : hashcode
-  // if forwarding:
-  //   bit 2-end  : forwarding pointer
+  /* header format (bits indexed with least significant as zero):
+     bit 0      : free?
+     if not forwarding:
+       bit 1      : forwarding pointer?
+       bit 2-5    : tag
+       bit 7-end  : hashcode
+     if forwarding:
+       bit 2-end  : forwarding pointer */
   cell header;
 
   template <typename Fixup> cell base_size(Fixup fixup) const;
index 0795da21652c285ad1cfa20be15c1fdeaa15fef3..76a1211d1059a18e116f59c34c2642d6668bb973 100644 (file)
@@ -187,7 +187,7 @@ static void* mach_exception_thread(void* arg) {
       abort();
     }
   }
-  return NULL;  // quiet warning
+  return NULL;  /* quiet warning */
 }
 
 /* Initialize the Mach exception handler thread. */
index e2a85454f073198d84e636299f42591f0c868590..e6a466f384b98e8d9411126c3f689791c4f3d71e 100644 (file)
@@ -9,7 +9,7 @@ struct startargs {
   vm_char** argv;
 };
 
-// arg must be new'ed because we're going to delete it!
+/* arg must be new'ed because we're going to delete it! */
 void* start_standalone_factor_thread(void* arg) {
   factor_vm* newvm = new_factor_vm();
   startargs* args = (startargs*)arg;
index 9a54279ffd1f60a6ccbdfb2ca2819286316384fa..8a96239c5c4eefec95c37e9c1edca646d8f2365d 100644 (file)
@@ -1,8 +1,8 @@
 namespace factor {
 
-// Special object count and identifiers must be kept in sync with:
-//   core/kernel/kernel.factor
-//   basis/bootstrap/image/image.factor
+/* Special object count and identifiers must be kept in sync with:
+     core/kernel/kernel.factor
+     basis/bootstrap/image/image.factor */
 
 static const cell special_object_count = 85;
 
index 9e08914c3284e6bf7b3e09ee0b1f8807b7b9c854..bf77a419461cdd8a83096e352e701b464dc68e92 100644 (file)
@@ -2,9 +2,8 @@
 
 namespace factor {
 
-// glibc lies about the contents of the fpstate the kernel provides, hiding the
-// FXSR
-// environment
+/* glibc lies about the contents of the fpstate the kernel provides, hiding the
+   FXSR environment */
 struct _fpstate {
   /* Regular FPU environment */
   unsigned long cw;
index 94e43b521ba8477a8a7a6a70281ffb68c8d15773..1ba44c66a2c0ba724bd2b4db4484c32bdc23be04 100644 (file)
@@ -41,7 +41,7 @@ BOOL factor_vm::windows_stat(vm_char* path) {
                          OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
 
   if (h == INVALID_HANDLE_VALUE) {
-    // FindFirstFile is the only call that can stat c:\pagefile.sys
+    /* FindFirstFile is the only call that can stat c:\pagefile.sys */
     WIN32_FIND_DATA st;
     HANDLE h;
 
@@ -151,12 +151,12 @@ uint64_t nano_count() {
   static uint32_t hi = 0;
   static uint32_t lo = 0;
 
-  // Note: on older systems QueryPerformanceCounter may be unreliable
-  // until you add /usepmtimer to Boot.ini. I had an issue where two
-  // nano_count calls would show a difference of about 1 second,
-  // while actually about 80 seconds have passed. The /usepmtimer
-  // switch cured the issue on that PC (WinXP Pro SP3 32-bit).
-  // See also http://www.virtualdub.org/blog/pivot/entry.php?id=106
+  /* Note: on older systems QueryPerformanceCounter may be unreliable
+     until you add /usepmtimer to Boot.ini. I had an issue where two
+     nano_count calls would show a difference of about 1 second,
+     while actually about 80 seconds have passed. The /usepmtimer
+     switch cured the issue on that PC (WinXP Pro SP3 32-bit).
+     See also http://www.virtualdub.org/blog/pivot/entry.php?id=106 */
   LARGE_INTEGER count;
   BOOL ret = QueryPerformanceCounter(&count);
   if (ret == 0)
@@ -246,7 +246,7 @@ VM_C_API LONG exception_handler(PEXCEPTION_RECORD e, void* frame, PCONTEXT c,
    cancellation requests to unblock the thread. */
 VOID CALLBACK dummy_cb (ULONG_PTR dwParam) { }
 
-// CancelSynchronousIo is not in Windows XP
+/* CancelSynchronousIo is not in Windows XP */
 #if _WIN32_WINNT >= 0x0600
 static void wake_up_thread(HANDLE thread) {
   if (!CancelSynchronousIo(thread)) {
index b6218f59fa50b588f215843cda30aba20e584aba..a347608bb74a8c4442c5f63fa8dfb12891dcea3c 100644 (file)
@@ -7,8 +7,8 @@
 
 #if _WIN32_WINNT != 0x0600
 #undef _WIN32_WINNT
-#define _WIN32_WINNT 0x0501  // For AddVectoredExceptionHandler, WinXP support
-//#define _WIN32_WINNT 0x0600  // For CancelSynchronousIo
+#define _WIN32_WINNT 0x0501  /* For AddVectoredExceptionHandler, WinXP support */
+/*#define _WIN32_WINNT 0x0600  /* For CancelSynchronousIo */
 #endif
 
 #ifndef UNICODE
@@ -51,9 +51,8 @@ typedef HANDLE THREADHANDLE;
 
 #define FACTOR_OS_STRING "windows"
 
-// SSE traps raise these exception codes, which are defined in internal NT
-// headers
-// but not winbase.h
+/* SSE traps raise these exception codes, which are defined in internal NT
+headers, but not winbase.h */
 #ifndef STATUS_FLOAT_MULTIPLE_FAULTS
 #define STATUS_FLOAT_MULTIPLE_FAULTS 0xC00002B4
 #endif
index c6b530cc79f76b23840d6db0dcb8a47b069e2358..581539405956d1717de8876f8abf1da15a3d99f9 100644 (file)
@@ -67,7 +67,7 @@ void factor_vm::set_sampling_profiler(fixnum rate) {
 void factor_vm::start_sampling_profiler(fixnum rate) {
   samples_per_second = rate;
   safepoint.sample_counts.clear();
-  // Release the memory consumed by collecting samples.
+  /* Release the memory consumed by collecting samples. */
   samples.clear();
   samples.shrink_to_fit();
   sample_callstacks.clear();
index 8711f28d633de3cebe07f3585d7e000924082ef2..6def041b1ca4f40d4faa4f424d74badc09d1c97d 100644 (file)
@@ -1,15 +1,15 @@
 namespace factor {
 
 struct profiling_sample_count {
-  // Number of samples taken before the safepoint that recorded the sample
+  /* Number of samples taken before the safepoint that recorded the sample */
   fixnum sample_count;
-  // Number of samples taken during GC
+  /* Number of samples taken during GC */
   fixnum gc_sample_count;
-  // Number of samples taken during unoptimized compiler
+  /* Number of samples taken during unoptimized compiler */
   fixnum jit_sample_count;
-  // Number of samples taken during foreign code execution
+  /* Number of samples taken during foreign code execution */
   fixnum foreign_sample_count;
-  // Number of samples taken during code execution in non-Factor threads
+  /* Number of samples taken during code execution in non-Factor threads */
   fixnum foreign_thread_sample_count;
 
   profiling_sample_count()
@@ -39,9 +39,9 @@ struct profiling_sample_count {
 };
 
 struct profiling_sample {
-  // Sample counts
+  /* Sample counts */
   profiling_sample_count counts;
-  // Active thread during sample
+  /* Active thread during sample */
   cell thread;
   /* The callstack at safepoint time. Indexes to the beginning and ending
      code_block entries in the vm sample_callstacks array. */
index 9e7de0b3b56f974638d6f287481365caca77cf93..960c93fc3b5d1b405a0716500dd6753c90b57f64 100644 (file)
@@ -1,6 +1,6 @@
 namespace factor {
 
-// Poor mans range-based for loops.
+/* Poor man's range-based for-loops. */
 #define FACTOR_FOR_EACH(iterable)                               \
   for (auto iter = (iterable).begin(),    \
            _end = (iterable).end();                             \
index 3069e5c8dc7a28b02051220965279b4656c3a95a..50757252b873d1059ebe4e13282aa21b0d2496fe 100644 (file)
--- a/vm/vm.hpp
+++ b/vm/vm.hpp
@@ -11,11 +11,11 @@ struct growable_array;
 struct code_root;
 
 struct factor_vm {
-  //
-  // vvvvvv
-  // THESE FIELDS ARE ACCESSED DIRECTLY FROM FACTOR. See:
-  //   basis/vm/vm.factor
-  //   basis/compiler/constants/constants.factor
+  /*
+     vvvvvv
+     THESE FIELDS ARE ACCESSED DIRECTLY FROM FACTOR. See:
+       basis/vm/vm.factor
+       basis/compiler/constants/constants.factor */
 
   /* Current context */
   context* ctx;
@@ -41,9 +41,9 @@ struct factor_vm {
        set-special-object primitives */
   cell special_objects[special_object_count];
 
-  // THESE FIELDS ARE ACCESSED DIRECTLY FROM FACTOR.
-  // ^^^^^^
-  //
+  /* THESE FIELDS ARE ACCESSED DIRECTLY FROM FACTOR.
+     ^^^^^^
+  */
 
   /* Handle to the main thread we run in */
   THREADHANDLE thread;
@@ -148,7 +148,7 @@ struct factor_vm {
   /* Safepoint state */
   volatile safepoint_state safepoint;
 
-  // contexts
+  /* contexts */
   context* new_context();
   void init_context(context* ctx);
   void delete_context();
@@ -171,13 +171,13 @@ struct factor_vm {
   void primitive_check_datastack();
   void primitive_load_locals();
 
-  // run
+  /* run */
   void primitive_exit();
   void primitive_nano_count();
   void primitive_sleep();
   void primitive_set_slot();
 
-  // objects
+  /* objects */
   void primitive_special_object();
   void primitive_set_special_object();
   void primitive_identity_hashcode();
@@ -186,7 +186,7 @@ struct factor_vm {
   void primitive_clone();
   void primitive_become();
 
-  // sampling_profiler
+  /* sampling_profiler */
   void record_sample(bool prolog_p);
   void record_callstack_sample(cell* begin, cell* end, bool prolog_p);
   void start_sampling_profiler(fixnum rate);
@@ -195,7 +195,7 @@ struct factor_vm {
   void primitive_sampling_profiler();
   void primitive_get_samples();
 
-  // errors
+  /* errors */
   void general_error(vm_error_type error, cell arg1, cell arg2);
   void type_error(cell type, cell tagged);
   void not_implemented_error();
@@ -203,7 +203,7 @@ struct factor_vm {
   void divide_by_zero_error();
   void primitive_unimplemented();
 
-  // bignum
+  /* bignum */
   int bignum_equal_p(bignum* x, bignum* y);
   enum bignum_comparison bignum_compare(bignum* x, bignum* y);
   bignum* bignum_add(bignum* x, bignum* y);
@@ -277,7 +277,7 @@ struct factor_vm {
   int bignum_unsigned_logbitp(int shift, bignum* bn);
   bignum* bignum_gcd(bignum* a_, bignum* b_);
 
-  //data heap
+  /* data heap */
   void set_data_heap(data_heap* data_);
   void init_data_heap(cell young_size, cell aging_size, cell tenured_size);
   void primitive_size();
@@ -334,10 +334,10 @@ struct factor_vm {
       write_barrier((cell*)offset);
   }
 
-  // data heap checker
+  /* data heap checker */
   void check_data_heap();
 
-  // gc
+  /* gc */
   void end_gc();
   void set_current_gc_op(gc_op op);
   void start_gc_again();
@@ -366,13 +366,13 @@ struct factor_vm {
     return (Type*)allot_object(Type::type_number, size);
   }
 
-  // generic arrays
+  /* generic arrays */
   template <typename Array> Array* allot_uninitialized_array(cell capacity);
   template <typename Array>
   bool reallot_array_in_place_p(Array* array, cell capacity);
   template <typename Array> Array* reallot_array(Array* array_, cell capacity);
 
-  // debug
+  /* debug */
   void print_chars(ostream& out, string* str);
   void print_word(ostream& out, word* word, cell nesting);
   void print_factor_string(ostream& out, string* str);
@@ -398,7 +398,7 @@ struct factor_vm {
   void factorbug();
   void primitive_die();
 
-  // arrays
+  /* arrays */
   inline void set_array_nth(array* array, cell slot, cell value);
   array* allot_array(cell capacity, cell fill_);
   void primitive_array();
@@ -406,7 +406,7 @@ struct factor_vm {
   void primitive_resize_array();
   cell std_vector_to_array(std::vector<cell>& elements);
 
-  // strings
+  /* strings */
   string* allot_string_internal(cell capacity);
   void fill_string(string* str_, cell start, cell capacity, cell fill);
   string* allot_string(cell capacity, cell fill);
@@ -416,12 +416,12 @@ struct factor_vm {
   void primitive_resize_string();
   void primitive_set_string_nth_fast();
 
-  // booleans
+  /* booleans */
   cell tag_boolean(cell untagged) {
     return untagged ? special_objects[OBJ_CANONICAL_TRUE] : false_object;
   }
 
-  // byte arrays
+  /* byte arrays */
   byte_array* allot_byte_array(cell size);
   void primitive_byte_array();
   void primitive_uninitialized_byte_array();
@@ -429,11 +429,11 @@ struct factor_vm {
 
   template <typename Type> byte_array* byte_array_from_value(Type* value);
 
-  // tuples
+  /* tuples */
   void primitive_tuple();
   void primitive_tuple_boa();
 
-  // words
+  /* words */
   word* allot_word(cell name_, cell vocab_, cell hashcode_);
   void primitive_word();
   void primitive_word_code();
@@ -441,7 +441,7 @@ struct factor_vm {
   void primitive_wrapper();
   void jit_compile_word(cell word_, cell def_, bool relocating);
 
-  // math
+  /* math */
   void primitive_bignum_to_fixnum();
   void primitive_bignum_to_fixnum_strict();
   void primitive_float_to_fixnum();
@@ -513,7 +513,7 @@ struct factor_vm {
   inline fixnum float_to_fixnum(cell tagged);
   inline double fixnum_to_float(cell tagged);
 
-  // tagged
+  /* tagged */
   template <typename Type> void check_tagged(tagged<Type> t) {
     if (!t.type_p())
       type_error(Type::type_number, t.value_);
@@ -525,7 +525,7 @@ struct factor_vm {
     return t.untagged();
   }
 
-  // io
+  /* io */
   void init_c_io();
   void io_error_if_not_EINTR();
   FILE* safe_fopen(char* filename, const char* mode);
@@ -548,7 +548,7 @@ struct factor_vm {
   void primitive_fflush();
   void primitive_fclose();
 
-  // code_block
+  /* code_block */
   cell compute_entry_point_pic_address(word* w, cell tagged_quot);
   cell compute_entry_point_pic_address(cell w_);
   cell compute_entry_point_pic_tail_address(cell w_);
@@ -569,7 +569,7 @@ struct factor_vm {
                              cell owner_, cell relocation_, cell parameters_,
                              cell literals_, cell frame_size_untagged);
 
-  //code heap
+  /* code heap */
   template <typename Iterator> void each_code_block(Iterator& iter) {
     code->allocator->iterate(iter);
   }
@@ -581,12 +581,12 @@ struct factor_vm {
   void primitive_strip_stack_traces();
   void primitive_code_blocks();
 
-  // callbacks
+  /* callbacks */
   void primitive_free_callback();
   void primitive_callback();
   void primitive_callback_room();
 
-  // image
+  /* image */
   void load_data_heap(FILE* file, image_header* h, vm_parameters* p);
   void load_code_heap(FILE* file, image_header* h, vm_parameters* p);
   bool save_image(const vm_char* saving_filename, const vm_char* filename);
@@ -618,7 +618,7 @@ struct factor_vm {
   template <typename Iterator>
   void iterate_callstack(context* ctx, Iterator& iterator);
 
-  // cpu-*
+  /* cpu-* */
   void dispatch_signal_handler(cell* sp, cell* pc, cell newpc);
 #if defined(FACTOR_X86) || defined(FACTOR_64)
   void dispatch_non_resumable_signal(cell* sp, cell* pc,
@@ -627,7 +627,7 @@ struct factor_vm {
   void dispatch_resumable_signal(cell* sp, cell* pc, cell handler);
 #endif
 
-  // alien
+  /* alien */
   char* pinned_alien_offset(cell obj);
   cell allot_alien(cell delegate_, cell displacement);
   cell allot_alien(cell address);
@@ -641,7 +641,7 @@ struct factor_vm {
   void primitive_dll_validp();
   char* alien_offset(cell obj);
 
-  // quotations
+  /* quotations */
   void primitive_jit_compile();
   cell lazy_jit_compile_entry_point();
   void primitive_array_to_quotation();
@@ -653,7 +653,7 @@ struct factor_vm {
   bool quotation_compiled_p(quotation* quot);
   void primitive_quotation_compiled_p();
 
-  // dispatch
+  /* dispatch */
   cell lookup_tuple_method(cell obj, cell methods);
   cell lookup_method(cell obj, cell methods);
   void primitive_lookup_method();
@@ -663,7 +663,7 @@ struct factor_vm {
   void primitive_reset_dispatch_stats();
   void primitive_dispatch_stats();
 
-  // inline cache
+  /* inline cache */
   void init_inline_caching(int max_size);
   void deallocate_inline_cache(cell return_address);
   void update_pic_count(cell type);
@@ -674,13 +674,13 @@ struct factor_vm {
   void update_pic_transitions(cell pic_size);
   cell inline_cache_miss(cell return_address);
 
-  // entry points
+  /* entry points */
   void c_to_factor(cell quot);
   void unwind_native_frames(cell quot, cell to);
   cell get_fpu_state();
   void set_fpu_state(cell state);
 
-  // factor
+  /* factor */
   void prepare_boot_image();
   void init_factor(vm_parameters* p);
   void pass_args_to_factor(int argc, vm_char** argv);
@@ -692,7 +692,7 @@ struct factor_vm {
   void factor_yield();
   void factor_sleep(long us);
 
-  // os-*
+  /* os-* */
   void primitive_existsp();
   void init_ffi();
   void ffi_dlopen(dll* dll);
@@ -704,7 +704,7 @@ struct factor_vm {
   void start_sampling_profiler_timer();
   void end_sampling_profiler_timer();
 
-// os-windows
+/* os-windows */
 #if defined(WINDOWS)
   HANDLE sampler_thread;
   void sampler_thread_loop();
@@ -716,7 +716,7 @@ struct factor_vm {
   LONG exception_handler(PEXCEPTION_RECORD e, void* frame, PCONTEXT c,
                          void* dispatch);
 
-#else  // UNIX
+#else  /* UNIX */
   void dispatch_signal(void* uap, void(handler)());
   void unix_init_signals();
 #endif