mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
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
This commit is contained in:
parent
52bd0d1900
commit
d65f7458bc
6 changed files with 13 additions and 31 deletions
1
node.h
1
node.h
|
@ -470,6 +470,7 @@ typedef struct node_buffer_struct node_buffer_t;
|
|||
typedef struct rb_ast_body_struct {
|
||||
const NODE *root;
|
||||
VALUE compile_option;
|
||||
int line_count;
|
||||
} rb_ast_body_t;
|
||||
typedef struct rb_ast_struct {
|
||||
VALUE flags;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue