summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2023-03-06 22:02:03 -0800
committerTakashi Kokubun <takashikkbn@gmail.com>2023-03-06 22:29:35 -0800
commit7fb36a0054436369aa2868490e2d102d8e75929c (patch)
treede7fb2c68791e34d130b2d7bf811a7609246e059
parentf68580890faef54a8000e3d9b79341dbd17c115e (diff)
Remove obsoleted MJIT_STATIC macro
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/7461
-rw-r--r--include/ruby/internal/dllexport.h19
-rw-r--r--include/ruby/internal/intern/error.h2
-rw-r--r--internal/vm.h4
-rw-r--r--vm.c2
-rw-r--r--vm_core.h6
-rw-r--r--vm_insnhelper.c18
6 files changed, 16 insertions, 35 deletions
diff --git a/include/ruby/internal/dllexport.h b/include/ruby/internal/dllexport.h
index a540eece81..7f152441a9 100644
--- a/include/ruby/internal/dllexport.h
+++ b/include/ruby/internal/dllexport.h
@@ -59,25 +59,6 @@
# define RUBY_FUNC_EXPORTED /* void */
#endif
-/**
- * @cond INTERNAL_MACRO
- *
- * These MJIT related macros are placed here because translate_mjit_header can
- * need them. Extension libraries should not touch.
- */
-
-/* These macros are used for functions which are exported only for MJIT
- and NOT ensured to be exported in future versions. */
-
-/* On mswin, MJIT header transformation can't be used since cl.exe can't output
- preprocessed output preserving macros. So this `MJIT_STATIC` is needed
- to force non-static function to static on MJIT header to avoid symbol conflict. */
-#ifdef MJIT_HEADER
-# define MJIT_STATIC static
-#else
-# define MJIT_STATIC
-#endif
-
/** @endcond */
/** Shortcut macro equivalent to `RUBY_SYMBOL_EXPORT_BEGIN extern "C" {`.
diff --git a/include/ruby/internal/intern/error.h b/include/ruby/internal/intern/error.h
index 9c153cbac5..bf8daadd3e 100644
--- a/include/ruby/internal/intern/error.h
+++ b/include/ruby/internal/intern/error.h
@@ -235,7 +235,7 @@ RBIMPL_ATTR_NORETURN()
* @param[in] max Maximum allowed `argc`.
* @exception rb_eArgError Always.
*/
-MJIT_STATIC void rb_error_arity(int argc, int min, int max);
+void rb_error_arity(int argc, int min, int max);
RBIMPL_SYMBOL_EXPORT_END()
diff --git a/internal/vm.h b/internal/vm.h
index cfb8923572..11595b21d8 100644
--- a/internal/vm.h
+++ b/internal/vm.h
@@ -50,12 +50,12 @@ PUREFUNC(VALUE rb_vm_top_self(void));
const void **rb_vm_get_insns_address_table(void);
VALUE rb_source_location(int *pline);
const char *rb_source_location_cstr(int *pline);
-MJIT_STATIC void rb_vm_pop_cfunc_frame(void);
+void rb_vm_pop_cfunc_frame(void);
int rb_vm_add_root_module(VALUE module);
void rb_vm_check_redefinition_by_prepend(VALUE klass);
int rb_vm_check_optimizable_mid(VALUE mid);
VALUE rb_yield_refine_block(VALUE refinement, VALUE refinements);
-MJIT_STATIC VALUE ruby_vm_special_exception_copy(VALUE);
+VALUE ruby_vm_special_exception_copy(VALUE);
PUREFUNC(st_table *rb_vm_fstring_table(void));
VALUE vm_exec(struct rb_execution_context_struct *, bool); /* used in JIT-ed code */
diff --git a/vm.c b/vm.c
index dcfcdd82bc..fe1411d174 100644
--- a/vm.c
+++ b/vm.c
@@ -712,7 +712,7 @@ vm_get_ruby_level_caller_cfp(const rb_execution_context_t *ec, const rb_control_
return 0;
}
-MJIT_STATIC void
+void
rb_vm_pop_cfunc_frame(void)
{
rb_execution_context_t *ec = GET_EC();
diff --git a/vm_core.h b/vm_core.h
index f5ad0803a8..a415dbdc6e 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -1748,7 +1748,7 @@ void rb_vm_inc_const_missing_count(void);
VALUE rb_vm_call_kw(rb_execution_context_t *ec, VALUE recv, VALUE id, int argc,
const VALUE *argv, const rb_callable_method_entry_t *me, int kw_splat);
void rb_vm_pop_frame_no_int(rb_execution_context_t *ec);
-MJIT_STATIC void rb_vm_pop_frame(rb_execution_context_t *ec);
+void rb_vm_pop_frame(rb_execution_context_t *ec);
void rb_thread_start_timer_thread(void);
void rb_thread_stop_timer_thread(void);
@@ -1776,7 +1776,7 @@ rb_thread_t * ruby_thread_from_native(void);
int ruby_thread_set_native(rb_thread_t *th);
int rb_vm_control_frame_id_and_class(const rb_control_frame_t *cfp, ID *idp, ID *called_idp, VALUE *klassp);
void rb_vm_rewind_cfp(rb_execution_context_t *ec, rb_control_frame_t *cfp);
-MJIT_STATIC VALUE rb_vm_bh_to_procval(const rb_execution_context_t *ec, VALUE block_handler);
+VALUE rb_vm_bh_to_procval(const rb_execution_context_t *ec, VALUE block_handler);
void rb_vm_register_special_exception_str(enum ruby_special_exceptions sp, VALUE exception_class, VALUE mesg);
@@ -1787,7 +1787,7 @@ void rb_gc_mark_machine_stack(const rb_execution_context_t *ec);
void rb_vm_rewrite_cref(rb_cref_t *node, VALUE old_klass, VALUE new_klass, rb_cref_t **new_cref_ptr);
-MJIT_STATIC const rb_callable_method_entry_t *rb_vm_frame_method_entry(const rb_control_frame_t *cfp);
+const rb_callable_method_entry_t *rb_vm_frame_method_entry(const rb_control_frame_t *cfp);
#define sysstack_error GET_VM()->special_exceptions[ruby_error_sysstack]
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 296bad1ba3..8a5d6e64a3 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -46,7 +46,7 @@ static const struct rb_callcache vm_empty_cc_for_super;
static rb_control_frame_t *vm_get_ruby_level_caller_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp);
-MJIT_STATIC VALUE
+VALUE
ruby_vm_special_exception_copy(VALUE exc)
{
VALUE e = rb_obj_alloc(rb_class_real(RBASIC_CLASS(exc)));
@@ -81,8 +81,8 @@ vm_stackoverflow(void)
ec_stack_overflow(GET_EC(), TRUE);
}
-NORETURN(MJIT_STATIC void rb_ec_stack_overflow(rb_execution_context_t *ec, int crit));
-MJIT_STATIC void
+NORETURN(void rb_ec_stack_overflow(rb_execution_context_t *ec, int crit));
+void
rb_ec_stack_overflow(rb_execution_context_t *ec, int crit)
{
if (rb_during_gc()) {
@@ -431,7 +431,7 @@ vm_pop_frame(rb_execution_context_t *ec, rb_control_frame_t *cfp, const VALUE *e
return flags & VM_FRAME_FLAG_FINISH;
}
-MJIT_STATIC void
+void
rb_vm_pop_frame(rb_execution_context_t *ec)
{
vm_pop_frame(ec, ec->cfp, ec->cfp->ep);
@@ -483,7 +483,7 @@ rb_arity_error_new(int argc, int min, int max)
return rb_exc_new3(rb_eArgError, err_mess);
}
-MJIT_STATIC void
+void
rb_error_arity(int argc, int min, int max)
{
rb_exc_raise(rb_arity_error_new(argc, min, max));
@@ -515,7 +515,7 @@ vm_env_write(const VALUE *ep, int index, VALUE v)
}
}
-MJIT_STATIC VALUE
+VALUE
rb_vm_bh_to_procval(const rb_execution_context_t *ec, VALUE block_handler)
{
if (block_handler == VM_BLOCK_HANDLER_NONE) {
@@ -708,7 +708,7 @@ check_method_entry(VALUE obj, int can_be_svar)
}
}
-MJIT_STATIC const rb_callable_method_entry_t *
+const rb_callable_method_entry_t *
rb_vm_frame_method_entry(const rb_control_frame_t *cfp)
{
const VALUE *ep = cfp->ep;
@@ -2505,7 +2505,7 @@ vm_call_iseq_setup_normal_0start(rb_execution_context_t *ec, rb_control_frame_t
return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cc), 0, param, local);
}
-MJIT_STATIC bool
+bool
rb_simple_iseq_p(const rb_iseq_t *iseq)
{
return ISEQ_BODY(iseq)->param.flags.has_opt == FALSE &&
@@ -3362,7 +3362,7 @@ vm_call_cfunc_with_frame_(rb_execution_context_t *ec, rb_control_frame_t *reg_cf
}
// If true, cc->call needs to include `CALLER_SETUP_ARG` (i.e. can't be skipped in fastpath)
-MJIT_STATIC bool
+bool
rb_splat_or_kwargs_p(const struct rb_callinfo *restrict ci)
{
return IS_ARGS_SPLAT(ci) || IS_ARGS_KW_OR_KW_SPLAT(ci);