ruby/lib/ruby_vm/rjit
Jean byroot Boussier 6deeec5d45
Mark strings returned by Symbol#to_s as chilled (#12065)
* Use FL_USER0 for ELTS_SHARED

This makes space in RString for two bits for chilled strings.

* Mark strings returned by `Symbol#to_s` as chilled

[Feature #20350]

`STR_CHILLED` now spans on two user flags. If one bit is set it
marks a chilled string literal, if it's the other it marks a
`Symbol#to_s` chilled string.

Since it's not possible, and doesn't make much sense to include
debug info when `--debug-frozen-string-literal` is set, we can't
include allocation source, but we can safely include the symbol
name in the warning message, making it much easier to find the source
of the issue.

Co-Authored-By: Étienne Barrié <etienne.barrie@gmail.com>

---------

Co-authored-by: Étienne Barrié <etienne.barrie@gmail.com>
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
2024-11-13 09:20:00 -05:00
..
.document RJIT: Clean up unnecessary documentation 2023-12-21 16:47:13 -08:00
assembler.rb Fixed indents in recently RJIT patch (#11001) 2024-06-14 00:05:21 -07:00
block.rb
branch_stub.rb
c_pointer.rb RJIT: Distinguish Pointer with Array 2023-12-22 11:24:04 -08:00
c_type.rb Mark strings returned by Symbol#to_s as chilled (#12065) 2024-11-13 09:20:00 -05:00
code_block.rb RJIT: Avoid retaining comments unless --rjit-dump-disasm 2023-12-19 00:05:19 -08:00
compiler.rb RJIT: Prefer STDERR over $stderr 2023-12-22 21:48:26 -08:00
context.rb RJIT: Fix a wrong comparison in set_local_type 2023-12-21 16:45:37 -08:00
entry_stub.rb RJIT: Support entry with different PCs 2023-04-02 15:27:40 -07:00
exit_compiler.rb RJIT: Support entry with different PCs 2023-04-02 15:27:40 -07:00
hooks.rb s/mjit/rjit/ 2023-03-06 23:44:01 -08:00
insn_compiler.rb Optimized instruction for Hash#freeze 2024-09-05 12:46:02 +02:00
invariants.rb YJIT: Compile exception handlers (#8171) 2023-08-08 16:06:22 -07:00
jit_state.rb RJIT: Add --rjit-verify-ctx option 2023-04-04 00:35:29 -07:00
stats.rb RJIT: Clean up unnecessary documentation 2023-12-21 16:47:13 -08:00
type.rb RJIT: Remove Type::CArray and limit use of Type::CString 2023-08-28 17:14:33 -04:00