summaryrefslogtreecommitdiff
path: root/yjit/src/invariants.rs
diff options
context:
space:
mode:
authorNoah Gibbs (and/or Benchmark CI) <[email protected]>2022-05-25 16:31:38 +0000
committerAlan Wu <[email protected]>2022-05-26 13:06:47 -0400
commitba88787087b0d979f806e6b58cfbc3886d942968 (patch)
tree1ed25c3452df88940c8471c994f4d2c550237ab6 /yjit/src/invariants.rs
parentbd472ef36f22de176a886cbe789480e84990b82b (diff)
Use bindgen to import CRuby constants for YARV instruction bytecodes
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5948
Diffstat (limited to 'yjit/src/invariants.rs')
-rw-r--r--yjit/src/invariants.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/yjit/src/invariants.rs b/yjit/src/invariants.rs
index c31f0ccedc..16843c163f 100644
--- a/yjit/src/invariants.rs
+++ b/yjit/src/invariants.rs
@@ -182,11 +182,11 @@ pub fn assume_stable_constant_names(jit: &mut JITState, ocb: &mut OutlinedCb) {
index: u64,
data: *mut c_void,
) -> bool {
- if insn.as_usize() == OP_OPT_SETINLINECACHE {
+ if insn.as_u32() == YARVINSN_opt_setinlinecache {
return false;
}
- if insn.as_usize() == OP_GETCONSTANT {
+ if insn.as_u32() == YARVINSN_getconstant {
let jit = &mut *(data as *mut JITState);
// The first operand to GETCONSTANT is always the ID associated with
@@ -474,7 +474,7 @@ pub extern "C" fn rb_yjit_constant_ic_update(iseq: *const rb_iseq_t, ic: IC) {
let translated_opcode: VALUE = opcode_pc.read();
rb_vm_insn_decode(translated_opcode)
},
- OP_OPT_GETINLINECACHE.try_into().unwrap()
+ YARVINSN_opt_getinlinecache.try_into().unwrap()
);
// Find the matching opt_getinlinecache and invalidate all the blocks there