summaryrefslogtreecommitdiff
path: root/enc/iso_8859_3.c
diff options
context:
space:
mode:
authorPenelope Phippen <penelope@hey.com>2022-08-15 15:45:51 -0400
committerAaron Patterson <aaron.patterson@gmail.com>2022-08-15 15:41:35 -0700
commite49db0f760722bf44ed2c5b31f67d929e9156dbe (patch)
treed71130b269fdfe16d070fc39fee336d62b5bd703 /enc/iso_8859_3.c
parent4e66b3f47b2ad0d6cca1f2227dd38fdf117c0d3c (diff)
downloadruby-e49db0f760722bf44ed2c5b31f67d929e9156dbe.tar.gz
Do not clone method entries when bind_call is used
I noticed that this site unconditionally clones the method entry, which means that `bind_call` always allocates a `T_IMEMO`. While this clone is necessary for `bind`, it is not necessary for `bind_call`. I work at Stripe, and the sorbet_runtime gem uses bind call as part of it's [call validation](https://github.com/sorbet/sorbet/blob/master/gems/sorbet-runtime/lib/types/private/methods/call_validation.rb#L157) so this can save us a lot of allocations. This patch adds a `clone` parameter to `convert_umethod_to_method_components`, which then controls whether or not we do this cloning. This patch passed Stripe CI and works in our QA environment. I reviewed it with @tenderlove to talk about correctness also.
Diffstat (limited to 'enc/iso_8859_3.c')
0 files changed, 0 insertions, 0 deletions