From a8153a974a565d2a6aee2fc88ca02b2a6bd220d7 Mon Sep 17 00:00:00 2001 From: Quinton Miller Date: Wed, 11 Sep 2024 00:58:53 +0800 Subject: [PATCH] fixup --- src/compiler/crystal/codegen/call.cr | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/crystal/codegen/call.cr b/src/compiler/crystal/codegen/call.cr index 0096c7c84376..5934ffeb0c14 100644 --- a/src/compiler/crystal/codegen/call.cr +++ b/src/compiler/crystal/codegen/call.cr @@ -340,6 +340,9 @@ class Crystal::CodeGenVisitor # Create self var if available if node_obj + # call `#remove_indirection` here so that the downcast call in + # `#visit(Var)` doesn't spend time expanding module types again and again + # (it should be the only use site of `node_obj.type`) new_vars["%self"] = LLVMVar.new(@last, node_obj.type.remove_indirection, true) end