Reduced memory usage

This commit is contained in:
Eduard Urbach 2024-07-30 21:26:15 +02:00
parent 0c1b57b4e4
commit 45e15cdb52
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0

View File

@ -1,7 +1,7 @@
package core package core
import ( import (
"fmt" "strings"
"git.akyoto.dev/cli/q/src/build/asm" "git.akyoto.dev/cli/q/src/build/asm"
"git.akyoto.dev/cli/q/src/build/errors" "git.akyoto.dev/cli/q/src/build/errors"
@ -30,7 +30,11 @@ func (f *Function) CompileCall(root *expression.Expression) error {
isSyscall := name == "syscall" isSyscall := name == "syscall"
if !isSyscall { 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] _, exists := f.Functions[fullName]
if !exists { if !exists {