Граф коммитов

50015 Коммитов

Автор SHA1 Сообщение Дата
nobu 87b0af2a2b common.mk: link or copy MJIT_MIN_HEADER under include
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-06 15:31:10 +00:00
svn 9f4e80ef17 * 2018-02-07
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-06 15:19:11 +00:00
k0kubun 1a64f842ef mjit.c: handle fopen error
[Bug #14441]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-06 15:19:10 +00:00
k0kubun 7536797f81 transform_mjit_header.rb: resurrect `exit false`
which was just unintentionally dropped at r62252.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-06 14:58:12 +00:00
nobu d3e6af0041 common.mk: MJIT_CPPFLAGS
* common.mk (MJIT_CPPFLAGS): moved common definition flags for
  mjit compilation.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-06 14:45:11 +00:00
k0kubun d409017bc6 mjit_compile.c: fix inconsistent indentation
and style of generated code.

I've used 2-space indentation at first but at some moment I started to
use insns.def contents for generated code. So the 4-space indentation
was introduced. But it does no longer make sense.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-06 14:27:15 +00:00
k0kubun 3cb196f404 mjit_compile.c: share the definition of macros
(IS_ARGS_SPLAT, IS_ARGS_KEYWORD) with vm_args.c.

vm_args.c: share them with mjit_compile.c.
vm_insnhelper.h: get those definitions, with CALLER_SETUP_ARG too

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-06 14:07:57 +00:00
kazu 1c8d23796f Fix wrong comment
`ruby_strdup` does not return NULL.
[ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-06 13:58:04 +00:00
k0kubun dbb63aeea6 transform_mjit_header.rb: add output for debug
AIX's header build is failing like:

./miniruby -I./lib -I. -I.ext/common  ./tool/transform_mjit_header.rb "/usr/bin/gcc " rb_mjit_header.h .ext/include/powerpc-aix7.1.3.0/rb_mjit_min_header-2.6.0.h
error in initial header file:
/home/odaira/chkbuild/tmp/build/20180206T113302Z/tmp/20180206-15335556-aaiego.c:19:59: error: conflicting types for 'restrict'
 extern size_t fread(void *restrict, size_t, size_t, FILE *restrict);
                                                           ^

https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20180206T113302Z.log.html.gz#make

It's so hard to know the cause from current output. Let me add debug
output and see tomorrow's CI result.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-06 13:47:02 +00:00
nobu 2b90469ac7 mjit.c: suppress unused-value warning
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-06 13:23:25 +00:00
kazu 49d787359a Remove unused capture
Because `Regexp#to_s` add `(?-mix:)`, it is not unnecessary.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-06 12:40:41 +00:00
nobu 94d89c27d7 mjit.c: fixed missing variable
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-06 10:36:03 +00:00
nobu 4917aef04e mjit.c: build dir prefix
* mjit.c (init_header_filename): prepend basedir to header build
  dir too, so that the header can be found when running not in the
  build directory.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-06 10:30:53 +00:00
nobu 427b2ac250 configure.ac: removed unnecessary pushdef/popdef
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-06 08:00:17 +00:00
nobu 422cf1095f test_gem_util.rb: fix broken test
* test/rubygems/test_gem_util.rb: no guarantee that tmpdir is
  always underneath the root directory at all.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-06 07:42:44 +00:00
nobu 88035b9979 mjit headers for universal binary
* common.mk (MJIT_HEADER, MJIT_MIN_HEADER): added hook to separate
  intermediate headers per archs.

* defs/gmake.mk: build mjit headers per -arch options, and then
  merge the headers with `#ifdef`s.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-06 03:19:42 +00:00
hsbt 7112c6a1c1 Merge RubyGems-2.7.5 from upstream.
Please see its details: http://blog.rubygems.org/2018/02/06/2.7.5-released.html

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-06 02:58:35 +00:00
shyouhei eb537609ba deal with aclocal(1)
This commit updates files so that aclocal.m4 generated by aclocal(1)
works well with our configure.ac

	* ac_checking.m4: merged back to configure.ac because
	  aclocal(1) cannot handle this macro.

	* ruby_append_options.m4: no longer used.

	* ruby_check_va_copy.m4: define using AC_DEFUN so that
	  aclocal(1) can find this macro.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-06 02:08:13 +00:00
nobu 1f003810c2 thread_pthread.c: cast inside rb_thread_create_mjit_thread
* thread_pthread.c (rb_thread_create_mjit_thread): cast
  worker_func pointer to void pointer inside.  adjusted to the
  declaration in mjit.c and the definition in thread_win32.c.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-06 01:42:38 +00:00
nobu 75ffce2863 mjit.c: use ruby_strdup as get_string
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-06 01:42:37 +00:00
nobu 63bbd8eecd common.mk: ARCH_FLAG to mjit headers
* common.mk (rb_mjit_header.h, rb_mjit_min_header.h): $(ARCH_FLAG)
  is necessary to compile for non-default architecture, e.g.,
  32bit build on 64bit platform.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-06 00:47:19 +00:00
k0kubun b64f7258f4 mjit.c: fix MinGW warning by r62221
mjit.c: In function 'worker':
mjit.c:126:64: warning: passing argument 1 of '_InterlockedExchangePointer' from incompatible pointer type [-Wincompatible-pointer-types]
 #  define MJIT_ATOMIC_SET(var, val) InterlockedExchangePointer(&(var), val)
                                                                ^
mjit.c:828:17: note: in expansion of macro 'MJIT_ATOMIC_SET'
                 MJIT_ATOMIC_SET(node->unit->iseq->body->jit_func, func);
                 ^
In file included from C:/msys64/mingw64/x86_64-w64-mingw32/include/winnt.h:27:0,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/minwindef.h:163,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/windef.h:8,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/windows.h:69,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/winsock2.h:23,
                 from ./include/ruby/win32.h:41,
                 from ./include/ruby/defines.h:250,
                 from ./include/ruby/ruby.h:29,
                 from ./include/ruby.h:33,
                 from internal.h:15,
                 from mjit.c:76:
C:/msys64/mingw64/x86_64-w64-mingw32/include/psdk_inc/intrin-impl.h:1420:7: note: expected 'void * volatile*' but argument is of type 'VALUE (**)(struct rb_execution_context_struct *, struct rb_control_frame_struct *) {aka long long unsigned int (**)(struct rb_execution_context_struct *, struct rb_control_frame_struct *)}'
 void *_InterlockedExchangePointer(void *volatile *Target,void *Value) {
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 17:00:43 +00:00
k0kubun 1fd0a7a660 mjit.c: determine prefix of MJIT header at runtime
so that MJIT can work if Ruby is distributed as prebuilt binary.

Now mjit_init() depends on the internal const TMP_RUBY_PREFIX which is
only available after ruby_init_loadpath_safe() (L1608) and before
ruby_init_prelude() (L1681). So the place of mjit_init() is moved.

Makefile.in: Removed static prefix from MJIT_HEADER_ISNTALL_DIR macro.
And this removes the unused LIBRUBY_LIBDIR macro as well.
win32/Makefile.sub: ditto.

Patch by: Lars Kanis <lars@greiz-reinsdorf.de>
[Bug #14445]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 16:51:12 +00:00
k0kubun 68baf9551e vm_insnhelper.c: prefix rb_ to simple_iseq_p
which is started to be used by mjit_compile.c in r62197.

Related to r62235, this intends to transform the function to static.
Of course we shouldn't pollute the namespace anyway.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 15:49:32 +00:00
svn 43866a33c5 * 2018-02-06
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 15:39:56 +00:00
k0kubun e23aefe288 transform_mjit_header.rb: restrict transformation
to whitelisted patterns. This fix is for NetBSD.

[Bug #14439]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 15:39:55 +00:00
nobu da79033a30 transform_mjit_header.rb: same command after error
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 13:58:48 +00:00
k0kubun 349e7fcb66 tool/downloader.rb: retry SocketError
I would like to stabilize RubyCI.

https://rubyci.org/logs/rubyci.s3.amazonaws.com/fedora26/ruby-trunk/log/20180205T123003Z.fail.html.gz

downloading did_you_mean-1.2.0.gem ... /home/hsbt/chkbuild/tmp/build/20180205T123003Z/tmp/ruby-snapshot20180205-23226-3201ha/ruby-2.6.0-r62226/tool/downloader.rb:212:in `rescue in download': failed to download did_you_mean-1.2.0.gem (RuntimeError)
SocketError: Failed to open TCP connection to rubygems.org:443 (getaddrinfo: Name or service not known): https://rubygems.org/downloads/did_you_mean-1.2.0.gem
	from /home/hsbt/chkbuild/tmp/build/20180205T123003Z/tmp/ruby-snapshot20180205-23226-3201ha/ruby-2.6.0-r62226/tool/downloader.rb:123:in `download'
	from /home/hsbt/chkbuild/tmp/build/20180205T123003Z/tmp/ruby-snapshot20180205-23226-3201ha/ruby-2.6.0-r62226/tool/downloader.rb:66:in `download'
	from -e:4:in `<main>'
make[1]: *** [Makefile:1685: update-gems] Error 1

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 13:24:00 +00:00
k0kubun 827322569f mjit.c: prefer using --jit-cc=clang if __clang__
is defined.  This is basically for OpenBSD.

Failure on using the compiler which is
not used for Ruby compilation is not supported.

[Bug #14440]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 12:57:24 +00:00
kazu 1ddaa1ce09 Fix undefined behavior
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 12:34:37 +00:00
kazu 5a68bd7f00 Fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 12:34:35 +00:00
k0kubun d7195ec5c3 mjit.c: try changing the order of includes
Hoping to fix the AIX's build failure like:

In file included from ./include/ruby/defines.h:139:0,
                 from ./include/ruby/ruby.h:29,
                 from ./include/ruby.h:33,
                 from internal.h:15,
                 from mjit.c:81:
/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/4.8.1/include-fixed/unistd.h:939:14: error: conflicting types for 'ftruncate64'
  extern int  ftruncate64(int, off64_t);
              ^
In file included from ./include/ruby/defines.h:139:0,
                 from ./include/ruby/ruby.h:29,
                 from ./include/ruby.h:33,
                 from internal.h:15,
                 from mjit.c:81:
/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/4.8.1/include-fixed/unistd.h:937:14: note: previous declaration of 'ftruncate64' was here
  extern int  ftruncate(int, off_t);
              ^

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 12:33:36 +00:00
k0kubun 9895f69460 transform_mjit_header.rb: check initial code
separating the macros. Applying the kept macros to code which is already
affected by the macros may cause errors in initial code.

This is hopefully the final fix for icc build failure.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 12:19:38 +00:00
k0kubun 70a7bc3967 transform_mjit_header.rb: remove predefined macros
semi-automatically.

This is basically for icc's __DATE__, __TIME__, and many other families.
It causes an error by predefined macro redefinition.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 12:05:04 +00:00
shyouhei a3225c6eba need shell's escape instead of M4's.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 05:22:22 +00:00
nobu 08332d5357 Makefile.sub: va_copy in old version
* win32/Makefile.sub: va_copy is available since VS12 (VC 18.00).
  simple copy same as VC1 19.00.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 04:58:07 +00:00
nobu 961569b952 transform_mjit_header.rb: no extra CRs
* tool/transform_mjit_header.rb (MJITHeader.check_code!): open
  temporary file in binary mode too, not to include extra CRs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 04:58:04 +00:00
shyouhei 8427fca49b assigning void* to a function pointer is a POSIXism
No implicit cast is defined between these types.  Should be explicit.
Also, NULL is defined to be ((void*)0) so not usable as a function
pointer value.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 04:17:44 +00:00
shyouhei 779c18bf23 va_copy is a C99ism
Should provide appropriate fallback implementation.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 04:07:25 +00:00
shyouhei bb6c0f03a7 comma at the end of enum is a C99ism
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 04:02:55 +00:00
nobu 59cc9e3a67 vcs.rb: no meaningless splat
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 03:19:39 +00:00
nobu 3a4183d2b7 vcs.rb: for old ruby
* tool/vcs.rb (DebugSystem#system): pop option hash for old
  version ruby which does not support `system` options.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 03:19:39 +00:00
nobu 5c6162ad3f transform_mjit_header.rb: take program name from $0
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 02:07:49 +00:00
nobu 3f45bbfe0e transform_mjit_header.rb: read/write in binmode
* tool/transform_mjit_header.rb: read and write as ASCII-8BIT to
  make single-byte-optimizable always.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 02:02:23 +00:00
nobu 70ae83f8e1 transform_mjit_header.rb: separate macro and code
* tool/transform_mjit_header.rb (separate_macro_and_code): return
  macro and code separately as the name, and concat before output.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 00:52:45 +00:00
nobu a38b3307b6 transform_mjit_header.rb: scan by regexp
* tool/transform_mjit_header.rb (find_decl): scan by regexp
  instead of char-by-char loop.  return nil when finished.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 00:52:20 +00:00
kazu e743b36318 Use system option instead of shell redirect
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 00:09:09 +00:00
k0kubun 2c179b12de mjit.c: define __EXTENSIONS__ earlier
Another try of r62204 and r62192.

As far as I can see from solaris's signal.h and sys/procset.h, the only
possibility that causes the following error would be that sys/procset.h
is included without __EXTENSIONS__ and signal.h included it again but it
doesn't define procset_t.  Let's define __EXTENSIONS__ from first.

---
In file included from vm_core.h:87:0,
                 from mjit.c:85:
/usr/include/signal.h:77:29: error: unknown type name 'procset_t'
 extern int sigsendset(const procset_t *, int);
                             ^

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-04 15:40:06 +00:00
nobu 1f2293dfe5 MINIRUBY dependency
* common.mk ($(MJIT_MIN_HEADER)): add dependency for $(MINIRUBY).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-04 15:34:38 +00:00
nobu 67f12c5fc8 use MINIRUBY
* common.mk ($(MJIT_MIN_HEADER)): use $(MINIRUBY) at build time.
  $(BASERUBY) may not be available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-04 15:23:37 +00:00