(opcode OpCode)
| 103 | } |
| 104 | |
| 105 | func (self *Executor) checkFeaturesEnabled(opcode OpCode) error { |
| 106 | switch opcode { |
| 107 | case HASKEY, KEYS, DCALL, VALUES: |
| 108 | if self.Features.DisableHasKey { |
| 109 | return errors.ERR_NOT_SUPPORT_OPCODE |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | return nil |
| 114 | } |
| 115 | |
| 116 | func (self *Executor) ExecuteOp(opcode OpCode, context *ExecutionContext) (VMState, error) { |
| 117 | if err := self.checkFeaturesEnabled(opcode); err != nil { |