mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-13 15:33:40 +00:00
interp: refactor to eliminate lots of code
This may cause a small performance penalty, but the code is easier to maange as a result.
This commit is contained in:
committed by
Ron Evans
parent
cfc1a66e8d
commit
b7cdf8cd0c
+1
-5
@@ -124,11 +124,7 @@ func (e *Eval) function(fn llvm.Value, params []Value, pkgName, indent string) (
|
||||
// getValue determines what kind of LLVM value it gets and returns the
|
||||
// appropriate Value type.
|
||||
func (e *Eval) getValue(v llvm.Value) Value {
|
||||
if !v.IsAGlobalVariable().IsNil() {
|
||||
return &GlobalValue{e, v}
|
||||
} else {
|
||||
return &LocalValue{e, v}
|
||||
}
|
||||
return &LocalValue{e, v}
|
||||
}
|
||||
|
||||
// markDirty marks the passed-in LLVM value dirty, recursively. For example,
|
||||
|
||||
Reference in New Issue
Block a user