Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
620 commits
Select commit Hold shift + click to select a range
348fde1
Ledger: round 6's gate passes (540bdb0 against master)
claude Nov 28, 2026
1ed2d97
Merge branch 'claude/happy-gauss-95wm2j' of https://github.com/Largo/…
claude Nov 28, 2026
c502530
Merge claude/perf-crubydiff (crubydiff5, crubydiff6): StringScanner o…
claude Nov 28, 2026
646d5e0
Merge claude/perf-iter (literalsite, endpark, block-cost harness and …
claude Nov 28, 2026
6198337
Merge claude/perf-extiter (primitive): gap 17 measured and rejected
claude Nov 28, 2026
22dcf95
Ledger: drop the entries the merge of claude/perf-extiter doubled
claude Nov 28, 2026
b61476b
Merge claude/perf-startup (clrlookup, bootparse): CLR names from meta…
claude Nov 28, 2026
5c1a64e
Merge claude/perf-struct (permute): downto parks its caller's scope, …
claude Nov 28, 2026
9bb53b9
Ledger: perf/iter2's rejected downto, since taken by perf/permute
claude Nov 28, 2026
004dd86
Merge claude/perf-nbody (parkedtuple): measured and rejected
claude Nov 28, 2026
09749c1
Merge claude/perf-lsite (kwfwd): an empty ** forwarded without arrays…
claude Nov 28, 2026
c3c1e9a
Merge claude/perf-jitbody (jitrescue, jitisa): raise-free begin/rescu…
claude Nov 28, 2026
40cba33
Merge claude/perf-lexical (hashwalk, hashany): Enumerable over a plai…
claude Nov 28, 2026
9bd4aa3
Merge claude/perf-deadconst (cdtree): identity == on unsampled locals…
claude Nov 28, 2026
6251293
Merge claude/perf-dmethjit (lightmatch, sinkcarrier): a frame that ca…
claude Nov 28, 2026
33818f7
Merge claude/perf-singleton (loopreassign): an outlined loop handed b…
claude Nov 28, 2026
dca95f2
Merge remote-tracking branch 'origin/claude/happy-gauss-95wm2j' into …
claude Nov 28, 2026
58013a9
Store Integer instance variables raw in the typed code (IR_RAW_INTS),…
claude Nov 28, 2026
0bf3598
Take raw Integer instance variables out again; ledger: perf/intivar r…
claude Nov 28, 2026
4b928db
Merge claude/perf-struct (intivar) into the round's base
claude Nov 28, 2026
658195a
Startup library: an eval text that names the tree is claimed wherever…
claude Nov 28, 2026
a22b068
Let a lambda literal in a branch run in a light frame
claude Nov 28, 2026
9b21095
Merge claude/happy-gauss-95wm2j (33818f7) into perf/jiteach
claude Nov 28, 2026
67940bd
Kernel#String converts a plain object by its #to_s from C#
claude Nov 28, 2026
51f5637
Ledger: perf/kstring landed (clock only, not gated); gap 15: String()…
claude Nov 28, 2026
448f801
Merge branch 'claude/happy-gauss-95wm2j' of https://github.com/Largo/…
claude Nov 28, 2026
85acffc
Kernel#String asks for #to_str as rb_check_funcall does
claude Nov 28, 2026
5b98b17
Ledger: a typed body for each/map/times with a literal block, screene…
claude Nov 28, 2026
44d5286
A call on a later line of a multi-line statement reports its own line
claude Nov 28, 2026
3f23ee3
Store a ruby2_keywords Hash given to a Struct as it came
claude Nov 28, 2026
d45083a
Let a light frame make `f(k: v, **h)' and `f(**a, **b)'
claude Nov 28, 2026
c0c3335
Ledger: Module#=== with a constant receiver in a typed body, measured…
claude Nov 28, 2026
744b83e
Ledger: perf/kinteger - String's to_str as rb_check_funcall; Integer(…
claude Nov 28, 2026
d0a90db
Ledger: perf/havlakalloc, Havlak's bytes and what is left
claude Nov 28, 2026
4405475
Ledger: perf/requirecold landed, not gated (gap 26)
claude Nov 28, 2026
5fe9f8a
Merge branch 'perf/havlakalloc' into namedblock-base
claude Nov 28, 2026
fa82365
Design: general calls in typed bodies, the tail slice counted and not…
claude Nov 28, 2026
b48776c
Merge commit '4405475' into perf/jitreparse
claude Nov 28, 2026
2eda4af
A body that evaluates a literal block on every call is not a light frame
claude Nov 28, 2026
5cc8bd0
Design: stage 3's first step, resume at a top-level statement, as 3a'…
claude Nov 28, 2026
d32ac04
A fiber's block keeps its own $~ and $_, as MRI's does
claude Nov 28, 2026
ba596fa
LEDGER: perf/crubydiff's seventh round
claude Nov 28, 2026
e0ec29f
Ledger: perf/jitreparse measured, rejected (gap 26)
claude Nov 28, 2026
4e87b11
A named block that a method only passes on stays reusable
claude Nov 28, 2026
de51cf8
Make a **rest parameter the call's own keyword hash, not a copy of it
claude Nov 28, 2026
715610f
parked-scope-matrix: two threads passing literals through a method th…
claude Nov 28, 2026
4d5cfd4
Method JIT: take to_i, empty? and ! of objects; refuse x.call; hold b…
claude Nov 28, 2026
1d48430
A call of another shape gets a shared rule of its own, not a rule per…
claude Nov 28, 2026
6a9a81f
Ledger: perf/sharedargs (round forty-one, gap 32)
claude Nov 28, 2026
977e047
Passed blocks: a Ruby method that may keep a block it is passed makes…
claude Nov 28, 2026
4ef49ae
Let an outlined while loop write self's instance variables (IR_LOOP_I…
claude Nov 28, 2026
83ddb0d
Ledger: round 7's gate, PASS; its entries marked gated
claude Nov 28, 2026
ed1b527
Merge claude/perf-crubydiff (crubydiff7): string evals share the call…
claude Nov 28, 2026
dd8d358
Merge claude/perf-iter (literalcode): a body that evaluates a literal…
claude Nov 28, 2026
b89122f
Merge claude/perf-dmethjit (lightlambda, jitcalls, jitresume designs)…
claude Nov 28, 2026
09f07ed
Merge claude/perf-jitbody (jitoptimism): to_i, empty? and ! of object…
claude Nov 28, 2026
b769613
Merge claude/perf-lsite (kwdup, r2kflag, kwsplatlight, kwbind): **h p…
claude Nov 28, 2026
69ce4de
Merge claude/perf-startup (requirecold, jitreparse): module_evals and…
claude Nov 28, 2026
d5b555a
Merge claude/perf-lexical (kstring, kinteger): Kernel#String converts…
claude Nov 28, 2026
240ecb3
Merge claude/perf-nbody (havlakalloc): a light frame's scope holds it…
claude Nov 28, 2026
d229ebf
Merge claude/perf-struct (intivar, loopivar): raw Integer ivars measu…
claude Nov 28, 2026
fcbc67b
Ledger: drop two entries round 8's merge doubled again
claude Nov 28, 2026
e380363
An Array without instance data is answered its class without the inst…
claude Nov 28, 2026
672867e
Ledger: perf/kernelcall landed (not gated)
claude Nov 28, 2026
b7959f6
Ledger: perf/namedblock
claude Nov 28, 2026
2e96b84
Merge commit 'fcbc67b' into perf/namedblock
claude Nov 28, 2026
82dcf17
Merge commit 'fcbc67b' into gate-base8
claude Nov 28, 2026
fdb12f1
Merge commit 'fcbc67b' into round-next
claude Nov 28, 2026
eead04c
Ledger: a thread-owned parking spot, measured and rejected
claude Nov 28, 2026
6f29f0b
Method JIT: `C === x` of a class or module constant as Module#===
claude Nov 28, 2026
029bacb
Integer and Float: no snake_case names for their CLR methods
claude Nov 28, 2026
b6db773
LEDGER: perf/crubydiff's eighth round
claude Nov 28, 2026
e8a74f4
A method's scope holds its caller's literal block until it is parked
claude Nov 28, 2026
f6bacb7
Let the method JIT take a keyword method with a **rest parameter
claude Nov 28, 2026
4aa7931
Decline a JIT'd keyword method with **rest whose body can deopt
claude Nov 28, 2026
69f52fd
Run a while loop with a yield in its body in its compiled copy (gap 18)
claude Nov 28, 2026
4bdfe19
An interpolated local on a later line of a string reports its own line
claude Nov 28, 2026
1ac8c29
LEDGER: perf/crubydiff's ninth round
claude Nov 28, 2026
9ccae79
Outlined loops write self's instance variables by default, block loop…
claude Nov 28, 2026
0827449
A filter by identity hash keeps objects without instance data out of …
claude Nov 28, 2026
3275742
Ledger: perf/datafilter landed (not gated)
claude Nov 28, 2026
9aff9a7
Default object descriptions are BINARY strings, as in CRuby
claude Nov 28, 2026
7c0eb49
Ledger: perf/heldrfc, and how perf/literalcode had undone perf/havlak…
claude Nov 28, 2026
fbf5f4f
Ledger: perf/heldrfc's commit
claude Nov 28, 2026
d9a69d0
Merge master (#301, #302): the composite R2R host with a current star…
claude Nov 28, 2026
a473012
Merge claude/perf-crubydiff (crubydiff8, crubydiff9): Integer and Flo…
claude Nov 28, 2026
0020cd8
Merge claude/perf-iter (ownerpark): an owner thread's parking spot me…
claude Nov 28, 2026
a52a964
Merge claude/perf-dmethjit (yieldloop): an outlined while loop runs o…
claude Nov 28, 2026
6f1fa00
Merge claude/perf-lsite (kwjit, kwcall): the method JIT takes **rest …
claude Nov 28, 2026
098049c
Merge claude/perf-lexical (kernelcall, datafilter): an object without…
claude Nov 28, 2026
2e481f0
Merge claude/perf-nbody (namedblock): a named block that a method onl…
claude Nov 28, 2026
e230082
Merge claude/perf-struct (loopivar2): outlined loops write self's iva…
claude Nov 28, 2026
4c259b8
Merge claude/perf-singleton (sharedargs): a call of another shape get…
claude Nov 28, 2026
77d826d
Merge claude/perf-nbody (heldrfc): a method scope's converted literal…
claude Nov 28, 2026
5f60040
Ledger: round 8's gate, PASS; its entries marked gated
claude Nov 28, 2026
597b8dc
Merge round 8's gate entry into round 9
claude Nov 28, 2026
51feb30
private/protected on an alias keep it an alias
claude Nov 28, 2026
0a01d30
An alias statement marks its own line
claude Nov 28, 2026
14d608b
Method redefinition warning reaches Warning.warn as one message
claude Nov 28, 2026
4b2b9dc
Compiled class and module bodies keep their frame in backtraces
claude Nov 28, 2026
6e6ba04
A hosted top-level alias warns once
claude Nov 28, 2026
419f23e
thread-backtrace-matrix: wait until main is blocked before reading it
claude Nov 28, 2026
666444c
Method#inspect and UnboundMethod#inspect are BINARY when ASCII
claude Nov 28, 2026
bd7342a
Rational and Complex strings are US-ASCII
claude Nov 28, 2026
6d62f20
IO, File, Dir, Stat, MatchData, Process::Status, Exception inspect: B…
claude Nov 28, 2026
37d9aa1
Enumerator, Data, Set, Fiber, TracePoint, main inspect: BINARY
claude Nov 28, 2026
abc73d4
Ledger: round 9's gate, PASS for what it computes; Towers open
claude Nov 28, 2026
5c38741
Merge abc73d4b (round 9 integration) into perf/crubydiff
claude Nov 28, 2026
c4520cd
File#path and File#inspect under a US-ASCII path encoding
claude Nov 28, 2026
e12d05e
Method#inspect writes its modules with #inspect and #to_s, escaped
claude Nov 28, 2026
06f92c1
Merge claude/perf-crubydiff (crubydiff11-14): aliases keep alias iden…
claude Nov 28, 2026
16891ec
NameError and NoMethodError messages are US-ASCII when ASCII
claude Nov 28, 2026
e5edc8a
Exception#detailed_message is US-ASCII, #full_message BINARY, when ASCII
claude Nov 28, 2026
8bcf952
IO, File, File::Stat and TracePoint#to_s are Kernel's description
claude Nov 28, 2026
cf10c2f
Thread::Backtrace::Location's strings in CRuby's encodings
claude Nov 28, 2026
836135e
A backtrace frame with a UTF-8 label is UTF-8 under LANG=C
claude Nov 28, 2026
ce7bfe0
Make only a method with a regex literal a match sink (AWFY Towers 4.6…
claude Nov 28, 2026
4dd757e
Merge claude/perf-struct (sinkfix): only a method with a regex litera…
claude Nov 28, 2026
3781af6
Merge claude/perf-crubydiff (crubydiff15): NameError messages US-ASCI…
claude Nov 28, 2026
3d1332f
__FILE__ and frame paths in the encoding their source was named in
claude Nov 28, 2026
c1bc750
Raise ThreadError, not NoMemoryError, when a thread cannot be created
claude Nov 28, 2026
4d7eaae
IO::Buffer: every value type, set_values, size_of, dup, copy and hexd…
claude Nov 28, 2026
62f2cf6
String#[]= with a Regexp raises "string modified" when the conversion…
claude Nov 28, 2026
e8ab6e7
String#each_line raises "string modified" when the block changes the …
claude Nov 28, 2026
f545bc8
defined? answers "expression" for parentheses that held more than one…
claude Nov 28, 2026
20bdf7a
__method__ and __callee__ are nil in a class body inside a method
claude Nov 28, 2026
3ae981a
MatchData#initialize_copy raises FrozenError on a frozen receiver
claude Nov 28, 2026
032c90a
eval refuses code in an ASCII-incompatible encoding
claude Nov 28, 2026
d99c099
A module's singleton class describes itself by the module's #inspect
claude Nov 28, 2026
5c1568e
cruby-test: baseline after the third round of test/ruby fixes
claude Nov 28, 2026
42647e0
Register DefineMethodCallee1, which was written but never run
claude Nov 28, 2026
e18c870
cruby-test: note that the RSS-ratio memory-leak tests flip with the p…
claude Nov 28, 2026
41e326c
Thread::SizedQueue defines pop, clear, close and num_waiting itself
claude Nov 28, 2026
80ef07c
A Ruby subclass of Thread::SizedQueue can be instantiated
claude Nov 28, 2026
50b2427
Ledger: round 10's gate, PASS; Towers closed
claude Nov 28, 2026
e7ef742
Array, Hash and String define the methods CRuby defines on them
claude Nov 28, 2026
615de25
Merge claude/perf-crubydiff (crubydiff16-20): Location and frame stri…
claude Nov 28, 2026
f20768b
Merge claude/cruby-test (first round): IO::Buffer after io_buffer.c; …
claude Nov 28, 2026
41d9e6a
A singleton method of an Enumerator with instance variables no longer…
claude Nov 28, 2026
d2e8201
Kernel#to_enum without a block gives an enumerator of unknown size
claude Nov 28, 2026
56ca135
cruby-test: baseline after round four
claude Nov 28, 2026
157b88a
Merge branch 'claude/happy-gauss-95wm2j' of https://github.com/Largo/…
claude Nov 28, 2026
892d138
Merge claude/cruby-test (second round): an ivar store on an instance-…
claude Nov 28, 2026
affbb5b
Regexp timeouts are kept as MRI keeps them, a count of nanoseconds
claude Nov 28, 2026
4f504a7
Module#const_set refuses a name in an ASCII-incompatible encoding
claude Nov 28, 2026
c132180
attr_reader, attr_writer and attr_accessor methods have a source_loca…
claude Nov 28, 2026
964f587
Array#pack notices a format resized while whitespace or a comment fol…
claude Nov 28, 2026
170fc4f
cruby-test: baseline after round five
claude Nov 28, 2026
877c1de
Merge branch 'claude/happy-gauss-95wm2j' of https://github.com/Largo/…
claude Nov 28, 2026
dd0dee1
Census: name the refusal of a body that evaluates a literal on every …
claude Nov 28, 2026
b04c5a0
/i takes the characters Onigmo's case folding takes
claude Nov 28, 2026
da02d10
LEDGER: perf/jitcaseeq's owed checks are done
claude Nov 29, 2026
74e37c1
Let the prelude's take_while and drop_while loops run in their compil…
claude Nov 29, 2026
eb67beb
Library methods standing in for CRuby's internal ones are located there
claude Nov 29, 2026
2cfc10a
attr_reader/writer/accessor methods have a source location
claude Nov 29, 2026
8a0f583
Give Array#sum with a block an Integer loop that runs in its compiled…
claude Nov 29, 2026
b4fc1b6
Kernel#warn with Warning#warn undefined raises NoMethodError
claude Nov 29, 2026
017a8ee
Warning[], Warning[]= and Warning.categories are singleton methods only
claude Nov 29, 2026
89562fc
Add Encoding::UNICODE_VERSION
claude Nov 29, 2026
cd1f471
Shims for MRI's transcoder libraries, enc/trans/*
claude Nov 29, 2026
e0e94e7
A file required by a non-ASCII path is loaded once under a US-ASCII f…
claude Nov 29, 2026
44e950e
main.public and main.private in a wrapped load work on the wrapper mo…
claude Nov 29, 2026
d00ccaf
cruby-test: baseline after round six
claude Nov 29, 2026
5dea321
A literal block a typed body ignored is left reusable
claude Nov 29, 2026
3b7bd0c
Ledger: round 11's gate, PASS; a hang in perf/datafilter fixed
claude Nov 29, 2026
67ac8ea
Method JIT: defined?(@x) in typed bodies
claude Nov 29, 2026
1d13358
Ledger: where nb { }'s cost goes, and a parked scope reinitialized wi…
claude Nov 29, 2026
4443759
An escaped character in an fnmatch/glob bracket expression is taken l…
claude Nov 29, 2026
d405b4d
File.fnmatch refuses a pattern with a NUL in it
claude Nov 29, 2026
f68873f
Class variables of a class's singleton class come from the class, not…
claude Nov 29, 2026
d894ada
A constant set in a frozen object's singleton class is refused naming…
claude Nov 29, 2026
b5d1a5b
cruby-test: baseline after round seven
claude Nov 29, 2026
904ac24
Merge branch 'claude/happy-gauss-95wm2j' of https://github.com/Largo/…
claude Nov 29, 2026
952dcd2
Merge origin/claude/cruby-test into perf/crubydiff
claude Nov 29, 2026
a22483b
Merge claude/perf-crubydiff (crubydiff21-22): /i folds as Onigmo does…
claude Nov 29, 2026
8796ddd
Merge claude/cruby-test (rounds 5-7): Regexp timeouts in nanoseconds,…
claude Nov 29, 2026
081ca03
Merge claude/perf-dmethjit (yieldloop2, yieldloop3): take_while, drop…
claude Nov 29, 2026
321ddcc
Merge claude/perf-iter (ignoredblock, census reason, nblcost): a lite…
claude Nov 29, 2026
cc6aada
Merge claude/perf-jitbody (jitcaseeq, jitdefined): C === x and define…
claude Nov 29, 2026
530202d
Method JIT: a, b = v of an Array
claude Nov 29, 2026
befd3a1
defined? answers with the deduplicated frozen US-ASCII String, with n…
claude Nov 29, 2026
cb92550
defined?(super) outside any method is nil
claude Nov 29, 2026
2f0feeb
alias_method of a name a module only made private needs a method to l…
claude Nov 29, 2026
98963fa
Module#autoload?(name, false) does not look in included modules
claude Nov 29, 2026
6b691ba
super(args, &blk) evaluates the arguments before the block argument
claude Nov 29, 2026
8b82ec8
cruby-test: baseline after round eight
claude Nov 29, 2026
5dbf626
Compile the startup library's defs with a loop from source where OSR …
claude Nov 29, 2026
5304c2c
Merge remote-tracking branch 'origin/claude/happy-gauss-95wm2j' into …
claude Nov 29, 2026
37a65b3
Errors that rules and a few library methods throw defer their backtra…
claude Nov 29, 2026
0d15f47
Marshal.load's proc does not see a wrapped object before its instance…
claude Nov 29, 2026
eb8acc7
Time#_dump and Time._load take any year, as MRI's time_mdump and time…
claude Nov 29, 2026
af6b2f7
Marshal.dump refuses an object met again among its own _dump string's…
claude Nov 29, 2026
11e82fe
cruby-test: baseline after round nine
claude Nov 29, 2026
baeecdd
Method JIT: s[a..b] and ary[a...b] without a Range
claude Nov 29, 2026
7e258de
LEDGER: perf/jitslice's matrix has 31 rows
claude Nov 29, 2026
91b84a7
Array#sum and Enumerable#sum add numbers without calling a redefined …
claude Nov 29, 2026
29efb32
More library errors defer their backtrace walk: division by zero, EOF…
claude Nov 29, 2026
8195556
Name an eval's file and line in a warning when it starts below line 1
claude Nov 29, 2026
c687879
Word system(exception: true)'s error as CRuby does
claude Nov 29, 2026
94e9ce5
Take -s from a script's #! line
claude Nov 29, 2026
c596f90
Leave an at_exit block's SystemExit in $! for the blocks after it
claude Nov 29, 2026
e34abb3
Method JIT: Array literals with a splat
claude Nov 29, 2026
91c6011
cruby-test: baseline after round ten
claude Nov 29, 2026
3656ba6
Split UTF-16 and UTF-32 lines on a broken separator as CRuby does
claude Nov 29, 2026
4b5e0c1
No backtrace frame for String#<<, Array#<<, Array#[], Array#[]=, Hash…
claude Nov 29, 2026
409e75f
Report a chilled string's mutation before setbyte and << read it
claude Nov 29, 2026
4fce2e3
Ledger: round 12's gate, PASS
claude Nov 29, 2026
43cd7a8
Merge claude/cruby-test (rounds 8-10): defined?(super) outside a meth…
claude Nov 29, 2026
196ca27
Merge claude/perf-dmethjit (r2rloops): a precompiled def with a loop …
claude Nov 29, 2026
8738973
Merge claude/perf-iter (unkept, unkept2): rescued library errors defe…
claude Nov 29, 2026
7bf1567
Merge claude/perf-jitbody (jitmasgn1, jitslice, jitsplatlit): one-val…
claude Nov 29, 2026
a0f3f00
Every library error made and thrown at once defers its backtrace walk…
claude Nov 29, 2026
ce6bb18
Method JIT: comparisons with a Symbol literal take the identity path
claude Nov 29, 2026
7cde67e
Ledger: drop the orphaned header round 13's merge left of perf/jitdef…
claude Nov 29, 2026
10bb673
Take an RLIM_ name as a limit in Process.setrlimit
claude Nov 29, 2026
cba6e11
Raise Errno::EINVAL from Process.clock_getres for a clock it lacks
claude Nov 29, 2026
190961d
Check Process.groups= and initgroups arguments as CRuby does
claude Nov 29, 2026
847ccd9
Name the file a spawn redirection could not open
claude Nov 29, 2026
5089694
Keep $0 frozen, as CRuby does
claude Nov 29, 2026
83c9678
cruby-test: baseline after round eleven
claude Nov 29, 2026
ac23886
Merge branch 'claude/happy-gauss-95wm2j' of https://github.com/Largo/…
claude Nov 29, 2026
13fe1f8
Take the :hertz unit in Process.clock_getres
claude Nov 29, 2026
260663f
Marshal Process::Status as CRuby does, and let it be allocated
claude Nov 29, 2026
661838e
Run a command that starts with an assignment through the shell
claude Nov 29, 2026
21e4ee5
Add Process::UID/GID re_exchangeable? and from_name
claude Nov 29, 2026
528a6d6
cruby-test: baseline after round twelve
claude Nov 29, 2026
8c9285e
Merge round 12 (4fce2e35) into perf/crubydiff
claude Nov 29, 2026
f89b479
Method JIT: class variable reads and plain writes in the typed body
claude Nov 29, 2026
677be65
Call a module's own const_missing from Module#const_get
claude Nov 29, 2026
a583ae4
On Linux, File.open of a missing path asks faccessat(2) before the CL…
claude Nov 29, 2026
d9b506a
Open ARGF's next file before seek, pos, pos= and rewind
claude Nov 29, 2026
44506d6
Answer ARGF#read's buffer, emptied, once every file is read
claude Nov 29, 2026
1cca1c1
Raise TypeError for an ARGV entry ARGF cannot take as a path
claude Nov 29, 2026
ed7030e
cruby-test: baseline after round thirteen
claude Nov 29, 2026
d791b9a
Merge remote-tracking branch 'origin/claude/cruby-test' into perf/cru…
claude Nov 29, 2026
5eed1f3
Class variable lookup: a module comes before the modules prepended to it
claude Nov 29, 2026
7d7c917
Honor the shareable_constant_value magic comment
claude Nov 29, 2026
75a55ce
A chilled string literal warns at every frozen check, even where the …
claude Nov 29, 2026
d649c45
Check a library's nested class against what is already defined
claude Nov 29, 2026
a744dbd
cruby-test: baseline after round fourteen
claude Nov 29, 2026
bc0d5ac
Method JIT: class variable sites keep the module they found the varia…
claude Nov 29, 2026
71f1a11
IO#read_nonblock with nothing to read leaves its buffer as it was
claude Nov 29, 2026
ef86765
Ledger: a call into a pure typed callee from a typed body, counted an…
claude Nov 29, 2026
e5eb7f6
Ledger: round 13's gate, PASS
claude Nov 29, 2026
480e584
Merge claude/perf-crubydiff (crubydiff23-24): defined? answers its in…
claude Nov 29, 2026
2fc73de
Merge claude/cruby-test (rounds 11-14): String#lines on UTF-16/32, Pr…
claude Nov 29, 2026
e8215de
Merge claude/perf-iter (unkept3, enoent): every C# throw site deferre…
claude Nov 29, 2026
1e7d204
Merge claude/perf-jitbody (jitsymeq, jitcvar, jitcvarcache, generic-c…
claude Nov 29, 2026
9242a1e
Ledger: drop the orphaned header round 14's merge left of perf/jitspl…
claude Nov 29, 2026
16dd2a9
Ledger: round 14's gate, PASS; a start-up cost of perf/aotosr found
claude Nov 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
80 changes: 80 additions & 0 deletions Build/dlr-patches/0111-interpreted-rule-runs-compiled.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
diff --git a/src/core/Microsoft.Dynamic/Interpreter/LightLambda.cs b/src/core/Microsoft.Dynamic/Interpreter/LightLambda.cs
--- a/src/core/Microsoft.Dynamic/Interpreter/LightLambda.cs
+++ b/src/core/Microsoft.Dynamic/Interpreter/LightLambda.cs
@@ -151,6 +151,16 @@
return CreateCustomDelegate(delegateType);
}

+ /// <summary>
+ /// Runs <paramref name="compiled"/>, a compilation of the same lambda with the delegate type this LightLambda was made
+ /// for, from the next call on (DynamicUtils: an interpreted rule whose compiled rule the site never picked up).
+ /// </summary>
+ internal void UseCompiled(Delegate compiled) {
+ if (compiled is not null && _compiled is null) {
+ _compiled = compiled;
+ }
+ }
+
private bool TryGetCompiled() {
// A nested lambda light-compiled when it first runs (LightCompiler.CompileOnFirstCall); one the light compiler
// cannot interpret is compiled.
diff --git a/src/core/Microsoft.Dynamic/Utils/DynamicUtils.cs b/src/core/Microsoft.Dynamic/Utils/DynamicUtils.cs
--- a/src/core/Microsoft.Dynamic/Utils/DynamicUtils.cs
+++ b/src/core/Microsoft.Dynamic/Utils/DynamicUtils.cs
@@ -113,6 +113,7 @@
// we failed the rule because we have a compiled target available, return the compiled target
Debug.Assert(CachedBindingInfo<T>.LastInterpretedFailure.CompiledTarget is not null);
var res = CachedBindingInfo<T>.LastInterpretedFailure.CompiledTarget;
+ CachedBindingInfo<T>.LastInterpretedFailure.Rebound++;
CachedBindingInfo<T>.LastInterpretedFailure = null;
return res;
}
@@ -133,7 +134,10 @@
private T/*!*/ CreateDelegate(DynamicMetaObjectBinder/*!*/ binder, DynamicMetaObject/*!*/ binding, CachedBindingInfo<T>/*!*/ bindingInfo) {
var lambda = Compile(binding, bindingInfo);
try {
- return lambda.LightCompile(Int32.MaxValue);
+ T result = lambda.LightCompile(Int32.MaxValue);
+ // the interpreted rule, which can run its compiled body itself (CachedBindingInfo<T>.CheckCompiled)
+ bindingInfo.Light = (result as Delegate)?.Target as Microsoft.Scripting.Interpreter.LightLambda;
+ return result;
} catch (NotImplementedException ex) {
// the interpreter doesn't support every expression, fall back to compiling the lambda
PerfTrack.NoteEvent(PerfTrack.Categories.BindingSlow, $"LightBind fallback {binder.GetType().Name}: {ex.Message}");
@@ -249,6 +253,23 @@
[ThreadStatic]
public static CachedBindingInfo<T> LastInterpretedFailure;

+ // The LightLambda of the interpreted rule; null if it is not one.
+ public Microsoft.Scripting.Interpreter.LightLambda Light;
+
+ // How often the rule has failed because its compiled target was ready, how often that failure had the site bind
+ // again and pick up the compiled rule (Bind, from LastInterpretedFailure), and how many failures that did not the
+ // rule may have before it runs its compiled target itself. A binder that binds the site some other way never picks
+ // it up, and a site whose rules come in a different order can hold both the interpreted rule and the compiled one:
+ // the interpreted one, never matching, stays before the other in the site's rules and runs in the interpreter, to
+ // fail, on every call (a `!=` site over four or eight classes, 2.2-3 times as slow), millions of times. A failure
+ // that rebinds is the scheme working and is not counted; nor is it there to count every time: a site with more classes
+ // than it keeps rules for finds the interpreted rule in the binder's cache again and again, and switching such a rule
+ // to its compiled target in place (32 failures) left the binder's cache with rules behind a LightLambda's Run: 60
+ // classes 18% slower. Hence a count that only a rule stuck before its compiled one reaches.
+ private int _failuresForCompiled;
+ public int Rebound;
+ private const int MaxFailuresForCompiled = 4096;
+
public CachedBindingInfo(DynamicMetaObjectBinder binder, int compilationThreshold)
: base(binder, compilationThreshold) {
}
@@ -269,6 +290,12 @@
}

if (CompiledTarget is not null) {
+ var light = Light;
+ if (light is not null && ++_failuresForCompiled - Rebound > MaxFailuresForCompiled) {
+ // run the compiled rule in place from the next call on, and match this one
+ light.UseCompiled(CompiledTarget as Delegate);
+ return true;
+ }
LastInterpretedFailure = this;
return false;
}
33 changes: 33 additions & 0 deletions Build/dlr-patches/0112-compile-rewriter.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
diff --git a/src/core/Microsoft.Dynamic/Interpreter/LightDelegateCreator.cs b/src/core/Microsoft.Dynamic/Interpreter/LightDelegateCreator.cs
--- a/src/core/Microsoft.Dynamic/Interpreter/LightDelegateCreator.cs
+++ b/src/core/Microsoft.Dynamic/Interpreter/LightDelegateCreator.cs
@@ -13,6 +13,16 @@
using Microsoft.Scripting.Utils;

namespace Microsoft.Scripting.Interpreter {
+ /// <summary>
+ /// A hook for the language: <see cref="Rewriter"/>, if set, is given each interpreted lambda's tree just before it is
+ /// compiled to IL, and what it returns is compiled instead. It must return a lambda of the same type and parameters that
+ /// computes the same thing - for instance one whose constants are typed so that loading them is cheaper. The interpreter
+ /// keeps running the tree it was given. Process-wide: set it once, to something that holds no state of one runtime.
+ /// </summary>
+ public static class LightCompilation {
+ public static Func<LambdaExpression, LambdaExpression> Rewriter { get; set; }
+ }
+

/// <summary>
/// Manages creation of interpreted delegates. These delegates will get
@@ -256,6 +266,12 @@
lambda = Expression.Lambda(_compiledDelegateType, lambda.Body, lambda.Name, lambda.Parameters);
}

+ // the language's last word on the tree before it is compiled to IL (LightCompilation.Rewriter)
+ var rewriter = LightCompilation.Rewriter;
+ if (rewriter is not null) {
+ lambda = rewriter(lambda);
+ }
+
if (HasClosure) {
_compiled = LightLambdaClosureVisitor.BindLambda(lambda, Interpreter?.ClosureVariables ?? _closureVariables);
} else {
2 changes: 2 additions & 0 deletions Build/dlr-patches/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ the apply step instead of with a confusing CS1061 deep inside IronRuby.
| `0108-ThreadLocal-no-dead-thread-roots.patch` | `ThreadLocal<T>`'s entries (the interpreter's current frame among them) held the Thread that owns them, and an entry stays in the array after its thread has finished, until the array next grows. Every Ruby thread that had run interpreted code was kept alive that way, and with it the CLR's native record of the dead thread and its `ManagedThreadId`: thousands of dead threads piled up in the runtime's thread list, which the finalizer thread walks to remove each one and every GC suspension walks too (`Thread.new { }.join` in a loop spent most of its process CPU in `ThreadStore::RemoveThread`). An entry now carries a per-thread token object instead (weakly mapped from the Thread for `TryGetValue`, patch 0001), so a finished thread is collected and its id reused; a new thread that gets the id replaces the stale entry on first use. |
| `0109-interpret-deep-try-nesting.patch` | The CLR's JIT takes time cubic in how deeply a method's try regions nest under exception filters: for each block of a filter it goes through every region the filter's try encloses and walks that region's chain of enclosing regions up to the filter (`BasicBlock::VisitEHEnclosedHandlerSecondPassSuccs`, called by every flow-graph walk with exception edges; .NET 8 to 10, and .NET 11's is no better). IronRuby's begin/rescue is filters and finallys, four or more try expressions a level, so `begin ... rescue; end` nested 500 deep and compiled up front (`-X:CompilationThreshold 0`, as IronRuby.Tests run) spent over a minute in `DynamicMethod.CreateDelegate` (`DeepNesting1`: 75 s); interpreted it takes 1.5 s. The light compiler now records how deeply a lambda's try expressions nest - or those of a lambda nested in it, such as a block, which a compile of the outer one compiles too - and `LightDelegateCreator.Compile` leaves a lambda deeper than 64 (some 15 levels of begin/rescue) interpreted, which is linear. A lambda the light compiler cannot interpret is still compiled, and so is everything under `-X:NoAdaptiveCompilation`. `DeepNesting1` now takes 2.4 s; the 500-deep script alone, compiled up front, 0.4 s more than an empty one (1000 deep: 0.7 s). |
| `0110-compile-nested-lambdas-on-first-call.patch` | The light compiler compiled every lambda nested in the one it compiled - a block, a closure - with it, whether or not it ever ran. `LightCompiler.CompileOnFirstCall` lets the language name the nested lambdas to compile when a delegate made from one first runs instead (IronRuby: lambda literals, `->`). The variables such a lambda closes over are found by a walk of its tree, so the enclosing lambda boxes them and hands them over in the same order as before; the nested lambda is compiled against exactly those (a variable the walk missed fails loudly as "unbound variable"). `LightDelegateCreator` holds the lambda until its first run (`EnsureLightCompiled`), its `LightLambda` gets the interpreter then (or, for a lambda the light compiler cannot interpret, the compiled delegate), and a compile of the enclosing lambda to IL light-compiles the ones still pending to learn how deeply their try expressions nest (0109). prism's `Serialize::Loader#define_load_node_lambdas` makes 152 lambdas and the first parse calls a few: its first call went from 160 to 105 ms. |
| `0111-interpreted-rule-runs-compiled.patch` | A rule `DynamicUtils.LightBind` makes runs interpreted until its count runs out, then compiles in the background and, once compiled, fails its test so that the site binds again and the binder hands out the compiled rule (`CachedBindingInfo.LastInterpretedFailure`). When the site gets the compiled rule some other way - IronRuby's shared rules, which serve every receiver class whose method resolves the same, are handed to a site as it binds - the interpreted one can stay ahead of it in the site's rules, never matching, and run in the interpreter to fail on every call: `recv != other` over four or eight classes took 2.2-3 times as long in some processes and not in others (gap 12, perf/twospeed). Such a rule now runs its compiled target itself (`LightLambda.UseCompiled`) once it has failed for it 4096 times without the site binding again (a stuck rule fails millions of times; the rules of a site with more classes than it keeps rules for fail far fewer, and switching those in place after 32 failures made 60 classes 18% slower), and matches again. |
| `0112-compile-rewriter.patch` | `Microsoft.Scripting.Interpreter.LightCompilation.Rewriter`: a hook the language sets to rewrite an interpreted lambda's tree just before `LightDelegateCreator` compiles it to IL (the interpreter keeps the tree it had). IronRuby's `CompiledConstantsRewriter` uses it so that a compiled body loads its constants - its call sites among them - as objects given their class by `Unsafe.As`: `LambdaExpression.Compile` casts each closure constant to its type on every load, and in Ruby's bodies each such cast is a call of the runtime's cast helper, 7-12% of a small Ruby method's instructions. Unset, nothing changes. |

`Util/check-dlr-patches.sh DLR_DIR` checks that a DLR checkout has all of these applied:
a local one is patched once and falls behind when a new patch lands here.
Expand Down
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ invalid definition is a build error (`IRGEN001`). To read what was generated, bu
| `Src/Ruby/Builtins/UnicodeProperties.Generated.cs` | `Util/gen-unicode-properties.rb` | |
| `Src/Ruby/Runtime/Utf8MacTables.Generated.cs` | `Util/gen-utf8-mac.rb` (with CRuby) | the oracle CRuby's UTF8-MAC converters change |
| `Src/Ruby/Builtins/InspectPrintable.Generated.cs` | `Util/gen-inspect-printable.rb` (with CRuby) | the oracle CRuby's Onigmo ctype tables change |
| `Src/Ruby/Builtins/CaseFoldGroups.Generated.cs` | `Util/gen-case-fold-groups.rb` (with CRuby) | the oracle CRuby's case folding (its Unicode version) changes |
| `*/AotSubclasses.Generated.cs` | `Util/aot/gen-subclasses.rb` | a library class is added |
| `Src/Libraries/Rbs/RbsNodes.Generated.cs` | `Src/Libraries/Rbs/generate.rb` | |

Expand Down
Loading
Loading