interp: remove unused gepOperands slice
Этот коммит содержится в:
родитель
5fa1e7163a
коммит
b3f1dacbb9
1 изменённых файлов: 0 добавлений и 4 удалений
|
@ -590,18 +590,14 @@ func (r *runner) run(fn *function, params []value, parentMem *memoryView, indent
|
||||||
// GetElementPtr does pointer arithmetic, changing the offset of the
|
// GetElementPtr does pointer arithmetic, changing the offset of the
|
||||||
// pointer into the underlying object.
|
// pointer into the underlying object.
|
||||||
var offset uint64
|
var offset uint64
|
||||||
var gepOperands []uint64
|
|
||||||
for i := 2; i < len(operands); i += 2 {
|
for i := 2; i < len(operands); i += 2 {
|
||||||
index := operands[i].Uint()
|
index := operands[i].Uint()
|
||||||
elementSize := operands[i+1].Uint()
|
elementSize := operands[i+1].Uint()
|
||||||
if int64(elementSize) < 0 {
|
if int64(elementSize) < 0 {
|
||||||
// This is a struct field.
|
// This is a struct field.
|
||||||
// The field number is encoded by flipping all the bits.
|
|
||||||
gepOperands = append(gepOperands, ^elementSize)
|
|
||||||
offset += index
|
offset += index
|
||||||
} else {
|
} else {
|
||||||
// This is a normal GEP, probably an array index.
|
// This is a normal GEP, probably an array index.
|
||||||
gepOperands = append(gepOperands, index)
|
|
||||||
offset += elementSize * index
|
offset += elementSize * index
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче