diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2022-11-03 10:33:49 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-03 13:33:49 -0400 |
commit | 124f10f56b16e4fa4572b6dffde7487dcf914b26 (patch) | |
tree | ec0fc0cc5d7601cd80dba53f96998a7da2f2a9b5 | |
parent | 00f559641a0b4941e0022c67657469dc565ce44d (diff) |
YJIT: Fix a wrong type reference (#6661)
* YJIT: Fix a wrong type reference
* YJIT: Just remove CapturedSelfOpnd for now
Notes
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
-rw-r--r-- | yjit/src/codegen.rs | 2 | ||||
-rw-r--r-- | yjit/src/core.rs | 10 |
2 files changed, 1 insertions, 11 deletions
diff --git a/yjit/src/codegen.rs b/yjit/src/codegen.rs index 9ec6c26f89..8e36c44823 100644 --- a/yjit/src/codegen.rs +++ b/yjit/src/codegen.rs @@ -5073,7 +5073,7 @@ fn gen_send_iseq( } let recv_type = if captured_self { - ctx.get_opnd_type(CapturedSelfOpnd) + Type::Unknown // we don't track the type information of captured->self for now } else { ctx.get_opnd_type(StackOpnd(argc.try_into().unwrap())) }; diff --git a/yjit/src/core.rs b/yjit/src/core.rs index afa7604aaf..c0e48e87b2 100644 --- a/yjit/src/core.rs +++ b/yjit/src/core.rs @@ -269,9 +269,6 @@ pub enum InsnOpnd { // The value is self SelfOpnd, - // Captured block's self - CapturedSelfOpnd, - // Temporary stack operand with stack index StackOpnd(u16), } @@ -300,9 +297,6 @@ pub struct Context { // Type we track for self self_type: Type, - // Type we track for captured block's self - captured_self_type: Type, - // Mapping of temp stack entries to types we track temp_mapping: [TempMapping; MAX_TEMP_TYPES], } @@ -1166,7 +1160,6 @@ impl Context { pub fn get_opnd_type(&self, opnd: InsnOpnd) -> Type { match opnd { SelfOpnd => self.self_type, - CapturedSelfOpnd => self.captured_self_type, StackOpnd(idx) => { let idx = idx as u16; assert!(idx < self.stack_size); @@ -1208,7 +1201,6 @@ impl Context { match opnd { SelfOpnd => self.self_type.upgrade(opnd_type), - CapturedSelfOpnd => self.self_type.upgrade(opnd_type), StackOpnd(idx) => { let idx = idx as u16; assert!(idx < self.stack_size); @@ -1244,7 +1236,6 @@ impl Context { match opnd { SelfOpnd => (MapToSelf, opnd_type), - CapturedSelfOpnd => unreachable!("not used for captured self"), StackOpnd(idx) => { let idx = idx as u16; assert!(idx < self.stack_size); @@ -1266,7 +1257,6 @@ impl Context { pub fn set_opnd_mapping(&mut self, opnd: InsnOpnd, (mapping, opnd_type): (TempMapping, Type)) { match opnd { SelfOpnd => unreachable!("self always maps to self"), - CapturedSelfOpnd => unreachable!("not used for captured self"), StackOpnd(idx) => { assert!(idx < self.stack_size); let stack_idx = (self.stack_size - 1 - idx) as usize; |