summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-30 18:02:24 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-30 18:02:24 +0000
commiteb9aaa4c4fdaee9225e1843a71b5cdefaf179db6 (patch)
tree61c0207b228af4cb4f018d93fd7449da07b9b60e
parentfd3f9eee0e9a37218edf21e1726ff1b5d90792ba (diff)
* 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
-rw-r--r--ChangeLog9
-rw-r--r--insns.def22
-rw-r--r--version.h8
-rw-r--r--vm.h14
-rw-r--r--vm_evalbody.ci2
5 files changed, 32 insertions, 23 deletions
diff --git a/ChangeLog b/ChangeLog
index 9561883a143..921b2055c93 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/insns.def b/insns.def
index a8bec163e11..7893abe3e95 100644
--- a/insns.def
+++ b/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();
}
/**
diff --git a/version.h b/version.h
index a36134b7e24..8aeb40512e5 100644
--- a/version.h
+++ b/version.h
@@ -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[];
diff --git a/vm.h b/vm.h
index 072563e1f7d..b1c543eb9cb 100644
--- a/vm.h
+++ b/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) {
diff --git a/vm_evalbody.ci b/vm_evalbody.ci
index 53683865d53..2e8746813a5 100644
--- a/vm_evalbody.ci
+++ b/vm_evalbody.ci
@@ -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;