Bug 1592973 - Fix WebAssembly ABIResultIter for stack arguments r=lth

Differential Revision: https://phabricator.services.mozilla.com/D51269

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andy Wingo 2019-11-05 15:38:39 +00:00
parent 82923924d7
commit 131db600b5

View File

@ -66,7 +66,8 @@ uint32_t ABIResult::size() const { return ResultStackSize(type()); }
void ABIResultIter::settleRegister(ValType type) { void ABIResultIter::settleRegister(ValType type) {
MOZ_ASSERT(!done()); MOZ_ASSERT(!done());
MOZ_ASSERT(index() < RegisterResultCount); MOZ_ASSERT_IF(direction_ == Next, index() < RegisterResultCount);
MOZ_ASSERT_IF(direction_ == Prev, index() >= count_ - RegisterResultCount);
static_assert(RegisterResultCount == 1, "expected a single register result"); static_assert(RegisterResultCount == 1, "expected a single register result");
switch (type.code()) { switch (type.code()) {