diff options
author | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-07 13:11:27 +0000 |
---|---|---|
committer | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-07 13:11:27 +0000 |
commit | 950d1007005a6d3aa961e7b299c99dccd71a2efc (patch) | |
tree | c5a935aea06cf874a03759fefcb94677fe2c785e /vm_insnhelper.c | |
parent | b62c1a22b30ac0108280fe2ba99254f605623972 (diff) |
mjit.h: introduce MJIT_STATIC for full mswin JIT support
This change resolves most of major remaining MJIT bugs on mswin.
Since Visual Studio doesn't support generating pre-processed code
preserving macros, we can't use transform_mjit_header approach for mswin.
So we need to transform MJIT header using macro like this.
vm.c: use MJIT_STATIC for non-static functions that exist on MJIT header
and cause conflict on link.
vm_insnhelper.c: ditto
test_jit.rb: remove many skips for mswin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index d99711e11f..f0da52dbcb 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -23,7 +23,7 @@ static rb_control_frame_t *vm_get_ruby_level_caller_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp); -VALUE +MJIT_STATIC VALUE ruby_vm_special_exception_copy(VALUE exc) { VALUE e = rb_obj_alloc(rb_class_real(RBASIC_CLASS(exc))); @@ -55,8 +55,8 @@ vm_stackoverflow(void) ec_stack_overflow(GET_EC(), TRUE); } -NORETURN(void rb_ec_stack_overflow(rb_execution_context_t *ec, int crit)); -void +NORETURN(MJIT_STATIC void rb_ec_stack_overflow(rb_execution_context_t *ec, int crit)); +MJIT_STATIC void rb_ec_stack_overflow(rb_execution_context_t *ec, int crit) { if (crit || rb_during_gc()) { @@ -314,7 +314,7 @@ vm_pop_frame(rb_execution_context_t *ec, rb_control_frame_t *cfp, const VALUE *e return flags & VM_FRAME_FLAG_FINISH; } -void +MJIT_STATIC void rb_vm_pop_frame(rb_execution_context_t *ec) { vm_pop_frame(ec, ec->cfp, ec->cfp->ep); @@ -337,7 +337,7 @@ rb_arity_error_new(int argc, int min, int max) return rb_exc_new3(rb_eArgError, err_mess); } -void +MJIT_STATIC void rb_error_arity(int argc, int min, int max) { rb_exc_raise(rb_arity_error_new(argc, min, max)); @@ -369,7 +369,7 @@ vm_env_write(const VALUE *ep, int index, VALUE v) } } -VALUE +MJIT_STATIC VALUE rb_vm_bh_to_procval(const rb_execution_context_t *ec, VALUE block_handler) { if (block_handler == VM_BLOCK_HANDLER_NONE) { @@ -562,7 +562,7 @@ check_method_entry(VALUE obj, int can_be_svar) } } -const rb_callable_method_entry_t * +MJIT_STATIC const rb_callable_method_entry_t * rb_vm_frame_method_entry(const rb_control_frame_t *cfp) { const VALUE *ep = cfp->ep; @@ -1628,7 +1628,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, cc->me, 0, param, local); } -int +MJIT_STATIC int rb_simple_iseq_p(const rb_iseq_t *iseq) { return iseq->body->param.flags.has_opt == FALSE && |