Vm logging on diff

This commit is contained in:
obscuren
2014-07-15 00:25:49 +02:00
parent 50bc838047
commit 2784e256f1
4 changed files with 20 additions and 9 deletions

View File

@ -190,6 +190,19 @@ func (val *Value) Get(idx int) *Value {
return NewValue(nil)
}
func (self *Value) Copy() *Value {
switch val := self.Val.(type) {
case *big.Int:
return NewValue(new(big.Int).Set(val))
case []byte:
return NewValue(CopyBytes(val))
default:
return NewValue(self.Val)
}
return nil
}
func (val *Value) Cmp(o *Value) bool {
return reflect.DeepEqual(val.Val, o.Val)
}