parser,util: improve libleak false positive detection rate
parent
3d800b12e8
commit
4c67c01e72
|
@ -18,7 +18,7 @@ fn (p &Parser) prepend_mod(name string) string {
|
||||||
if p.builtin_mod {
|
if p.builtin_mod {
|
||||||
return name
|
return name
|
||||||
}
|
}
|
||||||
return '${p.mod}.$name'
|
return p.mod + '.' + name
|
||||||
}
|
}
|
||||||
|
|
||||||
fn (p &Parser) is_used_import(alias string) bool {
|
fn (p &Parser) is_used_import(alias string) bool {
|
||||||
|
|
|
@ -419,7 +419,7 @@ pub fn (mut p Parser) parse_block() []ast.Stmt {
|
||||||
|
|
||||||
pub fn (mut p Parser) parse_block_no_scope(is_top_level bool) []ast.Stmt {
|
pub fn (mut p Parser) parse_block_no_scope(is_top_level bool) []ast.Stmt {
|
||||||
p.check(.lcbr)
|
p.check(.lcbr)
|
||||||
mut stmts := []ast.Stmt{}
|
mut stmts := []ast.Stmt{cap: 20}
|
||||||
if p.tok.kind != .rcbr {
|
if p.tok.kind != .rcbr {
|
||||||
mut count := 0
|
mut count := 0
|
||||||
for p.tok.kind !in [.eof, .rcbr] {
|
for p.tok.kind !in [.eof, .rcbr] {
|
||||||
|
|
|
@ -18,6 +18,7 @@ pub fn new_timers(should_print bool) &Timers {
|
||||||
return &Timers{
|
return &Timers{
|
||||||
swatches: map[string]time.StopWatch{}
|
swatches: map[string]time.StopWatch{}
|
||||||
should_print: should_print
|
should_print: should_print
|
||||||
|
already_shown: []string{cap: 100}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue