Index BindingHash::FindIndex(const Var& var) const { if (var.is_name()) { return FindIndex(var.name());
} return var.index();
}
void BindingHash::CreateDuplicatesVector(
ValueTypeVector* out_duplicates) const { // This relies on the fact that in an unordered_multimap, all values with the // same key are adjacent in iteration order. auto first = begin(); bool is_first = true; for (auto iter = std::next(first); iter != end(); ++iter) { if (first->first == iter->first) { if (is_first) {
out_duplicates->push_back(&*first);
}
out_duplicates->push_back(&*iter);
is_first = false;
} else {
is_first = true;
first = iter;
}
}
}
void BindingHash::CallCallbacks(const ValueTypeVector& duplicates,
DuplicateCallback callback) const { // Loop through all duplicates in order, and call callback with first // occurrence. for (auto iter = duplicates.begin(), end = duplicates.end(); iter != end;
++iter) { auto first = std::find_if(duplicates.begin(), duplicates.end(),
[iter](const value_type* x) -> bool { return x->first == (*iter)->first;
}); if (first == iter) { continue;
}
assert(first != duplicates.end());
callback(**first, **iter);
}
}
} // namespace wabt
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet am 2026-09-29)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.