mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Dropping --opcodes support
This commit is contained in:
@@ -130,7 +130,6 @@ static std::string const g_strGeneratedSources = "generated-sources";
|
||||
static std::string const g_strGeneratedSourcesRuntime = "generated-sources-runtime";
|
||||
static std::string const g_strNatspecDev = "devdoc";
|
||||
static std::string const g_strNatspecUser = "userdoc";
|
||||
static std::string const g_strOpcodes = "opcodes";
|
||||
static std::string const g_strSignatureHashes = "hashes";
|
||||
static std::string const g_strSourceList = "sourceList";
|
||||
static std::string const g_strSources = "sources";
|
||||
@@ -154,7 +153,6 @@ static bool needsHumanTargetedStdout(CommandLineOptions const& _options)
|
||||
_options.compiler.outputs.metadata ||
|
||||
_options.compiler.outputs.natspecUser ||
|
||||
_options.compiler.outputs.natspecDev ||
|
||||
_options.compiler.outputs.opcodes ||
|
||||
_options.compiler.outputs.signatureHashes ||
|
||||
_options.compiler.outputs.storageLayout;
|
||||
}
|
||||
@@ -192,20 +190,6 @@ void CommandLineInterface::handleBinary(std::string const& _contract)
|
||||
}
|
||||
}
|
||||
|
||||
void CommandLineInterface::handleOpcode(std::string const& _contract)
|
||||
{
|
||||
solAssert(CompilerInputModes.count(m_options.input.mode) == 1);
|
||||
|
||||
if (!m_options.output.dir.empty())
|
||||
createFile(m_compiler->filesystemFriendlyName(_contract) + ".opcode", evmasm::disassemble(m_compiler->object(_contract).bytecode, m_options.output.evmVersion));
|
||||
else
|
||||
{
|
||||
sout() << "Opcodes:" << std::endl;
|
||||
sout() << std::uppercase << evmasm::disassemble(m_compiler->object(_contract).bytecode, m_options.output.evmVersion);
|
||||
sout() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
void CommandLineInterface::handleIR(std::string const& _contractName)
|
||||
{
|
||||
solAssert(CompilerInputModes.count(m_options.input.mode) == 1);
|
||||
@@ -295,8 +279,6 @@ void CommandLineInterface::handleBytecode(std::string const& _contract)
|
||||
{
|
||||
solAssert(CompilerInputModes.count(m_options.input.mode) == 1);
|
||||
|
||||
if (m_options.compiler.outputs.opcodes)
|
||||
handleOpcode(_contract);
|
||||
if (m_options.compiler.outputs.binary || m_options.compiler.outputs.binaryRuntime)
|
||||
handleBinary(_contract);
|
||||
}
|
||||
@@ -752,13 +734,11 @@ void CommandLineInterface::compile()
|
||||
m_options.compiler.estimateGas ||
|
||||
m_options.compiler.outputs.asm_ ||
|
||||
m_options.compiler.outputs.asmJson ||
|
||||
m_options.compiler.outputs.opcodes ||
|
||||
m_options.compiler.outputs.binary ||
|
||||
m_options.compiler.outputs.binaryRuntime ||
|
||||
(m_options.compiler.combinedJsonRequests && (
|
||||
m_options.compiler.combinedJsonRequests->binary ||
|
||||
m_options.compiler.combinedJsonRequests->binaryRuntime ||
|
||||
m_options.compiler.combinedJsonRequests->opcodes ||
|
||||
m_options.compiler.combinedJsonRequests->asm_ ||
|
||||
m_options.compiler.combinedJsonRequests->generatedSources ||
|
||||
m_options.compiler.combinedJsonRequests->generatedSourcesRuntime ||
|
||||
@@ -858,8 +838,6 @@ void CommandLineInterface::handleCombinedJSON()
|
||||
contractData[g_strBinary] = m_compiler->object(contractName).toHex();
|
||||
if (m_options.compiler.combinedJsonRequests->binaryRuntime && compilationSuccess)
|
||||
contractData[g_strBinaryRuntime] = m_compiler->runtimeObject(contractName).toHex();
|
||||
if (m_options.compiler.combinedJsonRequests->opcodes && compilationSuccess)
|
||||
contractData[g_strOpcodes] = evmasm::disassemble(m_compiler->object(contractName).bytecode, m_options.output.evmVersion);
|
||||
if (m_options.compiler.combinedJsonRequests->asm_ && compilationSuccess)
|
||||
contractData[g_strAsm] = m_compiler->assemblyJSON(contractName);
|
||||
if (m_options.compiler.combinedJsonRequests->storageLayout && compilationSuccess)
|
||||
|
||||
@@ -99,7 +99,6 @@ private:
|
||||
void handleCombinedJSON();
|
||||
void handleAst();
|
||||
void handleBinary(std::string const& _contract);
|
||||
void handleOpcode(std::string const& _contract);
|
||||
void handleIR(std::string const& _contract);
|
||||
void handleIRAst(std::string const& _contract);
|
||||
void handleIROptimized(std::string const& _contract);
|
||||
|
||||
@@ -723,7 +723,6 @@ General Information)").c_str(),
|
||||
(CompilerOutputs::componentName(&CompilerOutputs::astCompactJson).c_str(), "AST of all source files in a compact JSON format.")
|
||||
(CompilerOutputs::componentName(&CompilerOutputs::asm_).c_str(), "EVM assembly of the contracts.")
|
||||
(CompilerOutputs::componentName(&CompilerOutputs::asmJson).c_str(), "EVM assembly of the contracts in JSON format.")
|
||||
(CompilerOutputs::componentName(&CompilerOutputs::opcodes).c_str(), "Opcodes of the contracts.")
|
||||
(CompilerOutputs::componentName(&CompilerOutputs::binary).c_str(), "Binary of the contracts in hex.")
|
||||
(CompilerOutputs::componentName(&CompilerOutputs::binaryRuntime).c_str(), "Binary of the runtime part of the contracts in hex.")
|
||||
(CompilerOutputs::componentName(&CompilerOutputs::abi).c_str(), "ABI specification of the contracts.")
|
||||
|
||||
@@ -72,7 +72,6 @@ struct CompilerOutputs
|
||||
{"ast-compact-json", &CompilerOutputs::astCompactJson},
|
||||
{"asm", &CompilerOutputs::asm_},
|
||||
{"asm-json", &CompilerOutputs::asmJson},
|
||||
{"opcodes", &CompilerOutputs::opcodes},
|
||||
{"bin", &CompilerOutputs::binary},
|
||||
{"bin-runtime", &CompilerOutputs::binaryRuntime},
|
||||
{"abi", &CompilerOutputs::abi},
|
||||
@@ -92,7 +91,6 @@ struct CompilerOutputs
|
||||
bool astCompactJson = false;
|
||||
bool asm_ = false;
|
||||
bool asmJson = false;
|
||||
bool opcodes = false;
|
||||
bool binary = false;
|
||||
bool binaryRuntime = false;
|
||||
bool abi = false;
|
||||
@@ -121,7 +119,6 @@ struct CombinedJsonRequests
|
||||
{"metadata", &CombinedJsonRequests::metadata},
|
||||
{"bin", &CombinedJsonRequests::binary},
|
||||
{"bin-runtime", &CombinedJsonRequests::binaryRuntime},
|
||||
{"opcodes", &CombinedJsonRequests::opcodes},
|
||||
{"asm", &CombinedJsonRequests::asm_},
|
||||
{"storage-layout", &CombinedJsonRequests::storageLayout},
|
||||
{"generated-sources", &CombinedJsonRequests::generatedSources},
|
||||
@@ -142,7 +139,6 @@ struct CombinedJsonRequests
|
||||
bool metadata = false;
|
||||
bool binary = false;
|
||||
bool binaryRuntime = false;
|
||||
bool opcodes = false;
|
||||
bool asm_ = false;
|
||||
bool storageLayout = false;
|
||||
bool generatedSources = false;
|
||||
|
||||
Reference in New Issue
Block a user