Sending ether.

This commit is contained in:
Christian
2014-11-26 15:35:25 +01:00
parent a2715c5f34
commit f30dc68cdd
5 changed files with 93 additions and 27 deletions
+15 -1
View File
@@ -192,7 +192,7 @@ u256 IntegerType::literalValue(Literal const& _literal) const
const MemberList IntegerType::AddressMemberList =
MemberList({{"balance", make_shared<IntegerType const>(256)},
{"send", make_shared<FunctionType const>(TypePointers({make_shared<IntegerType const>(256)}),
TypePointers())}});
TypePointers(), FunctionType::Location::SEND)}});
bool BoolType::isExplicitlyConvertibleTo(Type const& _convertTo) const
{
@@ -314,6 +314,7 @@ FunctionType::FunctionType(FunctionDefinition const& _function)
retParams.push_back(var->getType());
swap(params, m_parameterTypes);
swap(retParams, m_returnParameterTypes);
m_location = Location::INTERNAL;
}
bool FunctionType::operator==(Type const& _other) const
@@ -347,6 +348,19 @@ string FunctionType::toString() const
return name + ")";
}
unsigned FunctionType::getSizeOnStack() const
{
switch (m_location)
{
case Location::INTERNAL:
return 1;
case Location::EXTERNAL:
return 2;
default:
return 0;
}
}
bool MappingType::operator==(Type const& _other) const
{
if (_other.getCategory() != getCategory())