ruby-changes:53062
From: k0kubun <ko1@a...>
Date: Sun, 21 Oct 2018 22:37:20 +0900 (JST)
Subject: [ruby-changes:53062] k0kubun:r65276 (trunk): _mjit_compile_send.erb: don't split send_guard
k0kubun 2018-10-21 22:37:13 +0900 (Sun, 21 Oct 2018) New Revision: 65276 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65276 Log: _mjit_compile_send.erb: don't split send_guard to another file, because it's no longer shared. It was created when attr_reader was inlined but it's no longer included. common.mk: ditto Removed files: trunk/tool/ruby_vm/views/_mjit_compile_send_guard.erb Modified files: trunk/common.mk trunk/tool/ruby_vm/views/_mjit_compile_send.erb Index: tool/ruby_vm/views/_mjit_compile_send_guard.erb =================================================================== --- tool/ruby_vm/views/_mjit_compile_send_guard.erb (revision 65275) +++ tool/ruby_vm/views/_mjit_compile_send_guard.erb (nonexistent) @@ -1,14 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/tool/ruby_vm/views/_mjit_compile_send_guard.erb#L0 -% # Copyright (c) 2018 Takashi Kokubun. All rights reserved. -% # -% # This file is a part of the programming language Ruby. Permission is hereby -% # granted, to either redistribute and/or modify this file, provided that the -% # conditions mentioned in the file COPYING are met. Consult the file for -% # details. -% -% # 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() != %"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, " reg_cfp->sp = (VALUE *)reg_cfp->bp + %d;\n", b->stack_size + 1); - fprintf(f, " goto cancel;\n"); - fprintf(f, " }\n"); Index: tool/ruby_vm/views/_mjit_compile_send.erb =================================================================== --- tool/ruby_vm/views/_mjit_compile_send.erb (revision 65275) +++ tool/ruby_vm/views/_mjit_compile_send.erb (revision 65276) @@ -31,7 +31,12 @@ https://github.com/ruby/ruby/blob/trunk/tool/ruby_vm/views/_mjit_compile_send.erb#L31 } % # JIT: Invalidate call cache if it requires vm_search_method. This allows to inline some of following things. -<%= render 'mjit_compile_send_guard' -%> + 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, " reg_cfp->sp = (VALUE *)reg_cfp->bp + %d;\n", b->stack_size + 1); + fprintf(f, " goto cancel;\n"); + fprintf(f, " }\n"); % # JIT: move sp and pc if necessary <%= render 'mjit_compile_pc_and_sp', locals: { insn: insn } -%> Index: common.mk =================================================================== --- common.mk (revision 65275) +++ common.mk (revision 65276) @@ -939,7 +939,7 @@ $(srcs_vpath)vm.inc: $(srcdir)/tool/ruby https://github.com/ruby/ruby/blob/trunk/common.mk#L939 $(srcdir)/tool/ruby_vm/views/_insn_entry.erb $(srcdir)/tool/ruby_vm/views/_trace_instruction.erb $(srcs_vpath)mjit_compile.inc: $(srcdir)/tool/ruby_vm/views/mjit_compile.inc.erb $(inc_common_headers) \ $(srcdir)/tool/ruby_vm/views/_mjit_compile_insn.erb $(srcdir)/tool/ruby_vm/views/_mjit_compile_send.erb \ - $(srcdir)/tool/ruby_vm/views/_mjit_compile_send_guard.erb $(srcdir)/tool/ruby_vm/views/_mjit_compile_ivar.erb \ + $(srcdir)/tool/ruby_vm/views/_mjit_compile_ivar.erb \ $(srcdir)/tool/ruby_vm/views/_mjit_compile_insn_body.erb $(srcdir)/tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb common-srcs: $(srcs_vpath)parse.c $(srcs_vpath)lex.c $(srcs_vpath)enc/trans/newline.c $(srcs_vpath)id.c \ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/