Thread safety for status updates, periodically minify
This commit is contained in:
@@ -7,3 +7,15 @@ type Instruction struct {
|
||||
|
||||
opHandler opHandler `struc:"skip"`
|
||||
}
|
||||
|
||||
func (instr *Instruction) Copy() *Instruction {
|
||||
ret := &Instruction{
|
||||
OpCode: instr.OpCode,
|
||||
}
|
||||
|
||||
for i, opr := range instr.Operands {
|
||||
ret.Operands[i] = opr.Copy()
|
||||
}
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user