fix release mode builds by building parse table

This commit is contained in:
Mitchell Hashimoto
2022-04-29 20:02:22 -07:00
parent 308050dc7d
commit a95e72eced

View File

@ -34,16 +34,12 @@ fn genTable() Table {
@setEvalBranchQuota(15000); @setEvalBranchQuota(15000);
var result: Table = undefined; var result: Table = undefined;
// In debug mode, we initialize everything so that we can detect if // Initialize everything so every state transition exists
// anything is overwritten. No value should be set more than once var i: u8 = 0;
// since the state machine diagram is exact. while (i < result.len) : (i += 1) {
if (builtin.mode == .Debug) { var j: u8 = 0;
var i: u8 = 0; while (j < result[0].len) : (j += 1) {
while (i < result.len) : (i += 1) { result[i][j] = transition(.anywhere, .none);
var j: u8 = 0;
while (j < result[0].len) : (j += 1) {
result[i][j] = transition(.anywhere, .none);
}
} }
} }