From d44127b5439988ccdcfdcfec7ec94de19c109853 Mon Sep 17 00:00:00 2001 From: Erik Charlebois Date: Sat, 11 May 2013 22:32:23 -0400 Subject: [PATCH] VM: Refactor write_barrier.hpp to Factor style --- vm/write_barrier.hpp | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/vm/write_barrier.hpp b/vm/write_barrier.hpp index d434bf2d98..bf4329929b 100644 --- a/vm/write_barrier.hpp +++ b/vm/write_barrier.hpp @@ -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; -} +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; } } -- 2.34.1