mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* vm.h: rename insn_func_type to rb_insn_func_type.
* vm_evalbody.ci: ditt. * insns.def: add opt_call_native_compiled instruction instead of opt_call_native_compiled. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fd3f9eee0e
commit
eb9aaa4c4f
5 changed files with 32 additions and 23 deletions
|
@ -1,3 +1,12 @@
|
|||
Sun Jul 1 02:57:57 2007 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* vm.h: rename insn_func_type to rb_insn_func_type.
|
||||
|
||||
* vm_evalbody.ci: ditt.
|
||||
|
||||
* insns.def: add opt_call_native_compiled instruction
|
||||
instead of opt_call_native_compiled.
|
||||
|
||||
Sat Jun 30 00:17:00 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* parse.y (parser_yylex): return non-valid token for an invalid
|
||||
|
|
22
insns.def
22
insns.def
|
@ -2331,21 +2331,21 @@ opt_regexpmatch2
|
|||
@j ネイティブコンパイルしたメソッドを kick
|
||||
*/
|
||||
DEFINE_INSN
|
||||
opt_call_native_compiled
|
||||
()
|
||||
opt_call_c_function
|
||||
(VALUE func)
|
||||
()
|
||||
()
|
||||
{
|
||||
#if __GNUC__ && OPT_USE_JIT_COMPILE
|
||||
rb_iseq_t *iseq = GET_ISEQ();
|
||||
void *label = (void *)iseq->jit_compiled;
|
||||
rb_insn_func_t funcptr = (rb_insn_func_t) func;
|
||||
reg_cfp = (funcptr)(th, reg_cfp);
|
||||
|
||||
breakpoint();
|
||||
SET_PC(iseq->iseq_orig);
|
||||
goto *label;
|
||||
#else
|
||||
rb_bug("opt_call_native_compiled is not supported");
|
||||
#endif
|
||||
if (reg_cfp == 0) {
|
||||
VALUE err = th->errinfo;
|
||||
th->errinfo = Qnil;
|
||||
return err;
|
||||
}
|
||||
|
||||
NEXT_INSN();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
#define RUBY_VERSION "1.9.0"
|
||||
#define RUBY_RELEASE_DATE "2007-06-30"
|
||||
#define RUBY_RELEASE_DATE "2007-07-01"
|
||||
#define RUBY_VERSION_CODE 190
|
||||
#define RUBY_RELEASE_CODE 20070630
|
||||
#define RUBY_RELEASE_CODE 20070701
|
||||
#define RUBY_PATCHLEVEL 0
|
||||
|
||||
#define RUBY_VERSION_MAJOR 1
|
||||
#define RUBY_VERSION_MINOR 9
|
||||
#define RUBY_VERSION_TEENY 0
|
||||
#define RUBY_RELEASE_YEAR 2007
|
||||
#define RUBY_RELEASE_MONTH 6
|
||||
#define RUBY_RELEASE_DAY 30
|
||||
#define RUBY_RELEASE_MONTH 7
|
||||
#define RUBY_RELEASE_DAY 1
|
||||
|
||||
#ifdef RUBY_EXTERN
|
||||
RUBY_EXTERN const char ruby_version[];
|
||||
|
|
14
vm.h
14
vm.h
|
@ -24,6 +24,13 @@ typedef unsigned long lindex_t;
|
|||
typedef unsigned long dindex_t;
|
||||
typedef rb_num_t GENTRY;
|
||||
|
||||
#ifndef FUNC_FASTCALL
|
||||
#define FUNC_FASTCALL(x) x
|
||||
#endif
|
||||
|
||||
typedef rb_control_frame_t *
|
||||
(FUNC_FASTCALL(*rb_insn_func_t))(rb_thread_t *, rb_control_frame_t *);
|
||||
|
||||
extern VALUE rb_cEnv;
|
||||
extern VALUE ruby_vm_global_state_version;
|
||||
extern VALUE ruby_vm_redefined_flag;
|
||||
|
@ -101,13 +108,6 @@ error !
|
|||
#define ELABEL(x)
|
||||
#define LABEL_PTR(x) &LABEL(x)
|
||||
|
||||
#ifndef FUNC_FASTCALL
|
||||
#define FUNC_FASTCALL(x) x
|
||||
#endif
|
||||
|
||||
typedef rb_control_frame_t *
|
||||
(FUNC_FASTCALL(*insn_func_type))(rb_thread_t *, rb_control_frame_t *);
|
||||
|
||||
#define INSN_ENTRY(insn) \
|
||||
static rb_control_frame_t * \
|
||||
FUNC_FASTCALL(LABEL(insn))(rb_thread_t *th, rb_control_frame_t *reg_cfp) {
|
||||
|
|
|
@ -125,7 +125,7 @@ vm_eval(rb_thread_t *th, VALUE initial)
|
|||
VALUE ret;
|
||||
|
||||
while (*GET_PC()) {
|
||||
reg_cfp = ((insn_func_type) (*GET_PC()))(th, reg_cfp);
|
||||
reg_cfp = ((rb_insn_func_t) (*GET_PC()))(th, reg_cfp);
|
||||
|
||||
if (reg_cfp == 0) {
|
||||
VALUE err = th->errinfo;
|
||||
|
|
Loading…
Add table
Reference in a new issue