diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-05-25 08:59:57 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-05-27 03:39:30 +0800 |
commit | 8fe79fe706fd64146ffbf345e0241b7c4357ce43 (patch) | |
tree | 4b17df95faa4f1e901bae7a4d6b698a2923d0cc7 /libsolidity/inlineasm/AsmAnalysis.cpp | |
parent | 3b75c5b45fdb1bfb49b4e157e031154c57b475f3 (diff) | |
download | dexon-solidity-8fe79fe706fd64146ffbf345e0241b7c4357ce43.tar dexon-solidity-8fe79fe706fd64146ffbf345e0241b7c4357ce43.tar.gz dexon-solidity-8fe79fe706fd64146ffbf345e0241b7c4357ce43.tar.bz2 dexon-solidity-8fe79fe706fd64146ffbf345e0241b7c4357ce43.tar.lz dexon-solidity-8fe79fe706fd64146ffbf345e0241b7c4357ce43.tar.xz dexon-solidity-8fe79fe706fd64146ffbf345e0241b7c4357ce43.tar.zst dexon-solidity-8fe79fe706fd64146ffbf345e0241b7c4357ce43.zip |
Introduce Julia mode in AsmAnalyzer
Diffstat (limited to 'libsolidity/inlineasm/AsmAnalysis.cpp')
-rw-r--r-- | libsolidity/inlineasm/AsmAnalysis.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libsolidity/inlineasm/AsmAnalysis.cpp b/libsolidity/inlineasm/AsmAnalysis.cpp index ca50fdbe..eb6f8bc0 100644 --- a/libsolidity/inlineasm/AsmAnalysis.cpp +++ b/libsolidity/inlineasm/AsmAnalysis.cpp @@ -48,12 +48,14 @@ bool AsmAnalyzer::analyze(Block const& _block) bool AsmAnalyzer::operator()(Label const& _label) { + solAssert(!m_julia, ""); m_info.stackHeightInfo[&_label] = m_stackHeight; return true; } bool AsmAnalyzer::operator()(assembly::Instruction const& _instruction) { + solAssert(!m_julia, ""); auto const& info = instructionInfo(_instruction.instruction); m_stackHeight += info.ret - info.args; m_info.stackHeightInfo[&_instruction] = m_stackHeight; @@ -135,6 +137,7 @@ bool AsmAnalyzer::operator()(assembly::Identifier const& _identifier) bool AsmAnalyzer::operator()(FunctionalInstruction const& _instr) { + solAssert(!m_julia, ""); bool success = true; for (auto const& arg: _instr.arguments | boost::adaptors::reversed) { @@ -154,12 +157,12 @@ bool AsmAnalyzer::operator()(FunctionalInstruction const& _instr) bool AsmAnalyzer::operator()(assembly::StackAssignment const& _assignment) { + solAssert(!m_julia, ""); bool success = checkAssignment(_assignment.variableName, size_t(-1)); m_info.stackHeightInfo[&_assignment] = m_stackHeight; return success; } - bool AsmAnalyzer::operator()(assembly::Assignment const& _assignment) { int const stackHeight = m_stackHeight; @@ -454,8 +457,8 @@ Scope& AsmAnalyzer::scope(Block const* _block) void AsmAnalyzer::expectValidType(string const& type, SourceLocation const& _location) { -// if (!m_julia) -// return; + if (!m_julia) + return; if (!(set<string>{"bool", "u8", "s8", "u32", "s32", "u64", "s64", "u128", "s128", "u256", "s256"}).count(type)) m_errors.push_back(make_shared<Error>( |