-
Notifications
You must be signed in to change notification settings - Fork 28
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
wasm file generation error #138
Comments
Hi @louisvangeldrop, thanks for reporting this issue, we've fixed in #139 Would you mind if we add this code snippet into our test case? |
Hallo @xujuntwt95329 , Of course you may use the code snippet in your test case. I feel honored that I can help you. |
I also use the following function to calculate a random number: var m_w: i32_ = 123456789; export function random() {
|
Thanks a lot!
Yes, this should be the expected performance result by design as long as you don't use |
Thanks for reporting this, there must be something wrong, we will fix it soon. |
This is the code I use to measure the performance. Especially the gradeUp-function is leading. The function returns an integer vector being the permutation of indices that places the vector alpha in ascending order.
|
Code:
export function indexGenerator(alpha: i32): i32[] {
let results: i32[] = new Array(alpha);
for (let counter: i32 = 0; counter < alpha; counter++) {
results[counter] = counter;
}
return results;
};
Error:
Aborted(Assertion failed: Type::isSubType(newType, oldType), at: /home/runner/work/binaryen.js/binaryen.js/binaryen/src/passes/LocalSubtyping.cpp,148,doWalkFunction)
[2024-01-07T22:46:19.148] [ERROR] console - Aborted(Assertion failed: Type::isSubType(newType, oldType), at: /home/runner/work/binaryen.js/binaryen.js/binaryen/src/passes/LocalSubtyping.cpp,148,doWalkFunction). Build with -sASSERTIONS for more info.
Error details is in 'C:\Users\louis\AppData\Local\Temp\ts2wasm-log-r6GkvW\error.log'
Log details is in 'C:\Users\louis\AppData\Local\Temp\ts2wasm-log-r6GkvW\trace.log'
However the following code will generate the wasm-file:
New Code:
type i32_ = i32;
export function indexGenerator(alpha: i32_): i32_[] {
let results: i32_[] = new Array(alpha);
for (let counter: i32_ = 0; counter < alpha; counter++) {
results[counter] = counter;
}
return results;
};
The text was updated successfully, but these errors were encountered: