Skip to content

Commit

Permalink
air_node: Optimize argument passing a little
Browse files Browse the repository at this point in the history
  • Loading branch information
lhmouse committed Oct 23, 2023
1 parent ab296b8 commit 2b7233c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions asteria/runtime/air_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,13 @@ do_pop_arguments(Reference_Stack& alt_stack, Reference_Stack& stack, uint32_t co
{
ROCKET_ASSERT(count <= stack.size());
alt_stack.clear();
for(uint32_t k = count - 1; k != UINT32_MAX; --k)
alt_stack.push() = ::std::move(stack.mut_top(k));

for(uint32_t k = 0; k != count; ++k)
alt_stack.push();

for(uint32_t k = 0; k != count; ++k)
alt_stack.mut_top(k) = ::std::move(stack.mut_top(k));

stack.pop(count);
}

Expand Down

0 comments on commit 2b7233c

Please sign in to comment.