refactor(dev): unify user-facing diagnostics

This commit is contained in:
Lane0218
2026-03-11 21:42:33 +08:00
parent 9070775187
commit e9d7b4a058
10 changed files with 56 additions and 40 deletions

View File

@@ -3,6 +3,8 @@
#include <stdexcept>
#include <vector>
#include "utils/Log.h"
namespace mir {
namespace {
@@ -17,8 +19,7 @@ void RunFrameLowering(MachineFunction& function) {
for (const auto& slot : function.frame_slots()) {
cursor += slot.size;
if (-cursor < -256) {
throw std::runtime_error(
"Lab3 MVP 后端暂不支持超过 64 个 i32 栈槽的函数");
throw std::runtime_error(FormatError("mir", "暂不支持过大的栈帧"));
}
}