Commit 5ed1f93
committed
Fix bug: the Slowpath doesn't work correctly because of double increment
builtin_lookup() find the pre-loaded and compiled (to ISeq) builtin libraries.
The libraries (.rb files) are loaded by miniruby, and those ISeq are written
in build/builtin_library.rbbin in the order that miniruby loads.
The fastpath of builtin_lookup() searches the contents of builtin_library.rbbin
in the order of miniruby loading, on ruby. The only fastpath works as far as
the order of loading libraries in ruby is equal to miniruby.
This is the reason why the slowpath's bug has not caused problems.
The slowpath incremented `bb` twice in a loop, so it's clearly bug
to skip the item after checking bb. Items at 1, 3, 5... will never be found
in the swlopath.1 parent 56cd26f commit 5ed1f93
1 file changed
Lines changed: 28 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
27 | 40 | | |
28 | | - | |
29 | | - | |
30 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
31 | 53 | | |
| 54 | + | |
32 | 55 | | |
33 | 56 | | |
34 | 57 | | |
| |||
0 commit comments