ruby/internal
Alan Wu 37e6c83609 Lazily insert origins on prepend to save memory
98286e9850 made it so that
`Module#include` allocates an origin iclass on each use. Since `include`
is widely used, the extra allocation can contribute significantly to
memory usage.

Instead of always allocating in anticipation of prepend, this change
takes a different approach. The new setup inserts a origin iclass into
the super chains of all the children of the module when prepend happens
for the first time.

rb_ensure_origin is made static again since now that adding an origin
now means walking over all usages, we want to limit the number of places
where we do it.
2020-07-22 19:01:28 -04:00
..
array.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
bignum.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
bits.h Fix a typo [ci skip] 2020-05-18 17:42:50 +09:00
class.h Lazily insert origins on prepend to save memory 2020-07-22 19:01:28 -04:00
compar.h add #include guard hack 2020-04-13 16:06:00 +09:00
compile.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
compilers.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
complex.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
cont.h add #include guard hack 2020-04-13 16:06:00 +09:00
dir.h add #include guard hack 2020-04-13 16:06:00 +09:00
enc.h add #include guard hack 2020-04-13 16:06:00 +09:00
encoding.h add #include guard hack 2020-04-13 16:06:00 +09:00
enum.h add #include guard hack 2020-04-13 16:06:00 +09:00
enumerator.h add #include guard hack 2020-04-13 16:06:00 +09:00
error.h Merge pull request #3047 from mame/suppress-backtrace 2020-05-15 01:22:56 +09:00
eval.h add #include guard hack 2020-04-13 16:06:00 +09:00
file.h add #include guard hack 2020-04-13 16:06:00 +09:00
fixnum.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
gc.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
hash.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
imemo.h Fix missing imemo cases in objspace_dump by refactoring 2020-07-10 22:42:35 -04:00
inits.h add #include guard hack 2020-04-13 16:06:00 +09:00
io.h add #include guard hack 2020-04-13 16:06:00 +09:00
load.h add #include guard hack 2020-04-13 16:06:00 +09:00
loadpath.h add #include guard hack 2020-04-13 16:06:00 +09:00
math.h add #include guard hack 2020-04-13 16:06:00 +09:00
missing.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
mjit.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
numeric.h fix MJIT link error 2020-07-13 08:56:18 +09:00
object.h inline Primitive.cexpr! 2020-07-13 08:56:18 +09:00
parse.h add #include guard hack 2020-04-13 16:06:00 +09:00
proc.h add #include guard hack 2020-04-13 16:06:00 +09:00
process.h Allow Dir.home to work for non-login procs when $HOME not set 2020-05-23 23:16:28 +09:00
random.h add #include guard hack 2020-04-13 16:06:00 +09:00
range.h add #include guard hack 2020-04-13 16:06:00 +09:00
rational.h Renamed `nurat_sub` compliant with `rb_rational_plus` 2020-07-01 22:41:15 +09:00
re.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
sanitizers.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
serial.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
signal.h add #include guard hack 2020-04-13 16:06:00 +09:00
static_assert.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
string.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
struct.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
symbol.h add #include guard hack 2020-04-13 16:06:00 +09:00
thread.h Move declarations to private `internal/thread.h` header. 2020-07-20 13:20:58 +12:00
time.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
transcode.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
util.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
variable.h Use ID instead of GENTRY for gvars. (#3278) 2020-07-03 16:56:44 +09:00
vm.h Properly resolve refinements in defined? on private call [Bug #16932] 2020-06-04 02:12:57 +09:00
warnings.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00