From 433f56c29b26b83cd2991b4a834b427fae3e75d4 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Sun, 18 Oct 2026 16:44:17 +0100 Subject: Module executor: a call's frame counted in the event's room by a table, as gas is (PURE_CALL_*: 256 a frame, 64 a value of its stack's height, 8 a local, 128 a loop it nests, 1024 a list of its own, 128 a held value, 16 a register; each at least what it stands for, checked as it compiles), not by the implementation's sizes: a module's calls fail at the same depth on every machine and build; a call's list let go is kept for the next calls unless what it keeps empty passes what a frame counts for it --- docs/design/008-module-format.md | 3 +++ 1 file changed, 3 insertions(+) (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 4c561f8..84c8e18 100644 --- a/docs/design/008-module-format.md +++ b/docs/design/008-module-format.md @@ -47,6 +47,9 @@ v6에는 뒤에 **i64**가 더해졌다([016](016-bool-and-i64.md)의 2단계): - 함수의 코드는 메시지가 없는 핸들러의 코드다(필드, 문서, 응답이 없다). 상태를 바꿀 수 있다. CALL은 핸들러와 함수의 코드에만 있다(보기에는 없다). - 부름의 깊이는 이벤트의 몫이 묶는다. 부름마다 그 프레임의 바이트를 몫에 세고(넘으면 `memory`), 블록 길이를 실행량에 센다. + 프레임의 바이트는 구현의 크기가 아닌 표다(`PURE_CALL_*`). 프레임 256, 스택 높이의 값마다 64, 지역 칸마다 8, 반복의 겹마다 128, + 제 리스트마다 1024, 담은 값마다 128, 레지스터마다 16이다. 각 값은 그것이 나타내는 구현의 크기 이상이다(컴파일할 때 확인한다). + 그래서 같은 모듈은 어느 기계, 어느 빌드에서나 같은 깊이에서 실패한다. ## 바이트 배치 -- cgit v1.2.3