From patchwork Mon Oct 16 05:16:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 826126 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yFmmK4Br6z9t2c for ; Mon, 16 Oct 2017 16:17:37 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3yFmmK2ssQzDrJZ for ; Mon, 16 Oct 2017 16:17:37 +1100 (AEDT) X-Original-To: slof@lists.ozlabs.org Delivered-To: slof@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=ozlabs.ru (client-ip=107.173.13.209; helo=ozlabs.ru; envelope-from=aik@ozlabs.ru; receiver=) Received: from ozlabs.ru (ozlabs.ru [107.173.13.209]) by lists.ozlabs.org (Postfix) with ESMTP id 3yFmmG3wfczDrFt for ; Mon, 16 Oct 2017 16:17:34 +1100 (AEDT) Received: from vpl1.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id 7BB2F3A600F4; Mon, 16 Oct 2017 01:15:50 -0400 (EDT) From: Alexey Kardashevskiy To: slof@lists.ozlabs.org Date: Mon, 16 Oct 2017 16:16:49 +1100 Message-Id: <20171016051653.31014-3-aik@ozlabs.ru> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171016051653.31014-1-aik@ozlabs.ru> References: <20171016051653.31014-1-aik@ozlabs.ru> Subject: [SLOF] [PATCH slof v5 2/6] node: Add some documentation X-BeenThere: slof@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: "Patches for https://github.com/aik/SLOF" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Greg Kurz MIME-Version: 1.0 Errors-To: slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "SLOF" This adds some internal structure commented definitions so they won't break things now and grep can find them. Signed-off-by: Alexey Kardashevskiy --- slof/fs/base.fs | 16 ++++++++++++++++ slof/fs/node.fs | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/slof/fs/base.fs b/slof/fs/base.fs index edd474e..e92621f 100644 --- a/slof/fs/base.fs +++ b/slof/fs/base.fs @@ -13,6 +13,22 @@ \ Hash for faster lookup #include +\ WARNING: the wid>xxx and name>xxx definitions below are for the documentation +\ purposes only; NAME>LINK LINK> NAME> should be used instead; no code outside +\ of the engine has any business accessing flags, count, chars directly. + +\ STRUCT +\ cell FIELD wid>next +\ cell FIELD wid>names \ the head of the list of name records, points to name>next +\ END-STRUCT + +\ STRUCT +\ cell FIELD name>next +\ /c FIELD name>flags +\ /c FIELD name>count +\ 0 FIELD name>chars +\ END-STRUCT + : >name ( xt -- nfa ) \ note: still has the "immediate" field! BEGIN char- dup c@ UNTIL ( @lastchar ) dup dup aligned - cell+ char- ( @lastchar lenmodcell ) diff --git a/slof/fs/node.fs b/slof/fs/node.fs index 3b079e4..add5760 100644 --- a/slof/fs/node.fs +++ b/slof/fs/node.fs @@ -23,7 +23,7 @@ STRUCT cell FIELD node>peer cell FIELD node>parent cell FIELD node>child - cell FIELD node>properties + cell FIELD node>properties \ points to wid>next cell FIELD node>words cell FIELD node>instance-template cell FIELD node>instance-size