2016-03-01 21:56:39 +00:00
|
|
|
/*
|
2016-11-18 23:13:20 +00:00
|
|
|
This file is part of solidity.
|
2016-03-01 21:56:39 +00:00
|
|
|
|
2016-11-18 23:13:20 +00:00
|
|
|
solidity is free software: you can redistribute it and/or modify
|
2016-03-01 21:56:39 +00:00
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
2016-11-18 23:13:20 +00:00
|
|
|
solidity is distributed in the hope that it will be useful,
|
2016-03-01 21:56:39 +00:00
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
2016-11-18 23:13:20 +00:00
|
|
|
along with solidity. If not, see <http://www.gnu.org/licenses/>.
|
2016-03-01 21:56:39 +00:00
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* @author Christian <c@ethdev.com>
|
|
|
|
* @date 2016
|
|
|
|
* Code-generating part of inline assembly.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2018-11-23 10:18:57 +00:00
|
|
|
#include <libyul/AsmAnalysis.h>
|
2017-03-14 14:41:23 +00:00
|
|
|
|
|
|
|
#include <functional>
|
2016-03-01 21:56:39 +00:00
|
|
|
|
|
|
|
namespace dev
|
|
|
|
{
|
|
|
|
namespace eth
|
|
|
|
{
|
|
|
|
class Assembly;
|
|
|
|
}
|
2018-11-21 11:42:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace yul
|
2016-03-01 21:56:39 +00:00
|
|
|
{
|
|
|
|
struct Block;
|
|
|
|
|
|
|
|
class CodeGenerator
|
|
|
|
{
|
|
|
|
public:
|
2018-09-20 14:54:57 +00:00
|
|
|
/// Performs code generation and appends generated to _assembly.
|
2017-06-06 13:37:43 +00:00
|
|
|
static void assemble(
|
2017-04-12 16:32:25 +00:00
|
|
|
Block const& _parsedData,
|
2017-04-26 13:41:08 +00:00
|
|
|
AsmAnalysisInfo& _analysisInfo,
|
2018-11-21 11:42:34 +00:00
|
|
|
dev::eth::Assembly& _assembly,
|
2018-10-15 09:58:51 +00:00
|
|
|
yul::ExternalIdentifierAccess const& _identifierAccess = yul::ExternalIdentifierAccess(),
|
2017-08-25 15:04:31 +00:00
|
|
|
bool _useNamedLabelsForFunctions = false
|
2017-04-12 16:32:25 +00:00
|
|
|
);
|
2016-03-01 21:56:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|