зеркало из https://github.com/github/ruby.git
mjit_compile.c: share the definition of macros
(IS_ARGS_SPLAT, IS_ARGS_KEYWORD) with vm_args.c. vm_args.c: share them with mjit_compile.c. vm_insnhelper.h: get those definitions, with CALLER_SETUP_ARG too git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
1c8d23796f
Коммит
3cb196f404
|
@ -48,10 +48,6 @@ get_iseq_if_available(CALL_CACHE cc)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* TODO: move to somewhere shared with vm_args.c */
|
||||
#define IS_ARGS_SPLAT(ci) ((ci)->flag & VM_CALL_ARGS_SPLAT)
|
||||
#define IS_ARGS_KEYWORD(ci) ((ci)->flag & VM_CALL_KWARG)
|
||||
|
||||
/* Returns TRUE if iseq is inlinable, otherwise NULL. This becomes TRUE in the same condition
|
||||
as CI_SET_FASTPATH (in vm_callee_setup_arg) is called from vm_call_iseq_setup. */
|
||||
static int
|
||||
|
|
|
@ -884,11 +884,3 @@ vm_caller_setup_arg_block(const rb_execution_context_t *ec, rb_control_frame_t *
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#define IS_ARGS_SPLAT(ci) ((ci)->flag & VM_CALL_ARGS_SPLAT)
|
||||
#define IS_ARGS_KEYWORD(ci) ((ci)->flag & VM_CALL_KWARG)
|
||||
|
||||
#define CALLER_SETUP_ARG(cfp, calling, ci) do { \
|
||||
if (UNLIKELY(IS_ARGS_SPLAT(ci))) vm_caller_setup_arg_splat((cfp), (calling)); \
|
||||
if (UNLIKELY(IS_ARGS_KEYWORD(ci))) vm_caller_setup_arg_kw((cfp), (calling), (ci)); \
|
||||
} while (0)
|
||||
|
|
|
@ -244,4 +244,12 @@ THROW_DATA_CONSUMED_SET(struct vm_throw_data *obj)
|
|||
}
|
||||
}
|
||||
|
||||
#define IS_ARGS_SPLAT(ci) ((ci)->flag & VM_CALL_ARGS_SPLAT)
|
||||
#define IS_ARGS_KEYWORD(ci) ((ci)->flag & VM_CALL_KWARG)
|
||||
|
||||
#define CALLER_SETUP_ARG(cfp, calling, ci) do { \
|
||||
if (UNLIKELY(IS_ARGS_SPLAT(ci))) vm_caller_setup_arg_splat((cfp), (calling)); \
|
||||
if (UNLIKELY(IS_ARGS_KEYWORD(ci))) vm_caller_setup_arg_kw((cfp), (calling), (ci)); \
|
||||
} while (0)
|
||||
|
||||
#endif /* RUBY_INSNHELPER_H */
|
||||
|
|
Загрузка…
Ссылка в новой задаче