diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-05-22 08:31:38 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-05-22 08:31:38 +0000 |
commit | 8bcf7fc40266faa09cf8b6cebb2d96c1bb8d51ee (patch) | |
tree | 719fe00c607d84a4339d7cfef7754eec8590d2e3 /vm_core.h | |
parent | 9c46e774c15668b7fbf3df8a9a9ea912b5908738 (diff) | |
download | ruby-8bcf7fc40266faa09cf8b6cebb2d96c1bb8d51ee.tar.gz |
* vm_core.h: add a data type rb_location_t to store iseq location
information.
rb_location_t#filename, filepath, name and line_no was moved from
rb_iseq_t. rb_location_t#basename is a new field which is
similar to `name' field without any decoration.
`name' field contains some decoration such as `block in foo'.
`basename' only contains `foo'.
rb_iseq_t contains memory object of rb_location_t.
* iseq.c: setup rb_location_t for each rb_iseq_t memory objects.
* compile.c, proc.c, vm.c, vm_dump.c, vm_eval.c, vm_insnhelper.c,
vm_method.c: support about it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r-- | vm_core.h | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -150,6 +150,14 @@ struct iseq_inline_cache_entry { #define GetISeqPtr(obj, ptr) \ GetCoreDataFromValue((obj), rb_iseq_t, (ptr)) +typedef struct rb_location_struct { + VALUE filename; + VALUE filepath; + VALUE basename; + VALUE name; + size_t line_no; +} rb_location_t; + struct rb_iseq_struct; struct rb_iseq_struct { @@ -169,16 +177,14 @@ struct rb_iseq_struct { ISEQ_TYPE_DEFINED_GUARD } type; /* instruction sequence type */ - VALUE name; /* String: iseq name */ - VALUE filename; /* file information where this sequence from */ - VALUE filepath; /* real file path or nil */ + rb_location_t location; + VALUE *iseq; /* iseq (insn number and operands) */ VALUE *iseq_encoded; /* encoded iseq */ unsigned long iseq_size; VALUE mark_ary; /* Array: includes operands which should be GC marked */ VALUE coverage; /* coverage array */ - unsigned short line_no; - + /* insn info, must be freed */ struct iseq_line_info_entry *line_info_table; size_t line_info_size; |