aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaweł Bylica <chfast@gmail.com>2015-07-03 21:16:51 +0800
committerPaweł Bylica <chfast@gmail.com>2015-07-03 21:16:51 +0800
commit09f0e7f6445a319c391c5cf50e9b3536a766603a (patch)
treeef0d6283bb07c1046e187de1f882a642e20083d1
parentf32f142e91c969c7129ce7462db60ceeb57c0d57 (diff)
downloaddexon-solidity-09f0e7f6445a319c391c5cf50e9b3536a766603a.tar.gz
dexon-solidity-09f0e7f6445a319c391c5cf50e9b3536a766603a.tar.zst
dexon-solidity-09f0e7f6445a319c391c5cf50e9b3536a766603a.zip
Make --vm command line option syntax consistent with other options.
-rw-r--r--TestHelper.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/TestHelper.cpp b/TestHelper.cpp
index 01bb5f30..b3dee72e 100644
--- a/TestHelper.cpp
+++ b/TestHelper.cpp
@@ -728,10 +728,20 @@ Options::Options()
for (auto i = 0; i < argc; ++i)
{
auto arg = std::string{argv[i]};
- if (arg == "--jit" || arg == "--vm=jit") // TODO: Remove deprecated option "--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")