mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
inline Primitive.cexpr!
We can obtain the verbatim source code of Primitive.cexpr!. Why not paste that content into the JITed program.
This commit is contained in:
parent
f66e0212ef
commit
9721f477c7
Notes:
git
2020-07-13 08:56:53 +09:00
7 changed files with 74 additions and 32 deletions
|
@ -15,7 +15,7 @@ class Integer
|
|||
# Returns +true+ if +int+ is an even number.
|
||||
def even?
|
||||
Primitive.attr! 'inline'
|
||||
Primitive.cexpr! 'int_even_p(self)'
|
||||
Primitive.cexpr! 'rb_int_even_p(self)'
|
||||
end
|
||||
|
||||
# call-seq:
|
||||
|
@ -79,6 +79,6 @@ class Integer
|
|||
# Returns +true+ if +int+ has a zero value.
|
||||
def zero?
|
||||
Primitive.attr! 'inline'
|
||||
Primitive.cexpr! 'int_zero_p(self)'
|
||||
Primitive.cexpr! 'rb_int_zero_p(self)'
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue