mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Some documentation and checks for vector_ref.
This commit is contained in:
parent
64a1e82b6c
commit
66a85f0229
10
Assembly.cpp
10
Assembly.cpp
@ -292,16 +292,6 @@ void Assembly::injectStart(AssemblyItem const& _i)
|
||||
m_items.insert(m_items.begin(), _i);
|
||||
}
|
||||
|
||||
inline bool matches(AssemblyItemsConstRef _a, AssemblyItemsConstRef _b)
|
||||
{
|
||||
if (_a.size() != _b.size())
|
||||
return false;
|
||||
for (unsigned i = 0; i < _a.size(); ++i)
|
||||
if (!_a[i].match(_b[i]))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
struct OptimiserChannel: public LogChannel { static const char* name() { return "OPT"; } static const int verbosity = 12; };
|
||||
#define copt dev::LogOutputStream<OptimiserChannel, true>()
|
||||
|
||||
|
@ -126,10 +126,3 @@ ostream& dev::eth::operator<<(ostream& _out, AssemblyItem const& _item)
|
||||
}
|
||||
return _out;
|
||||
}
|
||||
|
||||
ostream& dev::eth::operator<<(ostream& _out, AssemblyItemsConstRef _i)
|
||||
{
|
||||
for (AssemblyItem const& i: _i)
|
||||
_out << i;
|
||||
return _out;
|
||||
}
|
||||
|
@ -98,11 +98,14 @@ private:
|
||||
};
|
||||
|
||||
using AssemblyItems = std::vector<AssemblyItem>;
|
||||
using AssemblyItemsConstRef = vector_ref<AssemblyItem const>;
|
||||
|
||||
std::ostream& operator<<(std::ostream& _out, AssemblyItem const& _item);
|
||||
std::ostream& operator<<(std::ostream& _out, AssemblyItemsConstRef _i);
|
||||
inline std::ostream& operator<<(std::ostream& _out, AssemblyItems const& _i) { return operator<<(_out, AssemblyItemsConstRef(&_i)); }
|
||||
inline std::ostream& operator<<(std::ostream& _out, AssemblyItems const& _items)
|
||||
{
|
||||
for (AssemblyItem const& item: _items)
|
||||
_out << item;
|
||||
return _out;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user