mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Adapt EVM codegen to new namespace.
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
#include <libsolidity/interface/StandardCompiler.h>
|
||||
#include <libsolidity/interface/SourceReferenceFormatter.h>
|
||||
#include <libsolidity/interface/GasEstimator.h>
|
||||
#include <libsolidity/interface/MultiBackendAssemblyStack.h>
|
||||
#include <libsolidity/interface/AssemblyStack.h>
|
||||
#include <libsolidity/formal/Why3Translator.h>
|
||||
|
||||
#include <libevmasm/Instruction.h>
|
||||
@@ -717,9 +717,9 @@ bool CommandLineInterface::processInput()
|
||||
{
|
||||
// switch to assembly mode
|
||||
m_onlyAssemble = true;
|
||||
using Input = MultiBackendAssemblyStack::Input;
|
||||
using Machine = MultiBackendAssemblyStack::Machine;
|
||||
Input input = m_args.count(g_argJulia) ? Input::JULIA : Input::Assembly;
|
||||
using Input = AssemblyStack::Language;
|
||||
using Machine = AssemblyStack::Machine;
|
||||
Input inputLanguage = m_args.count(g_argJulia) ? Input::JULIA : Input::Assembly;
|
||||
Machine targetMachine = Machine::EVM;
|
||||
if (m_args.count(g_argMachine))
|
||||
{
|
||||
@@ -736,7 +736,7 @@ bool CommandLineInterface::processInput()
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return assemble(input, targetMachine);
|
||||
return assemble(inputLanguage, targetMachine);
|
||||
}
|
||||
if (m_args.count(g_argLink))
|
||||
{
|
||||
@@ -1023,15 +1023,15 @@ void CommandLineInterface::writeLinkedFiles()
|
||||
}
|
||||
|
||||
bool CommandLineInterface::assemble(
|
||||
MultiBackendAssemblyStack::Input _input,
|
||||
MultiBackendAssemblyStack::Machine _targetMachine
|
||||
AssemblyStack::Language _language,
|
||||
AssemblyStack::Machine _targetMachine
|
||||
)
|
||||
{
|
||||
bool successful = true;
|
||||
map<string, MultiBackendAssemblyStack> assemblyStacks;
|
||||
map<string, AssemblyStack> assemblyStacks;
|
||||
for (auto const& src: m_sourceCodes)
|
||||
{
|
||||
auto& stack = assemblyStacks[src.first] = MultiBackendAssemblyStack(_input, _targetMachine);
|
||||
auto& stack = assemblyStacks[src.first] = AssemblyStack(_language);
|
||||
try
|
||||
{
|
||||
if (!stack.parseAndAnalyze(src.first, src.second))
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <libsolidity/interface/CompilerStack.h>
|
||||
#include <libsolidity/interface/MultiBackendAssemblyStack.h>
|
||||
#include <libsolidity/interface/AssemblyStack.h>
|
||||
|
||||
#include <boost/program_options.hpp>
|
||||
#include <boost/filesystem/path.hpp>
|
||||
@@ -54,7 +54,7 @@ private:
|
||||
bool link();
|
||||
void writeLinkedFiles();
|
||||
|
||||
bool assemble(MultiBackendAssemblyStack::Input _input, MultiBackendAssemblyStack::Machine _targetMachine);
|
||||
bool assemble(AssemblyStack::Language _language, AssemblyStack::Machine _targetMachine);
|
||||
|
||||
void outputCompilationResults();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user