summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2022-09-18 23:32:59 +0900
committerTakashi Kokubun <takashikkbn@gmail.com>2022-09-23 06:44:28 +0900
commit2f5b37533e6129646ddfacffc3da34be02bc9e87 (patch)
tree673cc226e7cdacba7425962586b5262569e75a1e
parent591c3c7a1aae41bb2702dc40609a9bcae0e40ea5 (diff)
Builtin needs to be baseruby-compatible
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6418
-rw-r--r--mjit_c.rb20
-rwxr-xr-xtool/mjit/bindgen.rb4
2 files changed, 18 insertions, 6 deletions
diff --git a/mjit_c.rb b/mjit_c.rb
index 5def975dcc..ac3b2a2ff2 100644
--- a/mjit_c.rb
+++ b/mjit_c.rb
@@ -123,15 +123,25 @@ module RubyVM::MJIT
### MJIT bindgen begin ###
- def C.NOT_COMPILED_STACK_SIZE = Primitive.cexpr! %q{ INT2NUM(NOT_COMPILED_STACK_SIZE) }
+ def C.NOT_COMPILED_STACK_SIZE
+ Primitive.cexpr! %q{ INT2NUM(NOT_COMPILED_STACK_SIZE) }
+ end
- def C.USE_LAZY_LOAD = Primitive.cexpr! %q{ RBOOL(USE_LAZY_LOAD != 0) }
+ def C.USE_LAZY_LOAD
+ Primitive.cexpr! %q{ RBOOL(USE_LAZY_LOAD != 0) }
+ end
- def C.USE_RVARGC = Primitive.cexpr! %q{ RBOOL(USE_RVARGC != 0) }
+ def C.USE_RVARGC
+ Primitive.cexpr! %q{ RBOOL(USE_RVARGC != 0) }
+ end
- def C.VM_CALL_KW_SPLAT = Primitive.cexpr! %q{ INT2NUM(VM_CALL_KW_SPLAT) }
+ def C.VM_CALL_KW_SPLAT
+ Primitive.cexpr! %q{ INT2NUM(VM_CALL_KW_SPLAT) }
+ end
- def C.VM_CALL_TAILCALL = Primitive.cexpr! %q{ INT2NUM(VM_CALL_TAILCALL) }
+ def C.VM_CALL_TAILCALL
+ Primitive.cexpr! %q{ INT2NUM(VM_CALL_TAILCALL) }
+ end
### MJIT bindgen end ###
end if RubyVM::MJIT.enabled?
diff --git a/tool/mjit/bindgen.rb b/tool/mjit/bindgen.rb
index 750fde9805..98d89e17a4 100755
--- a/tool/mjit/bindgen.rb
+++ b/tool/mjit/bindgen.rb
@@ -131,7 +131,9 @@ class BindingGenerator
# Define macros
@macros.each do |macro|
- println " def C.#{macro} = #{generate_macro(macro)}"
+ println " def C.#{macro}"
+ println " #{generate_macro(macro)}"
+ println " end"
println
end