mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Whitespace and error messages.
This commit is contained in:
parent
4e72a77546
commit
9f8c2620da
6
AST.h
6
AST.h
@ -473,9 +473,9 @@ class EventDefinition: public Declaration, public Documented
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
EventDefinition(Location const& _location,
|
EventDefinition(Location const& _location,
|
||||||
ASTPointer<ASTString> const& _name,
|
ASTPointer<ASTString> const& _name,
|
||||||
ASTPointer<ASTString> const& _documentation,
|
ASTPointer<ASTString> const& _documentation,
|
||||||
ASTPointer<ParameterList> const& _parameters):
|
ASTPointer<ParameterList> const& _parameters):
|
||||||
Declaration(_location, _name), Documented(_documentation), m_parameters(_parameters) {}
|
Declaration(_location, _name), Documented(_documentation), m_parameters(_parameters) {}
|
||||||
|
|
||||||
virtual void accept(ASTVisitor& _visitor) override;
|
virtual void accept(ASTVisitor& _visitor) override;
|
||||||
|
@ -322,7 +322,7 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
|
|||||||
}
|
}
|
||||||
unsigned length = appendExpressionCopyToMemory(*function.getParameterTypes().front(),
|
unsigned length = appendExpressionCopyToMemory(*function.getParameterTypes().front(),
|
||||||
*arguments.front());
|
*arguments.front());
|
||||||
solAssert(length == 32, "Log data should have length 32.");
|
solAssert(length == 32, "Log data should be 32 bytes long (for now).");
|
||||||
m_context << u256(length) << u256(0) << eth::logInstruction(logNumber);
|
m_context << u256(length) << u256(0) << eth::logInstruction(logNumber);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -487,7 +487,7 @@ bool ExpressionCompiler::visit(IndexAccess const& _indexAccess)
|
|||||||
|
|
||||||
TypePointer const& keyType = dynamic_cast<MappingType const&>(*_indexAccess.getBaseExpression().getType()).getKeyType();
|
TypePointer const& keyType = dynamic_cast<MappingType const&>(*_indexAccess.getBaseExpression().getType()).getKeyType();
|
||||||
unsigned length = appendExpressionCopyToMemory(*keyType, _indexAccess.getIndexExpression());
|
unsigned length = appendExpressionCopyToMemory(*keyType, _indexAccess.getIndexExpression());
|
||||||
solAssert(length == 32, "Mapping key length in memory has to be 32.");
|
solAssert(length == 32, "Mapping key has to take 32 bytes in memory (for now).");
|
||||||
// @todo move this once we actually use memory
|
// @todo move this once we actually use memory
|
||||||
length += CompilerUtils(m_context).storeInMemory(length);
|
length += CompilerUtils(m_context).storeInMemory(length);
|
||||||
m_context << u256(length) << u256(0) << eth::Instruction::SHA3;
|
m_context << u256(length) << u256(0) << eth::Instruction::SHA3;
|
||||||
|
@ -95,8 +95,8 @@ private:
|
|||||||
/// Appends code that copies the given arguments to memory (with optional offset).
|
/// Appends code that copies the given arguments to memory (with optional offset).
|
||||||
/// @returns the number of bytes copied to memory
|
/// @returns the number of bytes copied to memory
|
||||||
unsigned appendArgumentCopyToMemory(TypePointers const& _types,
|
unsigned appendArgumentCopyToMemory(TypePointers const& _types,
|
||||||
std::vector<ASTPointer<Expression const>> const& _arguments,
|
std::vector<ASTPointer<Expression const>> const& _arguments,
|
||||||
unsigned _memoryOffset = 0);
|
unsigned _memoryOffset = 0);
|
||||||
/// Appends code that evaluates a single expression and copies it to memory (with optional offset).
|
/// Appends code that evaluates a single expression and copies it to memory (with optional offset).
|
||||||
/// @returns the number of bytes copied to memory
|
/// @returns the number of bytes copied to memory
|
||||||
unsigned appendExpressionCopyToMemory(Type const& _expectedType, Expression const& _expression,
|
unsigned appendExpressionCopyToMemory(Type const& _expectedType, Expression const& _expression,
|
||||||
|
Loading…
Reference in New Issue
Block a user