Browse Source

saved returnParameterNames in FunctionType constructor

cl-refactor
Liana Husikyan 10 years ago
parent
commit
bd693e4ca8
  1. 1
      libsolidity/AST.cpp
  2. 1
      libsolidity/ExpressionCompiler.cpp
  3. 7
      libsolidity/Types.cpp
  4. 3
      libsolidity/Types.h

1
libsolidity/AST.cpp

@ -821,6 +821,7 @@ void NewExpression::checkTypeRequirements(TypePointers const*)
parameterTypes, parameterTypes,
TypePointers{contractType}, TypePointers{contractType},
strings(), strings(),
strings(),
FunctionType::Location::Creation); FunctionType::Location::Creation);
} }

1
libsolidity/ExpressionCompiler.cpp

@ -526,6 +526,7 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
TypePointers{}, TypePointers{},
TypePointers{}, TypePointers{},
strings(), strings(),
strings(),
Location::External, Location::External,
false, false,
true, true,

7
libsolidity/Types.cpp

@ -1143,7 +1143,7 @@ FunctionTypePointer FunctionType::externalFunctionType() const
return FunctionTypePointer(); return FunctionTypePointer();
retParamTypes.push_back(type->externalType()); retParamTypes.push_back(type->externalType());
} }
return make_shared<FunctionType>(paramTypes, retParamTypes, m_parameterNames, m_location, m_arbitraryParameters); return make_shared<FunctionType>(paramTypes, retParamTypes, m_parameterNames, m_returnParameterNames, m_location, m_arbitraryParameters);
} }
MemberList const& FunctionType::getMembers() const MemberList const& FunctionType::getMembers() const
@ -1165,6 +1165,7 @@ MemberList const& FunctionType::getMembers() const
parseElementaryTypeVector({"uint"}), parseElementaryTypeVector({"uint"}),
TypePointers{copyAndSetGasOrValue(false, true)}, TypePointers{copyAndSetGasOrValue(false, true)},
strings(), strings(),
strings(),
Location::SetValue, Location::SetValue,
false, false,
m_gasSet, m_gasSet,
@ -1180,6 +1181,7 @@ MemberList const& FunctionType::getMembers() const
parseElementaryTypeVector({"uint"}), parseElementaryTypeVector({"uint"}),
TypePointers{copyAndSetGasOrValue(true, false)}, TypePointers{copyAndSetGasOrValue(true, false)},
strings(), strings(),
strings(),
Location::SetGas, Location::SetGas,
false, false,
m_gasSet, m_gasSet,
@ -1267,7 +1269,8 @@ TypePointer FunctionType::copyAndSetGasOrValue(bool _setGas, bool _setValue) con
return make_shared<FunctionType>( return make_shared<FunctionType>(
m_parameterTypes, m_parameterTypes,
m_returnParameterTypes, m_returnParameterTypes,
strings(), m_parameterNames,
m_returnParameterNames,
m_location, m_location,
m_arbitraryParameters, m_arbitraryParameters,
m_gasSet || _setGas, m_gasSet || _setGas,

3
libsolidity/Types.h

@ -573,6 +573,7 @@ public:
parseElementaryTypeVector(_parameterTypes), parseElementaryTypeVector(_parameterTypes),
parseElementaryTypeVector(_returnParameterTypes), parseElementaryTypeVector(_returnParameterTypes),
strings(), strings(),
strings(),
_location, _location,
_arbitraryParameters _arbitraryParameters
) )
@ -582,6 +583,7 @@ public:
TypePointers const& _parameterTypes, TypePointers const& _parameterTypes,
TypePointers const& _returnParameterTypes, TypePointers const& _returnParameterTypes,
strings _parameterNames = strings(), strings _parameterNames = strings(),
strings _returnParameterNames = strings(),
Location _location = Location::Internal, Location _location = Location::Internal,
bool _arbitraryParameters = false, bool _arbitraryParameters = false,
bool _gasSet = false, bool _gasSet = false,
@ -590,6 +592,7 @@ public:
m_parameterTypes (_parameterTypes), m_parameterTypes (_parameterTypes),
m_returnParameterTypes (_returnParameterTypes), m_returnParameterTypes (_returnParameterTypes),
m_parameterNames (_parameterNames), m_parameterNames (_parameterNames),
m_returnParameterNames (_returnParameterNames),
m_location (_location), m_location (_location),
m_arbitraryParameters (_arbitraryParameters), m_arbitraryParameters (_arbitraryParameters),
m_gasSet (_gasSet), m_gasSet (_gasSet),

Loading…
Cancel
Save