added brackets for printing in/out

cleaned up
This commit is contained in:
Liana Husikyan 2015-03-10 12:00:23 +01:00
parent 74a01826ee
commit d5cbb2acd2
2 changed files with 3 additions and 7 deletions

View File

@ -177,9 +177,7 @@ void Compiler::appendFunctionSelector(ContractDefinition const& _contract)
{
callDataUnpackerEntryPoints.insert(std::make_pair(it.first, m_context.newTag()));
m_context << eth::dupInstruction(1) << u256(FixedHash<4>::Arith(it.first)) << eth::Instruction::EQ;
auto assemblyItem = callDataUnpackerEntryPoints.at(it.first);
//assemblyItem.setJumpType(eth::AssemblyItem::JumpType::IntoFunction);
m_context.appendConditionalJumpTo(assemblyItem);
m_context.appendConditionalJumpTo(callDataUnpackerEntryPoints.at(it.first));
}
if (FunctionDefinition const* fallback = _contract.getFallbackFunction())
{
@ -199,9 +197,7 @@ void Compiler::appendFunctionSelector(ContractDefinition const& _contract)
m_context << callDataUnpackerEntryPoints.at(it.first);
eth::AssemblyItem returnTag = m_context.pushNewTag();
appendCalldataUnpacker(functionType->getParameterTypes());
auto assemblyItem = m_context.getFunctionEntryLabel(functionType->getDeclaration());
//assemblyItem.setJumpType(eth::AssemblyItem::JumpType::IntoFunction);
m_context.appendJumpTo(assemblyItem);
m_context.appendJumpTo(m_context.getFunctionEntryLabel(functionType->getDeclaration()));
m_context << returnTag;
appendReturnValuePacker(functionType->getReturnParameterTypes());
}

View File

@ -120,7 +120,7 @@ public:
eth::Assembly const& getAssembly() const { return m_asm; }
/// @arg _sourceCodes is the map of input files to source code strings
void streamAssembly(std::ostream& _stream, StringMap const& _sourceCodes = StringMap()) const { m_asm.streamRLP(_stream, "", _sourceCodes); }
void streamAssembly(std::ostream& _stream, StringMap const& _sourceCodes = StringMap()) const { m_asm.stream(_stream, "", _sourceCodes); }
bytes getAssembledBytecode(bool _optimize = false) { return m_asm.optimise(_optimize).assemble(); }