]> gitweb.factorcode.org Git - factor.git/commitdiff
VM: Refactor write_barrier.hpp to Factor style
authorErik Charlebois <erikcharlebois@gmail.com>
Sun, 12 May 2013 02:32:23 +0000 (22:32 -0400)
committerErik Charlebois <erikcharlebois@gmail.com>
Sun, 12 May 2013 17:24:48 +0000 (13:24 -0400)
vm/write_barrier.hpp

index d434bf2d983602bb2f0a74d8111d84eecaf20fdb..bf4329929bf51a250ce640cf4903d10fae662df7 100644 (file)
@@ -6,32 +6,26 @@ card has a slot written to.
 
 the offset of the first object is set by the allocator. */
 
-namespace factor
-{
+namespace factor {
 
 /* if card_points_to_nursery is set, card_points_to_aging must also be set. */
 static const cell card_points_to_nursery = 0x80;
 static const cell card_points_to_aging = 0x40;
-static const cell card_mark_mask = (card_points_to_nursery | card_points_to_aging);
+static const cell card_mark_mask =
+    (card_points_to_nursery | card_points_to_aging);
 typedef u8 card;
 
 static const cell card_bits = 8;
-static const cell card_size = (1<<card_bits);
-static const cell addr_card_mask = (card_size-1);
+static const cell card_size = (1 << card_bits);
+static const cell addr_card_mask = (card_size - 1);
 
 typedef u8 card_deck;
 
 static const cell deck_bits = (card_bits + 10);
-static const cell deck_size = (1<<deck_bits);
-static const cell addr_deck_mask = (deck_size-1);
+static const cell deck_size = (1 << deck_bits);
+static const cell addr_deck_mask = (deck_size - 1);
 
-inline cell addr_to_card(cell a)
-{
-       return a >> card_bits;
-}
+inline cell addr_to_card(cell a) { return a >> card_bits; }
 
-inline cell addr_to_deck(cell a)
-{
-       return a >> deck_bits;
-}
+inline cell addr_to_deck(cell a) { return a >> deck_bits; }
 }