From 2f1ca9decf6e971fc9a0a43e0b03a95f893f6a66 Mon Sep 17 00:00:00 2001 From: Folkert Date: Sat, 21 Nov 2020 22:54:57 +0100 Subject: [PATCH] cleanup --- compiler/gen/src/llvm/build_list.rs | 7 ++++--- compiler/gen/src/llvm/build_str.rs | 3 +-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/gen/src/llvm/build_list.rs b/compiler/gen/src/llvm/build_list.rs index 7335e91b35..40837e4755 100644 --- a/compiler/gen/src/llvm/build_list.rs +++ b/compiler/gen/src/llvm/build_list.rs @@ -1,7 +1,8 @@ -use crate::llvm::build::{allocate_with_refcount_help, build_num_binop, Env, InPlace}; +use crate::llvm::build::{ + allocate_with_refcount_help, build_num_binop, cast_basic_basic, Env, InPlace, +}; use crate::llvm::compare::build_eq; -use crate::llvm::convert::{basic_type_from_layout, collection, get_ptr_type, ptr_int}; -use crate::llvm::refcounting::PointerToRefcount; +use crate::llvm::convert::{basic_type_from_layout, collection, get_ptr_type}; use inkwell::builder::Builder; use inkwell::context::Context; use inkwell::types::{BasicTypeEnum, PointerType}; diff --git a/compiler/gen/src/llvm/build_str.rs b/compiler/gen/src/llvm/build_str.rs index 70fbc0fb53..9451ff0010 100644 --- a/compiler/gen/src/llvm/build_str.rs +++ b/compiler/gen/src/llvm/build_str.rs @@ -4,7 +4,7 @@ use crate::llvm::build::{ use crate::llvm::build_list::{ allocate_list, build_basic_phi2, empty_list, incrementing_elem_loop, load_list_ptr, store_list, }; -use crate::llvm::convert::{collection, ptr_int}; +use crate::llvm::convert::collection; use inkwell::builder::Builder; use inkwell::types::BasicTypeEnum; use inkwell::values::{BasicValueEnum, FunctionValue, IntValue, PointerValue, StructValue}; @@ -535,7 +535,6 @@ fn clone_nonempty_str<'a, 'ctx, 'env>( } Smallness::Big => { let clone_ptr = allocate_list(env, inplace, &CHAR_LAYOUT, len); - let int_type = ptr_int(ctx, ptr_bytes); // TODO check if malloc returned null; if so, runtime error for OOM!