chore: dict remove unused vars

This commit is contained in:
rvcas 2021-07-02 18:36:30 -04:00
parent fb12715aba
commit 3452037d44
3 changed files with 1 additions and 26 deletions

View file

@ -568,14 +568,6 @@ pub fn dictKeys(dict: RocDict, alignment: Alignment, key_width: usize, value_wid
const data_bytes = length * key_width; const data_bytes = length * key_width;
var ptr = allocateWithRefcount(data_bytes, alignment); var ptr = allocateWithRefcount(data_bytes, alignment);
var offset = blk: {
if (alignment.keyFirst()) {
break :blk 0;
} else {
break :blk (dict.capacity() * value_width);
}
};
i = 0; i = 0;
var copied: usize = 0; var copied: usize = 0;
while (i < size) : (i += 1) { while (i < size) : (i += 1) {
@ -617,14 +609,6 @@ pub fn dictValues(dict: RocDict, alignment: Alignment, key_width: usize, value_w
const data_bytes = length * value_width; const data_bytes = length * value_width;
var ptr = allocateWithRefcount(data_bytes, alignment); var ptr = allocateWithRefcount(data_bytes, alignment);
var offset = blk: {
if (alignment.keyFirst()) {
break :blk (dict.capacity() * key_width);
} else {
break :blk 0;
}
};
i = 0; i = 0;
var copied: usize = 0; var copied: usize = 0;
while (i < size) : (i += 1) { while (i < size) : (i += 1) {
@ -644,7 +628,7 @@ pub fn dictValues(dict: RocDict, alignment: Alignment, key_width: usize, value_w
output.* = RocList{ .bytes = ptr, .length = length }; output.* = RocList{ .bytes = ptr, .length = length };
} }
fn doNothing(ptr: Opaque) callconv(.C) void { fn doNothing(_: Opaque) callconv(.C) void {
return; return;
} }
@ -764,8 +748,6 @@ pub fn dictWalk(
key_width: usize, key_width: usize,
value_width: usize, value_width: usize,
accum_width: usize, accum_width: usize,
inc_key: Inc,
inc_value: Inc,
output: Opaque, output: Opaque,
) callconv(.C) void { ) callconv(.C) void {
const alignment_u32 = alignment.toU32(); const alignment_u32 = alignment.toU32();

View file

@ -4200,7 +4200,6 @@ fn run_higher_order_low_level<'a, 'ctx, 'env>(
dict_walk( dict_walk(
env, env,
layout_ids,
roc_function_call, roc_function_call,
dict, dict,
default, default,

View file

@ -635,7 +635,6 @@ fn dict_intersect_or_difference<'a, 'ctx, 'env>(
#[allow(clippy::too_many_arguments)] #[allow(clippy::too_many_arguments)]
pub fn dict_walk<'a, 'ctx, 'env>( pub fn dict_walk<'a, 'ctx, 'env>(
env: &Env<'a, 'ctx, 'env>, env: &Env<'a, 'ctx, 'env>,
layout_ids: &mut LayoutIds<'a>,
roc_function_call: RocFunctionCall<'ctx>, roc_function_call: RocFunctionCall<'ctx>,
dict: BasicValueEnum<'ctx>, dict: BasicValueEnum<'ctx>,
accum: BasicValueEnum<'ctx>, accum: BasicValueEnum<'ctx>,
@ -660,9 +659,6 @@ pub fn dict_walk<'a, 'ctx, 'env>(
let output_ptr = builder.build_alloca(accum_bt, "output_ptr"); let output_ptr = builder.build_alloca(accum_bt, "output_ptr");
let inc_key_fn = build_inc_wrapper(env, layout_ids, key_layout);
let inc_value_fn = build_inc_wrapper(env, layout_ids, value_layout);
call_void_bitcode_fn( call_void_bitcode_fn(
env, env,
&[ &[
@ -676,8 +672,6 @@ pub fn dict_walk<'a, 'ctx, 'env>(
layout_width(env, key_layout), layout_width(env, key_layout),
layout_width(env, value_layout), layout_width(env, value_layout),
layout_width(env, accum_layout), layout_width(env, accum_layout),
inc_key_fn.as_global_value().as_pointer_value().into(),
inc_value_fn.as_global_value().as_pointer_value().into(),
env.builder.build_bitcast(output_ptr, u8_ptr, "to_opaque"), env.builder.build_bitcast(output_ptr, u8_ptr, "to_opaque"),
], ],
&bitcode::DICT_WALK, &bitcode::DICT_WALK,