summaryrefslogtreecommitdiff
path: root/yjit.rb
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2021-09-21 18:16:23 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:41 -0400
commit78b5e95e41cefd36702c37293bab95fdede38369 (patch)
tree78d3d6817438758aeaa9bd09eaaeaf04b74be43c /yjit.rb
parentf1eb48cb23c949ce8163c6b6d2042cecd0d79ea9 (diff)
Add a slowpath for opt_getinlinecache
Before this change, when we encounter a constant cache that is specific to a lexical scope, we unconditionally exit. This change falls back to the interpreter's cache in this situation. This should help constant expressions in `class << self`, which is popular at Shopify due to the style guide. This change relies on the cache being warm while compiling to detect the need for checking the lexical scope for simplicity.
Diffstat (limited to 'yjit.rb')
-rw-r--r--yjit.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/yjit.rb b/yjit.rb
index 3c447b4b11..f7e283dc05 100644
--- a/yjit.rb
+++ b/yjit.rb
@@ -159,6 +159,7 @@ module YJIT
print_counters(stats, prefix: 'setivar_', prompt: 'setinstancevariable exit reasons:')
print_counters(stats, prefix: 'oaref_', prompt: 'opt_aref exit reasons: ')
print_counters(stats, prefix: 'expandarray_', prompt: 'expandarray exit reasons: ')
+ print_counters(stats, prefix: 'opt_getinlinecache_', prompt: 'opt_getinlinecache exit reasons: ')
side_exits = total_exit_count(stats)
total_exits = side_exits + stats[:leave_interp_return]