Skip to content

Commit

Permalink
use pop more
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleynh committed Feb 23, 2024
1 parent e2420f0 commit 303f952
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/wasm/wasm-ir-builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,18 +416,10 @@ Result<Expression*> IRBuilder::getBranchValue(Name labelName,
// Loops would receive their input type rather than their output type, if we
// supported that.
size_t numValues = (*scope)->getLoop() ? 0 : (*scope)->getResultType().size();
std::vector<Expression*> values(numValues);
for (size_t i = 0; i < numValues; ++i) {
auto val = pop();
CHECK_ERR(val);
values[numValues - 1 - i] = *val;
}
if (numValues == 0) {
return nullptr;
} else if (numValues == 1) {
return values[0];
} else {
return builder.makeTupleMake(values);
return pop(numValues);
}
}

Expand Down

0 comments on commit 303f952

Please sign in to comment.