Fix warnings
This commit is contained in:
parent
86eab29173
commit
1b9f3dbca0
@ -351,7 +351,6 @@ impl InstructionHolder {
|
|||||||
),
|
),
|
||||||
ArrayAlloca(ty, len) => {
|
ArrayAlloca(ty, len) => {
|
||||||
let array_len = ConstValue::U16(*len as u16).as_llvm(module.context_ref);
|
let array_len = ConstValue::U16(*len as u16).as_llvm(module.context_ref);
|
||||||
let array_ty = Type::Ptr(Box::new(ty.clone()));
|
|
||||||
LLVMBuildArrayAlloca(
|
LLVMBuildArrayAlloca(
|
||||||
module.builder_ref,
|
module.builder_ref,
|
||||||
ty.as_llvm(module.context_ref),
|
ty.as_llvm(module.context_ref),
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Arithmetic, function calls and imports!
|
// Arithmetic, function calls and imports!
|
||||||
|
|
||||||
fn array() -> [[u16; 4]; 1] {
|
fn array() -> [[[u16; 4]; 1]; 1] {
|
||||||
return [[10, 15, 7, 9]];
|
return [[[10, 15, 7, 9]]];
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() -> u16 {
|
fn main() -> u16 {
|
||||||
@ -9,7 +9,7 @@ fn main() -> u16 {
|
|||||||
|
|
||||||
let mut list = array();
|
let mut list = array();
|
||||||
|
|
||||||
list[0][3] = 5;
|
list[0][0][3] = 5;
|
||||||
|
|
||||||
return list[0][3];
|
return list[0][0][3];
|
||||||
}
|
}
|
||||||
|
@ -155,8 +155,6 @@ impl<'ctx, 'a> Scope<'ctx, 'a> {
|
|||||||
|
|
||||||
impl IndexedVariableReference {
|
impl IndexedVariableReference {
|
||||||
fn get_stack_value(&self, scope: &mut Scope) -> Option<(StackValue, Vec<u32>)> {
|
fn get_stack_value(&self, scope: &mut Scope) -> Option<(StackValue, Vec<u32>)> {
|
||||||
use StackValueKind as Kind;
|
|
||||||
|
|
||||||
match &self.kind {
|
match &self.kind {
|
||||||
mir::IndexedVariableReferenceKind::Named(NamedVariableRef(_, name, _)) => scope
|
mir::IndexedVariableReferenceKind::Named(NamedVariableRef(_, name, _)) => scope
|
||||||
.stack_values
|
.stack_values
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
//! must then be passed through TypeCheck with the same [`TypeRefs`] in order to
|
//! must then be passed through TypeCheck with the same [`TypeRefs`] in order to
|
||||||
//! place the correct types from the IDs and check that there are no issues.
|
//! place the correct types from the IDs and check that there are no issues.
|
||||||
|
|
||||||
use std::{convert::Infallible, iter};
|
use std::iter;
|
||||||
|
|
||||||
use crate::{mir::TypeKind, util::try_all};
|
use crate::{mir::TypeKind, util::try_all};
|
||||||
|
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
use super::{
|
use super::*;
|
||||||
pass::{ScopeVariable, Storage},
|
|
||||||
typecheck::ErrorKind,
|
|
||||||
*,
|
|
||||||
};
|
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub enum ReturnTypeOther {
|
pub enum ReturnTypeOther {
|
||||||
|
Loading…
Reference in New Issue
Block a user