mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[solc] Enable handling for InputMode::CompilerWithEvmAssemblyJsonImport.
This commit is contained in:
parent
9a3e248d51
commit
34492b3fe3
@ -185,7 +185,11 @@ void CommandLineInterface::handleBinary(string const& _contract)
|
|||||||
|
|
||||||
void CommandLineInterface::handleOpcode(string const& _contract)
|
void CommandLineInterface::handleOpcode(string const& _contract)
|
||||||
{
|
{
|
||||||
solAssert(m_options.input.mode == InputMode::Compiler || m_options.input.mode == InputMode::CompilerWithASTImport, "");
|
solAssert(
|
||||||
|
m_options.input.mode == InputMode::Compiler ||
|
||||||
|
m_options.input.mode == InputMode::CompilerWithASTImport ||
|
||||||
|
m_options.input.mode == InputMode::CompilerWithEvmAssemblyJsonImport , ""
|
||||||
|
);
|
||||||
|
|
||||||
if (!m_options.output.dir.empty())
|
if (!m_options.output.dir.empty())
|
||||||
createFile(m_compiler->filesystemFriendlyName(_contract) + ".opcode", evmasm::disassemble(m_compiler->object(_contract).bytecode));
|
createFile(m_compiler->filesystemFriendlyName(_contract) + ".opcode", evmasm::disassemble(m_compiler->object(_contract).bytecode));
|
||||||
@ -199,7 +203,11 @@ void CommandLineInterface::handleOpcode(string const& _contract)
|
|||||||
|
|
||||||
void CommandLineInterface::handleIR(string const& _contractName)
|
void CommandLineInterface::handleIR(string const& _contractName)
|
||||||
{
|
{
|
||||||
solAssert(m_options.input.mode == InputMode::Compiler || m_options.input.mode == InputMode::CompilerWithASTImport, "");
|
solAssert(
|
||||||
|
m_options.input.mode == InputMode::Compiler ||
|
||||||
|
m_options.input.mode == InputMode::CompilerWithASTImport ||
|
||||||
|
m_options.input.mode == InputMode::CompilerWithEvmAssemblyJsonImport , ""
|
||||||
|
);
|
||||||
|
|
||||||
if (!m_options.compiler.outputs.ir)
|
if (!m_options.compiler.outputs.ir)
|
||||||
return;
|
return;
|
||||||
@ -215,7 +223,11 @@ void CommandLineInterface::handleIR(string const& _contractName)
|
|||||||
|
|
||||||
void CommandLineInterface::handleIROptimized(string const& _contractName)
|
void CommandLineInterface::handleIROptimized(string const& _contractName)
|
||||||
{
|
{
|
||||||
solAssert(m_options.input.mode == InputMode::Compiler || m_options.input.mode == InputMode::CompilerWithASTImport, "");
|
solAssert(
|
||||||
|
m_options.input.mode == InputMode::Compiler ||
|
||||||
|
m_options.input.mode == InputMode::CompilerWithASTImport ||
|
||||||
|
m_options.input.mode == InputMode::CompilerWithEvmAssemblyJsonImport , ""
|
||||||
|
);
|
||||||
|
|
||||||
if (!m_options.compiler.outputs.irOptimized)
|
if (!m_options.compiler.outputs.irOptimized)
|
||||||
return;
|
return;
|
||||||
@ -231,7 +243,11 @@ void CommandLineInterface::handleIROptimized(string const& _contractName)
|
|||||||
|
|
||||||
void CommandLineInterface::handleEwasm(string const& _contractName)
|
void CommandLineInterface::handleEwasm(string const& _contractName)
|
||||||
{
|
{
|
||||||
solAssert(m_options.input.mode == InputMode::Compiler || m_options.input.mode == InputMode::CompilerWithASTImport, "");
|
solAssert(
|
||||||
|
m_options.input.mode == InputMode::Compiler ||
|
||||||
|
m_options.input.mode == InputMode::CompilerWithASTImport ||
|
||||||
|
m_options.input.mode == InputMode::CompilerWithEvmAssemblyJsonImport , ""
|
||||||
|
);
|
||||||
|
|
||||||
if (!m_options.compiler.outputs.ewasm)
|
if (!m_options.compiler.outputs.ewasm)
|
||||||
return;
|
return;
|
||||||
@ -268,7 +284,11 @@ void CommandLineInterface::handleBytecode(string const& _contract)
|
|||||||
|
|
||||||
void CommandLineInterface::handleSignatureHashes(string const& _contract)
|
void CommandLineInterface::handleSignatureHashes(string const& _contract)
|
||||||
{
|
{
|
||||||
solAssert(m_options.input.mode == InputMode::Compiler || m_options.input.mode == InputMode::CompilerWithASTImport, "");
|
solAssert(
|
||||||
|
m_options.input.mode == InputMode::Compiler ||
|
||||||
|
m_options.input.mode == InputMode::CompilerWithASTImport ||
|
||||||
|
m_options.input.mode == InputMode::CompilerWithEvmAssemblyJsonImport , ""
|
||||||
|
);
|
||||||
|
|
||||||
if (!m_options.compiler.outputs.signatureHashes)
|
if (!m_options.compiler.outputs.signatureHashes)
|
||||||
return;
|
return;
|
||||||
@ -286,7 +306,11 @@ void CommandLineInterface::handleSignatureHashes(string const& _contract)
|
|||||||
|
|
||||||
void CommandLineInterface::handleMetadata(string const& _contract)
|
void CommandLineInterface::handleMetadata(string const& _contract)
|
||||||
{
|
{
|
||||||
solAssert(m_options.input.mode == InputMode::Compiler || m_options.input.mode == InputMode::CompilerWithASTImport, "");
|
solAssert(
|
||||||
|
m_options.input.mode == InputMode::Compiler ||
|
||||||
|
m_options.input.mode == InputMode::CompilerWithASTImport ||
|
||||||
|
m_options.input.mode == InputMode::CompilerWithEvmAssemblyJsonImport , ""
|
||||||
|
);
|
||||||
|
|
||||||
if (!m_options.compiler.outputs.metadata)
|
if (!m_options.compiler.outputs.metadata)
|
||||||
return;
|
return;
|
||||||
@ -300,7 +324,11 @@ void CommandLineInterface::handleMetadata(string const& _contract)
|
|||||||
|
|
||||||
void CommandLineInterface::handleABI(string const& _contract)
|
void CommandLineInterface::handleABI(string const& _contract)
|
||||||
{
|
{
|
||||||
solAssert(m_options.input.mode == InputMode::Compiler || m_options.input.mode == InputMode::CompilerWithASTImport, "");
|
solAssert(
|
||||||
|
m_options.input.mode == InputMode::Compiler ||
|
||||||
|
m_options.input.mode == InputMode::CompilerWithASTImport ||
|
||||||
|
m_options.input.mode == InputMode::CompilerWithEvmAssemblyJsonImport , ""
|
||||||
|
);
|
||||||
|
|
||||||
if (!m_options.compiler.outputs.abi)
|
if (!m_options.compiler.outputs.abi)
|
||||||
return;
|
return;
|
||||||
@ -314,7 +342,11 @@ void CommandLineInterface::handleABI(string const& _contract)
|
|||||||
|
|
||||||
void CommandLineInterface::handleStorageLayout(string const& _contract)
|
void CommandLineInterface::handleStorageLayout(string const& _contract)
|
||||||
{
|
{
|
||||||
solAssert(m_options.input.mode == InputMode::Compiler || m_options.input.mode == InputMode::CompilerWithASTImport, "");
|
solAssert(
|
||||||
|
m_options.input.mode == InputMode::Compiler ||
|
||||||
|
m_options.input.mode == InputMode::CompilerWithASTImport ||
|
||||||
|
m_options.input.mode == InputMode::CompilerWithEvmAssemblyJsonImport , ""
|
||||||
|
);
|
||||||
|
|
||||||
if (!m_options.compiler.outputs.storageLayout)
|
if (!m_options.compiler.outputs.storageLayout)
|
||||||
return;
|
return;
|
||||||
@ -328,7 +360,11 @@ void CommandLineInterface::handleStorageLayout(string const& _contract)
|
|||||||
|
|
||||||
void CommandLineInterface::handleNatspec(bool _natspecDev, string const& _contract)
|
void CommandLineInterface::handleNatspec(bool _natspecDev, string const& _contract)
|
||||||
{
|
{
|
||||||
solAssert(m_options.input.mode == InputMode::Compiler || m_options.input.mode == InputMode::CompilerWithASTImport, "");
|
solAssert(
|
||||||
|
m_options.input.mode == InputMode::Compiler ||
|
||||||
|
m_options.input.mode == InputMode::CompilerWithASTImport ||
|
||||||
|
m_options.input.mode == InputMode::CompilerWithEvmAssemblyJsonImport , ""
|
||||||
|
);
|
||||||
|
|
||||||
bool enabled = false;
|
bool enabled = false;
|
||||||
std::string suffix;
|
std::string suffix;
|
||||||
|
Loading…
Reference in New Issue
Block a user