Skip to content

Commit

Permalink
Add ISEQ_BODY macro
Browse files Browse the repository at this point in the history
Use ISEQ_BODY macro to get the rb_iseq_constant_body of the ISeq. Using
this macro will make it easier for us to change the allocation strategy
of rb_iseq_constant_body when using Variable Width Allocation.
  • Loading branch information
peterzhu2118 committed Mar 24, 2022
1 parent 04591e1 commit 5f10bd6
Show file tree
Hide file tree
Showing 28 changed files with 601 additions and 601 deletions.
4 changes: 2 additions & 2 deletions ast.c
Expand Up @@ -215,14 +215,14 @@ ast_s_of(rb_execution_context_t *ec, VALUE module, VALUE body, VALUE keep_script
iseq = rb_method_iseq(body);
}
if (iseq) {
node_id = iseq->body->location.node_id;
node_id = ISEQ_BODY(iseq)->location.node_id;
}
}

if (!iseq) {
return Qnil;
}
lines = iseq->body->variable.script_lines;
lines = ISEQ_BODY(iseq)->variable.script_lines;

VALUE path = rb_iseq_path(iseq);
int e_option = RSTRING_LEN(path) == 2 && memcmp(RSTRING_PTR(path), "-e", 2) == 0;
Expand Down

0 comments on commit 5f10bd6

Please sign in to comment.