Cleanup DFA (#13173)

This commit is contained in:
Clyybber 2020-01-16 20:15:50 +01:00 • committed by GitHub
commit e3acb2d12c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 36 deletions

View file

@ -168,13 +168,13 @@ proc initialized(code: ControlFlowGraph; pc: int,
if comesFrom == target: return pc
inc pc
of use:
let v = code[pc].sym
let v = code[pc].n.sym
if v.kind != skParam and v.id notin init:
# attempt to read an uninit'ed variable
uninit.incl v.id
inc pc
of def:
let v = code[pc].sym
let v = code[pc].n.sym
init.incl v.id
inc pc
return pc