From 45e15cdb52ee6f694b5cd8be4db3e64e518c3de8 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Tue, 30 Jul 2024 21:26:15 +0200 Subject: [PATCH] Reduced memory usage --- src/build/core/CompileCall.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/build/core/CompileCall.go b/src/build/core/CompileCall.go index 9251510..7ac3d10 100644 --- a/src/build/core/CompileCall.go +++ b/src/build/core/CompileCall.go @@ -1,7 +1,7 @@ package core import ( - "fmt" + "strings" "git.akyoto.dev/cli/q/src/build/asm" "git.akyoto.dev/cli/q/src/build/errors" @@ -30,7 +30,11 @@ func (f *Function) CompileCall(root *expression.Expression) error { isSyscall := name == "syscall" if !isSyscall { - fullName = fmt.Sprintf("%s.%s", pkg, name) + tmp := strings.Builder{} + tmp.WriteString(pkg) + tmp.WriteString(".") + tmp.WriteString(name) + fullName = tmp.String() _, exists := f.Functions[fullName] if !exists {