ruby-changes:50233
From: nobu <ko1@a...>
Date: Sun, 11 Feb 2018 09:19:11 +0900 (JST)
Subject: [ruby-changes:50233] nobu:r62351 (trunk): _mjit_compile_send.erb: PRI_SERIALT_PREFIX
nobu 2018-02-11 09:19:03 +0900 (Sun, 11 Feb 2018) New Revision: 62351 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62351 Log: _mjit_compile_send.erb: PRI_SERIALT_PREFIX * 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. Modified files: trunk/internal.h trunk/tool/ruby_vm/views/_mjit_compile_send.erb Index: internal.h =================================================================== --- internal.h (revision 62350) +++ internal.h (revision 62351) @@ -780,12 +780,15 @@ struct rb_subclass_entry { https://github.com/ruby/ruby/blob/trunk/internal.h#L780 #if defined(HAVE_LONG_LONG) typedef unsigned LONG_LONG rb_serial_t; #define SERIALT2NUM ULL2NUM +#define PRI_SERIALT_PREFIX PRI_LL_PREFIX #elif defined(HAVE_UINT64_T) typedef uint64_t rb_serial_t; #define SERIALT2NUM SIZET2NUM +#define PRI_SERIALT_PREFIX PRI_64_PREFIX #else typedef unsigned long rb_serial_t; #define SERIALT2NUM ULONG2NUM +#define PRI_SERIALT_PREFIX PRI_LONG_PREFIX #endif struct rb_classext_struct { Index: tool/ruby_vm/views/_mjit_compile_send.erb =================================================================== --- tool/ruby_vm/views/_mjit_compile_send.erb (revision 62350) +++ tool/ruby_vm/views/_mjit_compile_send.erb (revision 62351) @@ -27,7 +27,8 @@ https://github.com/ruby/ruby/blob/trunk/tool/ruby_vm/views/_mjit_compile_send.erb#L27 fprintf(f, " reg_cfp->sp = reg_cfp->bp + %d;\n", b->stack_size + 1 - <%= insn.pops.size %>); /* POPN(INSN_ATTR(popn)); */ % # JIT: Invalidate call cache if it requires vm_search_method. This allows to inline some of following things. - fprintf(f, " if (UNLIKELY(GET_GLOBAL_METHOD_STATE() != %llu || RCLASS_SERIAL(CLASS_OF(stack[%d])) != %llu)) {\n", cc->method_state, b->stack_size - 1 - argc, cc->class_serial); + fprintf(f, " if (UNLIKELY(GET_GLOBAL_METHOD_STATE() != %"PRI_SERIALT_PREFIX"u ||\n", cc->method_state); + fprintf(f, " RCLASS_SERIAL(CLASS_OF(stack[%d])) != %"PRI_SERIALT_PREFIX"u)) {\n", b->stack_size - 1 - argc, cc->class_serial); fprintf(f, " reg_cfp->pc = original_body_iseq + %d;\n", pos); fprintf(f, " return Qundef; /* cancel JIT */\n"); fprintf(f, " }\n"); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/