diff options
author | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2022-09-25 21:07:18 +1300 |
---|---|---|
committer | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2022-09-26 00:41:16 +1300 |
commit | 22af2e9084d869b0d1eb24e4c11bc1fd62b7c50d (patch) | |
tree | 3dc85492cfb7dd846612ebb8635b8b4cc4874862 /mjit_c.rb | |
parent | 75cf29f60d87b298edfd75611bfe272a92289cee (diff) | |
download | ruby-22af2e9084d869b0d1eb24e4c11bc1fd62b7c50d.tar.gz |
Rework vm_core to use `int first_lineno` struct member.
Diffstat (limited to 'mjit_c.rb')
-rw-r--r-- | mjit_c.rb | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -32,6 +32,11 @@ module RubyVM::MJIT Primitive.cexpr! 'rb_iseq_path((rb_iseq_t *)NUM2PTR(_iseq_addr))' end + def rb_iseq_first_lineno(iseq) + _iseq_addr = iseq.to_i + Primitive.cexpr! 'rb_iseq_first_lineno((rb_iseq_t *)NUM2PTR(_iseq_addr))' + end + def vm_ci_argc(ci) _ci_addr = ci.to_i Primitive.cexpr! 'UINT2NUM(vm_ci_argc((CALL_INFO)NUM2PTR(_ci_addr)))' @@ -461,7 +466,7 @@ module RubyVM::MJIT pathobj: [self.VALUE, Primitive.cexpr!("OFFSETOF((*((struct rb_iseq_location_struct *)NULL)), pathobj)"), true], base_label: [self.VALUE, Primitive.cexpr!("OFFSETOF((*((struct rb_iseq_location_struct *)NULL)), base_label)"), true], label: [self.VALUE, Primitive.cexpr!("OFFSETOF((*((struct rb_iseq_location_struct *)NULL)), label)"), true], - first_lineno: [self.VALUE, Primitive.cexpr!("OFFSETOF((*((struct rb_iseq_location_struct *)NULL)), first_lineno)"), true], + first_lineno: [CType::Immediate.parse("int"), Primitive.cexpr!("OFFSETOF((*((struct rb_iseq_location_struct *)NULL)), first_lineno)"), true], node_id: [CType::Immediate.parse("int"), Primitive.cexpr!("OFFSETOF((*((struct rb_iseq_location_struct *)NULL)), node_id)")], code_location: [self.rb_code_location_t, Primitive.cexpr!("OFFSETOF((*((struct rb_iseq_location_struct *)NULL)), code_location)")], ) |