roadmap: io streams
parent
059722f211
commit
303b65c0b9
|
@ -12,6 +12,7 @@
|
|||
- make `-autofree` the default
|
||||
- parallel parser (and maybe checker/gen?)
|
||||
- `recover()` from panics
|
||||
- IO streams
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -742,6 +742,8 @@ fn (mut g Gen) stmt(node ast.Stmt) {
|
|||
}
|
||||
}
|
||||
if g.pref.use_cache {
|
||||
// We are using prebuilt modules, we do not need to generate
|
||||
// their functions in main.c.
|
||||
if node.mod != 'main' {
|
||||
skip = true
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ fn (mut g Gen) gen_fn_decl(it ast.FnDecl, skip bool) {
|
|||
fargs, fargtypes := g.fn_args(it.args, it.is_variadic)
|
||||
if it.no_body || (g.pref.use_cache && it.is_builtin) || skip {
|
||||
// Just a function header. Builtin function bodies are defined in builtin.o
|
||||
g.definitions.writeln('); // NO BODY')
|
||||
g.definitions.writeln(');') // // NO BODY')
|
||||
g.writeln(');')
|
||||
return
|
||||
}
|
||||
|
@ -142,11 +142,11 @@ fn (mut g Gen) gen_fn_decl(it ast.FnDecl, skip bool) {
|
|||
g.profile_fn(it.name)
|
||||
}
|
||||
g.stmts(it.stmts)
|
||||
// ////////////
|
||||
//
|
||||
if it.return_type == table.void_type {
|
||||
g.write_defer_stmts_when_needed()
|
||||
}
|
||||
// /////////
|
||||
//
|
||||
if g.autofree && !g.pref.experimental {
|
||||
// TODO: remove this, when g.write_autofree_stmts_when_needed works properly
|
||||
g.autofree_scope_vars(it.body_pos.pos)
|
||||
|
|
Loading…
Reference in New Issue