mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
commit
ab93c94081
@ -2429,7 +2429,7 @@ FunctionType::FunctionType(VariableDeclaration const& _varDecl):
|
|||||||
else if (auto arrayType = dynamic_cast<ArrayType const*>(returnType.get()))
|
else if (auto arrayType = dynamic_cast<ArrayType const*>(returnType.get()))
|
||||||
{
|
{
|
||||||
if (arrayType->isByteArray())
|
if (arrayType->isByteArray())
|
||||||
// Return byte arrays as as whole.
|
// Return byte arrays as whole.
|
||||||
break;
|
break;
|
||||||
returnType = arrayType->baseType();
|
returnType = arrayType->baseType();
|
||||||
m_parameterNames.push_back("");
|
m_parameterNames.push_back("");
|
||||||
|
@ -174,7 +174,7 @@ public:
|
|||||||
/// Will not contain any character which would be invalid as an identifier.
|
/// Will not contain any character which would be invalid as an identifier.
|
||||||
std::string identifier() const;
|
std::string identifier() const;
|
||||||
|
|
||||||
/// More complex identifier strings use "parentheses", where $_ is interpreted as as
|
/// More complex identifier strings use "parentheses", where $_ is interpreted as
|
||||||
/// "opening parenthesis", _$ as "closing parenthesis", _$_ as "comma" and any $ that
|
/// "opening parenthesis", _$ as "closing parenthesis", _$_ as "comma" and any $ that
|
||||||
/// appears as part of a user-supplied identifier is escaped as _$$$_.
|
/// appears as part of a user-supplied identifier is escaped as _$$$_.
|
||||||
/// @returns an escaped identifier (will not contain any parenthesis or commas)
|
/// @returns an escaped identifier (will not contain any parenthesis or commas)
|
||||||
|
@ -1230,7 +1230,7 @@ bool ExpressionCompiler::visit(MemberAccess const& _memberAccess)
|
|||||||
else
|
else
|
||||||
solAssert(false, "Contract member is neither variable nor function.");
|
solAssert(false, "Contract member is neither variable nor function.");
|
||||||
m_context << identifier;
|
m_context << identifier;
|
||||||
/// need to store store it as bytes4
|
/// need to store it as bytes4
|
||||||
utils().leftShiftNumberOnStack(224);
|
utils().leftShiftNumberOnStack(224);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1305,7 +1305,7 @@ bool ExpressionCompiler::visit(MemberAccess const& _memberAccess)
|
|||||||
if (member == "selector")
|
if (member == "selector")
|
||||||
{
|
{
|
||||||
m_context << Instruction::SWAP1 << Instruction::POP;
|
m_context << Instruction::SWAP1 << Instruction::POP;
|
||||||
/// need to store store it as bytes4
|
/// need to store it as bytes4
|
||||||
utils().leftShiftNumberOnStack(224);
|
utils().leftShiftNumberOnStack(224);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1975,7 +1975,7 @@ void ExpressionCompiler::appendExternalFunctionCall(
|
|||||||
m_context << dupInstruction(m_context.baseToCurrentStackOffset(contractStackPos));
|
m_context << dupInstruction(m_context.baseToCurrentStackOffset(contractStackPos));
|
||||||
|
|
||||||
bool existenceChecked = false;
|
bool existenceChecked = false;
|
||||||
// Check the the target contract exists (has code) for non-low-level calls.
|
// Check the target contract exists (has code) for non-low-level calls.
|
||||||
if (funKind == FunctionType::Kind::External || funKind == FunctionType::Kind::DelegateCall)
|
if (funKind == FunctionType::Kind::External || funKind == FunctionType::Kind::DelegateCall)
|
||||||
{
|
{
|
||||||
m_context << Instruction::DUP1 << Instruction::EXTCODESIZE << Instruction::ISZERO;
|
m_context << Instruction::DUP1 << Instruction::EXTCODESIZE << Instruction::ISZERO;
|
||||||
|
@ -41,7 +41,7 @@ struct Block;
|
|||||||
class CodeGenerator
|
class CodeGenerator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// Performs code generation and appends generated to to _assembly.
|
/// Performs code generation and appends generated to _assembly.
|
||||||
static void assemble(
|
static void assemble(
|
||||||
Block const& _parsedData,
|
Block const& _parsedData,
|
||||||
AsmAnalysisInfo& _analysisInfo,
|
AsmAnalysisInfo& _analysisInfo,
|
||||||
|
Loading…
Reference in New Issue
Block a user