Commit 3721b380 authored by nagayama15's avatar nagayama15

Merge branch 'update-binaryen-1.38.31' into 'master'

Update Binaryen

See merge request !4
parents 4bf1e9f1 f39cc0bf
ExternalProject_Add(
binaryen
URL https://github.com/WebAssembly/binaryen/archive/1.38.30.tar.gz
URL https://github.com/WebAssembly/binaryen/archive/91704fbae74fa7c89a017764eaa5ff03eda5ec0d.tar.gz
PREFIX binaryen
INSTALL_COMMAND ""
TEST_COMMAND ""
......
......@@ -261,10 +261,11 @@ namespace wasm {
std::tie(r.type, r.offset, *r.ptr, *r.expected, *r.timeout);
}
case Expression::Id::AtomicWakeId: {
const auto &l = *lhs.cast<AtomicWake>();
const auto &r = *rhs.cast<AtomicWake>();
return std::tie(l.type, l.offset, *l.ptr, *l.wakeCount) < std::tie(r.type, r.offset, *r.ptr, *r.wakeCount);
case Expression::Id::AtomicNotifyId: {
const auto &l = *lhs.cast<AtomicNotify>();
const auto &r = *rhs.cast<AtomicNotify>();
return std::tie(l.type, l.offset, *l.ptr, *l.notifyCount) <
std::tie(r.type, r.offset, *r.ptr, *r.notifyCount);
}
case Expression::Id::SIMDExtractId: {
......@@ -333,20 +334,10 @@ namespace wasm {
}
inline bool operator<(const ExpressionList &lhs, const ExpressionList &rhs) noexcept {
auto lIt = lhs.begin();
auto lEnd = lhs.end();
auto rIt = rhs.begin();
auto rEnd = rhs.end();
for (; lIt != lEnd && rIt != rEnd; ++lIt, ++rIt) {
if (**lIt < **rIt) {
return true;
} else if (**rIt < **lIt) {
return false;
}
}
return !(lIt != lEnd) && rIt != rEnd;
return std::lexicographical_compare(
std::begin(lhs), std::end(lhs), std::begin(rhs), std::end(rhs), [](const auto &a, const auto &b) {
return *a < *b;
});
}
} // namespace wasm
......
......@@ -135,9 +135,9 @@ namespace kyut::pass {
return true;
}
bool visitAtomicWake(wasm::AtomicWake *curr) {
bool visitAtomicNotify(wasm::AtomicNotify *curr) {
visit(curr->ptr);
visit(curr->wakeCount);
visit(curr->notifyCount);
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment