2015-01-12 12:40:14 -06:00
|
|
|
package vm
|
|
|
|
|
|
|
|
import "math/big"
|
|
|
|
|
|
|
|
type JitVm struct {
|
2015-01-19 04:18:34 -06:00
|
|
|
env Environment
|
|
|
|
backup *Vm
|
2015-01-12 12:40:14 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
func NewJitVm(env Environment) *JitVm {
|
2015-01-20 08:49:12 -06:00
|
|
|
backupVm := New(env)
|
2015-01-12 12:40:14 -06:00
|
|
|
return &JitVm{env: env, backup: backupVm}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (self *JitVm) Run(me, caller ContextRef, code []byte, value, gas, price *big.Int, callData []byte) (ret []byte, err error) {
|
|
|
|
return self.backup.Run(me, caller, code, value, gas, price, callData)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (self *JitVm) Printf(format string, v ...interface{}) VirtualMachine {
|
|
|
|
return self.backup.Printf(format, v)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (self *JitVm) Endl() VirtualMachine {
|
|
|
|
return self.backup.Endl()
|
|
|
|
}
|
|
|
|
|
|
|
|
func (self *JitVm) Env() Environment {
|
|
|
|
return self.env
|
|
|
|
}
|
|
|
|
|
2015-01-19 04:18:34 -06:00
|
|
|
//go is nice
|