IonBuilder can only fail via OOM, by disabling the script, or to indicate a retry due to bad inlining or the new script properties analysis needing to be performed. Other stages of Ion compilation can generally only fail via OOM. The compiler uses a variety of error reporting strategies, though: setting OOM flags or other failure fields, using a ballast and failing if it can't be refilled, and explicitly returning failure codes. It would be nice if this was cleaned up, by removing almost all explicit error returns and error checking in the compiler, and relying on failure fields in the builder or macro assembler for propagating failure. The ballast would be used to allow compiler things like MIR definitions to be allocated infallibly, as they are now.
Summary: Avoid explicit error returns and checks during Ion compilation → [meta] Avoid explicit error returns and checks during Ion compilation
You need to log in before you can comment on or make changes to this bug.