diff options
author | Koichi Sasada <[email protected]> | 2020-07-03 16:56:44 +0900 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-03 16:56:44 +0900 |
commit | a0f12a0258e4020bd657ee80b7d8f22bd33ea223 (patch) | |
tree | f6ebafa85cba2bddddc090f8d3c3b74c2c9f374b /iseq.c | |
parent | 8655c2e69041cc812d30c2e951a8ac9ea7a60c47 (diff) |
Use ID instead of GENTRY for gvars. (#3278)
Use ID instead of GENTRY for gvars.
Global variables are compiled into GENTRY (a pointer to struct
rb_global_entry). This patch replace this GENTRY to ID and
make the code simple.
We need to search GENTRY from ID every time (st_lookup), so
additional overhead will be introduced.
However, the performance of accessing global variables is not
important now a day and this simplicity helps Ractor development.
Notes
Notes:
Merged-By: ko1 <[email protected]>
Diffstat (limited to 'iseq.c')
-rw-r--r-- | iseq.c | 12 |
1 files changed, 0 insertions, 12 deletions
@@ -1946,12 +1946,6 @@ rb_insn_operand_intern(const rb_iseq_t *iseq, } break; } - case TS_GENTRY: - { - struct rb_global_entry *entry = (struct rb_global_entry *)op; - ret = rb_str_dup(rb_id2str(entry->id)); - } - break; case TS_IC: case TS_IVC: @@ -2776,12 +2770,6 @@ iseq_data_to_ary(const rb_iseq_t *iseq) } } break; - case TS_GENTRY: - { - struct rb_global_entry *entry = (struct rb_global_entry *)*seq; - rb_ary_push(ary, ID2SYM(entry->id)); - } - break; case TS_IC: case TS_IVC: case TS_ISE: |