YJIT: rename InsnOpnd
=> YARVOpnd
(#6801)
Rename InsnOpnd => YARVOpnd Make it more clear this refers to YARV insn/vm operands rather than backend IR, x86 or ARM insn operands.
This commit is contained in:
parent
66e5200ba4
commit
d2fa67de81
Notes:
git
2022-11-24 15:30:50 +00:00
Merged-By: maximecb <maximecb@ruby-lang.org>
@ -10,7 +10,7 @@ use crate::options::*;
|
||||
use crate::stats::*;
|
||||
use crate::utils::*;
|
||||
use CodegenStatus::*;
|
||||
use InsnOpnd::*;
|
||||
use YARVOpnd::*;
|
||||
|
||||
use std::cmp;
|
||||
use std::collections::HashMap;
|
||||
@ -1956,7 +1956,7 @@ fn gen_get_ivar(
|
||||
comptime_receiver: VALUE,
|
||||
ivar_name: ID,
|
||||
recv: Opnd,
|
||||
recv_opnd: InsnOpnd,
|
||||
recv_opnd: YARVOpnd,
|
||||
side_exit: CodePtr,
|
||||
) -> CodegenStatus {
|
||||
let comptime_val_klass = comptime_receiver.class_of();
|
||||
@ -3397,7 +3397,7 @@ fn jit_guard_known_klass(
|
||||
ocb: &mut OutlinedCb,
|
||||
known_klass: VALUE,
|
||||
obj_opnd: Opnd,
|
||||
insn_opnd: InsnOpnd,
|
||||
insn_opnd: YARVOpnd,
|
||||
sample_instance: VALUE,
|
||||
max_chain_depth: i32,
|
||||
side_exit: CodePtr,
|
||||
|
@ -15,7 +15,7 @@ use std::collections::HashSet;
|
||||
use std::hash::{Hash, Hasher};
|
||||
use std::mem;
|
||||
use std::rc::{Rc};
|
||||
use InsnOpnd::*;
|
||||
use YARVOpnd::*;
|
||||
use TempMapping::*;
|
||||
|
||||
// Maximum number of temp value types we keep track of
|
||||
@ -263,9 +263,9 @@ impl Default for TempMapping {
|
||||
}
|
||||
}
|
||||
|
||||
// Operand to a bytecode instruction
|
||||
// Operand to a YARV bytecode instruction
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
|
||||
pub enum InsnOpnd {
|
||||
pub enum YARVOpnd {
|
||||
// The value is self
|
||||
SelfOpnd,
|
||||
|
||||
@ -1165,7 +1165,7 @@ impl Context {
|
||||
}
|
||||
|
||||
/// Get the type of an instruction operand
|
||||
pub fn get_opnd_type(&self, opnd: InsnOpnd) -> Type {
|
||||
pub fn get_opnd_type(&self, opnd: YARVOpnd) -> Type {
|
||||
match opnd {
|
||||
SelfOpnd => self.self_type,
|
||||
StackOpnd(idx) => {
|
||||
@ -1201,7 +1201,7 @@ impl Context {
|
||||
/// This value must be compatible and at least as specific as the previously known type.
|
||||
/// If this value originated from self, or an lvar, the learned type will be
|
||||
/// propagated back to its source.
|
||||
pub fn upgrade_opnd_type(&mut self, opnd: InsnOpnd, opnd_type: Type) {
|
||||
pub fn upgrade_opnd_type(&mut self, opnd: YARVOpnd, opnd_type: Type) {
|
||||
// If type propagation is disabled, store no types
|
||||
if get_option!(no_type_prop) {
|
||||
return;
|
||||
@ -1239,7 +1239,7 @@ impl Context {
|
||||
This is can be used with stack_push_mapping or set_opnd_mapping to copy
|
||||
a stack value's type while maintaining the mapping.
|
||||
*/
|
||||
pub fn get_opnd_mapping(&self, opnd: InsnOpnd) -> (TempMapping, Type) {
|
||||
pub fn get_opnd_mapping(&self, opnd: YARVOpnd) -> (TempMapping, Type) {
|
||||
let opnd_type = self.get_opnd_type(opnd);
|
||||
|
||||
match opnd {
|
||||
@ -1262,7 +1262,7 @@ impl Context {
|
||||
}
|
||||
|
||||
/// Overwrite both the type and mapping of a stack operand.
|
||||
pub fn set_opnd_mapping(&mut self, opnd: InsnOpnd, (mapping, opnd_type): (TempMapping, Type)) {
|
||||
pub fn set_opnd_mapping(&mut self, opnd: YARVOpnd, (mapping, opnd_type): (TempMapping, Type)) {
|
||||
match opnd {
|
||||
SelfOpnd => unreachable!("self always maps to self"),
|
||||
StackOpnd(idx) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user