aboutsummaryrefslogtreecommitdiffstats
path: root/libyul/Dialect.h
diff options
context:
space:
mode:
Diffstat (limited to 'libyul/Dialect.h')
-rw-r--r--libyul/Dialect.h37
1 files changed, 10 insertions, 27 deletions
diff --git a/libyul/Dialect.h b/libyul/Dialect.h
index b78f1aaf..2def566c 100644
--- a/libyul/Dialect.h
+++ b/libyul/Dialect.h
@@ -22,7 +22,9 @@
#include <libyul/YulString.h>
-#include <memory>
+#include <boost/noncopyable.hpp>
+
+#include <vector>
namespace yul
{
@@ -45,38 +47,19 @@ struct BuiltinFunction
bool movable;
};
-/**
- * Class to query for builtin functions and their semantics.
- */
-struct Builtins
+struct Dialect: boost::noncopyable
{
- virtual ~Builtins() = default;
+ AsmFlavour const flavour = AsmFlavour::Loose;
/// @returns the builtin function of the given name or a nullptr if it is not a builtin function.
- virtual BuiltinFunction const* query(YulString /*_name*/) const { return nullptr; }
-};
+ virtual BuiltinFunction const* builtin(YulString /*_name*/) const { return nullptr; }
-struct Dialect
-{
- AsmFlavour flavour = AsmFlavour::Loose;
- std::shared_ptr<Builtins> builtins;
+ Dialect(AsmFlavour _flavour): flavour(_flavour) {}
+ virtual ~Dialect() {}
- Dialect(AsmFlavour _flavour, std::shared_ptr<Builtins> _builtins):
- flavour(_flavour), builtins(std::move(_builtins))
- {}
- static Dialect looseAssemblyForEVM()
- {
- return Dialect{AsmFlavour::Loose, std::make_shared<Builtins>()};
- }
- static Dialect strictAssemblyForEVM()
- {
- // The EVM instructions will be moved to builtins at some point.
- return Dialect{AsmFlavour::Strict, std::make_shared<Builtins>()};
- }
- static Dialect strictAssemblyForEVMObjects();
- static Dialect yul()
+ static std::shared_ptr<Dialect> yul()
{
// Will have to add builtins later.
- return Dialect{AsmFlavour::Yul, std::make_shared<Builtins>()};
+ return std::make_shared<Dialect>(AsmFlavour::Yul);
}
};
f316c4eb6'>Mark as BROKEN on sparc64 due to internal compiler error.Mark Linimon2006-07-041-1/+7 * Update to 1.10 (maintained by others) and unbreak.Maho Nakata2006-07-0311-268/+50 * o Update to 0.99rc1Maho Nakata2006-07-015-39/+203 * - Provide SSE optimized application as an optionPav Lucistnik2006-06-252-1/+12 * - Instruct amd64 users to libmap libpthread.so.2 to libc_r.so.6Pav Lucistnik2006-06-232-3/+15 * SIMAP (Similarity Matrix of Proteins) is a public database of pre-calculatedPav Lucistnik2006-06-207-0/+110 * Re-add CONFIGURE_TARGET and fix libm detection.Thierry Thomas2006-06-191-1/+5 * - Upgrade to to 1.9.9 and unbreak;Thierry Thomas2006-06-184-146/+134 * USE_SIZE was obsoleted in rev. 1.484 of bsd.port.mk more thanErwin Lansing2006-06-111-1/+0 * - Update PORTREVISION to match latest release (see main web site)Pav Lucistnik2006-06-113-8/+27 * - Update to 34.t25.d9Pav Lucistnik2006-06-102-5/+5 * Update biology/ncbi-toolkit to the latest release.Ion-Mihai Tetcu2006-06-063-5/+11 * - Add MASTER_SITEErwin Lansing2006-06-062-30/+31 * - Update to 34.t25.d8 [1]Erwin Lansing2006-06-062-5/+5 * - update to 34.t25.d7Sergey Matveychuk2006-05-253-77/+7 * BROKEN: UnfetchableKris Kennaway2006-05-221-0/+2 * - Update to 3.15Sergey Matveychuk2006-05-212-4/+4 * - Updated from 0.07 to 0.12Aaron Dalton2006-05-203-12/+25 * Adding port biology/p5-Bio-Phylo, Phylogenetic analysis using perl.Aaron Dalton2006-05-145-0/+110 * - Update to 34.t25.d6Sergey Matveychuk2006-05-084-38/+80 * Update to 21.u1.d1 (fixes fetch).Sam Lawrance2006-05-075-27/+18 * - Satisfy portlintSergey Matveychuk2006-05-071-4/+3 * Add protomol 2.0.3, OO, component based, framework for molecularEmanuel Haupt2006-05-065-0/+201 * Remove USE_REINPLACE from all categories starting with BEdwin Groothuis2006-05-0421-22/+0 * - Update to 1.89Yen-Ming Lee2006-05-036-16/+60 * Bioperl-run contain modules that provides a PERL interface to variousRenato Botelho2006-05-035-0/+784 * Bioperl-run contain modules that provides a PERL interface to variousRenato Botelho2006-05-035-0/+752 * - Update to 1.0.0Pav Lucistnik2006-04-26