MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / removeInactiveHandler

Method removeInactiveHandler

include/runtime/stackmgr.h:170–184  ·  view source on GitHub ↗

Unsafe remove inactive handler.

Source from the content-addressed store, hash-verified

168
169 /// Unsafe remove inactive handler.
170 void removeInactiveHandler(AST::InstrView::iterator PC) noexcept {
171 assuming(!FrameStack.empty());
172 // First pop the inactive handlers. Br instructions may cause the handlers
173 // in current frame becomes inactive.
174 auto &HandlerStack = FrameStack.back().HandlerStack;
175 while (!HandlerStack.empty()) {
176 auto &Handler = HandlerStack.back();
177 if (PC < Handler.Try ||
178 PC > Handler.Try + Handler.Try->getTryCatch().JumpEnd) {
179 HandlerStack.pop_back();
180 } else {
181 break;
182 }
183 }
184 }
185
186 /// Unsafe erase value stack.
187 void eraseValueStack(uint32_t EraseBegin, uint32_t EraseEnd) noexcept {

Callers 2

enterFunctionMethod · 0.80
throwExceptionMethod · 0.80

Calls 2

backMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected