Files
Nim/compiler
metagn efd603eb28 don't cascade vmgen errors in nim check without error outputs (#24365)
refs #23625, refs #24289

Encountered in #24360 but could not reproduce minimally: overloading on
static parameters can work with the normal compile commands but crash
`nim check`. Static overloading relies on `tryConstExpr` which recovers
from things like `globalError` and fails softly, in this case this can
happen when a variable etc. is not available to evaluate in the VM. But
with `nim check`, the compiler does not throw an exception in this case,
and instead tries to keep generating the entire expression in the VM,
which can cause crashes.

To fix this, when the compiler has no error outputs even on `nim check`,
we raise a global error so that the VM code generation stops early. This
fixes both `tryConstExpr` and speeds up `nim check`, because no error
outputs means we don't need cascading errors.
2024-10-26 17:48:39 +02:00
..
2023-12-15 10:20:57 +01:00
2024-06-07 09:01:30 +02:00
2017-01-07 22:35:09 +01:00
2024-04-22 13:04:30 +02:00
2024-10-19 16:39:15 +02:00
2023-12-17 18:43:52 +01:00
2023-12-13 10:29:58 +01:00
2021-01-12 09:36:51 +01:00
2024-07-09 09:29:45 +02:00
2023-12-17 18:43:52 +01:00
2023-07-02 22:36:05 +02:00
2023-11-06 18:33:28 +01:00
2024-03-16 08:35:18 +08:00
2023-12-25 07:12:54 +01:00

Nim Compiler

  • This directory contains the Nim compiler written in Nim.
  • Note that this code has been translated from a bootstrapping version written in Pascal.
  • So the code is not a poster child of good Nim code.

See Internals of the Nim Compiler for more information.