aboutsummaryrefslogtreecommitdiffstats
path: root/compile.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-22 10:38:56 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-22 10:38:56 +0000
commita023c34441e57a8d8553f28790fc458ebf4f27be (patch)
treeedb94c2a2caf7c5727b9b2f87a94db94d8669321 /compile.c
parent3efe31fe0406219df5d9f4e57a0d7586eec96701 (diff)
downloadruby-a023c34441e57a8d8553f28790fc458ebf4f27be.tar.gz
parse.y: remove coverage-related code fragments
The code fragments that initializes coverage data were scattered into both parse.y and compile.c. parse.y allocated a coverage data, and compile.c initialize the data. To remove this cross-cutting concern, this change moves the allocation from "coverage" function of parse.y to "rb_iseq_new_top" of iseq.c. For the sake, parse.y just counts the line number of the original source code, and the number is passed via rb_ast_body_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/compile.c b/compile.c
index 2788372d7b..c424092ae8 100644
--- a/compile.c
+++ b/compile.c
@@ -1244,6 +1244,7 @@ new_child_iseq(rb_iseq_t *iseq, const NODE *const node,
ast.root = node;
ast.compile_option = 0;
+ ast.line_count = -1;
debugs("[new_child_iseq]> ---------------------------------------\n");
ret_iseq = rb_iseq_new_with_opt(&ast, name,