aboutsummaryrefslogtreecommitdiffhomepage
path: root/interp
diff options
context:
space:
mode:
authorDamian Gryski <[email protected]>2021-09-04 08:04:50 -0700
committerRon Evans <[email protected]>2021-09-05 12:00:07 +0200
commitb3f1dacbb914ea793c07351a9ce42a0d4702eba5 (patch)
tree26f2e3a48293e150a3985ba62f08434cbe54b212 /interp
parent5fa1e7163aa5e87d536ffa062b7d818665237ffe (diff)
downloadtinygo-b3f1dacbb914ea793c07351a9ce42a0d4702eba5.tar.gz
tinygo-b3f1dacbb914ea793c07351a9ce42a0d4702eba5.zip
interp: remove unused gepOperands slice
Diffstat (limited to 'interp')
-rw-r--r--interp/interpreter.go4
1 files changed, 0 insertions, 4 deletions
diff --git a/interp/interpreter.go b/interp/interpreter.go
index c6ce6b7f9..db121cc75 100644
--- a/interp/interpreter.go
+++ b/interp/interpreter.go
@@ -590,18 +590,14 @@ func (r *runner) run(fn *function, params []value, parentMem *memoryView, indent
// GetElementPtr does pointer arithmetic, changing the offset of the
// pointer into the underlying object.
var offset uint64
- var gepOperands []uint64
for i := 2; i < len(operands); i += 2 {
index := operands[i].Uint()
elementSize := operands[i+1].Uint()
if int64(elementSize) < 0 {
// This is a struct field.
- // The field number is encoded by flipping all the bits.
- gepOperands = append(gepOperands, ^elementSize)
offset += index
} else {
// This is a normal GEP, probably an array index.
- gepOperands = append(gepOperands, index)
offset += elementSize * index
}
}