aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGav Wood <g@ethdev.com>2015-07-06 02:19:06 +0800
committerGav Wood <g@ethdev.com>2015-07-06 02:19:06 +0800
commite1dabe556b087bd330b623810551255cfc011e6d (patch)
tree0e5f93b7829e1d89e678f8d3627d710b1278f0f2
parenta393acd0b26d6c9cc2bd7c74730fdfb9d6fc9ed6 (diff)
parent09f0e7f6445a319c391c5cf50e9b3536a766603a (diff)
downloaddexon-solidity-e1dabe556b087bd330b623810551255cfc011e6d.tar.gz
dexon-solidity-e1dabe556b087bd330b623810551255cfc011e6d.tar.zst
dexon-solidity-e1dabe556b087bd330b623810551255cfc011e6d.zip
Merge pull request #2374 from chfast/pr/smartvm
Smart VM
-rw-r--r--TestHelper.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/TestHelper.cpp b/TestHelper.cpp
index 698f3512..b3dee72e 100644
--- a/TestHelper.cpp
+++ b/TestHelper.cpp
@@ -235,7 +235,7 @@ void ImportTest::importState(json_spirit::mObject& _o, State& _state)
}
void ImportTest::importTransaction(json_spirit::mObject& _o)
-{
+{
if (_o.count("secretKey") > 0)
{
assert(_o.count("nonce") > 0);
@@ -728,10 +728,20 @@ Options::Options()
for (auto i = 0; i < argc; ++i)
{
auto arg = std::string{argv[i]};
- if (arg == "--jit")
- eth::VMFactory::setKind(eth::VMKind::JIT);
- else if (arg == "--vm=smart")
- eth::VMFactory::setKind(eth::VMKind::Smart);
+ if (arg == "--vm" && i + 1 < argc)
+ {
+ string vmKind = argv[++i];
+ if (vmKind == "interpreter")
+ VMFactory::setKind(VMKind::Interpreter);
+ else if (vmKind == "jit")
+ VMFactory::setKind(VMKind::JIT);
+ else if (vmKind == "smart")
+ VMFactory::setKind(VMKind::Smart);
+ else
+ cerr << "Unknown VM kind: " << vmKind << endl;
+ }
+ else if (arg == "--jit") // TODO: Remove deprecated option "--jit"
+ VMFactory::setKind(VMKind::JIT);
else if (arg == "--vmtrace")
vmtrace = true;
else if (arg == "--filltests")