[前][次][番号順一覧][スレッド一覧]

ruby-changes:52473

From: k0kubun <ko1@a...>
Date: Tue, 11 Sep 2018 20:26:21 +0900 (JST)
Subject: [ruby-changes:52473] k0kubun:r64682 (trunk): transform_mjit_header.rb: add static to Init_*

k0kubun	2018-09-11 20:26:15 +0900 (Tue, 11 Sep 2018)

  New Revision: 64682

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64682

  Log:
    transform_mjit_header.rb: add static to Init_*
    
    as well, to make CI succeed with VM_CHECK_MODE > 1.
    
    vm_insnhelper.c: drop unnecessary MJIT_HEADER ifdef. This is intended to
    be ignored by having `static inline`. Removing that by macro would be
    helpful for minimizing compilation time, but the impact is not so big
    and having many MJIT_HEADER check would be bad for maintainability.

  Modified files:
    trunk/tool/transform_mjit_header.rb
    trunk/vm_insnhelper.c
Index: vm_insnhelper.c
===================================================================
--- vm_insnhelper.c	(revision 64681)
+++ vm_insnhelper.c	(revision 64682)
@@ -3930,6 +3930,6 @@ vm_canary_is_found_dead(enum ruby_vminsn https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L3930
     rb_bug("dead canary found at %s: %s", insn, str);
 }
 
-#elif !defined(MJIT_HEADER)
+#else
 void Init_vm_stack_canary(void) { /* nothing to do */ }
 #endif
Index: tool/transform_mjit_header.rb
===================================================================
--- tool/transform_mjit_header.rb	(revision 64681)
+++ tool/transform_mjit_header.rb	(revision 64682)
@@ -15,7 +15,7 @@ module MJITHeader https://github.com/ruby/ruby/blob/trunk/tool/transform_mjit_header.rb#L15
   #   VALUE __attribute__ ((foo)) bar(int baz)
   #   __attribute__ ((foo)) VALUE bar(int baz)
   FUNC_HEADER_REGEXP = /\A[^\[{(]*(\s*#{ATTR_REGEXP})*[^\[{(]*\((#{ATTR_REGEXP}|[^()])*\)(\s*#{ATTR_REGEXP})*\s*/
-  TARGET_NAME_REGEXP = /\A(rb|ruby|vm|insn|attr)_/
+  TARGET_NAME_REGEXP = /\A(rb|ruby|vm|insn|attr|Init)_/
 
   # Predefined macros for compilers which are already supported by MJIT.
   # We're going to support cl.exe too (WIP) but `cl.exe -E` can't produce macro.

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]