From 3cc6bc3d8a1d8827519decbf7e084e89110c93f9 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Mon, 19 Oct 2026 00:16:56 +0100 Subject: 027's 4f-3b: no fixed count of records or of their fields in all: the header's u16s alone (16 and 128 before); a stored list's record graph (PureLayout) holds a few records itself and more on the heap, 256 at most (an image numbers them in a byte), an image or a checkpoint not written then without room for it; a record's 16 fields kept, the list engine's width (a leaf's columns, a run's columns and narrow cells, the arrays' and packs' columns), to be widened with the lists' shapes sized to their fields; unit tests: 20 records of 10 fields (200 in all), an item of the last appended; a stored list whose six records each hold a list of the next saved and read back after a restart (its graph on the heap); counts: b41 against b40 with batches BFS +0.12%, without BFS -0.09%, the rest within 0.001%; the bank's queries (s40 and s41 in turns, six each) within 0.09% (the first three's in_credit +1.16% its spread: 2.75% between runs of one build); 008 and 027 --- docs/design/008-module-format.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'docs/design/008-module-format.md') diff --git a/docs/design/008-module-format.md b/docs/design/008-module-format.md index e940e6a..fa59692 100644 --- a/docs/design/008-module-format.md +++ b/docs/design/008-module-format.md @@ -190,8 +190,10 @@ bool은 실행 중에 수의 칸에 든 0이나 1이고, i64는 같은 8바이 ## 로드할 때 검증하는 것 - 머리말, 예약 바이트, 명령 패딩이 0인지. 한도(명령 65,535, text 상수 4,096개·1 MiB, 이름 문자열 32 KiB)와 정확한 파일 크기. - 상태, 입력, 보기(지은 열까지 u16), 핸들러, 메시지 필드의 수는 머리말의 u16이 정할 뿐이다(027의 4f-2, 4f-3a). 메시지 하나의 - 필드는 64까지다(SEND가 모두 스택에 올린다). 출력은 255까지다(저장소가 링크와 보낼 것의 이미지에 그 수를 바이트로 적는다). 명령과 상수, 그리고 상태·입력·보기·레코드 따위의 표는 모듈 크기에 맞춘 블록에 담긴다(4f-1). 앱이 상태마다 + 상태, 입력, 보기(지은 열까지 u16), 핸들러, 메시지 필드, 레코드, 레코드 필드의 수는 머리말의 u16이 정할 뿐이다(027의 4f-2, 4f-3a, + 4f-3b). 메시지 하나의 필드는 64까지다(SEND가 모두 스택에 올린다). 출력은 255까지다(저장소가 링크와 보낼 것의 이미지에 그 수를 + 바이트로 적는다). 레코드 하나의 필드는 16까지다(리스트의 잎이 열 16을 가진다, module-list.c). 저장 리스트의 레코드 그래프는 256 + 레코드까지다(이미지가 그 번호를 바이트로 적는다). 명령과 상수, 그리고 상태·입력·보기·레코드 따위의 표는 모듈 크기에 맞춘 블록에 담긴다(4f-1). 앱이 상태마다 가지는 배열도 모듈의 상태 수에 맞춘다. JIT은 상태가 32개까지인 모듈만 컴파일한다(그 집합이 한 단어의 비트다). 넘는 모듈은 실행기가 모두 돈다. 걷기와 집계의 인자는 리스트를 8비트에 적으므로(아래 표) 그것이 도는 리스트는 상태 번호 256 아래다. 호스트는 모듈 파일을 크기대로 읽는다(`pure_module_read`). -- cgit v1.2.3