mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 04:24:23 +00:00
ZJIT: Annotate BasicObject#initialize (#14590)
It's a no-op and always returns `nil`. Fixes https://github.com/Shopify/ruby/issues/755
This commit is contained in:
parent
4e05fe54e2
commit
7e6f7fbf9e
@ -177,6 +177,7 @@ pub fn init() -> Annotations {
|
||||
annotate!(rb_mKernel, "nil?", types::FalseClass, no_gc, leaf, elidable);
|
||||
annotate!(rb_cBasicObject, "==", types::BoolExact, no_gc, leaf, elidable);
|
||||
annotate!(rb_cBasicObject, "!", types::BoolExact, no_gc, leaf, elidable);
|
||||
annotate!(rb_cBasicObject, "initialize", types::NilClass, no_gc, leaf, elidable);
|
||||
|
||||
annotate_builtin!(rb_mKernel, "Float", types::Float);
|
||||
annotate_builtin!(rb_mKernel, "Integer", types::Integer);
|
||||
|
||||
@ -8121,7 +8121,8 @@ mod opt_tests {
|
||||
v6:NilClass = Const Value(nil)
|
||||
PatchPoint MethodRedefined(C@0x1008, new@0x1010, cme:0x1018)
|
||||
v37:HeapObject[class_exact:C] = ObjectAllocClass VALUE(0x1008)
|
||||
v12:BasicObject = SendWithoutBlock v37, :initialize
|
||||
PatchPoint MethodRedefined(C@0x1008, initialize@0x1040, cme:0x1048)
|
||||
v39:NilClass = CCall initialize@0x1070, v37
|
||||
CheckInterrupts
|
||||
CheckInterrupts
|
||||
Return v37
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user