-
Notifications
You must be signed in to change notification settings - Fork 758
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
undefined asyncify_get_state #7317
Comments
cc: @kripken |
Here is a patch that unblocks me for the time being: diff --git a/src/passes/Asyncify.cpp b/src/passes/Asyncify.cpp
index 994142e48..f6500ed2c 100644
--- a/src/passes/Asyncify.cpp
+++ b/src/passes/Asyncify.cpp
@@ -349,6 +349,7 @@ static const Name START_UNWIND = "start_unwind";
static const Name STOP_UNWIND = "stop_unwind";
static const Name START_REWIND = "start_rewind";
static const Name STOP_REWIND = "stop_rewind";
+static const Name GET_STATE = "get_state";
static const Name ASYNCIFY_GET_CALL_INDEX = "__asyncify_get_call_index";
static const Name ASYNCIFY_CHECK_CALL_INDEX = "__asyncify_check_call_index";
@@ -569,6 +570,8 @@ public:
renamings[func->name] = ASYNCIFY_START_REWIND;
} else if (func->base == STOP_REWIND) {
renamings[func->name] = ASYNCIFY_STOP_REWIND;
+ } else if (func->base == GET_STATE) {
+ renamings[func->name] = ASYNCIFY_GET_STATE;
} else {
Fatal() << "call to unidenfied asyncify import: " << func->base;
}
@@ -624,6 +627,8 @@ public:
} else if (target->base == STOP_REWIND) {
info.canChangeState = true;
info.isTopMostRuntime = true;
+ } else if (target->base == GET_STATE) {
+ // NOTE: asyncify.get_state doesn't actually change the state; NOOP
} else {
WASM_UNREACHABLE("call to unidenfied asyncify import");
}
|
The patch makes sense to me (though we don't need the last part that is just a comment, I think). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there currently a recommended way to go about calling asyncify_get_state from inside native code? To manage this with other methods currently I'm doing:
Which all get successfully turned into exports. But for
asyncify_get_state
the pass raises an error:What I'm trying to achieve:
I'm using binaryen-version_121
edit:
looking at the pass more closely I can see
get_state
is missing from here & here, but the documentation says that it should be thereThe text was updated successfully, but these errors were encountered: