diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-02 08:20:35 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-02 08:20:35 +0000 |
commit | cfd1157f1123998bde7b93212bdb111a65b82414 (patch) | |
tree | 418f1f7d9a8652ed71e1ffbef0afbb59281111a3 /iseq.h | |
parent | a9c0cf4ff06ecbda16b1fcf9d16cb252becd9453 (diff) | |
download | ruby-cfd1157f1123998bde7b93212bdb111a65b82414.tar.gz |
* iseq.h: introduce ISEQ_ORIGINAL_ISEQ() and
ISEQ_ORIGINAL_ISEQ_ALLOC() macro.
* compile.c: use them to access original iseq buffer.
* iseq.c: ditto.
* vm_core.h: rename iseq field to support this fix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.h')
-rw-r--r-- | iseq.h | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -23,10 +23,13 @@ rb_call_info_kw_arg_bytes(int keyword_len) return sizeof(struct rb_call_info_kw_arg) + sizeof(VALUE) * (keyword_len - 1); } -#define ISEQ_COMPILE_DATA(iseq) (iseq)->compile_data_ -#define ISEQ_COVERAGE(iseq) (iseq)->variable_body->coverage_ -#define ISEQ_COVERAGE_SET(iseq, cov) RB_OBJ_WRITE((iseq), &(iseq)->variable_body->coverage_, cov) +#define ISEQ_COMPILE_DATA(iseq) (iseq)->compile_data_ +#define ISEQ_COVERAGE(iseq) (iseq)->variable_body->coverage_ +#define ISEQ_COVERAGE_SET(iseq, cov) RB_OBJ_WRITE((iseq), &(iseq)->variable_body->coverage_, cov) #define ISEQ_FLIP_CNT_INCREMENT(iseq) ((iseq)->variable_body->flip_cnt_++) +#define ISEQ_ORIGINAL_ISEQ(iseq) (iseq)->variable_body->iseq_ +#define ISEQ_ORIGINAL_ISEQ_ALLOC(iseq, size) (ISEQ_ORIGINAL_ISEQ(iseq) = ALLOC_N(VALUE, size)) + RUBY_SYMBOL_EXPORT_BEGIN /* compile.c */ |