mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
ZJIT: Fix Kernel#Float
's annotation (#14123)
As pointed out in https://github.com/ruby/ruby/pull/14078#discussion_r2255427676, the return type should be `Float` instead.
This commit is contained in:
parent
fe3ed3e7f3
commit
e60e1952a4
2 changed files with 3 additions and 3 deletions
|
@ -174,7 +174,7 @@ pub fn init() -> Annotations {
|
|||
annotate!(rb_cNilClass, "nil?", types::TrueClass, no_gc, leaf, elidable);
|
||||
annotate!(rb_mKernel, "nil?", types::FalseClass, no_gc, leaf, elidable);
|
||||
|
||||
annotate_builtin!(rb_mKernel, "Float", types::Flonum);
|
||||
annotate_builtin!(rb_mKernel, "Float", types::Float);
|
||||
annotate_builtin!(rb_mKernel, "Integer", types::Integer);
|
||||
annotate_builtin!(rb_mKernel, "class", types::Class, leaf);
|
||||
|
||||
|
|
|
@ -5011,9 +5011,9 @@ mod tests {
|
|||
assert_method_hir_with_opcode("Float", YARVINSN_opt_invokebuiltin_delegate_leave, expect![[r#"
|
||||
fn Float@<internal:kernel>:
|
||||
bb0(v0:BasicObject, v1:BasicObject, v2:BasicObject, v3:BasicObject):
|
||||
v6:Flonum = InvokeBuiltin rb_f_float, v0, v1, v2
|
||||
v6:Float = InvokeBuiltin rb_f_float, v0, v1, v2
|
||||
Jump bb1(v0, v1, v2, v3, v6)
|
||||
bb1(v8:BasicObject, v9:BasicObject, v10:BasicObject, v11:BasicObject, v12:Flonum):
|
||||
bb1(v8:BasicObject, v9:BasicObject, v10:BasicObject, v11:BasicObject, v12:Float):
|
||||
Return v12
|
||||
"#]]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue