selfhost: fix parser infinite loop + lexer token limit
- Parser_Parse: add beforePos safeguard to skip unrecognized tokens instead of looping forever when parserParseDecl returns null - Lexer: increase maxTokens 4096 -> 32768; add explicit break on limit - CLI: null-check ReadFile result before String_Eq - Nim CLI: add -O2 to cc invocation for faster self-hosted builds
This commit is contained in:
+1
-1
@@ -536,7 +536,7 @@ proc cmdBuild*(args: seq[string], opts: GlobalOptions): int =
|
||||
# Compile with cc
|
||||
let outputName = if man.name != "": man.name else: "bux_out"
|
||||
let outputFile = buildDir / outputName
|
||||
let ccCmd = &"cc -pthread -o {outputFile} {cFile} {runtimeDst} {ioDst} -lm 2>&1"
|
||||
let ccCmd = &"cc -O2 -pthread -o {outputFile} {cFile} {runtimeDst} {ioDst} -lm 2>&1"
|
||||
if opts.verbose:
|
||||
printInfo(&"running: {ccCmd}", useColor)
|
||||
let (output, exitCode) = execCmdEx(ccCmd)
|
||||
|
||||
Reference in New Issue
Block a user