-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
js codegen bug for case
statement with just else
branch
#24031
Labels
Comments
!nim js case 0
else: discard |
🐧 Linux bisect by @juancarlospaco (collaborator)devel 👎 FAILOutput
IRCompiled filesize401 bytes (401 bytes)
var framePtr = null;
var excHandler = 0;
var lastJSError = null;
var F = {procname: "module temp", prev: framePtr, filename: "/home/runner/work/Nim/Nim/temp.nim", line: 0};
framePtr = F;
else{
}
framePtr = F.prev;
var F = {procname: "module temp", prev: framePtr, filename: "/home/runner/work/Nim/Nim/temp.nim", line: 0};
framePtr = F;
framePtr = F.prev; Stats
ASTnnkStmtList.newTree(
nnkCaseStmt.newTree(
newLit(0),
nnkElse.newTree(
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
)
)
) stable 👎 FAILOutput
IRCompiled filesize400 bytes (400 bytes)
var framePtr = null;
var excHandler = 0;
var lastJSError = null;
var F = {procname: "module temp", prev: framePtr, filename: "/home/runner/work/Nim/Nim/temp.nim", line: 0};
framePtr = F;
else{
}
framePtr = F.prev;
var F = {procname: "module temp", prev: framePtr, filename: "/home/runner/work/Nim/Nim/temp.nim", line: 0};
framePtr = F;
framePtr = F.prev; Stats
ASTnnkStmtList.newTree(
nnkCaseStmt.newTree(
newLit(0),
nnkElse.newTree(
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
)
)
) 2.0.8 👎 FAILOutput
IRCompiled filesize400 bytes (400 bytes)
var framePtr = null;
var excHandler = 0;
var lastJSError = null;
var F = {procname: "module temp", prev: framePtr, filename: "/home/runner/work/Nim/Nim/temp.nim", line: 0};
framePtr = F;
else{
}
framePtr = F.prev;
var F = {procname: "module temp", prev: framePtr, filename: "/home/runner/work/Nim/Nim/temp.nim", line: 0};
framePtr = F;
framePtr = F.prev; Stats
ASTnnkStmtList.newTree(
nnkCaseStmt.newTree(
newLit(0),
nnkElse.newTree(
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
)
)
) 2.0.0 👎 FAILOutput
IRCompiled filesize400 bytes (400 bytes)
var framePtr = null;
var excHandler = 0;
var lastJSError = null;
var F = {procname: "module temp", prev: framePtr, filename: "/home/runner/work/Nim/Nim/temp.nim", line: 0};
framePtr = F;
else{
}
framePtr = F.prev;
var F = {procname: "module temp", prev: framePtr, filename: "/home/runner/work/Nim/Nim/temp.nim", line: 0};
framePtr = F;
framePtr = F.prev; Stats
ASTnnkStmtList.newTree(
nnkCaseStmt.newTree(
newLit(0),
nnkElse.newTree(
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
)
)
) 1.6.20 👍 OKOutput
IRCompiled filesize566 bytes (566 bytes)
var framePtr = null;
var excHandler = 0;
var lastJSError = null;
var F = {procname: "module temp", prev: framePtr, filename: "/home/runner/work/Nim/Nim/temp.nim", line: 0};
framePtr = F;
switch (0) {
default:
break;
}
framePtr = F.prev;
var F = {procname: "module temp", prev: framePtr, filename: "/home/runner/work/Nim/Nim/temp.nim", line: 0};
framePtr = F;
framePtr = F.prev;
var F = {procname: "module temp", prev: framePtr, filename: "/home/runner/work/Nim/Nim/temp.nim", line: 0};
framePtr = F;
framePtr = F.prev; Stats
1.4.8 👍 OKOutput
IRCompiled filesize538 bytes (538 bytes)
var framePtr = null;
var excHandler = 0;
var lastJSError = null;
var F={procname:"module temp",prev:framePtr,filename:"/home/runner/work/Nim/Nim/temp.nim",line:0};
framePtr = F;
switch (0) {
default:
break;
}
framePtr = F.prev;
var F={procname:"module temp",prev:framePtr,filename:"/home/runner/work/Nim/Nim/temp.nim",line:0};
framePtr = F;
framePtr = F.prev;
var F={procname:"module temp",prev:framePtr,filename:"/home/runner/work/Nim/Nim/temp.nim",line:0};
framePtr = F;
framePtr = F.prev; Stats
1.2.18 👍 OKOutput
IRCompiled filesize807 bytes (807 bytes)
var framePtr = null;
var excHandler = 0;
var lastJSError = null;
if (typeof Int8Array === 'undefined') Int8Array = Array;
if (typeof Int16Array === 'undefined') Int16Array = Array;
if (typeof Int32Array === 'undefined') Int32Array = Array;
if (typeof Uint8Array === 'undefined') Uint8Array = Array;
if (typeof Uint16Array === 'undefined') Uint16Array = Array;
if (typeof Uint32Array === 'undefined') Uint32Array = Array;
if (typeof Float32Array === 'undefined') Float32Array = Array;
if (typeof Float64Array === 'undefined') Float64Array = Array;
process.exitCode = 0;
var global_raise_hook_142018 = [null];
var local_raise_hook_142023 = [null];
var out_of_mem_hook_142026 = [null];
var unhandled_exception_hook_142031 = [null];
switch (0) {
default:
break;
} Stats
1.0.10 👍 OKOutput
IRCompiled filesize789 bytes (789 bytes)
var framePtr = null;
var excHandler = 0;
var lastJSError = null;
if (typeof Int8Array === 'undefined') Int8Array = Array;
if (typeof Int16Array === 'undefined') Int16Array = Array;
if (typeof Int32Array === 'undefined') Int32Array = Array;
if (typeof Uint8Array === 'undefined') Uint8Array = Array;
if (typeof Uint16Array === 'undefined') Uint16Array = Array;
if (typeof Uint32Array === 'undefined') Uint32Array = Array;
if (typeof Float32Array === 'undefined') Float32Array = Array;
if (typeof Float64Array === 'undefined') Float64Array = Array;
process.exitCode = 0;
var global_raise_hook_18618 = [null];
var local_raise_hook_18623 = [null];
var out_of_mem_hook_18626 = [null];
switch (0) {
default:
break;
} Stats
??? ➡️ 🐛DiagnosticsThe commit that introduced the bug can not be found, but the bug is in the commits: (Can not find the commit because Nim can not be re-built commit-by-commit to bisect). Stats
🤖 Bug found in |
@bung87 See #24031 (comment) looks like your PR introduced a bug #20548 |
Could also just disallow this, not a critical regression |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
generates
whithout preceding
if
Nim Version
Nim Compiler Version 2.0.8 [Linux: amd64]
Compiled at 2024-07-03
Copyright (c) 2006-2023 by Andreas Rumpf
git hash: 5935c3b
active boot switches: -d:release
Current Output
No response
Expected Output
No response
Known Workarounds
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: