diff --git a/nac3core/src/codegen/irrt/new.rs b/nac3core/src/codegen/irrt/new.rs index 4c7edb95..50060687 100644 --- a/nac3core/src/codegen/irrt/new.rs +++ b/nac3core/src/codegen/irrt/new.rs @@ -88,13 +88,13 @@ fn build_error_ids<'ctx>(ctx: &CodeGenContext<'ctx, '_>) -> Address<'ctx, ErrorI let get_string_id = |string_id| llvm_i32.const_int(ctx.resolver.get_string_id(string_id) as u64, false); - error_ids.view(ctx, |fields| &fields.index_error).store(ctx, &get_string_id("0:IndexError")); - error_ids.view(ctx, |fields| &fields.value_error).store(ctx, &get_string_id("0:ValueError")); + error_ids.focus(ctx, |fields| &fields.index_error).store(ctx, &get_string_id("0:IndexError")); + error_ids.focus(ctx, |fields| &fields.value_error).store(ctx, &get_string_id("0:ValueError")); error_ids - .view(ctx, |fields| &fields.assertion_error) + .focus(ctx, |fields| &fields.assertion_error) .store(ctx, &get_string_id("0:AssertionError")); error_ids - .view(ctx, |fields| &fields.runtime_error) + .focus(ctx, |fields| &fields.runtime_error) .store(ctx, &get_string_id("0:RuntimeError")); error_ids @@ -155,11 +155,11 @@ pub fn check_error_context<'ctx, G: CodeGenerator + ?Sized>( let error_str_ptr = StrLens { size_type }.alloca(ctx, "error_str"); call_nac3_error_context_get_error_str(size_type, ctx, errctx_ptr, &error_str_ptr); - let error_id = errctx_ptr.view(ctx, |fields| &fields.error_id).load(ctx, "error_id"); + let error_id = errctx_ptr.focus(ctx, |fields| &fields.error_id).load(ctx, "error_id"); let error_str = error_str_ptr.load(ctx, "error_str"); - let param1 = errctx_ptr.view(ctx, |fields| &fields.param1).load(ctx, "param1"); - let param2 = errctx_ptr.view(ctx, |fields| &fields.param2).load(ctx, "param2"); - let param3 = errctx_ptr.view(ctx, |fields| &fields.param3).load(ctx, "param3"); + let param1 = errctx_ptr.focus(ctx, |fields| &fields.param1).load(ctx, "param1"); + let param2 = errctx_ptr.focus(ctx, |fields| &fields.param2).load(ctx, "param2"); + let param3 = errctx_ptr.focus(ctx, |fields| &fields.param3).load(ctx, "param3"); ctx.make_assert_impl_by_id( generator, has_error, diff --git a/nac3core/src/codegen/optics.rs b/nac3core/src/codegen/optics.rs index 3ac7d954..dcfd727c 100644 --- a/nac3core/src/codegen/optics.rs +++ b/nac3core/src/codegen/optics.rs @@ -334,7 +334,7 @@ impl<'ctx, T: StructureOptic<'ctx>> MemorySetter<'ctx> for T { } impl<'ctx, AddresseeOptic: StructureOptic<'ctx>> Address<'ctx, AddresseeOptic> { - pub fn view>( + pub fn focus>( &self, ctx: &CodeGenContext<'ctx, '_>, get_field_gep_fn: GetFieldGepFn,