summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-17 14:32:20 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-17 14:32:20 +0000
commit2db572514cd9f5cc8957ab8f35f39650bb243ea7 (patch)
treedfff28edbb7592de8dbd64d75e34743ec31ad2e0 /iseq.c
parent4df965f4ed21353b6e0c89ac8286c64c6266ec04 (diff)
* load.c (rb_load_internal): remove call to rb_realpath_internal
within rb_load_internal which caused big performance degradation. Instead, call rb_realpath_internal in the caller of rb_load_internal. [ruby-dev:41502] [ruby-dev:41610] * vm.c (rb_vm_call_cfunc): ditto. * eval_intern.h (rb_vm_call_cfunc): ditto. * ruby.c (process_options): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/iseq.c b/iseq.c
index 48d0cdfcb9..ae45884578 100644
--- a/iseq.c
+++ b/iseq.c
@@ -228,7 +228,7 @@ prepare_iseq_build(rb_iseq_t *iseq,
iseq->name = name;
iseq->filename = filename;
- iseq->filepath = filepath == Qnil ? Qnil : rb_realpath_internal(Qnil, filepath, 1);
+ iseq->filepath = filepath;
iseq->line_no = (unsigned short)line_no; /* TODO: really enough? */
iseq->defined_method_id = 0;
iseq->mark_ary = rb_ary_tmp_new(3);
@@ -606,7 +606,8 @@ iseq_s_compile_file(int argc, VALUE *argv, VALUE self)
parser = rb_parser_new();
node = rb_parser_compile_file(parser, fname, f, NUM2INT(line));
make_compile_option(&option, opt);
- return rb_iseq_new_with_opt(node, rb_str_new2("<main>"), file, file, line, Qfalse,
+ return rb_iseq_new_with_opt(node, rb_str_new2("<main>"), file,
+ rb_realpath_internal(Qnil, file, 1), line, Qfalse,
ISEQ_TYPE_TOP, &option);
}