aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorChristian Parpart <christian@ethereum.org>2018-10-15 17:58:51 +0800
committerChristian Parpart <christian@ethereum.org>2018-10-15 17:58:51 +0800
commit1304361b9c48438d5c55903492b5f11c3dac73e5 (patch)
treea8501e929c94a7d36e69a6350e98c68556fe9038 /libsolidity
parent9a4bec7e474a310c7f93ff3b84928e0e9ba9cce6 (diff)
downloaddexon-solidity-1304361b9c48438d5c55903492b5f11c3dac73e5.tar
dexon-solidity-1304361b9c48438d5c55903492b5f11c3dac73e5.tar.gz
dexon-solidity-1304361b9c48438d5c55903492b5f11c3dac73e5.tar.bz2
dexon-solidity-1304361b9c48438d5c55903492b5f11c3dac73e5.tar.lz
dexon-solidity-1304361b9c48438d5c55903492b5f11c3dac73e5.tar.xz
dexon-solidity-1304361b9c48438d5c55903492b5f11c3dac73e5.tar.zst
dexon-solidity-1304361b9c48438d5c55903492b5f11c3dac73e5.zip
Renaming namespace dev::julia to dev::yul.
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/analysis/ReferencesResolver.cpp4
-rw-r--r--libsolidity/analysis/TypeChecker.cpp10
-rw-r--r--libsolidity/codegen/CompilerContext.cpp12
-rw-r--r--libsolidity/codegen/ContractCompiler.cpp8
-rw-r--r--libsolidity/inlineasm/AsmAnalysis.cpp4
-rw-r--r--libsolidity/inlineasm/AsmAnalysis.h4
-rw-r--r--libsolidity/inlineasm/AsmCodeGen.cpp6
-rw-r--r--libsolidity/inlineasm/AsmCodeGen.h2
-rw-r--r--libsolidity/interface/AssemblyStack.cpp4
9 files changed, 27 insertions, 27 deletions
diff --git a/libsolidity/analysis/ReferencesResolver.cpp b/libsolidity/analysis/ReferencesResolver.cpp
index 81de3c43..f62d9c3b 100644
--- a/libsolidity/analysis/ReferencesResolver.cpp
+++ b/libsolidity/analysis/ReferencesResolver.cpp
@@ -269,8 +269,8 @@ bool ReferencesResolver::visit(InlineAssembly const& _inlineAssembly)
// external references.
ErrorList errors;
ErrorReporter errorsIgnored(errors);
- julia::ExternalIdentifierAccess::Resolver resolver =
- [&](assembly::Identifier const& _identifier, julia::IdentifierContext, bool _crossesFunctionBoundary) {
+ yul::ExternalIdentifierAccess::Resolver resolver =
+ [&](assembly::Identifier const& _identifier, yul::IdentifierContext, bool _crossesFunctionBoundary) {
auto declarations = m_resolver.nameFromCurrentScope(_identifier.name);
bool isSlot = boost::algorithm::ends_with(_identifier.name, "_slot");
bool isOffset = boost::algorithm::ends_with(_identifier.name, "_offset");
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp
index 164b0b02..3830935f 100644
--- a/libsolidity/analysis/TypeChecker.cpp
+++ b/libsolidity/analysis/TypeChecker.cpp
@@ -952,9 +952,9 @@ bool TypeChecker::visit(InlineAssembly const& _inlineAssembly)
{
// External references have already been resolved in a prior stage and stored in the annotation.
// We run the resolve step again regardless.
- julia::ExternalIdentifierAccess::Resolver identifierAccess = [&](
+ yul::ExternalIdentifierAccess::Resolver identifierAccess = [&](
assembly::Identifier const& _identifier,
- julia::IdentifierContext _context,
+ yul::IdentifierContext _context,
bool
)
{
@@ -978,7 +978,7 @@ bool TypeChecker::visit(InlineAssembly const& _inlineAssembly)
m_errorReporter.typeError(_identifier.location, "The suffixes _offset and _slot can only be used on storage variables.");
return size_t(-1);
}
- else if (_context != julia::IdentifierContext::RValue)
+ else if (_context != yul::IdentifierContext::RValue)
{
m_errorReporter.typeError(_identifier.location, "Storage variables cannot be assigned to.");
return size_t(-1);
@@ -1008,13 +1008,13 @@ bool TypeChecker::visit(InlineAssembly const& _inlineAssembly)
m_errorReporter.typeError(_identifier.location, "The suffixes _offset and _slot can only be used on storage variables.");
return size_t(-1);
}
- else if (_context == julia::IdentifierContext::LValue)
+ else if (_context == yul::IdentifierContext::LValue)
{
m_errorReporter.typeError(_identifier.location, "Only local variables can be assigned to in inline assembly.");
return size_t(-1);
}
- if (_context == julia::IdentifierContext::RValue)
+ if (_context == yul::IdentifierContext::RValue)
{
solAssert(!!declaration->type(), "Type of declaration required but not yet determined.");
if (dynamic_cast<FunctionDefinition const*>(declaration))
diff --git a/libsolidity/codegen/CompilerContext.cpp b/libsolidity/codegen/CompilerContext.cpp
index 71b615b8..089386b5 100644
--- a/libsolidity/codegen/CompilerContext.cpp
+++ b/libsolidity/codegen/CompilerContext.cpp
@@ -318,10 +318,10 @@ void CompilerContext::appendInlineAssembly(
{
int startStackHeight = stackHeight();
- julia::ExternalIdentifierAccess identifierAccess;
+ yul::ExternalIdentifierAccess identifierAccess;
identifierAccess.resolve = [&](
assembly::Identifier const& _identifier,
- julia::IdentifierContext,
+ yul::IdentifierContext,
bool
)
{
@@ -330,15 +330,15 @@ void CompilerContext::appendInlineAssembly(
};
identifierAccess.generateCode = [&](
assembly::Identifier const& _identifier,
- julia::IdentifierContext _context,
- julia::AbstractAssembly& _assembly
+ yul::IdentifierContext _context,
+ yul::AbstractAssembly& _assembly
)
{
auto it = std::find(_localVariables.begin(), _localVariables.end(), _identifier.name);
solAssert(it != _localVariables.end(), "");
int stackDepth = _localVariables.end() - it;
int stackDiff = _assembly.stackHeight() - startStackHeight + stackDepth;
- if (_context == julia::IdentifierContext::LValue)
+ if (_context == yul::IdentifierContext::LValue)
stackDiff -= 1;
if (stackDiff < 1 || stackDiff > 16)
BOOST_THROW_EXCEPTION(
@@ -346,7 +346,7 @@ void CompilerContext::appendInlineAssembly(
errinfo_sourceLocation(_identifier.location) <<
errinfo_comment("Stack too deep (" + to_string(stackDiff) + "), try removing local variables.")
);
- if (_context == julia::IdentifierContext::RValue)
+ if (_context == yul::IdentifierContext::RValue)
_assembly.appendInstruction(dupInstruction(stackDiff));
else
{
diff --git a/libsolidity/codegen/ContractCompiler.cpp b/libsolidity/codegen/ContractCompiler.cpp
index 3a0fccfb..c845da8f 100644
--- a/libsolidity/codegen/ContractCompiler.cpp
+++ b/libsolidity/codegen/ContractCompiler.cpp
@@ -494,21 +494,21 @@ bool ContractCompiler::visit(FunctionDefinition const& _function)
bool ContractCompiler::visit(InlineAssembly const& _inlineAssembly)
{
unsigned startStackHeight = m_context.stackHeight();
- julia::ExternalIdentifierAccess identifierAccess;
- identifierAccess.resolve = [&](assembly::Identifier const& _identifier, julia::IdentifierContext, bool)
+ yul::ExternalIdentifierAccess identifierAccess;
+ identifierAccess.resolve = [&](assembly::Identifier const& _identifier, yul::IdentifierContext, bool)
{
auto ref = _inlineAssembly.annotation().externalReferences.find(&_identifier);
if (ref == _inlineAssembly.annotation().externalReferences.end())
return size_t(-1);
return ref->second.valueSize;
};
- identifierAccess.generateCode = [&](assembly::Identifier const& _identifier, julia::IdentifierContext _context, julia::AbstractAssembly& _assembly)
+ identifierAccess.generateCode = [&](assembly::Identifier const& _identifier, yul::IdentifierContext _context, yul::AbstractAssembly& _assembly)
{
auto ref = _inlineAssembly.annotation().externalReferences.find(&_identifier);
solAssert(ref != _inlineAssembly.annotation().externalReferences.end(), "");
Declaration const* decl = ref->second.declaration;
solAssert(!!decl, "");
- if (_context == julia::IdentifierContext::RValue)
+ if (_context == yul::IdentifierContext::RValue)
{
int const depositBefore = _assembly.stackHeight();
solAssert(!!decl->type(), "Type of declaration required but not yet determined.");
diff --git a/libsolidity/inlineasm/AsmAnalysis.cpp b/libsolidity/inlineasm/AsmAnalysis.cpp
index 947b6d05..04b5d1a8 100644
--- a/libsolidity/inlineasm/AsmAnalysis.cpp
+++ b/libsolidity/inlineasm/AsmAnalysis.cpp
@@ -145,7 +145,7 @@ bool AsmAnalyzer::operator()(assembly::Identifier const& _identifier)
if (m_resolver)
{
bool insideFunction = m_currentScope->insideFunction();
- stackSize = m_resolver(_identifier, julia::IdentifierContext::RValue, insideFunction);
+ stackSize = m_resolver(_identifier, yul::IdentifierContext::RValue, insideFunction);
}
if (stackSize == size_t(-1))
{
@@ -512,7 +512,7 @@ bool AsmAnalyzer::checkAssignment(assembly::Identifier const& _variable, size_t
else if (m_resolver)
{
bool insideFunction = m_currentScope->insideFunction();
- variableSize = m_resolver(_variable, julia::IdentifierContext::LValue, insideFunction);
+ variableSize = m_resolver(_variable, yul::IdentifierContext::LValue, insideFunction);
}
if (variableSize == size_t(-1))
{
diff --git a/libsolidity/inlineasm/AsmAnalysis.h b/libsolidity/inlineasm/AsmAnalysis.h
index fd5c6ac7..a8673efa 100644
--- a/libsolidity/inlineasm/AsmAnalysis.h
+++ b/libsolidity/inlineasm/AsmAnalysis.h
@@ -59,7 +59,7 @@ public:
EVMVersion _evmVersion,
boost::optional<Error::Type> _errorTypeForLoose,
AsmFlavour _flavour = AsmFlavour::Loose,
- julia::ExternalIdentifierAccess::Resolver const& _resolver = julia::ExternalIdentifierAccess::Resolver()
+ yul::ExternalIdentifierAccess::Resolver const& _resolver = yul::ExternalIdentifierAccess::Resolver()
):
m_resolver(_resolver),
m_info(_analysisInfo),
@@ -106,7 +106,7 @@ private:
void checkLooseFeature(SourceLocation const& _location, std::string const& _description);
int m_stackHeight = 0;
- julia::ExternalIdentifierAccess::Resolver m_resolver;
+ yul::ExternalIdentifierAccess::Resolver m_resolver;
Scope* m_currentScope = nullptr;
/// Variables that are active at the current point in assembly (as opposed to
/// "part of the scope but not yet declared")
diff --git a/libsolidity/inlineasm/AsmCodeGen.cpp b/libsolidity/inlineasm/AsmCodeGen.cpp
index 0c1baf4c..3a62b232 100644
--- a/libsolidity/inlineasm/AsmCodeGen.cpp
+++ b/libsolidity/inlineasm/AsmCodeGen.cpp
@@ -49,7 +49,7 @@ using namespace dev;
using namespace dev::solidity;
using namespace dev::solidity::assembly;
-class EthAssemblyAdapter: public julia::AbstractAssembly
+class EthAssemblyAdapter: public yul::AbstractAssembly
{
public:
explicit EthAssemblyAdapter(eth::Assembly& _assembly):
@@ -145,12 +145,12 @@ void assembly::CodeGenerator::assemble(
Block const& _parsedData,
AsmAnalysisInfo& _analysisInfo,
eth::Assembly& _assembly,
- julia::ExternalIdentifierAccess const& _identifierAccess,
+ yul::ExternalIdentifierAccess const& _identifierAccess,
bool _useNamedLabelsForFunctions
)
{
EthAssemblyAdapter assemblyAdapter(_assembly);
- julia::CodeTransform(
+ yul::CodeTransform(
assemblyAdapter,
_analysisInfo,
false,
diff --git a/libsolidity/inlineasm/AsmCodeGen.h b/libsolidity/inlineasm/AsmCodeGen.h
index 277e1879..bbc31397 100644
--- a/libsolidity/inlineasm/AsmCodeGen.h
+++ b/libsolidity/inlineasm/AsmCodeGen.h
@@ -46,7 +46,7 @@ public:
Block const& _parsedData,
AsmAnalysisInfo& _analysisInfo,
eth::Assembly& _assembly,
- julia::ExternalIdentifierAccess const& _identifierAccess = julia::ExternalIdentifierAccess(),
+ yul::ExternalIdentifierAccess const& _identifierAccess = yul::ExternalIdentifierAccess(),
bool _useNamedLabelsForFunctions = false
);
};
diff --git a/libsolidity/interface/AssemblyStack.cpp b/libsolidity/interface/AssemblyStack.cpp
index dbd976d1..26496de7 100644
--- a/libsolidity/interface/AssemblyStack.cpp
+++ b/libsolidity/interface/AssemblyStack.cpp
@@ -116,8 +116,8 @@ MachineAssemblyObject AssemblyStack::assemble(Machine _machine) const
case Machine::EVM15:
{
MachineAssemblyObject object;
- julia::EVMAssembly assembly(true);
- julia::CodeTransform(assembly, *m_analysisInfo, m_language == Language::Yul, true)(*m_parserResult);
+ yul::EVMAssembly assembly(true);
+ yul::CodeTransform(assembly, *m_analysisInfo, m_language == Language::Yul, true)(*m_parserResult);
object.bytecode = make_shared<eth::LinkerObject>(assembly.finalize());
/// TODO: fill out text representation
return object;