summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-22 10:55:02 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-22 10:55:02 (GMT)
commit0d775f2a3c402310b71a581e368f347c52af78e5 (patch)
treebc30b3a636d69901ca2742534704d7acd0daefef /vm_core.h
parent2f5897e6b67d78d65c1aa3c9c16c0dfb65c38416 (diff)
* vm_core.h: separate rb_iseq_body into rb_iseq_constant_body and
rb_iseq_variable_body (rb_iseq_t::variable_body). rb_iseq_variable_body can be modified after compilation. * compile.c: use rb_iseq_t::variable_body. * iseq.c: ditto. * thread.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/vm_core.h b/vm_core.h
index f4c81fc..6e3d9cc 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -241,11 +241,7 @@ typedef struct rb_iseq_location_struct {
VALUE first_lineno; /* TODO: may be unsigned short */
} rb_iseq_location_t;
-struct rb_iseq_body {
- /***************/
- /* static data */
- /***************/
-
+struct rb_iseq_constant_body {
enum iseq_type {
ISEQ_TYPE_TOP,
ISEQ_TYPE_METHOD,
@@ -267,7 +263,6 @@ struct rb_iseq_body {
unsigned int line_info_size;
const VALUE mark_ary; /* Array: includes operands which should be GC marked */
- const VALUE coverage; /* coverage array */
/* insn info, must be freed */
struct iseq_line_info_entry *line_info_table;
@@ -360,12 +355,11 @@ struct rb_iseq_body {
/* for child iseq */
const struct rb_iseq_struct *parent_iseq;
struct rb_iseq_struct *local_iseq; /* local_iseq->flip_cnt can be modified */
+};
- /****************/
- /* dynamic data */
- /****************/
+struct rb_iseq_variable_body {
+ const VALUE coverage; /* coverage array */
- /* misc */
rb_num_t flip_cnt;
/* original iseq, before encoding
@@ -378,8 +372,8 @@ struct rb_iseq_body {
struct rb_iseq_struct {
VALUE flags;
struct iseq_compile_data *compile_data; /* used at compile time */
- struct rb_iseq_body *body;
- VALUE dummy1;
+ struct rb_iseq_constant_body *body;
+ struct rb_iseq_variable_body *variable_body;
VALUE dummy2;
};