* Makefie.in, win32/Makefile.sub: add more macros for compiler to
mjit_config.h.
* mjit.c: unification VC and GCC in progress.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
so that other predefined macros won't be removed by
`MJITHeader.remove_predefined_macros!`.
Currently macro like -DVM_CHECK_MODE=2 is removed when it's passed in
configure. But it is needed during JIT compilation.
gc.c: export rb_obj_info to let JIT succeed with VM_CHECK_MODE=2.
```
MJIT warning: failure in loading code from '/tmp/_ruby_mjit_p15631u0.so': /tmp/_ruby_mjit_p15631u0.so: undefined symbol: rb_obj_info
```
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tool/ruby_vm/views/_mjit_compile_insn.erb: comment ID of
constant, calling method, and Symbol literal.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/Makefile.sub (CPPOUTFLAG, MJIT_HEADER_FLAGS): -Fi option
is available since VC 10. redirect stdout on older versions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tool/ruby_vm/views/_mjit_compile_send.erb: `printf` modifier for
`rb_serial_t` which may not be `long long`, and '%ll' may not be
supported.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* insns.def (getinlinecache): Qnil is a valid value as a constant.
this can be observable when accessing a deprecated constant
which is nil. non-nil constant is warned just once for each
location, but every time if it is nil.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
test_compile_insns has only basic tests to improve coverage.
Other severer tests should be added with different names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Makefie.in, win32/Makefile.sub: make mjit_config.h from
configured variables, including necessary options, e.g., `-m32`
for 32bit binary on 64bit platform.
* mjit.c: always use configured CC command. as config.h depends
on the compiler, different compilers cannot work.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* mjit_compile.c (mjit_compile): name the original iseq pointer to
eliminate magic numbers.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* mjit.c (compile_c_to_so): use append_str2() and pass the length of
so_name. append_str() uses the size of the 2nd argument, not the
length of it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* mjit.c (start_process): set umask so other users cannot access
generated files.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c (compile_array): skip creating new hash if preceeding
elements are popped all. [ruby-core:85486] [Bug #14459]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/Makefile.sub (MESSAGE_BEGIN, MESSAGE_END): group the whole
`for` command, to redirect all lines but not overwrite line by
line.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* sprintf.c (ruby_do_vsnprintf): pathologically, get rid of
negative value when the result length exceeds INT_MAX.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
test_jit.rb: with environment variable RUBY_FORCE_TEST_JIT, we can force
to test JIT availability.
I wanted to have such CI, but Travis was the only option which I can
modify easily.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
I heard `error: conflicting types for 'restrict'` can be solved by
adding `-std=c99`.
Ideally we should use the same cflags which are used to compile vm.c,
but let me try this and see what happens on AIX.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* mjit.c (compile_c_to_so): refactored.
* mjit.c (init_header_filename): xmalloc never returns NULL.
* mjit.c (init_header_filename): report the filename of the header if failed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/Makefile.sub (RUBY_VERSION_NAME): used in this file but not defined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* mjit.c (compile_c_to_so): libs is not constant on Windows.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
io.c: Variable and label definition are necessary in both cases.
From: Lars Kanis <lars@greiz-reinsdorf.de>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.ac: MJIT_HEADER_INSTALL_DIR to rubyarchhdrdir to
support multiarch.
* Makefile.in (MJIT_HEADER_INSTALL_DIR): configured by multiarch.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* mjit.c (init_header_filename): get version name from the
particular global variable, not from the macro in version.h.
to get rid of re-compilation for each revision.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* mjit.c (compile_c_to_so): constified constat array and make
variable arrays local.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
tool/ruby_vm/views/_insn_name_info.erb: on Linux, rb_vm_insn_name_offset
was needed to compile with --jit-debug (Usually --jit-debug requires
more symbols than the situation without --jit-debug because -O2 skips
some functions to compile).
vm.c: when running transform_mjit_header.rb with --jit-wait,
rb_source_location_cstr was repoted to be missing.
string.c: ditto, for rb_str_eql
numeric.c: ditto, for rb_float_eql
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e