From a6df4168af7ae9125c9fa12bb280769ab9c1c5ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lindqvist?= Date: Sun, 25 Sep 2016 20:10:16 +0200 Subject: [PATCH] bootstrap.layouts: sync note in comments --- core/bootstrap/layouts/layouts.factor | 6 ++++-- vm/layouts.hpp | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/core/bootstrap/layouts/layouts.factor b/core/bootstrap/layouts/layouts.factor index 7ac8a8590d..6ff54d4979 100644 --- a/core/bootstrap/layouts/layouts.factor +++ b/core/bootstrap/layouts/layouts.factor @@ -8,10 +8,10 @@ quotations strings words ; 0b1111 tag-mask set 4 tag-bits set -14 num-types set - 32 mega-cache-size set +! Type tags, should be kept in sync with: +! vm/layouts.hpp H{ { fixnum 0 } { POSTPONE: f 1 } @@ -29,4 +29,6 @@ H{ { dll 13 } } type-numbers set +14 num-types set + 2 header-bits set diff --git a/vm/layouts.hpp b/vm/layouts.hpp index 485473cdbd..13856b2e63 100644 --- a/vm/layouts.hpp +++ b/vm/layouts.hpp @@ -20,7 +20,8 @@ static const cell data_alignment = 16; #define UNTAG(x) ((cell)(x) & ~TAG_MASK) #define RETAG(x, tag) (UNTAG(x) | (tag)) -// *** Tags *** +// Type tags, should be kept in sync with: +// core/bootstrap/layouts/layouts.factor #define FIXNUM_TYPE 0 #define F_TYPE 1 #define ARRAY_TYPE 2 @@ -112,8 +113,8 @@ struct object { NO_TYPE_CHECK; // header format (bits indexed with least significant as zero): // bit 0 : free? + // bit 1 : forwarding pointer? // if not forwarding: - // bit 1 : forwarding pointer? // bit 2-5 : tag // bit 7-end : hashcode // if forwarding: