Commit 80bdc083

80bdc083a4a0Merged

Yukihiro "Matz" Matsumoto <[email protected]> · 7 months ago · 1 file · ~1 modified

Description

docs: update README for value types and line counts

Co-Authored-By: Claude Opus 4.6 (1M context) [email protected]

Details

Commit
80bdc083a4a0
Parent
69ff099a10cf

README.mdmodifiedView file

@@ -113,9 +113,11 @@
113113 `=~`, `$1`-`$9`, `match?`, `gsub(/re/, str)`, `sub(/re/, str)`,
114114 `scan(/re/)`, `split(/re/)`.
115115
116-**Memory**: Mark-and-sweep GC with explicit roots, conservative stack
117-scanning, and adaptive threshold. Arrays track GC-managed memory for
118-accurate collection.
116+**Memory**: Mark-and-sweep GC with explicit roots and adaptive threshold.
117+Small classes (<=4 fields, no inheritance, no mutation through parameters)
118+are automatically stack-allocated as **value types** -- no GC allocation,
119+no rooting overhead. Programs using only value types emit no GC runtime
120+at all. Arrays track GC-managed memory for accurate collection.
119121
120122 **I/O**: `puts`, `print`, `printf`, `p`, `gets`, `ARGV`, `ENV[]`,
121123 `File.read/write/open`, `system()`, backtick.
@@ -126,7 +128,7 @@
126128 spinel One-command wrapper script (POSIX shell)
127129 spinel_parse.rb CRuby frontend: Prism AST → text format (715 lines)
128130 spinel_parse.c C frontend: libprism → text format (915 lines)
129-spinel_codegen.rb Compiler backend: AST → C code (14,498 lines)
131+spinel_codegen.rb Compiler backend: AST → C code (15,126 lines)
130132 lib/regexp/ Built-in regexp engine (1,759 lines)
131133 lib/ Stub libraries (stringio, strscan, optparse, etc.)
132134 test/ 60 test programs