mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Start of pinhole optimiser. Minor fix for debugger.
This commit is contained in:
parent
8a0dcc26c4
commit
52fbe7dbfd
@ -144,6 +144,8 @@ AssemblyItem const& Assembly::append(AssemblyItem const& _i)
|
|||||||
|
|
||||||
void Assembly::optimise()
|
void Assembly::optimise()
|
||||||
{
|
{
|
||||||
|
std::vector<pair< vector<int>, function< vector<AssemblyItem>(vector<AssemblyItem>) > >> rules;
|
||||||
|
// rules.insert(make_pair({(int)Instruction::ADD, (int)Instruction::ADD, -(int)Push}, []() {}));
|
||||||
}
|
}
|
||||||
|
|
||||||
bytes Assembly::assemble() const
|
bytes Assembly::assemble() const
|
||||||
|
@ -51,11 +51,15 @@ public:
|
|||||||
|
|
||||||
int deposit() const;
|
int deposit() const;
|
||||||
|
|
||||||
|
bool operator==(int _mask) const { return -_mask == (int)m_type || (m_type == Operation && _mask == (int)m_data); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AssemblyItemType m_type;
|
AssemblyItemType m_type;
|
||||||
u256 m_data;
|
u256 m_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
inline bool operator==(int _i, AssemblyItem _ai) { return _ai.operator==(_i); }
|
||||||
|
|
||||||
class Assembly
|
class Assembly
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user