summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-01 16:55:30 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-01 16:55:30 +0000
commit5874de95e8df1d051001cf53614c1d245c1ac5ae (patch)
tree3bd25f3a413a1637a826552181c1568b3bbeb9c0 /vm_core.h
parent498324c5d3cd08c2c306a4f91e3a11b7fda22835 (diff)
* Add coverage measurement constant COVERAGE__. This constant is not
for casual use. Usage: (1) assign {} to COVERAGE__, (2) require or load Ruby source file, and (3) COVERAGE__["sourcefilepath"] will return an array whose elements represent number of executions per line of source code. * vm_core.h: add field of coverage array to iseq. * iseq.c (prepare_iseq_build): ditto. * insns.def (trace): update coverage array. * parse.y (coverage): create and initialize coverage array. * compile.h (ADD_TRACE): add trace instruction to update covearge array. * thread.c (clear_coverage): delete coverage array when forking. Otherwise, double count of coverage may occur. * lib/coverage.rb: sample coverage measurement tool. * error.c: distinguish explicitly between parse_in_eval and mild_compile_error. * load.c: ditto. * vm_eval.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/vm_core.h b/vm_core.h
index 0614e660dc..700c33f224 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -201,6 +201,7 @@ struct rb_iseq_struct {
VALUE *iseq_encoded; /* encoded iseq */
unsigned long iseq_size;
VALUE mark_ary; /* Array: includes operands which should be GC marked */
+ VALUE coverage; /* coverage array */
/* insn info, must be freed */
struct iseq_insn_info_entry *insn_info_table;
@@ -448,6 +449,7 @@ struct rb_thread_struct
struct rb_vm_trap_tag *trap_tag;
int parse_in_eval;
+ int mild_compile_error;
/* storage */
st_table *local_storage;