1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

Revert "cgen.prepend_to_statement()"

This reverts commit 507c71ad80.
This commit is contained in:
Alexander Medvednikov
2019-12-11 20:37:39 +03:00
parent 507c71ad80
commit 47f9c02331
3 changed files with 15 additions and 27 deletions

View File

@@ -77,16 +77,6 @@ fn (g mut CGen) genln(s string) {
}
}
// same as `set_placeholder(0, s)`, but faster
fn (g mut CGen) prepend_to_statement(s string) {
if g.is_tmp {
g.tmp_line = s + g.tmp_line
return
}
g.lines << s
g.prev_line = g.cur_line
}
fn (g mut CGen) gen(s string) {
if g.nogen || g.pass != .main {
return
@@ -170,10 +160,6 @@ fn (g mut CGen) set_placeholder(pos int, val string) {
if g.nogen || g.pass != .main {
return
}
//if pos == 0 {
//g.prepend_to_statement(val)
//return
//}
// g.lines.set(pos, val)
if g.is_tmp {
left := g.tmp_line[..pos]