cgen: use more efficient array.pop()

pull/6672/head
Alexander Medvednikov 2020-10-23 22:52:50 +02:00
parent 3b3501cf09
commit 334497fdc0
1 changed files with 2 additions and 2 deletions

View File

@ -1047,7 +1047,7 @@ fn (mut g Gen) stmt(node ast.Stmt) {
g.writeln('// TypeDecl') g.writeln('// TypeDecl')
} }
} }
g.stmt_path_pos.delete(g.stmt_path_pos.len - 1) g.stmt_path_pos.pop()
} }
fn (mut g Gen) write_defer_stmts() { fn (mut g Gen) write_defer_stmts() {
@ -4762,7 +4762,7 @@ fn (mut g Gen) or_block(var_name string, or_block ast.OrExpr, return_type table.
if g.inside_ternary == 0 && !(expr_stmt.expr is ast.IfExpr) { if g.inside_ternary == 0 && !(expr_stmt.expr is ast.IfExpr) {
g.writeln(';') g.writeln(';')
} }
g.stmt_path_pos.delete(g.stmt_path_pos.len - 1) g.stmt_path_pos.pop()
} else { } else {
g.stmt(stmt) g.stmt(stmt)
} }