ast: bring back Table.free() for now

pull/11100/head
Alexander Medvednikov 2021-08-08 07:07:06 +03:00
parent eaf8b63dd2
commit 03ed32f805
2 changed files with 3 additions and 3 deletions

View File

@ -39,7 +39,8 @@ pub mut:
// When table.gostmts > 0, __VTHREADS__ is defined, which can be checked with `$if threads {`
}
/*
// used by vls to avoid leaks
// TODO remove manual memory management
[unsafe]
pub fn (t &Table) free() {
unsafe {
@ -59,7 +60,6 @@ pub fn (t &Table) free() {
t.used_vweb_types.free()
}
}
*/
pub type FnPanicHandler = fn (&Table, string)

View File

@ -1229,7 +1229,7 @@ fn (mut g Gen) call_args(node ast.CallExpr) {
elem_type := g.typ(arr_info.elem_type)
if g.pref.translated && args.len == 1 {
// Handle `foo(c'str')` for `fn foo(args ...&u8)`
// TODO handle this in a better place
// TODOC2V handle this in a better place
// println(g.table.type_to_str(args[0].typ))
g.expr(args[0].expr)
} else if args.len > 0 && args[args.len - 1].expr is ast.ArrayDecompose {