1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/tool/ruby_vm/views
Kevin Newton 6068da8937 Finer-grained constant cache invalidation (take 2)
This commit reintroduces finer-grained constant cache invalidation.
After 8008fb7 got merged, it was causing issues on token-threaded
builds (such as on Windows).

The issue was that when you're iterating through instruction sequences
and using the translator functions to get back the instruction structs,
you're either using `rb_vm_insn_null_translator` or
`rb_vm_insn_addr2insn2` depending if it's a direct-threading build.
`rb_vm_insn_addr2insn2` does some normalization to always return to
you the non-trace version of whatever instruction you're looking at.
`rb_vm_insn_null_translator` does not do that normalization.

This means that when you're looping through the instructions if you're
trying to do an opcode comparison, it can change depending on the type
of threading that you're using. This can be very confusing. So, this
commit creates a new translator function
`rb_vm_insn_normalizing_translator` to always return the non-trace
version so that opcode comparisons don't have to worry about different
configurations.

[Feature #18589]
2022-04-01 14:48:22 -04:00
..
_attributes.erb
_c_expr.erb
_comptime_insn_stack_increase.erb
_copyright.erb
_insn_entry.erb
_insn_len_info.erb
_insn_name_info.erb
_insn_operand_info.erb
_insn_sp_pc_dependency.erb
_insn_type_chars.erb
_leaf_helpers.erb
_mjit_compile_getinlinecache.erb
_mjit_compile_insn.erb
_mjit_compile_insn_body.erb
_mjit_compile_invokebuiltin.erb
_mjit_compile_ivar.erb
_mjit_compile_pc_and_sp.erb
_mjit_compile_send.erb
_notice.erb
_sp_inc_helpers.erb
_trace_instruction.erb
insns.inc.erb
insns_info.inc.erb
mjit_compile.inc.erb
opt_sc.inc.erb
optinsn.inc.erb
optunifs.inc.erb
vm.inc.erb
vmtc.inc.erb