summaryrefslogtreecommitdiff
path: root/eval_error.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-24 17:50:17 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-24 17:50:17 +0000
commit59c061235f7bb39d6a33b7e2b7fb4e3db57305db (patch)
treea476f70e698a68b2cc583e8aa5925feecabbd196 /eval_error.c
parent582da7dac70c7fd9c9927cd57587e0cebfebfb3d (diff)
* eval_method.c: renamed from vm_method.c. "vm_method.c" is included
by "vm.c". * vm_eval.c: added. Some codes are moved from "eval.c" * common.mk: fix for above changes. * compile.c: make a vm_eval(0) * eval.c, eval_error.c, eval_intern.h, eval_jump.c, proc.c, vm.c, id.c, id.h, vm_core.h, vm_dump.c, vm_evalbody.c, vm_insnhelper.c, blockinlining.c: fix for above changes. and do some refactoring. this changes improve rb_yield() performance. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_error.c')
-rw-r--r--eval_error.c34
1 files changed, 6 insertions, 28 deletions
diff --git a/eval_error.c b/eval_error.c
index aef3226..aae7655 100644
--- a/eval_error.c
+++ b/eval_error.c
@@ -3,34 +3,6 @@
* included by eval.c
*/
-const char *
-rb_sourcefile(void)
-{
- rb_thread_t *th = GET_THREAD();
- rb_control_frame_t *cfp = vm_get_ruby_level_cfp(th, th->cfp);
-
- if (cfp) {
- return RSTRING_PTR(cfp->iseq->filename);
- }
- else {
- return 0;
- }
-}
-
-int
-rb_sourceline(void)
-{
- rb_thread_t *th = GET_THREAD();
- rb_control_frame_t *cfp = vm_get_ruby_level_cfp(th, th->cfp);
-
- if (cfp) {
- return vm_get_sourceline(cfp);
- }
- else {
- return 0;
- }
-}
-
static void
warn_printf(const char *fmt, ...)
{
@@ -79,6 +51,12 @@ get_backtrace(VALUE info)
return rb_check_backtrace(info);
}
+VALUE
+rb_get_backtrace(VALUE info)
+{
+ return get_backtrace(info);
+}
+
static void
set_backtrace(VALUE info, VALUE bt)
{