1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/internal
John Hawthorn 19f331f588 Dedup superclass array in leaf sibling classes
Previously, we would build a new `superclasses` array for each class,
even though for all immediate subclasses of a class, the array is
identical.

This avoids duplicating the arrays on leaf classes (those without
subclasses) by calculating and storing a "superclasses including self"
array on a class when it's first inherited and sharing that among all
superclasses.

An additional trick used is that the "superclass array including self"
is valid as "self"'s superclass array. It just has it's own class at the
end. We can use this to avoid an extra pointer of storage and can use
one bit of a flag to track that we've "upgraded" the array.
2022-03-03 11:23:27 -08:00
..
array.h
bignum.h
bits.h
class.h Dedup superclass array in leaf sibling classes 2022-03-03 11:23:27 -08:00
cmdlineopt.h * expand tabs. [ci skip] 2022-01-15 20:10:30 +09:00
compar.h
compile.h RubyVM.keep_script_lines 2021-10-21 16:17:39 +09:00
compilers.h internal/*.h: skip doxygen 2021-09-10 20:00:06 +09:00
complex.h
cont.h
dir.h
enc.h
encoding.h
enum.h
enumerator.h
error.h
eval.h
file.h
fixnum.h
gc.h Change darray size to size_t and add functions that use GC malloc 2022-02-16 09:50:29 -05:00
hash.h
imemo.h
inits.h
io.h Move some function declaration to internal/io.h 2021-09-28 18:08:08 +13:00
load.h
loadpath.h
math.h
missing.h
numeric.h Embed bare double if sizeof(double) == sizeof(VALUE) 2021-10-27 02:05:06 +09:00
object.h
parse.h
proc.h
process.h process.c: Add Process._fork (#5017) 2021-10-25 20:47:19 +09:00
random.h
range.h
rational.h
re.h
sanitizers.h
serial.h
signal.h
static_assert.h
string.h
struct.h
symbol.h Assign temporary ID to anonymous ID [Bug #18250] 2021-11-23 21:03:19 +09:00
thread.h
time.h
transcode.h
util.h
variable.h
vm.h Mark rb_clear_constant_cache as internal use only 2022-01-20 13:54:37 +09:00
warnings.h