mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Builtin RubyVM::MJIT::C
This commit is contained in:
parent
88bf8ad6e9
commit
f2bea691cd
Notes:
git
2022-09-23 06:45:10 +09:00
9 changed files with 20 additions and 10 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -233,10 +233,11 @@ lcov*.info
|
|||
/win32/*.ico
|
||||
|
||||
# MJIT
|
||||
/rb_mjit_header.h
|
||||
/mjit_config.h
|
||||
/include/ruby-*/*/rb_mjit_min_header-*.h
|
||||
/lib/mjit/instruction.rb
|
||||
/mjit_c.rb
|
||||
/mjit_config.h
|
||||
/rb_mjit_header.h
|
||||
|
||||
# YJIT
|
||||
/yjit-bench
|
||||
|
|
12
common.mk
12
common.mk
|
@ -235,7 +235,12 @@ main: $(SHOWFLAGS) exts $(ENCSTATIC:static=lib)encs
|
|||
|
||||
main: $(srcdir)/lib/mjit/instruction.rb
|
||||
srcs: $(srcdir)/lib/mjit/instruction.rb
|
||||
$(srcdir)/lib/mjit/instruction.rb: $(tooldir)/ruby_vm/views/lib/mjit/instruction.rb.erb $(srcdir)/insns.def
|
||||
$(srcdir)/lib/mjit/instruction.rb: $(tooldir)/insns2vm.rb $(tooldir)/ruby_vm/views/lib/mjit/instruction.rb.erb $(srcdir)/insns.def
|
||||
$(ECHO) generating $@
|
||||
$(Q) $(BASERUBY) -Ku $(tooldir)/insns2vm.rb --basedir="$(srcdir)" $(INSNS2VMOPT) $@
|
||||
|
||||
srcs: $(srcdir)/mjit_c.rb
|
||||
$(srcdir)/mjit_c.rb: $(tooldir)/insns2vm.rb $(tooldir)/ruby_vm/views/mjit_c.rb.erb
|
||||
$(ECHO) generating $@
|
||||
$(Q) $(BASERUBY) -Ku $(tooldir)/insns2vm.rb --basedir="$(srcdir)" $(INSNS2VMOPT) $@
|
||||
|
||||
|
@ -1094,6 +1099,7 @@ BUILTIN_RB_SRCS = \
|
|||
$(srcdir)/io.rb \
|
||||
$(srcdir)/marshal.rb \
|
||||
$(srcdir)/mjit.rb \
|
||||
$(srcdir)/mjit_c.rb \
|
||||
$(srcdir)/mjit_compiler.rb \
|
||||
$(srcdir)/pack.rb \
|
||||
$(srcdir)/trace_point.rb \
|
||||
|
@ -9310,6 +9316,7 @@ miniinit.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
|
|||
miniinit.$(OBJEXT): $(CCAN_DIR)/list/list.h
|
||||
miniinit.$(OBJEXT): $(CCAN_DIR)/str/str.h
|
||||
miniinit.$(OBJEXT): $(hdrdir)/ruby/ruby.h
|
||||
miniinit.$(OBJEXT): $(srcdir)/mjit_c.rb
|
||||
miniinit.$(OBJEXT): $(top_srcdir)/internal/array.h
|
||||
miniinit.$(OBJEXT): $(top_srcdir)/internal/compilers.h
|
||||
miniinit.$(OBJEXT): $(top_srcdir)/internal/gc.h
|
||||
|
@ -9500,6 +9507,7 @@ miniinit.$(OBJEXT): {$(VPATH)}miniinit.c
|
|||
miniinit.$(OBJEXT): {$(VPATH)}miniprelude.c
|
||||
miniinit.$(OBJEXT): {$(VPATH)}missing.h
|
||||
miniinit.$(OBJEXT): {$(VPATH)}mjit.rb
|
||||
miniinit.$(OBJEXT): {$(VPATH)}mjit_c.rb
|
||||
miniinit.$(OBJEXT): {$(VPATH)}mjit_compiler.rb
|
||||
miniinit.$(OBJEXT): {$(VPATH)}nilclass.rb
|
||||
miniinit.$(OBJEXT): {$(VPATH)}node.h
|
||||
|
@ -9754,6 +9762,7 @@ mjit_compiler.$(OBJEXT): $(CCAN_DIR)/list/list.h
|
|||
mjit_compiler.$(OBJEXT): $(CCAN_DIR)/str/str.h
|
||||
mjit_compiler.$(OBJEXT): $(hdrdir)/ruby.h
|
||||
mjit_compiler.$(OBJEXT): $(hdrdir)/ruby/ruby.h
|
||||
mjit_compiler.$(OBJEXT): $(srcdir)/mjit_c.rb
|
||||
mjit_compiler.$(OBJEXT): $(top_srcdir)/internal/array.h
|
||||
mjit_compiler.$(OBJEXT): $(top_srcdir)/internal/class.h
|
||||
mjit_compiler.$(OBJEXT): $(top_srcdir)/internal/compile.h
|
||||
|
@ -9939,6 +9948,7 @@ mjit_compiler.$(OBJEXT): {$(VPATH)}mjit_compiler.c
|
|||
mjit_compiler.$(OBJEXT): {$(VPATH)}mjit_compiler.h
|
||||
mjit_compiler.$(OBJEXT): {$(VPATH)}mjit_compiler.rb
|
||||
mjit_compiler.$(OBJEXT): {$(VPATH)}mjit_compiler.rbinc
|
||||
mjit_compiler.$(OBJEXT): {$(VPATH)}mjit_c.rbinc
|
||||
mjit_compiler.$(OBJEXT): {$(VPATH)}mjit_unit.h
|
||||
mjit_compiler.$(OBJEXT): {$(VPATH)}node.h
|
||||
mjit_compiler.$(OBJEXT): {$(VPATH)}ruby_assert.h
|
||||
|
|
1
inits.c
1
inits.c
|
@ -104,6 +104,7 @@ rb_call_builtin_inits(void)
|
|||
BUILTIN(marshal);
|
||||
#if USE_MJIT
|
||||
BUILTIN(mjit);
|
||||
BUILTIN(mjit_c);
|
||||
BUILTIN(mjit_compiler);
|
||||
#endif
|
||||
Init_builtin_prelude();
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
require_relative 'c_type'
|
||||
|
||||
module RubyVM::MJIT
|
||||
C = Object.new
|
||||
|
||||
def C.NOT_COMPILED_STACK_SIZE = -1
|
||||
|
||||
def C.USE_LAZY_LOAD = false
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
require_relative 'c_type'
|
||||
|
||||
module RubyVM::MJIT
|
||||
C = Object.new
|
||||
|
||||
def C.NOT_COMPILED_STACK_SIZE = -1
|
||||
|
||||
def C.USE_LAZY_LOAD = false
|
||||
|
|
|
@ -164,6 +164,7 @@ has_cache_for_send(rb_execution_context_t *ec, VALUE self, VALUE cc_addr, VALUE
|
|||
|
||||
extern bool rb_splat_or_kwargs_p(const struct rb_callinfo *restrict ci);
|
||||
|
||||
#include "mjit_c.rbinc"
|
||||
#include "mjit_compiler.rbinc"
|
||||
|
||||
#endif // USE_MJIT
|
||||
|
|
|
@ -343,8 +343,6 @@ class BindingGenerator
|
|||
println "require_relative 'c_type'"
|
||||
println
|
||||
println "module RubyVM::MJIT"
|
||||
println " C = Object.new"
|
||||
println
|
||||
|
||||
# Define macros
|
||||
@macros.each do |macro|
|
||||
|
|
|
@ -37,4 +37,4 @@ module RubyVM::MJIT
|
|||
}
|
||||
|
||||
private_constant(*constants)
|
||||
end if RubyVM::MJIT.enabled?
|
||||
end
|
||||
|
|
3
tool/ruby_vm/views/mjit_c.rb.erb
Normal file
3
tool/ruby_vm/views/mjit_c.rb.erb
Normal file
|
@ -0,0 +1,3 @@
|
|||
module RubyVM::MJIT
|
||||
C = Object.new
|
||||
end if RubyVM::MJIT.enabled?
|
Loading…
Reference in a new issue