Coverage Report

Created: 2025-09-04 07:34

/src/solidity/libyul/backends/evm/EVMObjectCompiler.h
Line
Count
Source
1
/*
2
  This file is part of solidity.
3
4
  solidity is free software: you can redistribute it and/or modify
5
  it under the terms of the GNU General Public License as published by
6
  the Free Software Foundation, either version 3 of the License, or
7
  (at your option) any later version.
8
9
  solidity is distributed in the hope that it will be useful,
10
  but WITHOUT ANY WARRANTY; without even the implied warranty of
11
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
  GNU General Public License for more details.
13
14
  You should have received a copy of the GNU General Public License
15
  along with solidity.  If not, see <http://www.gnu.org/licenses/>.
16
*/
17
// SPDX-License-Identifier: GPL-3.0
18
/**
19
 * Compiler that transforms Yul Objects to EVM bytecode objects.
20
 */
21
22
#pragma once
23
24
#include <optional>
25
#include <cstdint>
26
27
namespace solidity::yul
28
{
29
class Object;
30
class AbstractAssembly;
31
class EVMDialect;
32
33
class EVMObjectCompiler
34
{
35
public:
36
  static void compile(
37
    Object const& _object,
38
    AbstractAssembly& _assembly,
39
    bool _optimize
40
  );
41
private:
42
42.1k
  EVMObjectCompiler(AbstractAssembly& _assembly): m_assembly(_assembly) {}
43
44
  void run(Object const& _object, bool _optimize);
45
46
  AbstractAssembly& m_assembly;
47
};
48
49
}