Browse Source
cranelift: Resize with `types::INVALID` isntead of `types::I8` (#5227)
pull/5232/head
Trevor Elliott
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
cranelift/codegen/src/machinst/vcode.rs
|
|
@ -1408,7 +1408,7 @@ impl<I: VCodeInst> VRegAllocator<I> { |
|
|
|
/// Set the type of this virtual register.
|
|
|
|
pub fn set_vreg_type(&mut self, vreg: VirtualReg, ty: Type) { |
|
|
|
if self.vreg_types.len() <= vreg.index() { |
|
|
|
self.vreg_types.resize(vreg.index() + 1, ir::types::I8); |
|
|
|
self.vreg_types.resize(vreg.index() + 1, ir::types::INVALID); |
|
|
|
} |
|
|
|
self.vreg_types[vreg.index()] = ty; |
|
|
|
if is_reftype(ty) { |
|
|
|