Switched to pointer receivers for values
This commit is contained in:
@ -29,7 +29,7 @@ func (f *Function) EvaluateDot(expr *expression.Expression) (eval.Value, error)
|
||||
return nil, errors.New(&errors.UnknownStructField{StructName: structure.Name(), FieldName: rightText}, f.File, right.Token.Position)
|
||||
}
|
||||
|
||||
value := eval.Memory{
|
||||
value := &eval.Memory{
|
||||
Typ: field.Type,
|
||||
Memory: asm.Memory{
|
||||
Base: variable.Value.Register,
|
||||
@ -51,7 +51,7 @@ func (f *Function) EvaluateDot(expr *expression.Expression) (eval.Value, error)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
value := eval.Number{
|
||||
value := &eval.Number{
|
||||
Typ: types.AnyInt,
|
||||
Number: number,
|
||||
}
|
||||
@ -65,7 +65,7 @@ func (f *Function) EvaluateDot(expr *expression.Expression) (eval.Value, error)
|
||||
if exists {
|
||||
f.File.Imports[leftText].Used = true
|
||||
|
||||
value := eval.Label{
|
||||
value := &eval.Label{
|
||||
Typ: types.AnyPointer,
|
||||
Label: function.UniqueName,
|
||||
}
|
||||
|
Reference in New Issue
Block a user