Removed incorrect optimization
This commit is contained in:
parent
fca944d26c
commit
b886637dc3
7 changed files with 16 additions and 38 deletions
|
@ -38,15 +38,6 @@ func (f *Function) CompileDefinition(node *ast.Define) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if uses == 1 {
|
||||
f.definitions[name] = &Definition{
|
||||
Name: name,
|
||||
Value: value,
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
return f.storeVariableInRegister(name, value, uses)
|
||||
}
|
||||
|
||||
|
@ -83,12 +74,6 @@ func (f *Function) identifierExists(name string) bool {
|
|||
return true
|
||||
}
|
||||
|
||||
_, exists = f.definitions[name]
|
||||
|
||||
if exists {
|
||||
return true
|
||||
}
|
||||
|
||||
_, exists = f.functions[name]
|
||||
return exists
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue