JitVM.h 557 B

12345678910111213141516171819202122232425262728
  1. #pragma once
  2. #include <evmjit.h>
  3. #include <libevm/VMFace.h>
  4. namespace dev
  5. {
  6. namespace eth
  7. {
  8. class JitVM: public VMFace
  9. {
  10. public:
  11. virtual bytesConstRef execImpl(u256& io_gas, ExtVMFace& _ext, OnOpFunc const& _onOp) override final;
  12. static evm_mode scheduleToMode(EVMSchedule const& _schedule);
  13. static bool isCodeReady(evm_mode _mode, h256 _codeHash);
  14. static void compile(evm_mode _mode, bytesConstRef _code, h256 _codeHash);
  15. private:
  16. std::unique_ptr<VMFace> m_fallbackVM; ///< VM used in case of input data rejected by JIT
  17. bytes m_output;
  18. };
  19. }
  20. }