Moved register state to scopes

This commit is contained in:
Eduard Urbach 2024-07-16 15:30:28 +02:00
parent d1ccd60139
commit d6d018c5c5
No known key found for this signature in database
GPG key ID: C874F672B1AF20C0
22 changed files with 230 additions and 129 deletions

View file

@ -248,7 +248,7 @@ func scanFile(path string, functions chan<- *core.Function) error {
name := tokens[0].Text()
register := x64.CallRegisters[count]
uses := core.CountIdentifier(function.Body, name)
uses := token.Count(function.Body, token.Identifier, name)
if uses == 0 {
return errors.New(&errors.UnusedVariable{Name: name}, file, tokens[0].Position)