fix(qbe): use extraData instead of child3 for hIf else-branch
Block lowering overwrites child3 for statement chaining. Else block is stored in extraData by hir_lower (matches c_backend). Fixes QBE parse error 'last block misses jump' in if-without-else chains.
This commit is contained in:
@@ -312,7 +312,7 @@ func Sema_Analyze(mod: *Module) -> *Sema {
|
||||
let s: *Sema = bux_alloc(sizeof(Sema)) as *Sema;
|
||||
s.module = mod;
|
||||
s.scope = bux_alloc(sizeof(Scope)) as *Scope;
|
||||
s.scope.symbols = bux_alloc(256 as uint * sizeof(Symbol)) as *Symbol;
|
||||
s.scope.symbols = bux_alloc(1024 as uint * sizeof(Symbol)) as *Symbol;
|
||||
s.scope.count = 0;
|
||||
s.scope.parent = null as *Scope;
|
||||
s.hasError = false;
|
||||
|
||||
Reference in New Issue
Block a user