mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Running vm_tests with JIT
This commit is contained in:
parent
09a50c84a5
commit
8c871d0f9a
11
vm.cpp
11
vm.cpp
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include "vm.h"
|
#include "vm.h"
|
||||||
#include <libdevcore/CommonIO.h>
|
#include <libdevcore/CommonIO.h>
|
||||||
|
#include <libevmjit/VM.h>
|
||||||
|
|
||||||
#define FILL_TESTS
|
#define FILL_TESTS
|
||||||
|
|
||||||
@ -510,11 +511,21 @@ void doTests(json_spirit::mValue& v, bool _fillin)
|
|||||||
bytes output;
|
bytes output;
|
||||||
u256 gas;
|
u256 gas;
|
||||||
try
|
try
|
||||||
|
{
|
||||||
|
auto useJit = true;
|
||||||
|
if (useJit)
|
||||||
|
{
|
||||||
|
jit::VM vm(fev.gas);
|
||||||
|
output = vm.go(fev);
|
||||||
|
gas = vm.gas();
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
VM vm(fev.gas);
|
VM vm(fev.gas);
|
||||||
output = vm.go(fev).toVector();
|
output = vm.go(fev).toVector();
|
||||||
gas = vm.gas(); // Get the remaining gas
|
gas = vm.gas(); // Get the remaining gas
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch (Exception const& _e)
|
catch (Exception const& _e)
|
||||||
{
|
{
|
||||||
cnote << "VM did throw an exception: " << diagnostic_information(_e);
|
cnote << "VM did throw an exception: " << diagnostic_information(_e);
|
||||||
|
Loading…
Reference in New Issue
Block a user