Commit 7ec2467e
7ec2467e9e5aMerged
Yukihiro "Matz" Matsumoto <[email protected]> · 8 months ago · 1 file · ~1 modified
Description
Update README/PLAN — 7200 lines, 21 examples, regexp/struct/introspection
New in feature table: Regexp (oniguruma), is_a?/respond_to?/nil?, Struct.new, positive?/negative?. 20/20 tests pass.
Co-Authored-By: Claude Opus 4.6 (1M context) [email protected]
Details
- Commit
- 7ec2467e9e5a
- Parent
- 5f40630dc111
README.mdmodifiedView file
@@ -119,6 +119,13 @@
119119
| Numeric methods | `abs`, `even?`, `odd?`, `zero?`, `ceil`, `floor`, `round` |120120
| **I/O** | |121121
| `puts`/`print`/`printf`/`putc`/`p` | Int, Float, Bool, String |122+
| **Regexp** | |123+
| Regex literals, `=~`, captures | `/\d+/`, `$1`, `$2`, `$3` |124+
| `match?`, `gsub`, `sub`, `scan`, `split` | via oniguruma |125+
| **Introspection** | |126+
| `is_a?`, `respond_to?`, `nil?` | compile-time resolved |127+
| **Data Structures** | |128+
| `Struct.new(:x, :y)` | synthetic class with getters/setters |122129
| **Runtime** | |123130
| Mark-and-sweep GC | shadow stack roots, finalizers |124131
| Arena allocator | for closure-heavy programs |@@ -141,8 +148,8 @@
141148
├── src/142149
│ ├── main.c # CLI, file reading, Prism parsing143150
│ ├── codegen.h # Type system, class/method/module info structs144-
│ └── codegen.c # Multi-pass code generator (~6600 lines)145-
├── examples/ # 17 test programs151+
│ └── codegen.c # Multi-pass code generator (~7200 lines)152+
├── examples/ # 21 test programs146153
│ ├── bm_so_mandelbrot.rb # Mandelbrot (while, bitwise, PBM)147154
│ ├── bm_ao_render.rb # AO raytracer (6 classes, modules, GC)148155
│ ├── bm_so_lists.rb # Array operations (push/pop/shift, GC)@@ -159,7 +166,11 @@
159166
│ ├── bm_numeric.rb # Numeric methods, power160167
│ ├── bm_attr.rb # attr_accessor, for..in, loop, class methods161168
│ ├── bm_kwargs.rb # Keyword args, rest/splat162-
│ └── bm_mixin.rb # include (mixin)169+
│ ├── bm_mixin.rb # include (mixin)170+
│ ├── bm_misc.rb # upto/downto, String <<171+
│ ├── bm_regexp.rb # Regexp (oniguruma)172+
│ ├── bm_introspect.rb # is_a?, respond_to?, nil?173+
│ └── bm_struct.rb # Struct.new163174
├── prototype/164175
│ └── tools/ # Step 0 prototype (RBS extraction, LumiTrace)165176
├── Makefile