summaryrefslogtreecommitdiff
path: root/spec/ruby/core/basicobject
diff options
context:
space:
mode:
authorStan Lo <stan.lo@shopify.com>2025-07-09 04:56:52 +0100
committerGitHub <noreply@github.com>2025-07-08 23:56:52 -0400
commite9cd3060ac79cad75ee57973f786c6ada08d5ebc (patch)
tree4ce9577373a7e7ad44166cc3106ab44f69566d55 /spec/ruby/core/basicobject
parent5aaedc052c63d42479bcec890505976337490d71 (diff)
ZJIT: Support guarding *Exact types (#13797)
ZJIT already can generate guard type instructions for *Exact types. For example: ``` def test(strings) strings.map do |string| string.bytesize end end test(["foo", "bar"]) ``` ``` HIR: fn block in test: bb0(v0:BasicObject, v1:BasicObject): PatchPoint MethodRedefined(String@0x1014be890, bytesize@0x19f1) v7:StringExact = GuardType v1, StringExact v8:Fixnum = CCall bytesize@0x16fa4cc18, v7 Return v8 ``` But zjit only supported guarding fixnums so this script would panic. This commit adds support for guarding *Exact types.
Diffstat (limited to 'spec/ruby/core/basicobject')
0 files changed, 0 insertions, 0 deletions