diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-03-16 17:40:00 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-03-16 17:40:00 +0000 |
commit | 6ff75042db1a68a23a133667b3a97c9ec23c131e (patch) | |
tree | 71b655e989f973dc4f1e2e08a63aeeb776e75956 /vm_core.h | |
parent | c4fdd64fe03cc5fd99cd6eee10df9b660b46167d (diff) |
* compile.c, iseq.c, ruby.c, vm.c, vm_core.h, vm_eval.c: add absolute
path field into rb_iseq_t. The field contains a string representing
a path to corresponding source file. or nil when the iseq is created
from -e, stdin, eval, etc. This field is used for require_relative.
[ruby-dev:40004]
* load.c (rb_f_require_relative): add C implementation of
require_relative.
* prelude.rb (require_relative): get rid of Ruby implementation of
require_relative.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r-- | vm_core.h | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -155,6 +155,7 @@ struct rb_iseq_struct { VALUE type; /* instruction sequence type */ VALUE name; /* String: iseq name */ VALUE filename; /* file information where this sequence from */ + VALUE filepath; /* real file path or nil */ VALUE *iseq; /* iseq (insn number and openrads) */ VALUE *iseq_encoded; /* encoded iseq */ unsigned long iseq_size; @@ -464,11 +465,11 @@ typedef struct rb_thread_struct } rb_thread_t; /* iseq.c */ -VALUE rb_iseq_new(NODE*, VALUE, VALUE, VALUE, VALUE); -VALUE rb_iseq_new_top(NODE *node, VALUE name, VALUE filename, VALUE parent); -VALUE rb_iseq_new_main(NODE *node, VALUE filename); -VALUE rb_iseq_new_with_bopt(NODE*, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE); -VALUE rb_iseq_new_with_opt(NODE*, VALUE, VALUE, VALUE, VALUE, VALUE, const rb_compile_option_t*); +VALUE rb_iseq_new(NODE*, VALUE, VALUE, VALUE, VALUE, VALUE); +VALUE rb_iseq_new_top(NODE *node, VALUE name, VALUE filename, VALUE filepath, VALUE parent); +VALUE rb_iseq_new_main(NODE *node, VALUE filename, VALUE filepath); +VALUE rb_iseq_new_with_bopt(NODE*, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE); +VALUE rb_iseq_new_with_opt(NODE*, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, const rb_compile_option_t*); VALUE rb_iseq_compile(VALUE src, VALUE file, VALUE line); VALUE rb_iseq_disasm(VALUE self); int rb_iseq_disasm_insn(VALUE str, VALUE *iseqval, size_t pos, rb_iseq_t *iseq, VALUE child); |