Skip to content

[DO NOT LAND] Experiment with using pops in the current interpreter #7762

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 39 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
format
  • Loading branch information
kripken committed Jul 25, 2025
commit be17df40b9527b4612876c38da88a9b40e5c18ef
18 changes: 11 additions & 7 deletions src/wasm-interpreter.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
#include <variant>

#include "fp16.h"
#include "ir/iteration.h"
#include "ir/intrinsics.h"
#include "ir/iteration.h"
#include "ir/module-utils.h"
#include "ir/properties.h"
#include "support/bits.h"
Expand Down Expand Up @@ -3084,7 +3084,8 @@ class ModuleRunnerBase : public ExpressionRunner<SubType> {

Flow ret = callFunction(target, arguments);
#if WASM_INTERPRETER_DEBUG
std::cout << self()->indent() << "(returned to " << scope->function->name << ")\n";
std::cout << self()->indent() << "(returned to " << scope->function->name
<< ")\n";
#endif
return ret;
}
Expand Down Expand Up @@ -3114,7 +3115,8 @@ class ModuleRunnerBase : public ExpressionRunner<SubType> {
Flow ret = info.interface()->callTable(
info.name, index, curr->heapType, arguments, curr->type, *self());
#if WASM_INTERPRETER_DEBUG
std::cout << self()->indent() << "(returned to " << scope->function->name << ")\n";
std::cout << self()->indent() << "(returned to " << scope->function->name
<< ")\n";
#endif
return ret;
}
Expand All @@ -3140,7 +3142,8 @@ class ModuleRunnerBase : public ExpressionRunner<SubType> {

Flow ret = callFunction(targetRef.getFunc(), arguments);
#if WASM_INTERPRETER_DEBUG
std::cout << self()->indent() << "(returned to " << scope->function->name << ")\n";
std::cout << self()->indent() << "(returned to " << scope->function->name
<< ")\n";
#endif
return ret;
}
Expand Down Expand Up @@ -4065,7 +4068,8 @@ class ModuleRunnerBase : public ExpressionRunner<SubType> {
FunctionScope scope(function, arguments, *self());

#if WASM_INTERPRETER_DEBUG
std::cout << self()->indent() << "entering " << function->name << "\n with arguments:\n";
std::cout << self()->indent() << "entering " << function->name
<< "\n with arguments:\n";
for (unsigned i = 0; i < arguments.size(); ++i) {
std::cout << " $" << i << ": " << arguments[i] << '\n';
}
Expand All @@ -4074,8 +4078,8 @@ class ModuleRunnerBase : public ExpressionRunner<SubType> {
flow = self()->visit(function->body);

#if WASM_INTERPRETER_DEBUG
std::cout << self()->indent() << "exiting " << function->name << " with " << flow.values
<< '\n';
std::cout << self()->indent() << "exiting " << function->name << " with "
<< flow.values << '\n';
#endif

if (flow.breakTo != RETURN_CALL_FLOW) {
Expand Down