aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-12-04 22:36:03 +0800
committerchriseth <chris@ethereum.org>2018-12-04 22:36:03 +0800
commit7ee1ddc172a29ed1ccdd545a996d19f4c2a145a3 (patch)
tree8f2ff40c543dc1448779047862c9b6d15ff261d4
parent0b1125281aa36d84977c279314ef459ca3d533ca (diff)
downloaddexon-solidity-7ee1ddc172a29ed1ccdd545a996d19f4c2a145a3.tar.gz
dexon-solidity-7ee1ddc172a29ed1ccdd545a996d19f4c2a145a3.tar.zst
dexon-solidity-7ee1ddc172a29ed1ccdd545a996d19f4c2a145a3.zip
Switch namespaces.
-rw-r--r--libsolidity/codegen/AsmCodeGen.h14
-rw-r--r--libsolidity/codegen/CompilerContext.cpp2
-rw-r--r--libsolidity/codegen/ContractCompiler.cpp2
-rw-r--r--libsolidity/interface/AssemblyStack.cpp2
4 files changed, 12 insertions, 8 deletions
diff --git a/libsolidity/codegen/AsmCodeGen.h b/libsolidity/codegen/AsmCodeGen.h
index 95d0e51c..dc529e10 100644
--- a/libsolidity/codegen/AsmCodeGen.h
+++ b/libsolidity/codegen/AsmCodeGen.h
@@ -24,25 +24,28 @@
#include <functional>
+namespace yul
+{
+struct Block;
+}
+
namespace dev
{
namespace eth
{
class Assembly;
}
-}
-namespace yul
+namespace solidity
{
-struct Block;
class CodeGenerator
{
public:
/// Performs code generation and appends generated to _assembly.
static void assemble(
- Block const& _parsedData,
- AsmAnalysisInfo& _analysisInfo,
+ yul::Block const& _parsedData,
+ yul::AsmAnalysisInfo& _analysisInfo,
dev::eth::Assembly& _assembly,
yul::ExternalIdentifierAccess const& _identifierAccess = yul::ExternalIdentifierAccess(),
bool _useNamedLabelsForFunctions = false
@@ -50,3 +53,4 @@ public:
};
}
+}
diff --git a/libsolidity/codegen/CompilerContext.cpp b/libsolidity/codegen/CompilerContext.cpp
index bd19e703..5ccdac37 100644
--- a/libsolidity/codegen/CompilerContext.cpp
+++ b/libsolidity/codegen/CompilerContext.cpp
@@ -395,7 +395,7 @@ void CompilerContext::appendInlineAssembly(
}
solAssert(errorReporter.errors().empty(), "Failed to analyze inline assembly block.");
- yul::CodeGenerator::assemble(*parserResult, analysisInfo, *m_asm, identifierAccess, _system);
+ CodeGenerator::assemble(*parserResult, analysisInfo, *m_asm, identifierAccess, _system);
// Reset the source location to the one of the node (instead of the CODEGEN source location)
updateSourceLocation();
diff --git a/libsolidity/codegen/ContractCompiler.cpp b/libsolidity/codegen/ContractCompiler.cpp
index 286e5856..ec55ae9b 100644
--- a/libsolidity/codegen/ContractCompiler.cpp
+++ b/libsolidity/codegen/ContractCompiler.cpp
@@ -618,7 +618,7 @@ bool ContractCompiler::visit(InlineAssembly const& _inlineAssembly)
}
};
solAssert(_inlineAssembly.annotation().analysisInfo, "");
- yul::CodeGenerator::assemble(
+ CodeGenerator::assemble(
_inlineAssembly.operations(),
*_inlineAssembly.annotation().analysisInfo,
m_context.nonConstAssembly(),
diff --git a/libsolidity/interface/AssemblyStack.cpp b/libsolidity/interface/AssemblyStack.cpp
index 07f88934..c15a192a 100644
--- a/libsolidity/interface/AssemblyStack.cpp
+++ b/libsolidity/interface/AssemblyStack.cpp
@@ -112,7 +112,7 @@ MachineAssemblyObject AssemblyStack::assemble(Machine _machine) const
{
MachineAssemblyObject object;
eth::Assembly assembly;
- yul::CodeGenerator::assemble(*m_parserResult->code, *m_parserResult->analysisInfo, assembly);
+ CodeGenerator::assemble(*m_parserResult->code, *m_parserResult->analysisInfo, assembly);
object.bytecode = make_shared<eth::LinkerObject>(assembly.assemble());
object.assembly = assembly.assemblyString();
return object;