From 9f0cd740c86aa3588fa7a84f28c399d808eef112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lindqvist?= Date: Thu, 19 May 2016 21:49:51 +0200 Subject: [PATCH] compiler.constants: docs --- .../compiler/constants/constants-docs.factor | 34 +++++++++++++++++++ basis/compiler/constants/constants.factor | 3 +- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/basis/compiler/constants/constants-docs.factor b/basis/compiler/constants/constants-docs.factor index 3d189432ed..b7d38a5df0 100644 --- a/basis/compiler/constants/constants-docs.factor +++ b/basis/compiler/constants/constants-docs.factor @@ -5,6 +5,9 @@ HELP: context-callstack-save-offset { $values { "n" integer } } { $description "Offset in bytes in the " { $link context } " struct to where the c callstack is saved." } ; +HELP: rc-absolute-cell +{ $description "Indicates that the relocation is an absolute address to an object in the VM." } ; + HELP: rt-cards-offset { $description "Relocation offset type for the cards table." } { $see-also rel-cards-offset } ; @@ -63,6 +66,37 @@ $nl string-offset tuple-class-offset word-entry-point-offset +} +"Relocation classes:" +{ + rc-absolute-cell + rc-absolute + rc-relative + rc-absolute-ppc-2/2 + rc-absolute-ppc-2 + rc-relative-ppc-2-pc + rc-relative-ppc-3-pc + rc-absolute-2 + rc-absolute-1 + rc-absolute-ppc-2/2/2/2 +} +"Relocation types:" +{ + rt-dlsym + rt-entry-point + rt-entry-point-pic + rt-entry-point-pic-tail + rt-here + rt-this + rt-literal + rt-untagged + rt-megamorphic-cache-hits + rt-vm + rt-cards-offset + rt-decks-offset + rt-dlsym-toc + rt-inline-cache-miss + rt-safepoint } ; ABOUT: "compiler.constants" diff --git a/basis/compiler/constants/constants.factor b/basis/compiler/constants/constants.factor index f73b4634e9..58586e7304 100644 --- a/basis/compiler/constants/constants.factor +++ b/basis/compiler/constants/constants.factor @@ -6,6 +6,7 @@ IN: compiler.constants CONSTANT: card-bits 8 CONSTANT: deck-bits 18 + : card-mark ( -- n ) 0x40 0x80 bitor ; inline : slot-offset ( slot tag -- n ) [ bootstrap-cells ] dip - ; inline @@ -42,7 +43,6 @@ CONSTANT: deck-bits 18 : vm-special-object-offset ( n -- offset ) bootstrap-cells 10 bootstrap-cells + ; -! Relocation classes CONSTANT: rc-absolute-cell 0 CONSTANT: rc-absolute 1 CONSTANT: rc-relative 2 @@ -54,7 +54,6 @@ CONSTANT: rc-absolute-2 10 CONSTANT: rc-absolute-1 11 CONSTANT: rc-absolute-ppc-2/2/2/2 12 -! Relocation types CONSTANT: rt-dlsym 0 CONSTANT: rt-entry-point 1 CONSTANT: rt-entry-point-pic 2