mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
@@ -448,7 +448,7 @@ void TypeChecker::overrideError(FunctionDefinition const& function, FunctionDefi
|
||||
{
|
||||
m_errorReporter.typeError(
|
||||
function.location(),
|
||||
SecondarySourceLocation().append("Overriden function is here:", super.location()),
|
||||
SecondarySourceLocation().append("Overridden function is here:", super.location()),
|
||||
message
|
||||
);
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ private:
|
||||
void checkContractDuplicateFunctions(ContractDefinition const& _contract);
|
||||
void checkContractDuplicateEvents(ContractDefinition const& _contract);
|
||||
void checkContractIllegalOverrides(ContractDefinition const& _contract);
|
||||
/// Reports a type error with an appropiate message if overriden function signature differs.
|
||||
/// Reports a type error with an appropriate message if overridden function signature differs.
|
||||
/// Also stores the direct super function in the AST annotations.
|
||||
void checkFunctionOverride(FunctionDefinition const& function, FunctionDefinition const& super);
|
||||
void overrideError(FunctionDefinition const& function, FunctionDefinition const& super, std::string message);
|
||||
|
||||
@@ -1169,11 +1169,11 @@ public:
|
||||
Statement const& body() const { return *m_body; }
|
||||
|
||||
private:
|
||||
/// For statement's initialization expresion. for(XXX; ; ). Can be empty
|
||||
/// For statement's initialization expression. for(XXX; ; ). Can be empty
|
||||
ASTPointer<Statement> m_initExpression;
|
||||
/// For statement's condition expresion. for(; XXX ; ). Can be empty
|
||||
/// For statement's condition expression. for(; XXX ; ). Can be empty
|
||||
ASTPointer<Expression> m_condExpression;
|
||||
/// For statement's loop expresion. for(;;XXX). Can be empty
|
||||
/// For statement's loop expression. for(;;XXX). Can be empty
|
||||
ASTPointer<ExpressionStatement> m_loopExpression;
|
||||
/// The body of the loop
|
||||
ASTPointer<Statement> m_body;
|
||||
|
||||
@@ -949,7 +949,7 @@ TypePointer RationalNumberType::binaryOperatorResult(Token::Value _operator, Typ
|
||||
RationalNumberType const& other = dynamic_cast<RationalNumberType const&>(*_other);
|
||||
if (Token::isCompareOp(_operator))
|
||||
{
|
||||
// Since we do not have a "BoolConstantType", we have to do the acutal comparison
|
||||
// Since we do not have a "BoolConstantType", we have to do the actual comparison
|
||||
// at runtime and convert to mobile typse first. Such a comparison is not a very common
|
||||
// use-case and will be optimized away.
|
||||
TypePointer thisMobile = mobileType();
|
||||
|
||||
@@ -1031,7 +1031,7 @@ public:
|
||||
/// @param _selfType if the function is bound, this has to be supplied and is the type of the
|
||||
/// expression the function is called on.
|
||||
bool canTakeArguments(TypePointers const& _arguments, TypePointer const& _selfType = TypePointer()) const;
|
||||
/// @returns true if the types of parameters are equal (does't check return parameter types)
|
||||
/// @returns true if the types of parameters are equal (doesn't check return parameter types)
|
||||
bool hasEqualArgumentTypes(FunctionType const& _other) const;
|
||||
|
||||
/// @returns true if the ABI is used for this call (only meaningful for external calls)
|
||||
|
||||
@@ -203,7 +203,7 @@ private:
|
||||
std::string arrayLengthFunction(ArrayType const& _type);
|
||||
/// @returns the name of a function that computes the number of bytes required
|
||||
/// to store an array in memory given its length (internally encoded, not ABI encoded).
|
||||
/// The function reverts for too large lengthes.
|
||||
/// The function reverts for too large lengths.
|
||||
std::string arrayAllocationSizeFunction(ArrayType const& _type);
|
||||
/// @returns the name of a function that converts a storage slot number
|
||||
/// or a memory pointer to the slot number / memory pointer for the data position of an array
|
||||
|
||||
@@ -363,8 +363,8 @@ void CompilerUtils::encodeToMemory(
|
||||
|
||||
// Stack during operation:
|
||||
// <v1> <v2> ... <vn> <mem_start> <dyn_head_1> ... <dyn_head_r> <end_of_mem>
|
||||
// The values dyn_head_i are added during the first loop and they point to the head part
|
||||
// of the ith dynamic parameter, which is filled once the dynamic parts are processed.
|
||||
// The values dyn_head_n are added during the first loop and they point to the head part
|
||||
// of the nth dynamic parameter, which is filled once the dynamic parts are processed.
|
||||
|
||||
// store memory start pointer
|
||||
m_context << Instruction::DUP1;
|
||||
|
||||
@@ -1751,7 +1751,7 @@ void ExpressionCompiler::appendShiftOperatorCode(Token::Value _operator, Type co
|
||||
{
|
||||
if (c_valueSigned)
|
||||
// In the following assembly snippet, xor_mask will be zero, if value_to_shift is positive.
|
||||
// Therefor xor'ing with xor_mask is the identity and the computation reduces to
|
||||
// Therefore xor'ing with xor_mask is the identity and the computation reduces to
|
||||
// div(value_to_shift, exp(2, shift_amount)), which is correct, since for positive values
|
||||
// arithmetic right shift is dividing by a power of two (which, as a bitwise operation, results
|
||||
// in discarding bits on the right and filling with zeros from the left).
|
||||
@@ -1879,7 +1879,7 @@ void ExpressionCompiler::appendExternalFunctionCall(
|
||||
{
|
||||
m_context << u256(0);
|
||||
utils().fetchFreeMemoryPointer();
|
||||
// This touches too much, but that way we save some rounding arithmetics
|
||||
// This touches too much, but that way we save some rounding arithmetic
|
||||
m_context << u256(retSize) << Instruction::ADD << Instruction::MSTORE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ bool SMTChecker::visit(FunctionDefinition const& _function)
|
||||
|
||||
void SMTChecker::endVisit(FunctionDefinition const&)
|
||||
{
|
||||
// TOOD we could check for "reachability", i.e. satisfiability here.
|
||||
// TODO we could check for "reachability", i.e. satisfiability here.
|
||||
// We only handle local variables, so we clear at the beginning of the function.
|
||||
// If we add storage variables, those should be cleared differently.
|
||||
removeLocalVariables();
|
||||
|
||||
@@ -119,7 +119,7 @@ MachineAssemblyObject AssemblyStack::assemble(Machine _machine) const
|
||||
julia::EVMAssembly assembly(true);
|
||||
julia::CodeTransform(assembly, *m_analysisInfo, m_language == Language::Yul, true)(*m_parserResult);
|
||||
object.bytecode = make_shared<eth::LinkerObject>(assembly.finalize());
|
||||
/// TOOD: fill out text representation
|
||||
/// TODO: fill out text representation
|
||||
return object;
|
||||
}
|
||||
case Machine::eWasm:
|
||||
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
m_errorList(),
|
||||
m_errorReporter(m_errorList) {}
|
||||
|
||||
/// @returns the list of errors that occured during parsing and type checking.
|
||||
/// @returns the list of errors that occurred during parsing and type checking.
|
||||
ErrorList const& errors() const { return m_errorReporter.errors(); }
|
||||
|
||||
/// @returns the current state.
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
/// @param _contractDef The contract definition
|
||||
/// @return A JSON representation of the contract's user documentation
|
||||
static Json::Value userDocumentation(ContractDefinition const& _contractDef);
|
||||
/// Genereates the Developer's documentation of the contract
|
||||
/// Generates the Developer's documentation of the contract
|
||||
/// @param _contractDef The contract definition
|
||||
/// @return A JSON representation
|
||||
/// of the contract's developer documentation
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace solidity
|
||||
{
|
||||
|
||||
/**
|
||||
* Standard JSON compiler interface, which expects a JSON input and returns a JSON ouput.
|
||||
* Standard JSON compiler interface, which expects a JSON input and returns a JSON output.
|
||||
* See docs/using-the-compiler#compiler-input-and-output-json-description.
|
||||
*/
|
||||
class StandardCompiler: boost::noncopyable
|
||||
|
||||
@@ -223,7 +223,7 @@ private:
|
||||
bool isSourcePastEndOfInput() const { return m_source.isPastEndOfInput(); }
|
||||
|
||||
TokenDesc m_skippedComment; // desc for current skipped comment
|
||||
TokenDesc m_nextSkippedComment; // desc for next skiped comment
|
||||
TokenDesc m_nextSkippedComment; // desc for next skipped comment
|
||||
|
||||
TokenDesc m_currentToken; // desc for current token (as returned by Next())
|
||||
TokenDesc m_nextToken; // desc for next token (one token look-ahead)
|
||||
|
||||
Reference in New Issue
Block a user