You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fixes#24288, refs #23625
Since #23625 "cannot evaluate" errors during VM code generation are
"soft" errors with `nim check`, i.e. the code generation isn't halted
(except for the current proc which `return`s which can cause wrong
codegen) and the expression is still attempted to be evaluated. Now,
these errors signal to the VM that the current generated VM code cannot
be evaluated, and so instead of evaluating, an error node is returned.
This keeps the benefit of the "soft" errors without potentially crashing
the compiler on improperly generated VM code. Although maybe the
compiler might not be able to handle the generated error node in some
cases.
This fixes the chame example in #24288 but this is not tested in CI.
Presumably it or the compiler was doing something like `compiles()` on
code that can't run in the VM.
I would accept nicer ways of tracking non-evaluability than
`c.cannotEval = true` but I tried to keep it as harmless as possible.
(cherry picked from commit def1fea)
Description
Raising here since it seems to be compiler regression.
Ran into this problem when importing the minidom module from chame
Nim Version
Nim Compiler Version 2.2.1 [Linux: amd64]
Compiled at 2024-10-11
Copyright (c) 2006-2024 by Andreas Rumpf
git hash: e9a4d09
active boot switches: -d:release
Current Output
Expected Output
Known Workarounds
No response
Additional Information
Bisected and tracked it down to #23625.
Turning on vmTrace the error seems to be here, I wasn't able to minify to a small test case
The text was updated successfully, but these errors were encountered: